summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-06-24 02:08:15 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-07-04 02:44:37 +0200
commit998f21e02a725cd553d7c278819f67cd81295af4 (patch)
tree4bd158018e9302c31367b00c01cd2b41eb228414
downloadkbibtex-998f21e02a725cd553d7c278819f67cd81295af4.tar.gz
kbibtex-998f21e02a725cd553d7c278819f67cd81295af4.zip
Initial import
-rw-r--r--AUTHORS1
-rw-r--r--BUGS1
-rw-r--r--COPYING340
-rw-r--r--ChangeLog1598
-rw-r--r--Doxyfile266
-rw-r--r--INSTALL167
-rw-r--r--Makefile.am22
-rw-r--r--Makefile.cvs10
-rw-r--r--Makefile.in885
-rw-r--r--NEWS66
-rw-r--r--README9
-rw-r--r--TODO13
-rw-r--r--acinclude.m411863
-rw-r--r--aclocal.m41021
-rw-r--r--config.h.in253
-rwxr-xr-xconfigure35299
-rw-r--r--configure.files2
-rw-r--r--configure.in139
-rw-r--r--configure.in.in20
-rw-r--r--doc/Makefile.am1
-rw-r--r--doc/Makefile.in721
-rw-r--r--doc/en/Makefile.am2
-rw-r--r--doc/en/Makefile.in606
-rw-r--r--doc/en/index.docbook106
-rw-r--r--kbibtex.kdevelop299
-rw-r--r--kbibtex.kdevelop.pcsbin0 -> 3610538 bytes
-rw-r--r--man/Makefile.am2
-rw-r--r--man/Makefile.in589
-rw-r--r--man/kbibtex.125
-rw-r--r--po/Makefile.am2
-rw-r--r--po/Makefile.in628
-rw-r--r--po/de.po2799
-rw-r--r--po/fr.po2906
-rw-r--r--po/it.po2864
-rw-r--r--po/kbibtex.pot2655
-rwxr-xr-xpo/messages.sh28
-rw-r--r--po/pl.po2765
-rw-r--r--po/ru.po3038
-rw-r--r--src/Makefile.am92
-rw-r--r--src/Makefile.in1710
-rw-r--r--src/comment.cpp93
-rw-r--r--src/comment.h49
-rw-r--r--src/commentwidget.cpp98
-rw-r--r--src/commentwidget.h55
-rw-r--r--src/documentlistview.cpp768
-rw-r--r--src/documentlistview.h127
-rw-r--r--src/documentlistviewitem.cpp151
-rw-r--r--src/documentlistviewitem.h55
-rw-r--r--src/documentsourceview.cpp380
-rw-r--r--src/documentsourceview.h96
-rw-r--r--src/documentwidget.cpp1740
-rw-r--r--src/documentwidget.h174
-rw-r--r--src/element.cpp50
-rw-r--r--src/element.h49
-rw-r--r--src/encoder.cpp25
-rw-r--r--src/encoder.h54
-rw-r--r--src/encoderlatex.cpp876
-rw-r--r--src/encoderlatex.h78
-rw-r--r--src/encoderxml.cpp127
-rw-r--r--src/encoderxml.h64
-rw-r--r--src/entry.cpp714
-rw-r--r--src/entry.h92
-rw-r--r--src/entryfield.cpp227
-rw-r--r--src/entryfield.h57
-rw-r--r--src/entrywidget.cpp677
-rw-r--r--src/entrywidget.h158
-rw-r--r--src/entrywidgetauthor.cpp114
-rw-r--r--src/entrywidgetauthor.h60
-rw-r--r--src/entrywidgetexternal.cpp297
-rw-r--r--src/entrywidgetexternal.h76
-rw-r--r--src/entrywidgetkeyword.cpp283
-rw-r--r--src/entrywidgetkeyword.h93
-rw-r--r--src/entrywidgetmisc.cpp172
-rw-r--r--src/entrywidgetmisc.h57
-rw-r--r--src/entrywidgetother.cpp319
-rw-r--r--src/entrywidgetother.h96
-rw-r--r--src/entrywidgetpublication.cpp563
-rw-r--r--src/entrywidgetpublication.h80
-rw-r--r--src/entrywidgetsource.cpp161
-rw-r--r--src/entrywidgetsource.h61
-rw-r--r--src/entrywidgettab.cpp91
-rw-r--r--src/entrywidgettab.h62
-rw-r--r--src/entrywidgettitle.cpp136
-rw-r--r--src/entrywidgettitle.h55
-rw-r--r--src/entrywidgetuserdefined.cpp144
-rw-r--r--src/entrywidgetuserdefined.h54
-rw-r--r--src/entrywidgetwarningsitem.cpp62
-rw-r--r--src/entrywidgetwarningsitem.h46
-rw-r--r--src/fieldlineedit.cpp369
-rw-r--r--src/fieldlineedit.h106
-rw-r--r--src/fieldlistview.cpp455
-rw-r--r--src/fieldlistview.h101
-rw-r--r--src/file.cpp402
-rw-r--r--src/file.h108
-rw-r--r--src/fileexporter.cpp36
-rw-r--r--src/fileexporter.h63
-rw-r--r--src/fileexporterbibtex.cpp491
-rw-r--r--src/fileexporterbibtex.h88
-rw-r--r--src/fileexporterbibutils.cpp259
-rw-r--r--src/fileexporterbibutils.h70
-rw-r--r--src/fileexporterdocbook5.cpp96
-rw-r--r--src/fileexporterdocbook5.h54
-rw-r--r--src/fileexporterexternal.cpp179
-rw-r--r--src/fileexporterexternal.h66
-rw-r--r--src/fileexporterpdf.cpp197
-rw-r--r--src/fileexporterpdf.h62
-rw-r--r--src/fileexporterps.cpp135
-rw-r--r--src/fileexporterps.h58
-rw-r--r--src/fileexporterris.cpp200
-rw-r--r--src/fileexporterris.h50
-rw-r--r--src/fileexporterrtf.cpp134
-rw-r--r--src/fileexporterrtf.h56
-rw-r--r--src/fileexportertoolchain.cpp232
-rw-r--r--src/fileexportertoolchain.h70
-rw-r--r--src/fileexporterxml.cpp228
-rw-r--r--src/fileexporterxml.h61
-rw-r--r--src/fileexporterxslt.cpp95
-rw-r--r--src/fileexporterxslt.h50
-rw-r--r--src/fileimporter.cpp57
-rw-r--r--src/fileimporter.h66
-rw-r--r--src/fileimporterbibtex.cpp658
-rw-r--r--src/fileimporterbibtex.h96
-rw-r--r--src/fileimporterbibutils.cpp296
-rw-r--r--src/fileimporterbibutils.h72
-rw-r--r--src/fileimporterexternal.cpp150
-rw-r--r--src/fileimporterexternal.h72
-rw-r--r--src/fileimporterris.cpp517
-rw-r--r--src/fileimporterris.h64
-rw-r--r--src/findduplicates.cpp444
-rw-r--r--src/findduplicates.h85
-rw-r--r--src/hi128-app-kbibtex.pngbin0 -> 21254 bytes
-rw-r--r--src/hi16-app-kbibtex.pngbin0 -> 836 bytes
-rw-r--r--src/hi22-app-kbibtex.pngbin0 -> 1363 bytes
-rw-r--r--src/hi32-app-kbibtex.pngbin0 -> 2468 bytes
-rw-r--r--src/hi48-app-kbibtex.pngbin0 -> 4715 bytes
-rw-r--r--src/hi64-app-kbibtex.pngbin0 -> 7301 bytes
-rw-r--r--src/idsuggestions.cpp363
-rw-r--r--src/idsuggestions.h75
-rw-r--r--src/idsuggestionswidget.cpp567
-rw-r--r--src/idsuggestionswidget.h163
-rw-r--r--src/iso5426converter.cpp892
-rw-r--r--src/iso5426converter.h52
-rw-r--r--src/iso6937converter.cpp606
-rw-r--r--src/iso6937converter.h50
-rw-r--r--src/kbibtex.desktop12
-rw-r--r--src/kbibtex.lsm15
-rw-r--r--src/kbibtex_part.cpp758
-rw-r--r--src/kbibtex_part.desktop15
-rw-r--r--src/kbibtex_part.h169
-rw-r--r--src/kbibtex_part.rc158
-rw-r--r--src/kbibtex_shell.rc31
-rw-r--r--src/kbibtexshell.cpp387
-rw-r--r--src/kbibtexshell.h100
-rw-r--r--src/latin1literal.h99
-rw-r--r--src/macro.cpp115
-rw-r--r--src/macro.h57
-rw-r--r--src/macrowidget.cpp99
-rw-r--r--src/macrowidget.h56
-rw-r--r--src/main.cpp128
-rw-r--r--src/mergeelements.cpp864
-rw-r--r--src/mergeelements.h179
-rw-r--r--src/messagehandler.cpp44
-rw-r--r--src/messagehandler.h56
-rw-r--r--src/preamble.cpp107
-rw-r--r--src/preamble.h54
-rw-r--r--src/preamblewidget.cpp84
-rw-r--r--src/preamblewidget.h59
-rw-r--r--src/searchbar.cpp192
-rw-r--r--src/searchbar.h78
-rw-r--r--src/settings.cpp966
-rw-r--r--src/settings.h205
-rw-r--r--src/settingsdlg.cpp137
-rw-r--r--src/settingsdlg.h70
-rw-r--r--src/settingsediting.cpp331
-rw-r--r--src/settingsediting.h100
-rw-r--r--src/settingsfileio.cpp341
-rw-r--r--src/settingsfileio.h73
-rw-r--r--src/settingsidsuggestions.cpp400
-rw-r--r--src/settingsidsuggestions.h108
-rw-r--r--src/settingskeyword.cpp194
-rw-r--r--src/settingskeyword.h69
-rw-r--r--src/settingssearchurl.cpp221
-rw-r--r--src/settingssearchurl.h68
-rw-r--r--src/settingsuserdefinedinput.cpp264
-rw-r--r--src/settingsuserdefinedinput.h74
-rw-r--r--src/settingsz3950.cpp364
-rw-r--r--src/settingsz3950.h128
-rw-r--r--src/sidebar.cpp255
-rw-r--r--src/sidebar.h89
-rw-r--r--src/value.cpp465
-rw-r--r--src/value.h162
-rw-r--r--src/valuewidget.cpp254
-rw-r--r--src/valuewidget.h77
-rw-r--r--src/webquery.cpp637
-rw-r--r--src/webquery.h179
-rw-r--r--src/webqueryamatex.cpp123
-rw-r--r--src/webqueryamatex.h64
-rw-r--r--src/webqueryarxiv.cpp568
-rw-r--r--src/webqueryarxiv.h87
-rw-r--r--src/webquerybibsonomy.cpp127
-rw-r--r--src/webquerybibsonomy.h64
-rw-r--r--src/webquerycitebase.cpp129
-rw-r--r--src/webquerycitebase.h64
-rw-r--r--src/webqueryciteseerx.cpp318
-rw-r--r--src/webqueryciteseerx.h141
-rw-r--r--src/webquerycsb.cpp289
-rw-r--r--src/webquerycsb.h89
-rw-r--r--src/webquerydblp.cpp213
-rw-r--r--src/webquerydblp.h70
-rw-r--r--src/webquerygooglescholar.cpp469
-rw-r--r--src/webquerygooglescholar.h111
-rw-r--r--src/webqueryieeexplore.cpp267
-rw-r--r--src/webqueryieeexplore.h83
-rw-r--r--src/webquerymathscinet.cpp188
-rw-r--r--src/webquerymathscinet.h67
-rw-r--r--src/webquerypubmed.cpp535
-rw-r--r--src/webquerypubmed.h106
-rw-r--r--src/webquerysciencedirect.cpp425
-rw-r--r--src/webquerysciencedirect.h90
-rw-r--r--src/webqueryspireshep.cpp248
-rw-r--r--src/webqueryspireshep.h76
-rw-r--r--src/webqueryz3950.cpp397
-rw-r--r--src/webqueryz3950.h122
-rw-r--r--src/webqueryzmath.cpp124
-rw-r--r--src/webqueryzmath.h64
-rw-r--r--src/xsltransform.cpp81
-rw-r--r--src/xsltransform.h46
-rw-r--r--src/z3950-servers.cfg263
-rw-r--r--src/z3950connection.cpp589
-rw-r--r--src/z3950connection.h131
-rw-r--r--stamp-h.in0
-rw-r--r--subdirs5
-rw-r--r--templates/cpp19
-rw-r--r--templates/h19
-rw-r--r--xslt/MARC21slim2MODS3.xsl2795
-rw-r--r--xslt/MARC21slimUtils.xsl82
-rw-r--r--xslt/Makefile.am2
-rw-r--r--xslt/Makefile.in589
-rw-r--r--xslt/UNIMARC2MODS3.xsl2920
-rw-r--r--xslt/html.xsl144
240 files changed, 117395 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..937060a
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Thomas Fischer <fischer@unix-ag.uni-kl.de>
diff --git a/BUGS b/BUGS
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/BUGS
@@ -0,0 +1 @@
+
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..5b6e7c6
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 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
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..1f30a7d
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,1598 @@
+2010-08-30 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Tagging 0.2.3.91
+
+2010-08-07 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EncoderLaTeX: Fixing problem when text starts with inline math
+ * IdSuggestions: Removing unwanted characters from generated suggestions
+
+2010-08-04 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * IdSuggestions: Improved parsing year strings
+
+2010-07-31 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryPubMed, WebQueryDBLP, WebQueryMathsciNet, WebQueryZMath,
+ WebQueryZ3950, EntryWidgetUserDefined, WebQueryGoogleScholar,
+ WebQueryAmatex, WebQueryBibSonomy, WebQueryCiteBase, WebQuerySpiresHep,
+ PreambleWidget: Adding missinc .moc include
+
+2010-07-11 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * admin: Adding --color=never option to grep calls in scripts
+
+2010-07-08 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryArXiv: Adding more examples in comments
+ * KBibTeX_Part: Removing debug output
+ * Tagging 0.2.3.90
+
+2010-07-01 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, EntryWidgetExternal, EntryWidgetPublication,
+ DocumentListView, WebQuery, DocumentWidget, EntryWidgetOther:
+ Switching over to xdg-open instead of either KRun or invokeBrowser
+
+2010-06-30 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryArXiv: Guessing harder journals' bibliographic data
+ * html.xslt: Removing duplicate volume
+ * Settings, DocumentWidget, KBibTeX_Part: Checking if file to
+ overwrite is symbolic link, asking user to overwrite original
+ file or link
+
+2010-03-26 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileImporterBibTeX: Bugfix when reading plain text comments (first character
+ was missing)
+
+2010-02-28 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterBibTeX: Handling special case for "slaccitation";
+ fixing/simplifying encoding system in math environments
+
+2010-02-20 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileImporterBibTeX: Fixing bug in reading comment lines
+ * WebQuery: Code made more robust in parsing HTML code
+ * admin/cvs.sh: Fixing issue with automake 1.11 or newer
+
+2010-02-16 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FindDuplicates, KBibTeX_Part, Settings, EntryWidgetOther, DocumentListWidget:
+ Removing compiler warnings
+ * WebQueryMathSciNet, WebQuery, Makefile.am, Makefile.in:
+ Adding initial MathSciNet support
+
+2010-02-10 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EncoderLaTeX, IdSuggestions: Using translation table from LaTeX encoder
+ to normalize entry ids to plain ASCII
+ * FileImporterBibTeX: Minor improvements in tokenizer
+
+2010-01-11 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EncoderLaTeX: Fixing URL encoding/decoding issue;
+ adding more Latin-based characters
+ * IdSuggestions: Improving mapping of non-latin characters
+ * FileExporterPDF, FileExporterRTF: Making exporters more robust
+
+2009-12-26 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryArXiv: Fixing mutex locking issue
+
+2009-12-02 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterBibTeX: Make doi field verbatim
+ * FileExporterRTF: Fixing LaTeX file headers
+
+2009-11-11 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Entry: Adding "number" as an optional field for "book"
+ * EntryWidget: Refetch of ArXiv entries is more conservative
+ * FileImporterBibTeX: Counting lines to show more informative debug/error output
+
+2009-11-06 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetPublication: More robust way of calling browser in mixed KDE3/KDE4 environments
+ * WebQueryArXiv: Minor bug fix with premature aborting
+ * EntryWidget: Fixing minor UI problem
+
+2009-11-05 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileImporterBibTeX: Removing byte-order mark from UTF-8 input
+
+2009-11-04 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryArXiv: If article can be classified as TechReport or Article,
+ put preference on Article (reported by Gandalf Lechner)
+ * WebQueryArXiv, EntryWidget: Added function to refetch/refresh ArXiv articles
+ based on stored url (requested by Gandalf Lechner)
+
+2009-09-05 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterPDF, FileExporterPS: Removing incomplete cyrillic LaTeX headers
+ * FileExporterBibTeX: Fixing issue with last names starting with small characters
+
+2009-08-13 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryGoogleScholar: Rewriting search engine
+
+2009-08-09 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterBibTeX: Adding patch by Jürgen Spitzmüller to handle complex names
+
+2009-07-30 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterBibTeX: Adding function fix the encoding of special LaTeX characters
+
+2009-07-08 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EncoderLaTeX: Adding \ldots command; making code more robust
+ (based on patch by Jurgen Spitzmuller <juergen.sp@t-online.de>)
+
+2009-06-22 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * IdSuggestions: Falling back to editor names if no author names available
+ (patch by Jurgen Spitzmuller <juergen.sp@t-online.de>);
+ replace some accented and special characters by plain ASCII transliterations;
+ (based on a patch by Jurgen Spitzmuller <juergen.sp@t-online.de>);
+ Making list of "small words" in id suggesstions editable
+
+2009-05-31 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryScienceDirect: Handling case with insufficient permissions to access service
+ * KBibTeX_Part, DocumentWidget: Ids of all selected entries will be normalized as defined
+ by default id suggestion
+
+2009-05-24 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Entry: Simplified merge semantics
+ * WebQueryCiteSeerX: Fixing potential URL encoding problem
+ * FileImporterBibTeX: Simplified removal of HTML tags using regular expression
+ * EntryWidget: Fixing crash triggered when previewing search hits
+ * DocumentWidget: Keywords can be set for multiple entries at once using
+ context menu
+
+2009-04-27 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsFileIO, KBibTeXPart: Create a number of backup files when
+ saving/exporting
+ * DocumentWidget, KBibTeXPart: When saving, write to temporary file and overwrite
+ original only on success
+ * EntryWidget: Adding check if entry with same ID already exists
+ * EncoderLaTeX: Major bugfixes with messed URLs (when decoding) and messed math
+ inline (when encoding)
+
+2009-03-19 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EncoderXML, EncoderLaTeX, FileExporterBibTeX: Fixing issues with quotation marks
+
+2009-02-21 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * SettingsIdSuggestions: Fixing crash when rearranging suggestions with no default
+ suggestion selected
+
+2009-02-19 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryScienceDirect: Fixing issue with spaces and other encoded chars in URL;
+ adding warning to console if access properties are not sufficient to query DB
+
+2009-02-15 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Tagging version 0.2.1.91 (0.2.2 Beta 2)
+
+2009-02-09 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetExternal: Adding "previously used directory" to list of directories
+ to start browsing from
+
+2009-02-07 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileImporterBibTeX: Fixing compilation issue
+ * FileImporterBibTeX, FileExporterBibTeX: More robust parameter command parsing
+
+2009-02-06 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * SettingsEditing: Using URL auto completion when adding search paths
+ * EntryWidgetExternal: Converting absolute paths to relative paths if possible
+ * FileImporterBibTeX, FileExporterBibTeX: A per-file encoding can be specified by
+ adding a special comment to the BibTeX file ( @comment{x-kbibtex-encoding=XXX} ),
+ where XXX can be any encoding supported by iconv.
+
+2009-02-05 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQuerySpiresHep: New option to fetch abstracts from arXiv
+ * Entry: More flexible in detecting URLs in entries
+ * WebQuery: Changing semantics of pressing Return key
+ * DocumentWidget: Fixing code calling DOI website
+
+2009-02-04 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsEditing, MergeElements: Sensitivity to find duplicates
+ can be configured in settings
+ * FindDuplicates, DocumentWidget: Fixing bug that let KBibTeX "forget"
+ unmatched elements
+ * EncoderLaTeX: Fixing issues with underscore char
+ * EntryWidget: Asking user to discard changes if entry was modified
+ * WebQueryArxiv: Using different regular expressions to parse journal references
+
+2009-02-02 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXPart, DocumentWidget: Mimicking JabRef's key commands to view
+ a local PDF file (F4) and to open the entry's DOI website (F5)
+
+2009-01-20 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings: Source formatting changed slightly
+ * Value: Fixing potential memory leak
+ * FileExporterBibTeX: Source formatting changed slightly, replacing magic number
+ by constant
+ * SettingsUserDefinedInput: Fixing enabling behavior of Ok button
+ * Releasing KBibTeX 0.2.1.90 (0.2.2 Beta 1)
+
+2009-01-10 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FindDuplicates: Finding duplicate preambles added
+ * MergeElements, Makefile.am, Makefile.in, DocumentWidget: Renaming mergeentries.*
+ to mergelements.*
+ * Preamble: Adding simple constructor
+ * MergeElements: Adding support for duplicate preambles
+
+2009-01-07 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * MergeElements: Adding progress bar for merging steps
+ * MergeElements, WebQuery, EntryWidget: Fixing issues with restoring window size
+
+2008-12-28 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings: Using QString::null instead of empty string for invalid configuration
+ * DocumentWidget: More detailed error messages when communicating with LyX
+
+2008-12-16 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryCiteSeerX: Adding new web query by Jacob Kanev
+ * FileImporterBibTeX, WebQueryGoogleScholar: Fixing potential or actual deadlocks/bugs
+
+2008-12-04 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXPart, KBibTeXShell: Fixing filtering of hidden files in open and save dialogs
+
+2008-12-02 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterXML, FileExporterBibUtils, FileExporterRIS, FileExporterBibTeX,
+ FileImporterRIS, DocumentSourceView: Adding signals and slots to update progress
+ * FileImporterBibTeX: More robust code, canceling if input encoding does not match
+
+2008-11-30 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EncoderLaTeX, DocumentListView: Speeding up loading of large files
+
+2008-11-17 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * xslt/html.xsl: Adding tags for volume and edition
+ * Releasing KBibTeX 0.2.1.81 (0.2.2 Alpha 2)
+
+2008-11-14 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryPubMed: Fixing crash in PubMed module
+
+2008-11-10 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Fixing compiler warnings with gcc 4.3
+
+2008-10-27 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FieldLineEdit, EntryWidgetOther: Fixing crash, using KDE over Qt widgets
+
+2008-10-27 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FindDuplicates, MergeElements: Minor bug fixes, adding comments in sources
+
+2008-10-26 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQuery: Saving and restoring window size;
+ only searching if query seems to by valid
+
+2008-10-25 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsZ3950: Changing management of Z39.50 server configurations
+ * FileExporterBibUtils, FileImporterBibUtils: Various improvements and fixes
+
+2008-10-23 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXPart, KBibTeXShell, File, DocumentWidget, Settings, SettingsFileIO,
+ FileImporterBibTeX: File format for XML files can be chosen in dialog
+ * Settings, File, FileImporterBibUtils, FileExporterBibUtils, WebQueryZ3950,
+ KBibTeXShell, KBibTeXPart, SettingsFileIO, DocumentListView, DocumentWidget:
+ Rewriting handling of BibUtils (no longer shared library)
+
+2008-10-22 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentWidget: Adding file format selection dialog for unknown file suffixes
+
+2008-10-06 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EncoderLaTeX: Adding support for decomposed UTF-8 chars
+ * FileImporterBibUtils: Preprocessing decomposed chars in incoming data
+
+2008-09-28 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * ValueWidget, WebQueryZ3950, SettingsSearchURL, FieldListView,
+ SettingsUserDefinedInput: Minor UI fixes
+ * IdSuggestionWidget: Fixing deletion of id components
+ * EntryWidget: Using code from KMainWindow to save and restore window size
+ * Iso6937Converter, Iso5426Converter, MessageHandler, Latin1Literal:
+ Adding Z39.50 files from Tellico
+ * FileImporterBibTeX: Checking for duplicate fields
+ * WebQueryZ3950, Z3950Connection: Refactoring source code using Tellico's code
+
+2008-09-12 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * MergeEntries: Working on merging macros, too
+
+2008-09-01 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentWidget: Updating preview after editing element
+ * Settings, EntryWidget, IdSuggestions: Avoiding invalid chars in
+ id suggestion system
+ * EntryWidget: Adding field values in a clean fashion to auto-completion
+
+2008-08-24 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQuery*: Fixing issue with numerical values in search query settings
+ * EntryWidgetSource, DocumentSourceView: Setting encoding to 'latex'
+ (no UTF-8 characters used)
+ * Updating translations
+ * IdSuggestions, IdSuggestionsWidget: "All but first author" added
+
+2008-08-19 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsFileIO: Minor UI improvements when setting bib2db5 path
+ * Sidebar, WebQuery: Minor UI changes regarding fonts
+
+2008-08-18 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * File, KBibTeXPart, FileExporterDocBook5, Settings, SettingsFileIO:
+ Adding support for DocBook5 bibliography export
+ * SideBar: Adding multiselect feature
+
+2008-08-11 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetPublication: Using publisher from crossref if available
+ * Entry: Making merge semantics tristate
+
+2008-08-10 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQuery*: Storing search queries in settings for later retrieval
+ * WebQueryGoogle: Fixing issue with restarting search
+
+2008-08-09 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryDBLP: Fixing search DBLP, adding option to not merge entries
+
+2008-07-31 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * z3950-servers.cfg: Adding server
+ * SettingsZ3950: Improving handling of Z39.50 settings
+ * WebQueryScienceDirect: Beautifying UI layout
+ * WebQuery: Improving UI
+
+2008-07-30 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentListWidget: Marking files as modified on dropping data
+ * WebQueryGoogleScholar: Checking if Google search is frozen,
+ restarting if neccessary
+
+2008-07-23 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQuery*: Fixing behavior when canceling a search, optimizing GUI
+ * WebQueryBibSonomy, WebQueryCSB, WebQueryZ3950: Fixing minor bugs
+
+2008-07-19 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetOther: Fixing issue with actually removing deleted fields
+ * DocumentWidget: Preferring local file over remote files when opening associated document
+
+2008-06-23 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterPDF, FileExporterPS, FileExporterRTF: Adding check for t2aenc.def before
+ using fontenc T2
+ * FileImporterRIS: Reactivating usage of ID field to generate BibTeX id
+
+2008-06-19 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * SettingsDlg, SettingsZ3950, KBibTeXShell: Inserting #ifdefs to resolve
+ compilation issues
+
+2008-06-18 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsZ3950: Improving handling of Z39.50 server configuration
+ * Settings: Interpreting ~/ in file names as the user's home directory
+
+2008-06-13 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * SettingsZ3950: Improving GUI
+
+2008-06-10 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Releasing KBibTeX 0.2.1.80 (0.2.2 Alpha 1)
+
+2008-06-08 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * MergeEntries: Improving usability
+ * FindDuplicates: Correcting handling of merging files with identical
+ entry ids
+
+2008-06-07 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * MergeEntries, FindDuplicates: Adding new code to find duplicates and merge
+ entries
+
+2008-05-26 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EncoderLaTeX, FileExporterBibTeX: Improving handling of characters not supported
+ by target encoding
+
+2008-05-23 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, FileExporterBibTeX, FileImporterBibTeX, FileImporterBibUtils,
+ EntryWidgetSource, DocumentWidget, DocumentListView, DocumentSourceView,
+ SettingsFileIO, MergeEntries: Changing encoding system for BibTeX import
+ and export, using iconv to support all existing encodings
+
+2008-05-17 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FindDuplicates: Initial code to find duplicates in BibTeX files
+
+2008-05-15 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EncoderLaTeX, FileExporterPDF, FileExporterPS, FileExporterRTF: Support for
+ cyrillic chars added
+
+2008-05-12 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryScienceDirect: Adding querying ScienceDirect
+ * WebQuery: Refactoring download, progress bar, and result handling
+ * WebQueryPubMed, WebQueryDBLP, WebQueryZMath, WebQueryZ3950, WebQueryGoogleScholar,
+ WebQueryBibSonomy, WebQueryCSB, WebQueryIEEExplore, WebQueryCiteBase, WebQueryArXiv,
+ WebQuerySpiresHep, WebQueryAmatex: Switching to refactored WebQuery code
+
+2008-05-10 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * IdSuggestions, EntryWidget, DocumentWidget: Improving handling of default id
+ suggestions and id conflicts
+
+2008-05-05 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings: Z39.50 server configuration added
+ * WebQueryZ3950: Selection of Z39.50 server possible, better GUI for queries
+ * MergeEntries: Entries can be edited before merging
+ * Entry: Adding equals operator
+ * DocumentWidget: Correctly encoding online search's query
+ * WebQuerySpiresHep: Nicer search UI to select raw query, author, title, ...
+ * WebQuery: Various GUI improvements
+ * Adding Italian translation
+
+2008-04-30 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Value: Extending API to create macro keys more easily
+ * WebQueryIEEExplore: Trying to fix malformed dates
+
+2008-04-27 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQuery: Use default id suggestion for entries found by web queries
+ * configure.in.in, WebQueryZ3950, Z3950Connection, WebQuery: Fixing issues with #ifdef
+
+2008-04-26 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidget, EntryWidgetSource: Improving reset button,
+ checking if source code is valid before applying to entry
+ * FileImporter*, FileExporter*: Making code more robust
+ * WebQuery, WebQueryZ3950, Z3950Connection: Adding inital code for Z39.50 queries
+ * WebQuery, WebQueryIEEExplore: Adding initial code for IEEExplore
+
+2008-04-23 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetSource: Adding reset button
+
+2008-04-10 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryZMATH, WebQueryGoogleScholar, WebQueryBibSonomy, WebQueryCSB, WebQueryCitebase,
+ WebQuerySpiresHep: Fixing bug when generating urls for web queries
+ * WebQueryCSB: First working version
+ * EncoderLaTeX: Fixing circumflex bug, preparing better support of cyrillic letters
+
+2008-04-08 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryCSB: Adding initial code to query U Karlsruhe's CS bibliography
+
+2008-04-06 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * fr.po: Adding template for French translation
+ * Translations: Updating message strings
+ * FileExporterBibUtils, FileImporterBibUtils, configure.in.in:
+ Rewriting BibUtils support to prepare for modified API
+ * WebQueryZ3950, KBibTeXShell: Adding initial support for YAZ
+
+2008-04-05 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterPDF, FileExporterPS: Fixing bug in intermediate tex file
+ * WebQueryPubMed: Fixing query url, adding link to PubMed in entry
+
+2008-04-04 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * SettingsEditing, EntryWidgetExternal: Improving handling of document search paths
+
+2008-03-23 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQuery, WebQueryPubMed, WebQueryDBLP, WebQueryZMATH, WebQuerySpiresHep,
+ WebQueryGoogleScholar, WebQueryArXiv, WebQueryAmatex, WebQueryBibSonomy,
+ WebQueryCitebase: Adding infrastructure allowing each web query to use its
+ own query form
+
+2008-03-22 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsFileIO, DocumentWidget: Using BibUtils can be made optional
+ * Settings, SettingsEditing: DocumentSearchPath may contain list of paths
+ * SettingsIdSuggestions, SettingsKeyword, SettingsSearchURL, SettingsUserDefinedInput:
+ Minor UI improvements
+ * DocumentListView: Cleaning code, refactory paste code
+ * FileImporterRIS: Minor improvements for RIS from SpringerLink
+
+2008-03-16 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Releasing KBibTeX 0.2.1
+ * WebQuery: Adding read-only preview for search hits
+
+2008-03-13 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * html.xsl: Adding note field
+ * SideBar, DocumentWidget, EntryWidgetExternal: Handling read-only cases better
+ * IdSuggestions: Handling commands in title
+
+2008-03-11 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsEditing, DocumentListView: Adding drag operation supporting
+ both copying reference or bibtex code
+
+2008-03-10 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentWidget, DocumentListView, DocumentSourceView, KBibTeXPart:
+ Adding "select all" feature
+ * WebQuery, WebQueryArXiv: Fixing bug with empty search strings
+ * EntryWidget, EntryWidgetTitle: Title field is first widget to get focus
+
+2008-03-09 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * ValueWidget, EntryWidgetPublication, EntryWidget, DocumentSourceView:
+ Handling read-only cases better
+ * EntryWidgetOther: Fixing memory corruption
+ * Version bump to 0.2.0.91
+
+2008-03-02 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidget: Fixing default id suggestion button state; improving warning message;
+ improving conflicting entry ids
+
+2008-03-06 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetPublication, EntryWidgetExternal, EntryWidgetTitle,
+ EntryWidgetSource, EntryWidgetUserDefined, EntryWidgetAuthor, EntryWidget,
+ EntryWidgetTab, EntryWidgetOther, EntryWidgetKeyword, EntryWidgetMisc:
+ Refactoring internal apply and reset system
+ * EntryWidget, EntryWidgetDialog: Handling close event
+ * IdSuggestionWidget, IdSuggestionComponent, IdSuggestionComponentAuthor,
+ IdSuggestionComponentTitle, IdSuggestionComponentYear, IdSuggestionComponentText:
+ Adding example
+ * DocumentListView: Updating visibility for new elements
+ * KBibTeXShell, FileExporterBibUtils, DocumentListView, FileImporterBibUtils,
+ DocumentWidget, KBibTeXPart, File: Improving support for imports/exports
+ from/to bibutils
+
+2008-02-26 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryPubMed: Fixing progress bar problem
+
+2008-02-24 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentSourceView: Fixing crash
+ * WebQueryWizard: Fixing crash when canceling search
+ * FileImporterRIS: Improving import of abstracts
+ * IdSuggestionsListViewItem, SettingsIdSuggestions: Adding examples to suggestions;
+ fixing bug with favourite suggestion when moving up and down
+ * IdSuggestions: Checking for duplicates
+ * Entry, FileImporterBibTeX: Making code more robust
+
+2008-02-13 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsIdSuggestions, EntryWidget, DocumentWidget, IdSuggestions:
+ An id suggestion can be selected as default, no need to select entry id manually
+
+2008-02-09 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryGoogleScholar: Working on cancel operation
+
+2008-02-08 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EncoderLaTeX: Improved handling of dollar signs
+ * SideBar, SearchBar, Settings, SettingsEditing: Searchbar filter for fields is
+ reset when typing (optional by configuration)
+
+2008-02-02 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, Value, FieldListView: Adding both "FirstName LastName" and
+ "LastName, FirstName" to auto-completion for both authors and editors
+ * IdSuggestionComponentTitle: Fixing translation
+ * IdSuggestions: Refactoring handling of small words
+ * Version bump to 0.2.0.90
+
+2008-01-28 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetUserDefined, EntryWidget, EntryWidgetKeyword, DocumentWidget,
+ EntryWidgetOther, KBibTeXPart: Fixing minor issues when KBibTeX is embedded
+ as read-only part
+
+2008-01-27 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryDBLP: Merging both entries (conference article and proceedings) per hit
+ * Entry: Improving entry merging
+
+2008-01-26 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQuery*: Fixing crashes, improving cancel operation and improving
+ error handling
+ * File: Adding const functions, fixing infinite loop
+ * FileExporterXML, FileExporterRIS: Using const functions from File
+
+2008-01-25 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * SettingsIdSuggestions, EntryWidgetKeyword, SettingsSearchURL,
+ SettingsUserDefinedInput, SettingsKeyword: Adding icons to push buttons
+ * SettingsIdSuggestions, SettingsUserDefinedInput: Fixing moving elements
+ up and down
+
+2008-01-24 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentListView: Fixing broken copy-to-clipboard code
+
+2008-01-22 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileImporterBibTeX: Minor bugfix regarding valid ids
+ * EntryWidgetPublication: Beautifying page field
+ * DocumentListView: Checking for duplicate ids when inserting items
+
+2008-01-21 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentWidget: Refactoring file opening code
+ * KBibTeXPart: Merge for file types other than .bib possible
+ * FileImporterRIS, FileImporterBibUtils, FileImporterBibTeX:
+ Fixing guessCanDecode(..)
+ * DocumentListView: Pasting .ris files possible
+
+2008-01-19 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Improving internationalization support, including correct plural forms;
+ updating German and Russian translation
+
+2008-01-17 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Many changes for better i18n support
+
+2008-01-11 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterBibTeX: Fixing usage of protective curly brackets
+ * DocumentWidget, KBibTeXPart: Fixing enabling and disabling of menu items
+
+2008-01-09 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * IdSuggestionWidget: Improving GUI
+
+2008-01-05 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsFileIO, FileExporterBibTeX: Adding new option to put
+ curly brackets around title and other selected fields to protect them
+ from case changes in some BibTeX styles
+ * DocumentListView: Fixing bug when deleting several items from list
+ * EncoderXML: Taking care of special chars like < and >
+ * WebQueryWizard: Storing current settings after closing dialog
+ * WebQueryPubMed: Showing progress
+
+2008-01-03 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, WebQueryWizard: Keeping dialog between searchs, adding
+ auto-completion to search term, checkbox to import all hits
+ * SettingsUserDefinedInput: Adding buttons to move items up and down
+ * DocumentListView, DocumentWidget: Fixing bug where changes in entry
+ dialog were not applied to main list view
+
+2007-12-31 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryArXiv: Improving parsing content of website
+ * DocumentWidget: Improved handling of web query results
+ * WebQuery: Minor UI improvements
+ * WebQueryPubMed: Changing entry type to article if it is from a journal,
+ fetching abstract, detecting first and last name correctly
+
+2007-12-30 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQuery, WebQueryWizard, WebQueryAmatex, WebQueryArXiv, WebQueryBibSonomy,
+ WebQueryCitebase, WebQueryDBLP, WebQueryGoogleScholar, WebQueryPubMed,
+ WebQuerySpiresHep, WebQueryZMATH: Refactoring WebQuery classes (no more
+ UI elements); may have introduced bugs and regression
+ * Preamble, Macro, Entry, Comment, FileExporter, FileExporterXML,
+ FileExporterExternal, FileExporterBibTeX, FileExporterPDF, FileExporterPS,
+ FileExporterRTF, FileExporterRIS, FileExporterBibUtils, FileExporterXSLT:
+ Making functions const
+ * EntryWidgetOther, File: Refactoring completeReferencedFields for better
+ const support
+ * KBibTeX_Part, SearchBar: Refactoring searching online databases (after
+ WebQuery rewrite)
+ * DocumentWidget, DocumentListView: Some major refactoring
+ * Entry, Comment, Element, Macro, SearchBar: Searching supports exact,
+ every word and any word now
+
+2007-12-25 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * IdSuggestionComponent*, IdSuggestionsWidget: Initial version of a
+ widget to edit id suggestions
+
+2007-12-24 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * IdSuggestionsListViewItem, SettingsIdSuggestions, IdSuggestions:
+ Representing id suggestion format strings in a human readable form
+ * KBibTeXPart: Disabling menu items if no element is selected
+
+2007-12-23 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentWidget: Fixing bug with KDirWatch when modifying a file
+ while handling dirty signal
+
+2007-12-10 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentSourceView: Refactoring code, fixing crash related to editor
+ component
+ * DocumentWidget: Fixing crash, fixing handling of preamble, refactoring
+ insertion of web query results
+
+2007-12-09 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsUserDefinedInput, EntryWidgetUserDefined,
+ EntryWidgetOther: Adding initial support for user-defined input fields
+ in entry edit dialog
+ * FileExporterPDF, FileExporterPS: Better error handling if pdflatex or
+ latex fails
+ * EncoderLaTeX: Adding additional encoding cases
+ * DocumentWidget: Avoiding duplicate ids for new entries
+
+2007-11-24 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EncoderXML: Support for coded chars (&#x0123;) added
+ * WebQueryArXiv: Refactoring to fetch all data from arxiv.org only
+ * Preparing project for internationalization (i18n) and
+ localization (l10n)
+ * WebQuery: Added erase button for the search string
+
+2007-11-22 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * ValueWidget: Fixing bug which inverted the order of value items
+ * EntryWidgetPublication: ISBN numbers can be looked up in Wikipedia
+ * FileExporterXML: Supporting combined months (e.g. nov # "/" # dec)
+
+2007-11-16 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentListViewItem, WebQuery: Removing {, }, and ~ when displaying
+ BibTeX entries for better readability
+ * WebQueryArXiv: Abstracts will be fetched, too; multiple words in
+ a query possible; UI and bugfixes
+
+2007-11-14 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryArXiv: Initial code to query arXiv (including SPIRES and
+ ADS) added
+
+2007-11-06 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryGoogleScholar: Adding progress bar, allows canceling search
+
+2007-11-04 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryGoogleScholar: Search Google Scholar finally works
+
+2007-10-28 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterBibTeX: Refactoring save method
+
+2007-10-23 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Releasing KBibTeX 0.2
+
+2007-10-13 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetTitle, File: Fixed handling of title and book title
+ for crossref'ed entries
+
+2007-10-12 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsFileIO, DocumentListView, KBibTeXPart:
+ Lyx in pipe detection will be performed before sending data,
+ no more user interaction/configuration necessary
+
+2007-10-07 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsFileIO: Changed detection of LyX in pipe
+
+2007-10-03 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Releasing KBibTeX 0.1.5.56
+
+2007-09-29 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterXML, FileExporterRIS: Resolving macros and crossref
+ before exporting file
+ * Settings, SettingsEditing: Disallow "no sorting"
+ * File: For better usability, showing value of macro references
+
+2007-09-27 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterBibUtils, FileImporterBibUtils, KBibTeXShell,
+ KBibTeXPart, DocumentWidget: Fixing support for BibUtils
+ * kbibtex_part.desktop, kbibtex.desktop: Entries fixed
+
+2007-09-24 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetPublication, EntryWidgetTab,
+ EntryWidgetTitle: Validity check uses data from
+ crossref'ed entry
+ * DocumentListView: Preview uses data from crossref'ed
+ entry
+
+2007-09-23 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentWidget: Preview uses data from crossref'ed
+ entry
+
+2007-09-22 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileImporterBibTeX, EncoderLaTeX: Better debug output
+ if parsing a .bib file fails
+ * WebQueryPubMed, WebQueryDBLP, WebQueryZMATH,
+ WebQueryBibSonomy, WebQueryCitebase, WebQuerySpriesHep:
+ Saver query urls
+ * WebQueryGoogleScholar: Query interface for Google
+ Scholar
+ * WebQueryAmatex: Query interface for Amatex
+ * SearchBar, DocumentWidget, KBibTeXPart: Putting search
+ in online databases more prominently in the UI
+
+2007-09-21 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsFileIO: Improved finding LyX's
+ in pipe
+
+2007-09-20 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterRIS, FileImporterRIS: Improving keyword
+ support for RIS modules
+ * DocumentWidget: Fixing bug in assigning keywords
+ using context menu
+ * Releasing KBibTeX 0.1.5.55
+
+2007-09-17 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetUser: Detecting URLs and file names in
+ field values, enabling Open button
+ * FileExporterPDF, EntryWidgetUser, EntryWidgetExternal,
+ DocumentWidget, File, Settings: Improved detecting
+ local files if referenced in a BibTeX file
+
+2007-09-16 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXPart, DocumentWidget: Minimal statistics
+ dialog added
+ * DocumentWidget: Bug fix: Assigning keywords marks
+ file as modified
+ * KBibTeX: Bug fix: Disabling/enabling menu items only
+ if available
+ * SettingsIdSuggestions: Suggestions will be edited
+ in input dialog and no longer inside list view
+ * DocumentWidget: Long keyword lists in the context
+ menu will be split into a two-level menu
+
+2007-09-08 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Element, Entry, Preamble, Comment: Added text()
+ method for debugging
+ * FileExporterBibTeX: Fixed bug with bracket handling
+
+2007-09-02 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileImporterBibTeX: Improved parser for names with
+ curly braces
+
+2007-09-01 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Value: Parser for names can handle curly braces
+
+2007-08-28 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentWidget, KBibTeXPart: Adding code to
+ actually add preamble elements
+
+2007-08-27 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * File, FileImporterBibTeX, FileExporterXML,
+ FileExporterBibTeX, MergeEntries, DocumentWidget,
+ DocumentListView, DocumentListViewItem, Preamble,
+ PreambleWidget: Added better support for BibTeX
+ preamble
+
+2007-08-25 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Releasing KBibTeX 0.1.5.54
+
+2007-08-23 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsSearchURL, DocumentWidget: Making
+ decision whether to include author per search entry
+
+2007-08-20 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsSearchURL, DocumentListView: For
+ web searchs, authors' names can be included next to
+ title
+
+2007-08-19 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings: Changes to make settings object static
+ * SettingsEditing: UI changes, using combo box for
+ name ordering
+ * Value, EntryWidgetPublication: Checks for invalid
+ entries improved
+
+2007-08-17 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileImporterBibTeX: Comments can be ignored
+ optionally; cleaning input data from some HTML code
+ * FileExporterPDF, FileExporterPS: Support for apacite
+ improved
+ * WebQueryDBLP: Adding DBLP as new web search
+ * WebQueryCitebase: Adding Citebase as new web search
+ * Settings, EntryWidgetKeyword, WebQueryWizardBibSonomy:
+ Several bugfixes
+
+2007-08-14 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * SettingsIdSuggestions: Minimal GUI to edit id
+ suggestions
+ * IdSuggestions: Improvements and additions to pseudo
+ code
+
+2007-08-13 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * IdSuggestions: Modified system to use a printf like
+ system of shortcuts to describe an id
+
+2007-08-11 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterBibUtils, FileImporterBibUtils,
+ KBibTeXShell, DocumentWidget, KBibTeXPart,
+ configure.in.in: Checking for bibutils with configure,
+ using #define for conditional compilation
+ * WebQuerySpiresHep: Adding Spires-Hep as new web search
+ * WebQueryZMATH: Adding Zentralblatt MATH as new web
+ search
+ * IdSuggestions: Added new class to create a list of
+ suggestions for possible ids of new entries
+ * Version bump to 0.1.5.54
+
+2007-08-05 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterBibUtils, FileImporterBibUtils: Initial
+ version of importer and exporter using a library
+ based on Chris Putnam's bibutils
+ * KBibTeXShell, DocumentWidget, KBibTeXPart: Adding
+ support for bibutils based importer and exporter
+ * EntryWidgetExternal, DocumentListView, EntryWidgetUser,
+ DocumentWidget: Using KRun to open external files in
+ their respective viewers
+
+2007-08-04 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Several minor code cleanups
+ * KBibTeXShell: Keyboard shortcuts can be configured
+ for actions inside the part
+ * KBibTeXPart: Setting default keyboard shortcuts
+ * EntryWidget, EntryWidgetTab: Refactoring to use
+ EntryWidgetTab as widget in main view
+
+2007-07-30 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryBibSonomy, BibSonomyWizard: Added web query
+ wizard to query and to import from BibSonomy
+ * WebQuery, PubMedWebQuery: Some refactoring code
+
+2007-07-28 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * MergeEntries: New class and code to merge two BibTeX
+ files
+ * Version bump to 0.1.5.53
+
+2007-07-26 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentWidget: Added file watch to notify user if
+ BibTeX file has been modifed from outside
+ * FileListView: Support for BibTeX "and others" feature
+ added (special checkbox for authors and editors)
+
+2007-07-15 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileImporterBibTeX, FileExporterBibTeX, Comment,
+ CommentWidget: Plain text in .bib files between
+ entries is treated as comments
+ * Settings, FileExporterToolchain: Implemented kpsewhich()
+ to check if a given file is available to the TeX system
+ (code is duplicated in both classes!)
+ * FileExporterToolchain: Some code cleanups
+ * FileExporterPDF, FileExporterPS, FileExporterRIS,
+ DocumentWidget: Using kpsewhich() to check for packages
+ before including them into TeX code for export
+ * FileExporterPDF, DocumentWidget: DocumentSearchPath is
+ used to located file to be embedded
+ * EncoderLaTeX: Minor fixes
+
+2007-07-07 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsEditing, DocumentWidget: Default
+ search path for "View Document" can be specified;
+ additionally, the current file's path is used as
+ search path, too.
+ * SettingsFileIO, EntryWidget, FileExporterToolchain,
+ DocumentListView, SideBar, KBibTeXPart: Minor bugfixes
+
+2007-07-04 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * SideBar: Sorting for number of occurrences is
+ numerically now
+ * DocumentWidget: Empty keyword menu if no keywords
+ available
+ * EncoderLaTeX: Minor encoding bug fixed
+ * Entry: TechReport may have ISSN
+
+2007-07-03 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsFileIO, FileExporterBibTeX, ...:
+ BibTeX keywords may be written in different casing
+ styles such as @inproceedings, @Inproceedings,
+ @InProceedings, or @INPROCEEDINGS
+ * File, SideBar: Number of hits shown next to found
+ value
+ * Version bump to 0.1.5.52
+
+2007-06-17 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, FieldLineEdit: Macro ids (keys) are used for
+ auto-completion, too
+ * FileExporterPDF: Bugfix in PDF export (always including
+ embedfile)
+ * EntryWidget: Improving code for id suggestions
+ * DocumentWidget: Code optimization (fewer refreshing)
+
+2007-06-14 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileImporterBibTeX: Code cleanups, refactoring
+ * EntryWidget: Initial code for id suggestions
+ * FileExporterBibTeX: Reverting most of previous changes
+ * EntryWidgetKeyword: Keyword handling fixed
+ * DocumentWidget: Minor code improvement
+ * SideBar: Minor changes in renaming code
+ * Version bump to 0.1.5.51
+
+2007-06-11 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Changed copyright information to 2007
+ * Keyword, KeywordContainer: Bugfixes in keyword handling
+ * EntryWidgetSource: Honouring first name first flag
+ * SettingsFileIO: GUI changes for PDF export
+ * Value, ...: String replacement can handle container classes
+ * DocumentListView, FieldListView: Code cleanups
+ * FileExporterBibTeX: Fixed bug in quoting macro text
+
+2007-06-09 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EncoderLaTeX: Rewriting encoding system so that it accepts
+ LaTeX commands that would require a context-sensitive
+ language otherwise
+ * DocumentListView: Added progress bar to be shown when
+ updating the main list view
+ * Settings, SettingsEditing, Person, PersonContainer, ...:
+ New configure option: Show first name first; requires
+ restart to take effect
+ * FileExporterPDF, Settings, SettingsFileIO: File pointed
+ to by a reference can be added to the exported PDF if
+ available
+
+2007-06-06 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentListView, DocumentListViewItem, DocumentSourceView,
+ DocumentWidget, Encoder, EncoderLaTeX, EncoderXML, Entry,
+ EntryWidget, EntryWidgetPublication, EntryWidgetWarningsItem,
+ FieldLineEdit, FileExporterExternal, FileImporter,
+ FileImporterExternal, KBibTeXShell, SearchBar,
+ SettingsEditing, SettingsSearchURL, SideBar, XSLTransform:
+ Source formatting changed slightly
+ * DocumentListView, DocumentListViewItem, Entry, EntryField,
+ EntryWidgetExternal, EntryWidgetKeyword,
+ EntryWidgetPublication, EntryWidgetUser, FieldLineEdit,
+ FieldListView, File, FileExporterBibTeX, FileExporterRIS,
+ FileExporterToolchain, FileExporterXML, FileImporterBibTeX,
+ FileImporterRIS, Macro, Settings, ValueWidget:
+ Changes due to modified classes representing BibTeX data
+ (BibTeX::Value and related classes)
+ * DocumentWidget: Changes in keyword handling and searching
+ websites due to modified classes representing BibTeX data
+ (BibTeX::Value and related classes)
+ * DocumentListView: Drag'n'drop of urls from Firefox correctly
+ processed
+ * Encoder, EncoderLaTeX, EncoderXML: Code cleanups
+ * EncoderLaTeX: If a string contains \url, do not replace & by
+ \& (actually, undo previous replacement), otherwise url will
+ be broken
+ * EntryWidget: Button to insert suggestions for ids added, but
+ not yet functional
+ * EntryWidgetKeyword: Modifications on keyword management
+ * kbibtex_part.cpp, SettingsFileIO: Adding support for LyX
+ in pipe
+ * SettingsDlg, SettingsKeyword: Changes due to improved
+ keyword support
+ * Value, ValueTextInterface, PlainText, MacroKey,
+ PersonContainer, Person, KeywordContainer, Keyword,
+ ValueItem: Completely new/rewritten classes to handle
+ BibTeX data
+ * WebQueryPubMed: Switching to KIO::NetAccess, but still
+ work in progress
+ * WebQuerySRU: Work in progress
+
+2007-02-11 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * SettingsKeyword, EntryWidgetKeyword, DocumentWidget:
+ Improving keyword support
+
+2007-01-14 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsFileIO, DocumentListView, DocumentWidget,
+ KBibTeXPart: Adding support to send references to LyX using
+ an in pipe
+
+2007-01-04 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidget: Checking the identifier for invalid characters
+
+2006-12-27 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Value, ValueItem, ValuePersons, PersonValueKeywords: Replace
+ function added
+ * SideBar: All occurrences of a value can be replaces using a
+ context menu in the sidebar
+ * keywords.bib: New benchmark file
+
+2006-12-09 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * ValueKeywords: Introducing new class to handle keywords
+
+2006-11-19 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * SettingsKeyword, EntryWidgetKeyword: Added support for
+ keywords assigned to BibTeX entries
+
+2006-10-23 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileExporterRIS: Initial code to export RIS files added
+
+2006-10-21 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FileImporterRIS: Initial code to import RIS files added
+ * SearchBar: Making the search bar taller
+ * DocumentWidget: Fixing the main view's context menu for
+ "View Document"
+ * FileImporter: Fixing error when compiling with GCC 4.2
+
+2006-10-08 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentListView: Fixing bug when selecting multiple
+ entries in a filtered list
+
+2006-10-06 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EncoderLaTeX, FileImporterBibTeX, FileExporterBibTeX:
+ Fixing problem with encoding ampersants from and to
+ BibTeX/LaTeX files
+ * Releasing version 0.1.5
+
+2006-10-05 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentWidget, SearchBar: Minor UI improvements
+ * DocumentSourceView: Focus handling improved; bugfix in
+ pre KDE 3.4 support
+ * Setting version 0.1.4.85
+
+2006-10-04 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Minor bugfixes
+ * WebQueryPubMed: Allowing both 'ForeName' and 'FirstName'
+ in author fields in XML document
+ * DocumentSourceView: Making search compatible with pre
+ KDE 3.4 releases
+ * Setting version 0.1.4.81
+
+2006-10-03 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentSourceView: Searching in text added
+ * FieldListView: Correct handling of names fixed
+ * SideBar: Disabling widget when not visible
+ * Entry, EntryWidgetPublication: Handling required and optional
+ fields fixed
+ * KBibTeXShell: Tool button for opening files opens a list
+ of recent files similar to KPDF
+ * Setting version 0.1.4.80
+
+2006-10-01 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetExternal: Added a browse button for local file
+ * WebQueryPubMed: Changed UI to a simple dialog, no more
+ wizard
+ * html.xslt: Added more fields to the stylesheet, so preview
+ will show more information
+
+2006-09-26 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryPubMed: Switching NCBI's interface from esummary to
+ efetch, as this returns a more modern/structured output
+
+2006-09-26 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, SettingsEditing, DocumentListView, FieldLineEdit,
+ FieldListView, SideBar, SearchBar: User-defined font can be
+ set for widgets containing BibTeX data; useful if special fonts
+ are required
+
+2006-09-24 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Global renaming of BibTeX classes (now without "BibTeX" in
+ classname)
+
+2006-09-21 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXValue: Patch by Frank Osterfeld to fix name parsing
+ * Replacing QPtrList by QValueList using patches from Frank
+ Osterfeld
+ * SideBar: Patch by Frank Osterfeld to navigate via keyboard
+ * As suggested by Frank Osterfeld, compare(..) replaced by ==
+ and find(..) replaced by contains(..)
+
+2006-09-19 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXEntry: DOI urls will be complete with a prefix if
+ they do not start with "http"
+ * WebQueryPubMed: Columns in search results list view
+ rearranged, fixing page numbers, detecting publication type
+ and journal title
+ * DocumentListView: Crash fixed when opening documents with
+ the enter key
+ * Rearranged and renamed menu items for better usability
+
+2006-09-17 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXValue, BibTeXValuePersons: Specialization for persons
+ (authors and editors) added. Now persons will be sorted by
+ last name in the sidebar
+ * SideBar: List uses values from current file only, no longer
+ from competion lists
+ * WebQueryPubMed: Simplified, only PubMed will be queried
+ * Rearranged some menu items
+ * Removing command sequences from preview and list view items
+ for better UI display
+ * Setting version 0.1.4.58
+
+2006-09-13 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXEntry: Field type localfile is optional now
+ * Settings: Added SpringerLink as search engine
+ * EntryWidgetPublication: Forcing correct hyphen for pages
+ * DocumentWidget: Updating context menu when changing search
+ engines
+ * BibTeXEntry: New function returns list of URLs of this entry
+ * Settings, SettingsEditing, DocumentListView: Double click
+ action in main list can be set to either edit an entry or open
+ an URL of this entry
+ * SettingsEditing, DocumentListView: Column sorting fixed, got
+ broken during some refactoring
+ * SettingsDlg, SettingsEditing, DocumentWidget,
+ DocumentListWidget: Dialog actions and handling improved (e.g.
+ Apply button), settings will be stored correctly
+
+2006-09-11 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryPubMed: Crash fixed; UI improvements; minor bugfixes
+
+2006-09-10 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryPubMed: Some more fixes and clean-ups
+ * SideBar: Toggle button to switch between important and all
+ field types added
+ * Some refactorings regarding searching Internet based
+ bibliography sources
+ * DocumentWidget, Settings: Width of SideBar and height of
+ Preview will be saved and restored
+ * FieldListView: Adding keyboard shortcuts such as Ctrl+A to add
+ new authors/editors
+ * Setting version 0.1.4.57
+
+2006-09-09 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXEntry: Fixed bug by changing "Electronic (IEEE)" to
+ "Electronic"
+ * DocumentListView: Column "Element Type" can be hidden now, too;
+ "Element Id" renamed to "Entry Id"
+ * KBibTeXPart: Menu to select columns to show is in main menu
+ under "View" now, too
+ * SearchBar: Clear button resets restriction to "All Fields"
+ * SideBar: Instead of double-click, global KDE setting is used
+ (signal execute)
+ * WebQueryPubMed: Some code clean-ups, XML data will be dumped as
+ debug output for manual analysis
+
+2006-09-06 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings: New search engines added (taken from
+ http://de.wikipedia.org/wiki/CiteSeer)
+
+2006-09-05 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQueryPubMed: Importing elements worked for the first time
+
+2006-09-03 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * WebQuery*: Initial code to query web-based bibliography
+ databases, not working yet
+ * DocumentWidget: Code from Felix Schmitt <fschmitt@stanford.
+ edu> added which fixes some crashs
+ * DocumentListView: Code from Felix Schmitt <fschmitt@stanford.
+ edu> added which adds better drag'n'drop functionality
+ * DocumentListView, BibTeXFileImporter*: Code from Felix
+ Schmitt <fschmitt@stanford.edu> added which adds an intelligent
+ mechanism when pasting text
+ * Setting version 0.1.4.56
+
+2006-09-02 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * SideBar: New widget in main window to select text to filter
+ the document for
+
+2006-08-30 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Setting version 0.1.4.55
+
+2006-08-28 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FieldListView: Completion support should work by now
+ * EntryWidget, EntryWidgetSource: Completion system improved
+
+2006-08-20 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FieldListView: Double click problem to add new items fixed
+
+2006-08-16 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidget: Checking for missing data on a regular time base
+ makes warnings more up-to-date
+ * SettingsSearchURL: Disable buttons when not available
+
+2006-08-13 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentWidget, DocumentListWidget: Context menu shows documents
+ associated with the selected BibTeX entry
+ * KBibTeXShell: Removed "Quit" menu item, only "Close" remains
+ * KBibTeX: Making KBibTeX a KUniqueApplication, so only one instance
+ with possibly multiple windows will run at any time
+ * Setting version to 0.1.4.54
+
+2006-08-05 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetPublication: Rearranged field widget for better
+ usability: more important fields are on the left, less
+ important ones are on the right
+ * SettingsSearchURL: Changed UI how URLs are entered and
+ maintained
+
+2006-08-01 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, FieldLineEdit, FieldListView, EntryWidgetAuthor,
+ EntryWidgetTitle, EntryWidgetPublication: Completion system modified
+ to support independent completion for different types of fields
+
+2006-07-30 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings, DocumentWidget, FieldLineEdit, FieldListView: Added text
+ completion using strings occurring elsewhere in the file
+
+2006-07-29 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXEntry, BibTeXElement, BibTeXComment, BibTeXString,
+ DocumentListView, DocumentWidget, SearchBar: Support to filter
+ for specific fields when searching added
+ * Added short-time highlighting (bold font) for newly pasted elements in
+ the main list as a visual feedback
+
+2006-07-28 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentSourceView: Added undo and syntax highlighting capabilites to
+ Kate component
+
+2006-07-26 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * kbibtex_part.rc, kbibtex_part.rc: Moved files back to src/
+ * EncoderLaTeX: Added German quotes support
+ * KBibTeXPart: Crash fixed when embedding into Kile
+
+2006-07-24 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentListView, DocumentListViewItem: Can handle reordering columns now
+ * DocumentWidget: Small UI changes
+ * KBibTeXPart: Calling DocumentWidget's deferred initalization deferred now
+ * Settings: Modifications to save/restore DocumentListView's ordering and
+ sorting
+
+2006-07-16 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * kbibtex_part.rc, kbibtex_part.rc: Moved files to data/config/
+ * DocumentWidget, DocumentListView, DocumentSourceView, SearchBar:
+ Unified API introducing function setFactory(...)
+ * DocumentSourceView: Using Kate part by default; text can be copy,
+ cut and pasted now
+ * DocumentWidget: Better code by using enum EditMode; functions
+ newElement, cutElements, copyElements, pasteElements supported in
+ source edit mode
+ * KBibTeX: File open dialog starts in same directory as currently open
+ document (if applicable)
+ * KBibTeXPart: File save and export dialogs start in same directory as
+ currently open document (if applicable)
+ * Calling the current development version 0.1.4.51
+
+2006-07-14 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXFileExporterRTF: Support to export to RTF (Rich Text Format) added
+
+2006-07-05 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentSourceView: Crash in destructor fixed (code is still alpha)
+ * KBibTeX: Switched from KApplication::quit to KApplication::closeAllWindows
+ for KBibTeX's quit operation
+
+2006-07-02 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentListView: Pressing the enter or return key opens the entry
+ editing similar to double-clicking on an list element
+ * SearchBar: Shortcut for search bar changed from Alt+A to Alt+S
+
+2006-06-22 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EncoderLaTeX: Encoding of backslashes fixed
+ * DocumentSourceWidget: Working on using KTextEditor part
+
+2006-06-15 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXFileImporterBibTeX: When writing entries containing quote chars and
+ using quote chars as delimiters at the same time resulted in a parser
+ failure; fixed.
+
+2006-06-10 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXFileImporterBibTeX, DocumentWidget: Integrating Frank Osterfeld's
+ patches for fixing the BibTeX parser and the modification status when
+ pasting BibTeX elements
+
+2006-06-04 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentListView, DocumentListItem, Settings: Columns in the main list view
+ are more flexible, any standard field type can be (de)selected using the
+ list header's context menu
+
+2006-05-24 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Local File patch from Sebastian Scherer <basti@andrew.cmu.edu>
+ added
+
+2006-05-09 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetUser: Sizing problem in list view with long values for
+ user-defined fields fixed
+
+2006-05-07 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentListView, Settings: Working on having all field types as columns
+ available (work in progress)
+ * main.cpp, KBibTeX: File opening and closing management made more intuitive
+ * KBibTeX, KBibTeXPart: Minor fixes and improvements in configuration
+ management
+ * Settings: Additional search URL for PubMed added
+
+2006-04-26 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FieldListView: Fixing warning
+ * Releasing KBibTeX 0.1.4
+
+2006-04-18 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetAuthor: When editing Book or InBook entry, only author xor
+ editor are required; warnings adapted
+ * FieldListView: Internal status problem when deleting all list items fixed
+
+2006-04-17 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * For all occurrences of QTextStream ensure that it is using UTF-8
+ * EntryWidget: Improve warnings for entry (GUI improved, missing warning
+ for month added)
+
+2006-04-15 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXValue: static function to check if a text contains only valid chars
+ for a string key
+ * EntryWidgetExternal, EntryWidgetMisc, EntryWidgetPublication, EntryWidgetTab,
+ EntryWidgetTitle, FieldLineEdit: Check and warnings for invalid string
+ keys implemented
+
+2006-04-13 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXPart: KMessageBox with list not available in old KDE versions.
+ Fixed with conditional compilation
+ * FieldListView: Empty items forbidden, double click on list creates new
+ item, moving items while editing disabled
+ * Preparing for 0.1.3.96 (aka 0.1.4 Beta 5)
+
+2006-04-11 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXFileExporter*: Error log in form of a string list is passed to the
+ encoders
+ * BibTeXFileExporterBibTeX: BibTeX exporter will honor encoding (LaTeX or
+ UTF-8) now
+ * FieldListView: QToolTips added, Warnings fixed
+ * SearchBar: Icons enlarged, QToolTops and spacings added
+
+2006-04-06 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidget*: If an entry's edit dialog has modifications, a warning
+ message will pop up before closing the window, thus preventing the user from
+ loosing his/her data
+
+2006-03-29 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * DocumentWidget, KBibTeXPart: Saving mechanism for part refactored, hopefully
+ some bugs fixed
+ * KBibTeXSettingsIO: Bibliography styles added
+ * ValueWidget: Renaming policy changed
+ * Preparing for 0.1.3.95 (aka 0.1.4 Beta 4)
+
+2006-03-27 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXEntry, BibTeXEntryField, EntryWidgetPublication: Location field added
+ * BibTeXFileImporterBibTeX: Progress detection improved (but not yet perfect)
+ * DocumentWidget: Progress detection improved (but not yet perfect); Focus
+ policy changed
+ * KBibTeXPart: Initialization improved (problems when embedding into Kile);
+ Opening/saving/exporting mechanism improved
+ * Settings: Google document and .bib search added
+ * New testsets added
+
+2006-03-19 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * CommentWidget, DocumentListView, DocumentWidget, EntryWidgetAuthor,
+ EntryWidget, EntryWidgetExternal, EntryWidgetMisc, EntryWidgetPublication,
+ EntryWidgetSource, EntryWidgetTab, EntryWidgetTitle, EntryWidgetUser,
+ FileLineEdit, FileListView, KBibTeXPart, StringWidget, ValueWidget:
+ read-only semantics changed for embedding e.g. into Konqueror
+ * DocumentWidget, KBibTeX: Preview reintegrated into DocumentWidget, so that
+ is available when embedding part into other apps
+ * KBibTeXPart: Opening and saving mechanisms modified
+ * Preparing for KBibTeX 0.1.4_beta3
+
+2006-03-14 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * FieldListView: Problem preventing editing items fixed
+
+2006-03-12 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Removing remains of EndNote support
+ * BibTeXFileExporterToolChain, EntryWidgetTitle, EntryWidgetPublication,
+ EntryWidgetMisc, EntryWidgetExternal: Memory problems fixed (due to valgrind)
+ * Preparing for KBibTeX 0.1.4_beta2
+
+2006-03-07 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXComment, BibTeXString, BibTeXValue, BibTeXEntry:
+ containsPattern fixed
+ * BibTeXFileImporterBibTeX: Finding text fixed, Token parser improved,
+ was triggering EOF too early
+ * DocumentListView: Pasting text improved
+ * DocumentWidget: Pasting text improved, Preview triggered on click on list
+ * BibTeXValue, EntryWidgetUser, FieldListView: Memory problem fixed
+ * ElementPreview: Layout changed
+ * KBibTeXPart: Opening remove files possible, saved files will be added to MRU
+
+2006-03-05 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * EntryWidgetExternal: Crash fixed
+ * KBibTeX, KBibTeXPart, KBibTeXSettingsEditing, KBibTeXSettingsIO,
+ DocumentWidget: Importing EndNote and ProCite disabled
+ * KBibTeXSettingsEditing: Layout improved
+ * FieldLineEdit: Tooltips improved
+ * Preparing for KBibTeX 0.1.4_beta1
+
+2006-02-21 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXEntry, BibTeXEntryField, EntryWidgetExternal: Support for DOI added
+ * BibTeXFileImporterEndNote: Various improvements
+ * DocumentListView: Bug when filtering Strings and Comments fixed
+ * DocumentWidget, KBibTeX: Initial support for dock widgets added
+ * ElementPreview: Initial version of a dock widget to preview BibTeX elements
+ * FieldLineEdit: Bugfix in widget layout
+ * BibTeXFileExporterXML: Better handling for tag "month"
+ * steinertree.bib: Entry fixed
+ * html.xslt: Rendering of HTML files improved
+ * Releasing KBibTeX 0.1.4_alpha2
+
+2006-02-08 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Many changes and bugfixes, most notabe improvement is editing macros
+
+2006-01-04 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXPart, DocumentWidget, DocumentListView, DocumentSourceView:
+ Refactoring UI classes and actions
+ * Bugfix: Commands in mathmode (e.g. \log) will no longer be modified by
+ BibTeX::EncoderLaTeX
+ * Bugfix: Files will be saved (user is asked) when closing a modified
+ document
+ * Changed handbook's license from FDL to GPL
+
+2005-12-15 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Searching in Amatex added
+
+2005-12-05 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXEntryWidgetUserFields: Bugfix for not memorizing user field's content
+ * Releasing KBibTeX 0.1.3
+
+2005-12-04 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Preparing for KBibTeX 0.1.3
+ * KBibTeXPart: Icon for Export changed to "goto"
+ * testset/secondary.bib: New testcast
+
+2005-12-03 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXEntry: Bugfix when search text (+/-1 bug)
+ * KBibTeXPart: Crash when embedding into Kile (hopefully) fixed using
+ QTimer::singleShot(...)
+ * KBibTeXPart: Stripping { and } from internet search query
+ * Settings: Default URL for CiteSeer changed
+
+2005-12-02 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXSettingsSearchURL: Button for reset to default URLs added
+
+2005-11-29 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXPart: Preview when selecting different BibTeX element by keyboard
+ * Autotools: Trying to fix RPATH issue
+ * KBibTeXListView: Paste bug fixed
+ * KBibTeXEntryWidgetPublication: Quotation fixed for crossref
+ * KBibTeXPart: Code cleanup
+ * BibTeXFileExporterBibTeX: Ordering of elements corrected
+ * Documentation fixed
+ * Preparing for KBibTeX 0.1.3 Beta 2
+
+2005-11-28 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXPart, KBibTeXListView: New menu items to hide strings and
+ comments
+
+2005-11-26 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Settings: Problem finding the XSLT stylesheet for HTML export fixed
+ * BibTeXXSLTransform: Warning messages added for problems during
+ XSL transformation
+ * KBibTeX: Crash fixed when not able to load KBibTeX part
+ * KBibTeXListView: Fallback to HTML export using XSLT when not export
+ is configured
+ * xslt/Makefile.am: Installation directory changed
+ * doc/Makefile.am, doc/index.docbook: Initial documentation stub added
+ * SearchBar: Filter control is now a history combobox storing previous
+ search requests
+
+2005-11-13 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Major refactoring, preparing for KBibTeX 0.1.3 Beta 1
+
+2005-09-29 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * All classes: Moved BibTeX classes into BibTeX namespace
+ * BibTeXPreamble, KBibTeXPreambleWidget: Removed, as this element should
+ occur only once at the top of a file
+
+2005-09-27 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXListViewItem: Only first line of comments will be shown
+ * KBibTeXListView, KBibTeXPart: Copy&Past code moved to KBibTeXListView
+ (move incomplete)
+ * BibTeXEncoder: Nearly all special characters will be surrounded by
+ brackets now
+ * testset/tsp04.tsp: Double entry removed
+
+
+2005-09-24 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXPart, KBibTeX::XSLTransform: Introducing preview at bottom of
+ main list of elements. Based on XML text for element, translated by
+ XSL stylesheet. Buggy and hard-coded, but it works technically.
+ * Preparing for release 0.1.3
+
+2005-09-21 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXPart: Progress bar when opening, importing or saving files
+ improved
+ * BibTeXEncoder: Encoding of tilde character fixed
+ * KBibTeXActionTextSearch: Restoring old code as KListViewSearchLine is only
+ in KDE 3.4 and newer
+ * Going to release 0.1.2
+
+2005-09-19 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXPart: Overwriting warning fixed, was warning when saving an opened
+ file.
+
+2005-09-18 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Man page: Added to autotools scripts. Problem: File gets not yet included
+ by KDevelop
+ * KBibTeXPart: Warning before exiting KBibTeX after editing unsafed data
+
+2005-09-17 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXEntry, BibTeXFileExporter: Old debug output removed
+ * KBibTeXPart: Warning messages will be issued before overwriting an
+ existing file
+ * KBibTeXListView: Drag'n'Drop improved, complete area of the widget accepts
+ drops now
+
+2005-09-16 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXActionTextSearch: Using KListViewSearchLineWidget instead of QLabel
+ and QLineEdit. Code is more simple and cleaner now.
+ * admin/libtool.m4.in, admin/acinclude.m4.in: Various unnecessary tests
+ (Fortran, audio libraries, ...) removed from configure script
+
+2005-09-11 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Preparing for release 0.1.2
+ * BibTeXEntry, BibTeXEntryField, KBibTeXEntryWidget, BibTeXParser: Handling
+ of string keys improved
+ * KBibTeXEntryWidget: Layout changed for string key handling
+ * Settings, KBibTeXPart: Column width are no longer set automatically, but
+ will be preserved between sessions
+ * KBibTeXPart: Inserting files into an existing document added
+ * KBibTeXPart: Drag'n'Drop both text/selected elements and files (e.g. from
+ Konqueror) added, but not yet bug free. Dropping only works when dropped
+ on column header in main view
+ * Testset: New files
+ * Initial man page added
+
+2005-09-02 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXPart: Bugfixes in new saving/exporting code
+ * BibTeXFileExporter: InProceedings, InBook, and InCollection are now written
+ before any other element to ensure field crossref works
+ * BibTeXEntry: Fix for quoting did not work, reverting. However string keys
+ still do not work. Fixing that would require some refactoring
+ * Testset: File tsp04.bib expanded
+ * BibTeXEncoder: Support for more characters
+ * Preparing for release 0.1.1
+
+2005-08-30 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXEntryWidget and children: Layout improved
+ * KBibTeXEntryWidgetPublication: Replaced spinboxes for Edition and Volume by
+ lineedit controls
+ * KBibTeXEntryWidgetUserFields: Open field's value in Konqueror if valid URL
+ * BibTeXEntry: Quoting of field values without spaces fixed (e.g. string keys)
+
+2005-08-29 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeXEncoder: Encoding of tilde char fixed
+ * KBibTeXPart: Rewriting of save/export mechanism. Exporting is done by
+ "save as" dialog, saving of selected elements is possible now
+ * KBibTeXEntryWidgetAuthor: Warnings improved if either author or editor
+ is required
+
+2005-08-24 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * KBibTeXPart: Refactoring saving and exporting
+
+2005-08-17 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Menu entries for exporting removed, as for future relases this feature will
+ be integrated into the file saving mechanism
+ * KBibTeXPart: Further changes on the file save mechanism
+
+2005-08-16 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * UI improvment: Number and Volume switched position in
+ KBibTeXEntryWidgetPublication
+ * BibTeXFile: New function insertText(...) to parse and append plain BibTeX
+ text
+ * BibTeXString, BibTeXComment, BibTeXPreamble: New copy constructor
+ introduced
+ * KBibTeXEntryWidget: Parsing modified entry source code uses
+ BibTeX::insertText(...) now
+ * KBibTeXPart: Initial modifications to allow saving of selected elements
+ only. Does not work yet
+ Function saveFile(...) has new parameter to determine, which BibTeXFile to
+ save
+ Valditity of URLs is now check using isValid() instead of !isEmpty()
+ * KBibTeXListView: New function selectedElements returns BibTeXFile containing
+ only selected elements
+ * KBibTeXFile: Class removed, no longer used
+
+2005-08-12 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Parsing JabRef and IEEE files improved/fixed
+
+2005-08-11 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Sorting columns was not possible when "No sorting" was select in the
+ configuration. Fixed for now, but maybe this is a bug in KDE/Qt.
+
+2005-08-10 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * Bugfix: No BibTeX file is associated to an empty BibTeX list at the
+ beginning, so no data can be inserted without opening an existing
+ file before
+ * More and more detailed items added to TODO list
+
+2005-08-09 Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ * BibTeX entry "Conference" removed, as it is the same as "InProceedings"
+ * BibTeX entry "Electronic" introduced; defined by IEEE
+ * Support for parsing IEEE BibTeX files added
+ * Opening files on remote locations re-enabled (bugfix)
+ * Action list to add entries from tool bar re-enabled (bugfix)
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 0000000..dc7a325
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,266 @@
+# Doxyfile 1.3.7-KDevelop
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = kbibtex.kdevelop
+PROJECT_NUMBER = 0.2
+OUTPUT_DIRECTORY =
+CREATE_SUBDIRS = NO
+OUTPUT_LANGUAGE = English
+USE_WINDOWS_ENCODING = NO
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+ALWAYS_DETAILED_SEC = NO
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = NO
+STRIP_FROM_PATH = /home/thomas/Programmierung/kbibtex/
+STRIP_FROM_INC_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP = NO
+INHERIT_DOCS = YES
+DISTRIBUTE_GROUP_DOC = NO
+TAB_SIZE = 8
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_JAVA = NO
+SUBGROUPING = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = YES
+EXTRACT_LOCAL_METHODS = NO
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = YES
+HIDE_SCOPE_NAMES = NO
+SHOW_INCLUDE_FILES = YES
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+SORT_BRIEF_DOCS = NO
+SORT_BY_SCOPE_NAME = NO
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = /home/thomas/test/programming/kbibtex
+FILE_PATTERNS = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.idl \
+ *.odl \
+ *.cs \
+ *.php \
+ *.php3 \
+ *.inc \
+ *.m \
+ *.mm \
+ *.C \
+ *.CC \
+ *.C++ \
+ *.II \
+ *.I++ \
+ *.H \
+ *.HH \
+ *.H++ \
+ *.CS \
+ *.PHP \
+ *.PHP3 \
+ *.M \
+ *.MM \
+ *.C \
+ *.H \
+ *.tlh \
+ *.diff \
+ *.patch \
+ *.moc \
+ *.xpm \
+ *.dox
+RECURSIVE = yes
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS = *
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_SOURCE_FILES = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
+VERBATIM_HEADERS = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = NO
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = YES
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = NO
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+BINARY_TOC = NO
+TOC_EXPAND = NO
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = NO
+TREEVIEW_WIDTH = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = YES
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4wide
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = NO
+USE_PDFLATEX = NO
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = yes
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE = kbibtex.tag
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = YES
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = NO
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+UML_LOOK = NO
+TEMPLATE_RELATIONS = NO
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DOT_IMAGE_FORMAT = png
+DOT_PATH =
+DOTFILE_DIRS =
+MAX_DOT_GRAPH_WIDTH = 1024
+MAX_DOT_GRAPH_HEIGHT = 1024
+MAX_DOT_GRAPH_DEPTH = 1000
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+SEARCHENGINE = NO
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..02a4a07
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,167 @@
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+ The file `configure.in' is used to create `configure' by a program
+called `autoconf'. You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes a while. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 4. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. You can give `configure'
+initial values for variables by setting them in the environment. Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on. Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+ CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+ If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
+
+`--help'
+ Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made.
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--version'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..ccc478e
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,22 @@
+SUBDIRS = $(TOPSUBDIRS) man xslt doc po
+
+$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
+ cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
+
+$(top_srcdir)/subdirs:
+ cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
+
+$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
+ @cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
+
+MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
+
+package-messages:
+ cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common package-messages
+ $(MAKE) -C po merge
+
+EXTRA_DIST = admin COPYING configure.in.in
+
+dist-hook:
+ cd $(top_distdir) && perl admin/am_edit -padmin
+ cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
diff --git a/Makefile.cvs b/Makefile.cvs
new file mode 100644
index 0000000..4c0afd1
--- /dev/null
+++ b/Makefile.cvs
@@ -0,0 +1,10 @@
+all:
+ @echo "This Makefile is only for the CVS repository"
+ @echo "This will be deleted before making the distribution"
+ @echo ""
+ $(MAKE) -f admin/Makefile.common cvs
+
+dist:
+ $(MAKE) -f admin/Makefile.common dist
+
+.SILENT:
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..058f04c
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,885 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+ TODO admin/compile admin/config.guess admin/config.sub \
+ admin/depcomp admin/install-sh admin/ltmain.sh admin/missing \
+ admin/mkinstalldirs admin/ylwrap
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+#>- RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+#>- html-recursive info-recursive install-data-recursive \
+#>- install-exec-recursive install-info-recursive \
+#>- install-recursive installcheck-recursive installdirs-recursive \
+#>- pdf-recursive ps-recursive uninstall-info-recursive \
+#>- uninstall-recursive
+#>+ 6
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive nmcheck-recursive bcheck-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSCCONFIG = @ARTSCCONFIG@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOPIDLNG = @DCOPIDLNG@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KCFG_DEPENDENCIES = @KCFG_DEPENDENCIES@
+KCONFIG_COMPILER = @KCONFIG_COMPILER@
+KDECONFIG = @KDECONFIG@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_RPATH = @KDE_RPATH@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_FPIE = @KDE_USE_FPIE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+KDE_USE_PIE = @KDE_USE_PIE@
+KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBYAZ_CFLAGS = @LIBYAZ_CFLAGS@
+LIBYAZ_LIBS = @LIBYAZ_LIBS@
+LIBYAZ_RPATH = @LIBYAZ_RPATH@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KABC = @LIB_KABC@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDED = @LIB_KDED@
+LIB_KDEPIM = @LIB_KDEPIM@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KDNSSD = @LIB_KDNSSD@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIMPROXY = @LIB_KIMPROXY@
+LIB_KIO = @LIB_KIO@
+LIB_KJS = @LIB_KJS@
+LIB_KNEWSTUFF = @LIB_KNEWSTUFF@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_KUNITTEST = @LIB_KUNITTEST@
+LIB_KUTILS = @LIB_KUTILS@
+LIB_POLL = @LIB_POLL@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LIB_XRENDER = @LIB_XRENDER@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKEKDEWIDGETS = @MAKEKDEWIDGETS@
+MCOPIDL = @MCOPIDL@
+MEINPROC = @MEINPROC@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+XGETTEXT = @XGETTEXT@
+XMKMF = @XMKMF@
+XMLLINT = @XMLLINT@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+X_PRE_LIBS = @X_PRE_LIBS@
+X_RPATH = @X_RPATH@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+include_ARTS_FALSE = @include_ARTS_FALSE@
+include_ARTS_TRUE = @include_ARTS_TRUE@
+include_x11_FALSE = @include_x11_FALSE@
+include_x11_TRUE = @include_x11_TRUE@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_kcfgdir = @kde_kcfgdir@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+kdeinitdir = @kdeinitdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+xdg_appsdir = @xdg_appsdir@
+xdg_directorydir = @xdg_directorydir@
+xdg_menudir = @xdg_menudir@
+SUBDIRS = $(TOPSUBDIRS) man xslt doc po
+MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
+EXTRA_DIST = admin COPYING configure.in.in
+#>- all: config.h
+#>+ 1
+all: docs-am config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+#>- cd $(srcdir) && $(AUTOMAKE) --gnu \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu Makefile
+#>+ 14
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+ ( \
+ cd $(srcdir) && $(AUTOMAKE) --gnu \
+ ) || exit 1; echo ' cd $(top_srcdir) && perl admin/am_edit '; cd $(top_srcdir) && perl admin/am_edit && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+ cd $(top_srcdir) && perl admin/am_edit Makefile.in
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+#>- cd $(srcdir) && $(AUTOCONF)
+#>+ 2
+ cd $(srcdir) && rm -f configure
+ cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ 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: $(am__configure_deps)
+ cd $(top_srcdir) && $(AUTOHEADER)
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+# 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):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ 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) \
+ || eval $$failcom; \
+ 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:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ 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) \
+ || eval $$failcom; \
+ 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
+
+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
+
+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; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ 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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+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
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ $(mkdir_p) $(distdir)/admin
+ @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"; \
+ $(mkdir_p) "$(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='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -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
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | 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
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ 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 ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e '1{h;s/./=/g;p;x;}' -e '$${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 config.h
+installdirs: installdirs-recursive
+installdirs-am:
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+#>- clean: clean-recursive
+#>+ 1
+clean: kde-rpo-clean clean-recursive
+
+#>- clean-am: clean-generic clean-libtool mostlyclean-am
+#>+ 1
+clean-am: clean-bcheck 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:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+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-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-am clean clean-generic clean-libtool clean-recursive \
+ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+ dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-recursive distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am html html-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-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am uninstall-info-am
+
+
+$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
+ cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
+
+$(top_srcdir)/subdirs:
+ cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
+
+$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
+ @cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
+
+package-messages:
+ cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common package-messages
+ $(MAKE) -C po merge
+
+dist-hook:
+ cd $(top_distdir) && perl admin/am_edit -padmin
+ cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
+# 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:
+
+#>+ 2
+KDE_DIST=kbibtex.kdevelop subdirs Makefile.in BUGS configure.files config.h.in configure.in Makefile.cvs kbibtex.kdevelop.pcs aclocal.m4 Doxyfile Makefile.am acinclude.m4 configure
+
+#>+ 2
+docs-am:
+
+#>+ 7
+force-reedit:
+ \
+ cd $(srcdir) && $(AUTOMAKE) --gnu \
+
+ cd $(top_srcdir) && perl admin/am_edit Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-recursive
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXX) $(DEFS) -I. -I$(srcdir) -I$(top_builddir) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..8ad9866
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,66 @@
+2005-Aug-05
+Warnings during compilation fixed/removed.
+
+2005-Aug-04
+Toolbar and read-only mode handling for embedding into e.g. Konqueror improved.
+
+2005-Aug-02
+Instead of a find dialog a search widget as part of the toolbar is used.
+
+2005-July-31
+UI Bugfixes regarding saving files.
+
+2005-July-22
+Bugfixes and UI Improvements. The entry widget's warning list has been improved.
+
+2005-July-15
+Bugfixes and UI improvements. The entry widget has a list, where warnings about missing fields will be shown (currently alpha).
+
+2005-July-02
+New application icon. When closing the application, user gets asked if he wants to save the modified file.
+
+2005-June-30
+Some bugfixes due to reports by Christian Nolte and Ingo Stierand.
+
+2005-June-18
+Even more bugfixes. Network-transparent saving of files should work by now.
+
+2005-June-06
+More bugfixes. Internal changes (refactoring).
+
+2005-May-31
+More bugfixes for PDF and PostScript export.
+
+2005-May-29
+Bugfixes for PDF and PostScript export.
+
+2005-May-21
+KBibTeX 20050521 has been released. Preferences dialog for settings and exporting as PDF or PostScript has been added.
+
+2005-May-08
+KBibTeX 20050508 has been released. Last minute bugfix.
+
+2005-May-07
+KBibTeX 20050507 has been released. Some bugs fixed (user fields, searching) and drag&drop to rearrange BibTeX elements added.
+
+2005-Apr-12
+KBibTeX 20050412 has been released. Entries have a colored source view and you can search on Google Scholar for papers.
+
+2005-Mar-24
+KBibTeX 20050324 has been released. Various bug fixes in BibTeX file parsing and encoding fixed.
+
+2005-Mar-16
+KBibTeX 20050316 has been released. Crash during reading unclean files fixed. RPMs für SuSE 9.2 updated.
+
+2005-Mar-16
+KBibTeX 20050315 has been released. Searching for paper titles in Google and CiteSeer added. RPMs für SuSE 9.2 updated.
+
+2005-Mar-14
+RPMs for SuSE 9.2 have been released. You may try to use the source rpm to build rpm files for your favorite rpm-based distribution. Packages for other distributions are welcome.
+
+2005-Mar-05
+KBibTeX 20050305 has been released. Now you can search inside you BibTeX files.
+
+2005-Feb-28
+KBibTeX 20050228 has been released. New features, bugs and fixes.
+
diff --git a/README b/README
new file mode 100644
index 0000000..31ba393
--- /dev/null
+++ b/README
@@ -0,0 +1,9 @@
+Please goto this address for more information:
+
+ http://www.unix-ag.uni-kl.de/~fischer/kbibtex/
+
+
+Note: To compile KBibTeX from source, you will need some
+devel packages from your distribution. Names may differ,
+but you need at least devel packages from Qt and KDE.
+
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..cc583a5
--- /dev/null
+++ b/TODO
@@ -0,0 +1,13 @@
+=================================================
+Better support for biblatex fields
+Status: Not yet implemented, scheduled for KDE4 port
+=================================================
+Search Z39.50 databases
+Status: Seems to work, but needs 'real-world' testing
+=================================================
+Support for cyrillic letters
+Status: Initial code written, more info needed how to use such letters in BibTeX
+=================================================
+Write man page and/or manual (F1)
+Status: Not yet implemented, help wanted
+=================================================
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..2f0114a
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,11863 @@
+## -*- autoconf -*-
+
+dnl This file is part of the KDE libraries/packages
+dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
+dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
+
+dnl This file is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Library General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2 of the License, or (at your option) any later version.
+
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Library General Public License for more details.
+
+dnl You should have received a copy of the GNU Library General Public License
+dnl along with this library; see the file COPYING.LIB. If not, write to
+dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+dnl Boston, MA 02110-1301, USA.
+
+dnl IMPORTANT NOTE:
+dnl Please do not modify this file unless you expect your modifications to be
+dnl carried into every other module in the repository.
+dnl
+dnl Single-module modifications are best placed in configure.in for kdelibs
+dnl and kdebase or configure.in.in if present.
+
+# KDE_PATH_X_DIRECT
+dnl Internal subroutine of AC_PATH_X.
+dnl Set ac_x_includes and/or ac_x_libraries.
+AC_DEFUN([KDE_PATH_X_DIRECT],
+[
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+if test "$ac_x_includes" = NO; then
+ # Guess where to find include files, by looking for this one X11 .h file.
+ test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
+
+ # First, try using that file with no special directory specified.
+AC_TRY_CPP([#include <$x_direct_test_include>],
+[# We can compile using X headers with no special include directory.
+ac_x_includes=],
+[# Look for the header file in a standard set of common directories.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ for ac_dir in \
+ /usr/X11/include \
+ /usr/X11R6/include \
+ /usr/X11R5/include \
+ /usr/X11R4/include \
+ \
+ /usr/include/X11 \
+ /usr/include/X11R6 \
+ /usr/include/X11R5 \
+ /usr/include/X11R4 \
+ \
+ /usr/local/X11/include \
+ /usr/local/X11R6/include \
+ /usr/local/X11R5/include \
+ /usr/local/X11R4/include \
+ \
+ /usr/local/include/X11 \
+ /usr/local/include/X11R6 \
+ /usr/local/include/X11R5 \
+ /usr/local/include/X11R4 \
+ \
+ /usr/X386/include \
+ /usr/x386/include \
+ /usr/XFree86/include/X11 \
+ \
+ /usr/include \
+ /usr/local/include \
+ /usr/unsupported/include \
+ /usr/athena/include \
+ /usr/local/x11r5/include \
+ /usr/lpp/Xamples/include \
+ \
+ /usr/openwin/include \
+ /usr/openwin/share/include \
+ ; \
+ do
+ if test -r "$ac_dir/$x_direct_test_include"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+ done])
+fi # $ac_x_includes = NO
+
+if test "$ac_x_libraries" = NO; then
+ # Check for the libraries.
+
+ test -z "$x_direct_test_library" && x_direct_test_library=Xt
+ test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
+
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS="$LIBS"
+ LIBS="-l$x_direct_test_library $LIBS"
+AC_TRY_LINK([#include <X11/Intrinsic.h>], [${x_direct_test_function}(1)],
+[LIBS="$ac_save_LIBS"
+# We can link X programs with no special library path.
+ac_x_libraries=],
+[LIBS="$ac_save_LIBS"
+# First see if replacing the include by lib works.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
+ /usr/X11/lib${kdelibsuff} \
+ /usr/X11R6/lib${kdelibsuff} \
+ /usr/X11R5/lib${kdelibsuff} \
+ /usr/X11R4/lib${kdelibsuff} \
+ \
+ /usr/lib${kdelibsuff}/X11 \
+ /usr/lib${kdelibsuff}/X11R6 \
+ /usr/lib${kdelibsuff}/X11R5 \
+ /usr/lib${kdelibsuff}/X11R4 \
+ \
+ /usr/local/X11/lib${kdelibsuff} \
+ /usr/local/X11R6/lib${kdelibsuff} \
+ /usr/local/X11R5/lib${kdelibsuff} \
+ /usr/local/X11R4/lib${kdelibsuff} \
+ \
+ /usr/local/lib${kdelibsuff}/X11 \
+ /usr/local/lib${kdelibsuff}/X11R6 \
+ /usr/local/lib${kdelibsuff}/X11R5 \
+ /usr/local/lib${kdelibsuff}/X11R4 \
+ \
+ /usr/X386/lib${kdelibsuff} \
+ /usr/x386/lib${kdelibsuff} \
+ /usr/XFree86/lib${kdelibsuff}/X11 \
+ \
+ /usr/lib${kdelibsuff} \
+ /usr/local/lib${kdelibsuff} \
+ /usr/unsupported/lib${kdelibsuff} \
+ /usr/athena/lib${kdelibsuff} \
+ /usr/local/x11r5/lib${kdelibsuff} \
+ /usr/lpp/Xamples/lib${kdelibsuff} \
+ /lib/usr/lib${kdelibsuff}/X11 \
+ \
+ /usr/openwin/lib${kdelibsuff} \
+ /usr/openwin/share/lib${kdelibsuff} \
+ ; \
+do
+dnl Don't even attempt the hair of trying to link an X program!
+ for ac_extension in a so sl; do
+ if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done])
+fi # $ac_x_libraries = NO
+])
+
+
+dnl ------------------------------------------------------------------------
+dnl Find a file (or one of more files in a list of dirs)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_FIND_FILE],
+[
+$3=NO
+for i in $2;
+do
+ for j in $1;
+ do
+ echo "configure: __oline__: $i/$j" >&AC_FD_CC
+ if test -r "$i/$j"; then
+ echo "taking that" >&AC_FD_CC
+ $3=$i
+ break 2
+ fi
+ done
+done
+])
+
+dnl KDE_FIND_PATH(program-name, variable-name, list-of-dirs,
+dnl if-not-found, test-parameter, prepend-path)
+dnl
+dnl Look for program-name in list-of-dirs+$PATH.
+dnl If prepend-path is set, look in $PATH+list-of-dirs instead.
+dnl If found, $variable-name is set. If not, if-not-found is evaluated.
+dnl test-parameter: if set, the program is executed with this arg,
+dnl and only a successful exit code is required.
+AC_DEFUN([KDE_FIND_PATH],
+[
+ AC_MSG_CHECKING([for $1])
+ if test -n "$$2"; then
+ kde_cv_path="$$2";
+ else
+ kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
+
+ AC_CACHE_VAL(kde_cv_path_$kde_cache,
+ [
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z "$6"; then dnl Append dirs in PATH (default)
+ dirs="$3 $dirs"
+ else dnl Prepend dirs in PATH (if 6th arg is set)
+ dirs="$dirs $3"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/$1"; then
+ if test -n "$5"
+ then
+ evalstr="$dir/$1 $5 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/$1"
+ break
+ fi
+ else
+ kde_cv_path="$dir/$1"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+ ])
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ AC_MSG_RESULT(not found)
+ $4
+ else
+ AC_MSG_RESULT($kde_cv_path)
+ $2=$kde_cv_path
+
+ fi
+])
+
+AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
+[
+ AC_MSG_ERROR([No Qt meta object compiler (moc) found!
+Please check whether you installed Qt correctly.
+You need to have a running moc binary.
+configure tried to run $ac_cv_path_moc and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable MOC to the right one before running
+configure.
+])
+])
+
+AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
+[
+ AC_MSG_WARN([No Qt ui compiler (uic) found!
+Please check whether you installed Qt correctly.
+You need to have a running uic binary.
+configure tried to run $ac_cv_path_uic and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable UIC to the right one before running
+configure.
+])
+])
+
+
+AC_DEFUN([KDE_CHECK_UIC_FLAG],
+[
+ AC_MSG_CHECKING([whether uic supports -$1 ])
+ kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
+ AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
+ [
+ cat >conftest.ui <<EOT
+ <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
+EOT
+ ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
+ if AC_TRY_EVAL(ac_uic_testrun); then
+ eval "kde_cv_prog_uic_$kde_cache=yes"
+ else
+ eval "kde_cv_prog_uic_$kde_cache=no"
+ fi
+ rm -f conftest*
+ ])
+
+ if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
+ AC_MSG_RESULT([yes])
+ :
+ $3
+ else
+ AC_MSG_RESULT([no])
+ :
+ $4
+ fi
+])
+
+
+dnl ------------------------------------------------------------------------
+dnl Find the meta object compiler and the ui compiler in the PATH,
+dnl in $QTDIR/bin, and some more usual places
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_PATH_QT_MOC_UIC],
+[
+ AC_REQUIRE([KDE_CHECK_PERL])
+ qt_bindirs=""
+ for dir in $kde_qt_dirs; do
+ qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
+ done
+ qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
+ if test ! "$ac_qt_bindir" = "NO"; then
+ qt_bindirs="$ac_qt_bindir $qt_bindirs"
+ fi
+
+ KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
+ if test -z "$UIC_NOT_NEEDED"; then
+ KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
+ if test -z "$UIC_PATH" ; then
+ KDE_UIC_ERROR_MESSAGE
+ exit 1
+ else
+ UIC=$UIC_PATH
+
+ if test $kde_qtver = 3; then
+ KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
+ KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
+
+ if test x$ac_uic_supports_libpath = xyes; then
+ UIC="$UIC -L \$(kde_widgetdir)"
+ fi
+ if test x$ac_uic_supports_nounload = xyes; then
+ UIC="$UIC -nounload"
+ fi
+ fi
+ fi
+ else
+ UIC="echo uic not available: "
+ fi
+
+ AC_SUBST(MOC)
+ AC_SUBST(UIC)
+
+ UIC_TR="i18n"
+ if test $kde_qtver = 3; then
+ UIC_TR="tr2i18n"
+ fi
+
+ AC_SUBST(UIC_TR)
+])
+
+AC_DEFUN([KDE_1_CHECK_PATHS],
+[
+ KDE_1_CHECK_PATH_HEADERS
+
+ KDE_TEST_RPATH=
+
+ if test -n "$USE_RPATH"; then
+
+ if test -n "$kde_libraries"; then
+ KDE_TEST_RPATH="-R $kde_libraries"
+ fi
+
+ if test -n "$qt_libraries"; then
+ KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
+ fi
+
+ if test -n "$x_libraries"; then
+ KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
+ fi
+
+ KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
+ fi
+
+AC_MSG_CHECKING([for KDE libraries installed])
+ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_ERROR([your system fails at linking a small KDE application!
+Check, if your compiler is installed correctly and if you have used the
+same compiler to compile Qt and kdelibs as you did use now.
+For more details about this problem, look at the end of config.log.])
+fi
+
+if eval `KDEDIR= ./conftest 2>&5`; then
+ kde_result=done
+else
+ kde_result=problems
+fi
+
+KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
+kde_have_all_paths=yes
+
+KDE_SET_PATHS($kde_result)
+
+])
+
+AC_DEFUN([KDE_SET_PATHS],
+[
+ kde_cv_all_paths="kde_have_all_paths=\"yes\" \
+ kde_htmldir=\"$kde_htmldir\" \
+ kde_appsdir=\"$kde_appsdir\" \
+ kde_icondir=\"$kde_icondir\" \
+ kde_sounddir=\"$kde_sounddir\" \
+ kde_datadir=\"$kde_datadir\" \
+ kde_locale=\"$kde_locale\" \
+ kde_cgidir=\"$kde_cgidir\" \
+ kde_confdir=\"$kde_confdir\" \
+ kde_kcfgdir=\"$kde_kcfgdir\" \
+ kde_mimedir=\"$kde_mimedir\" \
+ kde_toolbardir=\"$kde_toolbardir\" \
+ kde_wallpaperdir=\"$kde_wallpaperdir\" \
+ kde_templatesdir=\"$kde_templatesdir\" \
+ kde_bindir=\"$kde_bindir\" \
+ kde_servicesdir=\"$kde_servicesdir\" \
+ kde_servicetypesdir=\"$kde_servicetypesdir\" \
+ kde_moduledir=\"$kde_moduledir\" \
+ kde_styledir=\"$kde_styledir\" \
+ kde_widgetdir=\"$kde_widgetdir\" \
+ xdg_appsdir=\"$xdg_appsdir\" \
+ xdg_menudir=\"$xdg_menudir\" \
+ xdg_directorydir=\"$xdg_directorydir\" \
+ kde_result=$1"
+])
+
+AC_DEFUN([KDE_SET_DEFAULT_PATHS],
+[
+if test "$1" = "default"; then
+
+ if test -z "$kde_htmldir"; then
+ kde_htmldir='\${datadir}/doc/HTML'
+ fi
+ if test -z "$kde_appsdir"; then
+ kde_appsdir='\${datadir}/applnk'
+ fi
+ if test -z "$kde_icondir"; then
+ kde_icondir='\${datadir}/icons'
+ fi
+ if test -z "$kde_sounddir"; then
+ kde_sounddir='\${datadir}/sounds'
+ fi
+ if test -z "$kde_datadir"; then
+ kde_datadir='\${datadir}/apps'
+ fi
+ if test -z "$kde_locale"; then
+ kde_locale='\${datadir}/locale'
+ fi
+ if test -z "$kde_cgidir"; then
+ kde_cgidir='\${exec_prefix}/cgi-bin'
+ fi
+ if test -z "$kde_confdir"; then
+ kde_confdir='\${datadir}/config'
+ fi
+ if test -z "$kde_kcfgdir"; then
+ kde_kcfgdir='\${datadir}/config.kcfg'
+ fi
+ if test -z "$kde_mimedir"; then
+ kde_mimedir='\${datadir}/mimelnk'
+ fi
+ if test -z "$kde_toolbardir"; then
+ kde_toolbardir='\${datadir}/toolbar'
+ fi
+ if test -z "$kde_wallpaperdir"; then
+ kde_wallpaperdir='\${datadir}/wallpapers'
+ fi
+ if test -z "$kde_templatesdir"; then
+ kde_templatesdir='\${datadir}/templates'
+ fi
+ if test -z "$kde_bindir"; then
+ kde_bindir='\${exec_prefix}/bin'
+ fi
+ if test -z "$kde_servicesdir"; then
+ kde_servicesdir='\${datadir}/services'
+ fi
+ if test -z "$kde_servicetypesdir"; then
+ kde_servicetypesdir='\${datadir}/servicetypes'
+ fi
+ if test -z "$kde_moduledir"; then
+ if test "$kde_qtver" = "2"; then
+ kde_moduledir='\${libdir}/kde2'
+ else
+ kde_moduledir='\${libdir}/kde3'
+ fi
+ fi
+ if test -z "$kde_styledir"; then
+ kde_styledir='\${libdir}/kde3/plugins/styles'
+ fi
+ if test -z "$kde_widgetdir"; then
+ kde_widgetdir='\${libdir}/kde3/plugins/designer'
+ fi
+ if test -z "$xdg_appsdir"; then
+ xdg_appsdir='\${datadir}/applications/kde'
+ fi
+ if test -z "$xdg_menudir"; then
+ xdg_menudir='\${sysconfdir}/xdg/menus'
+ fi
+ if test -z "$xdg_directorydir"; then
+ xdg_directorydir='\${datadir}/desktop-directories'
+ fi
+
+ KDE_SET_PATHS(defaults)
+
+else
+
+ if test $kde_qtver = 1; then
+ AC_MSG_RESULT([compiling])
+ KDE_1_CHECK_PATHS
+ else
+ AC_MSG_ERROR([path checking not yet supported for KDE 2])
+ fi
+
+fi
+])
+
+AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
+[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
+ test -z "$kde_icondir" || test -z "$kde_sounddir" ||
+ test -z "$kde_datadir" || test -z "$kde_locale" ||
+ test -z "$kde_cgidir" || test -z "$kde_confdir" ||
+ test -z "$kde_kcfgdir" ||
+ test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
+ test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
+ test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
+ test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
+ test -z "$kde_styledir" || test -z "kde_widgetdir" ||
+ test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
+ test "x$kde_have_all_paths" != "xyes"; then
+ kde_have_all_paths=no
+ fi
+])
+
+AC_DEFUN([KDE_MISSING_PROG_ERROR],
+[
+ AC_MSG_ERROR([The important program $1 was not found!
+Please check whether you installed KDE correctly.
+])
+])
+
+AC_DEFUN([KDE_MISSING_ARTS_ERROR],
+[
+ AC_MSG_ERROR([The important program $1 was not found!
+Please check whether you installed aRts correctly or use
+--without-arts to compile without aRts support (this will remove functionality).
+])
+])
+
+AC_DEFUN([KDE_SET_DEFAULT_BINDIRS],
+[
+ kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
+ test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
+ if test -n "$KDEDIRS"; then
+ kde_save_IFS=$IFS
+ IFS=:
+ for dir in $KDEDIRS; do
+ kde_default_bindirs="$dir/bin $kde_default_bindirs "
+ done
+ IFS=$kde_save_IFS
+ fi
+])
+
+AC_DEFUN([KDE_SUBST_PROGRAMS],
+[
+ AC_ARG_WITH(arts,
+ AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
+ [build_arts=$withval],
+ [build_arts=yes]
+ )
+ AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
+ if test "$build_arts" = "no"; then
+ AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
+ fi
+
+ KDE_SET_DEFAULT_BINDIRS
+ kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
+ KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
+ KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
+ if test "$build_arts" '!=' "no"; then
+ KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
+ KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
+ fi
+ KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
+
+ kde32ornewer=1
+ kde33ornewer=1
+ if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
+ kde32ornewer=
+ kde33ornewer=
+ else
+ if test "$kde_qtver" = "3"; then
+ if test "$kde_qtsubver" -le 1; then
+ kde32ornewer=
+ fi
+ if test "$kde_qtsubver" -le 2; then
+ kde33ornewer=
+ fi
+ if test "$KDECONFIG" != "compiled"; then
+ if test `$KDECONFIG --version | grep --color=never KDE | sed 's/KDE: \(...\).*/\1/'` = 3.2; then
+ kde33ornewer=
+ fi
+ fi
+ fi
+ fi
+
+ if test -n "$kde32ornewer"; then
+ KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
+ KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
+ fi
+ if test -n "$kde33ornewer"; then
+ KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
+ AC_SUBST(MAKEKDEWIDGETS)
+ fi
+ KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
+
+ if test -n "$MEINPROC" -a "$MEINPROC" != "compiled"; then
+ kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
+ test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
+ AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
+ if test "$KDE_XSL_STYLESHEET" = "NO"; then
+ KDE_XSL_STYLESHEET=""
+ else
+ KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
+ fi
+ fi
+
+ DCOP_DEPENDENCIES='$(DCOPIDL)'
+ if test -n "$kde32ornewer"; then
+ KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
+ DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
+ AC_SUBST(KCONFIG_COMPILER)
+ AC_SUBST(KCFG_DEPENDENCIES)
+ AC_SUBST(DCOPIDLNG)
+ fi
+ AC_SUBST(DCOPIDL)
+ AC_SUBST(DCOPIDL2CPP)
+ AC_SUBST(DCOP_DEPENDENCIES)
+ AC_SUBST(MCOPIDL)
+ AC_SUBST(ARTSCCONFIG)
+ AC_SUBST(MEINPROC)
+ AC_SUBST(KDE_XSL_STYLESHEET)
+ AC_SUBST(XMLLINT)
+])dnl
+
+AC_DEFUN([AC_CREATE_KFSSTND],
+[
+AC_REQUIRE([AC_CHECK_RPATH])
+
+AC_MSG_CHECKING([for KDE paths])
+kde_result=""
+kde_cached_paths=yes
+AC_CACHE_VAL(kde_cv_all_paths,
+[
+ KDE_SET_DEFAULT_PATHS($1)
+ kde_cached_paths=no
+])
+eval "$kde_cv_all_paths"
+KDE_CHECK_PATHS_FOR_COMPLETENESS
+if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
+ # wrong values were cached, may be, we can set better ones
+ kde_result=
+ kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
+ kde_datadir= kde_locale= kde_cgidir= kde_confdir= kde_kcfgdir=
+ kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
+ kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
+ kde_have_all_paths=
+ kde_styledir=
+ kde_widgetdir=
+ xdg_appsdir = xdg_menudir= xdg_directorydir=
+ KDE_SET_DEFAULT_PATHS($1)
+ eval "$kde_cv_all_paths"
+ KDE_CHECK_PATHS_FOR_COMPLETENESS
+ kde_result="$kde_result (cache overridden)"
+fi
+if test "$kde_have_all_paths" = "no"; then
+ AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
+Since it had compiled and linked before, it must be a strange problem on your system.
+Look at config.log for details. If you are not able to fix this, look at
+http://www.kde.org/faq/installation.html or any www.kde.org mirror.
+(If you're using an egcs version on Linux, you may update binutils!)
+])
+else
+ rm -f conftest*
+ AC_MSG_RESULT($kde_result)
+fi
+
+bindir=$kde_bindir
+
+KDE_SUBST_PROGRAMS
+
+])
+
+AC_DEFUN([AC_SUBST_KFSSTND],
+[
+AC_SUBST(kde_htmldir)
+AC_SUBST(kde_appsdir)
+AC_SUBST(kde_icondir)
+AC_SUBST(kde_sounddir)
+AC_SUBST(kde_datadir)
+AC_SUBST(kde_locale)
+AC_SUBST(kde_confdir)
+AC_SUBST(kde_kcfgdir)
+AC_SUBST(kde_mimedir)
+AC_SUBST(kde_wallpaperdir)
+AC_SUBST(kde_bindir)
+dnl X Desktop Group standards
+AC_SUBST(xdg_appsdir)
+AC_SUBST(xdg_menudir)
+AC_SUBST(xdg_directorydir)
+dnl for KDE 2
+AC_SUBST(kde_templatesdir)
+AC_SUBST(kde_servicesdir)
+AC_SUBST(kde_servicetypesdir)
+AC_SUBST(kde_moduledir)
+AC_SUBST(kdeinitdir, '$(kde_moduledir)')
+AC_SUBST(kde_styledir)
+AC_SUBST(kde_widgetdir)
+if test "$kde_qtver" = 1; then
+ kde_minidir="$kde_icondir/mini"
+else
+# for KDE 1 - this breaks KDE2 apps using minidir, but
+# that's the plan ;-/
+ kde_minidir="/dev/null"
+fi
+dnl AC_SUBST(kde_minidir)
+dnl AC_SUBST(kde_cgidir)
+dnl AC_SUBST(kde_toolbardir)
+])
+
+AC_DEFUN([KDE_MISC_TESTS],
+[
+ dnl Checks for libraries.
+ AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
+ AC_SUBST(LIBUTIL)
+ AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
+ AC_SUBST(LIBCOMPAT)
+ kde_have_crypt=
+ AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
+ AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
+ AC_MSG_WARN([you have no crypt in either libcrypt or libc.
+You should install libcrypt from another source or configure with PAM
+support])
+ kde_have_crypt=no
+ ]))
+ AC_SUBST(LIBCRYPT)
+ if test $kde_have_crypt = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
+ fi
+ AC_CHECK_SOCKLEN_T
+ AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
+ if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+ AC_CHECK_LIB(dnet_stub, dnet_ntoa,
+ [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
+ fi
+ AC_CHECK_FUNC(inet_ntoa)
+ if test $ac_cv_func_inet_ntoa = no; then
+ AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
+ fi
+ AC_CHECK_FUNC(connect)
+ if test $ac_cv_func_connect = no; then
+ AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
+ $X_EXTRA_LIBS)
+ fi
+
+ AC_CHECK_FUNC(remove)
+ if test $ac_cv_func_remove = no; then
+ AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
+ fi
+
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ AC_CHECK_FUNC(shmat, ,
+ AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
+
+ # more headers that need to be explicitly included on darwin
+ AC_CHECK_HEADERS(sys/types.h stdint.h)
+
+ # sys/bitypes.h is needed for uint32_t and friends on Tru64
+ AC_CHECK_HEADERS(sys/bitypes.h)
+
+ # darwin requires a poll emulation library
+ AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
+
+ # for some image handling on Mac OS X
+ AC_CHECK_HEADERS(Carbon/Carbon.h)
+
+ # CoreAudio framework
+ AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
+ AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
+ FRAMEWORK_COREAUDIO="-Wl,-framework,CoreAudio"
+ ])
+
+ AC_CHECK_RES_INIT
+ AC_SUBST(LIB_POLL)
+ AC_SUBST(FRAMEWORK_COREAUDIO)
+ LIBSOCKET="$X_EXTRA_LIBS"
+ AC_SUBST(LIBSOCKET)
+ AC_SUBST(X_EXTRA_LIBS)
+ AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
+ AC_SUBST(LIBUCB)
+
+ case $host in dnl this *is* LynxOS specific
+ *-*-lynxos* )
+ AC_MSG_CHECKING([LynxOS header file wrappers])
+ [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
+ AC_MSG_RESULT(disabled)
+ AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
+ ;;
+ esac
+
+ KDE_CHECK_TYPES
+ KDE_CHECK_LIBDL
+ KDE_CHECK_STRLCPY
+ KDE_CHECK_PIE_SUPPORT
+
+# darwin needs this to initialize the environment
+AC_CHECK_HEADERS(crt_externs.h)
+AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
+
+AH_VERBATIM(_DARWIN_ENVIRON,
+[
+#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
+# include <sys/time.h>
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron())
+#endif
+])
+
+AH_VERBATIM(_AIX_STRINGS_H_BZERO,
+[
+/*
+ * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
+ * that defines bzero.
+ */
+
+#if defined(_AIX)
+#include <strings.h>
+#endif
+])
+
+AC_CHECK_FUNCS([vsnprintf snprintf])
+
+AH_VERBATIM(_TRU64,[
+/*
+ * On HP-UX, the declaration of vsnprintf() is needed every time !
+ */
+
+#if !defined(HAVE_VSNPRINTF) || defined(hpux)
+#if __STDC__
+#include <stdarg.h>
+#include <stdlib.h>
+#else
+#include <varargs.h>
+#endif
+#ifdef __cplusplus
+extern "C"
+#endif
+int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
+#ifdef __cplusplus
+extern "C"
+#endif
+int snprintf(char *str, size_t n, char const *fmt, ...);
+#endif
+])
+
+])
+
+dnl ------------------------------------------------------------------------
+dnl Find the header files and libraries for X-Windows. Extended the
+dnl macro AC_PATH_X
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([K_PATH_X],
+[
+AC_REQUIRE([KDE_MISC_TESTS])dnl
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+AC_ARG_ENABLE(
+ embedded,
+ AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
+ kde_use_qt_emb=$enableval,
+ kde_use_qt_emb=no
+)
+
+AC_ARG_ENABLE(
+ qtopia,
+ AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
+ kde_use_qt_emb_palm=$enableval,
+ kde_use_qt_emb_palm=no
+)
+
+AC_ARG_ENABLE(
+ mac,
+ AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
+ kde_use_qt_mac=$enableval,
+ kde_use_qt_mac=no
+)
+
+# used to disable x11-specific stuff on special platforms
+AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
+
+if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
+
+AC_MSG_CHECKING(for X)
+
+AC_CACHE_VAL(kde_cv_have_x,
+[# One or both of the vars are not set, and there is no cached value.
+if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
+ kde_x_includes=NO
+else
+ kde_x_includes=$x_includes
+fi
+if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
+ kde_x_libraries=NO
+else
+ kde_x_libraries=$x_libraries
+fi
+
+# below we use the standard autoconf calls
+ac_x_libraries=$kde_x_libraries
+ac_x_includes=$kde_x_includes
+
+KDE_PATH_X_DIRECT
+dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
+dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
+dnl location. The correct location is /usr/lib32 or an undefined value
+dnl (the linker is smart enough to pick the correct default library).
+dnl Things work just fine if you use just AC_PATH_X_DIRECT.
+dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
+dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
+dnl x_includes should be left alone.
+case "$host" in
+mips-sgi-irix6*)
+ ;;
+*-*-solaris*)
+ ;;
+*)
+ _AC_PATH_X_XMKMF
+ if test -z "$ac_x_includes"; then
+ ac_x_includes="."
+ fi
+ if test -z "$ac_x_libraries"; then
+ ac_x_libraries="/usr/lib${kdelibsuff}"
+ fi
+esac
+#from now on we use our own again
+
+# when the user already gave --x-includes, we ignore
+# what the standard autoconf macros told us.
+if test "$kde_x_includes" = NO; then
+ kde_x_includes=$ac_x_includes
+fi
+
+# for --x-libraries too
+if test "$kde_x_libraries" = NO; then
+ kde_x_libraries=$ac_x_libraries
+fi
+
+if test "$kde_x_includes" = NO; then
+ AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
+fi
+
+if test "$kde_x_libraries" = NO; then
+ AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
+fi
+
+# Record where we found X for the cache.
+kde_cv_have_x="have_x=yes \
+ kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
+])dnl
+
+eval "$kde_cv_have_x"
+
+if test "$have_x" != yes; then
+ AC_MSG_RESULT($have_x)
+ no_x=yes
+else
+ AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
+fi
+
+if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
+ X_INCLUDES=""
+ x_includes="."; dnl better than nothing :-
+ else
+ x_includes=$kde_x_includes
+ X_INCLUDES="-I$x_includes"
+fi
+
+if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE || test "$kde_x_libraries" = "/usr/lib"; then
+ X_LDFLAGS=""
+ x_libraries="/usr/lib"; dnl better than nothing :-
+ else
+ x_libraries=$kde_x_libraries
+ X_LDFLAGS="-L$x_libraries"
+fi
+all_includes="$X_INCLUDES"
+all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
+
+# Check for libraries that X11R6 Xt/Xaw programs need.
+ac_save_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS $X_LDFLAGS"
+# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+# check for ICE first), but we must link in the order -lSM -lICE or
+# we get undefined symbols. So assume we have SM if we have ICE.
+# These have to be linked with before -lX11, unlike the other
+# libraries we check for below, so use a different variable.
+# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
+AC_CHECK_LIB(ICE, IceConnectionNumber,
+ [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
+LDFLAGS="$ac_save_LDFLAGS"
+
+LIB_X11='-lX11 $(LIBSOCKET)'
+
+AC_MSG_CHECKING(for libXext)
+AC_CACHE_VAL(kde_cv_have_libXext,
+[
+kde_ldflags_safe="$LDFLAGS"
+kde_libs_safe="$LIBS"
+
+LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
+LIBS="-lXext -lX11 $LIBSOCKET"
+
+AC_TRY_LINK([
+#include <stdio.h>
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+],
+[
+printf("hello Xext\n");
+],
+kde_cv_have_libXext=yes,
+kde_cv_have_libXext=no
+)
+
+LDFLAGS=$kde_ldflags_safe
+LIBS=$kde_libs_safe
+])
+
+AC_MSG_RESULT($kde_cv_have_libXext)
+
+if test "$kde_cv_have_libXext" = "no"; then
+ AC_MSG_ERROR([We need a working libXext to proceed. Since configure
+can't find it itself, we stop here assuming that make wouldn't find
+them either.])
+fi
+
+LIB_XEXT="-lXext"
+QTE_NORTTI=""
+
+elif test "$kde_use_qt_emb" = "yes"; then
+ dnl We're using QT Embedded
+ CPPFLAGS=-DQWS
+ CXXFLAGS="$CXXFLAGS -fno-rtti"
+ QTE_NORTTI="-fno-rtti -DQWS"
+ X_PRE_LIBS=""
+ LIB_X11=""
+ LIB_XEXT=""
+ LIB_XRENDER=""
+ LIBSM=""
+ X_INCLUDES=""
+ X_LDFLAGS=""
+ x_includes=""
+ x_libraries=""
+elif test "$kde_use_qt_mac" = "yes"; then
+ dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
+ dnl be included to get the information) --Sam
+ CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
+ CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
+ X_PRE_LIBS=""
+ LIB_X11=""
+ LIB_XEXT=""
+ LIB_XRENDER=""
+ LIBSM=""
+ X_INCLUDES=""
+ X_LDFLAGS=""
+ x_includes=""
+ x_libraries=""
+fi
+AC_SUBST(X_PRE_LIBS)
+AC_SUBST(LIB_X11)
+AC_SUBST(LIB_XRENDER)
+AC_SUBST(LIBSM)
+AC_SUBST(X_INCLUDES)
+AC_SUBST(X_LDFLAGS)
+AC_SUBST(x_includes)
+AC_SUBST(x_libraries)
+AC_SUBST(QTE_NORTTI)
+AC_SUBST(LIB_XEXT)
+
+])
+
+AC_DEFUN([KDE_PRINT_QT_PROGRAM],
+[
+AC_REQUIRE([KDE_USE_QT])
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <qglobal.h>
+#include <qapplication.h>
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qevent.h>
+#include <qstring.h>
+#include <qstyle.h>
+EOF
+
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+#if QT_VERSION < 210
+#error 1
+#endif
+EOF
+fi
+fi
+
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qcursor.h>
+#include <qstylefactory.h>
+#include <private/qucomextra_p.h>
+EOF
+fi
+
+echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
+cat >> conftest.$ac_ext <<EOF
+#error 1
+#endif
+
+int main() {
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+ QStringList *t = new QStringList();
+ Q_UNUSED(t);
+EOF
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+ QString s;
+ s.setLatin1("Elvis is alive", 14);
+EOF
+fi
+fi
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+ (void)QStyleFactory::create(QString::null);
+ QCursor c(Qt::WhatsThisCursor);
+EOF
+fi
+cat >> conftest.$ac_ext <<EOF
+ return 0;
+}
+EOF
+])
+
+AC_DEFUN([KDE_USE_QT],
+[
+if test -z "$1"; then
+ # Current default Qt version: 3.3
+ kde_qtver=3
+ kde_qtsubver=3
+else
+ kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
+ # following is the check if subversion isnt found in passed argument
+ if test "$kde_qtsubver" = "$1"; then
+ kde_qtsubver=1
+ fi
+ kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
+ if test "$kde_qtver" = "1"; then
+ kde_qtsubver=42
+ fi
+fi
+
+if test -z "$2"; then
+ if test "$kde_qtver" = "2"; then
+ if test $kde_qtsubver -gt 0; then
+ kde_qt_minversion=">= Qt 2.2.2"
+ else
+ kde_qt_minversion=">= Qt 2.0.2"
+ fi
+ fi
+ if test "$kde_qtver" = "3"; then
+ if test $kde_qtsubver -gt 0; then
+ if test $kde_qtsubver -gt 1; then
+ if test $kde_qtsubver -gt 2; then
+ kde_qt_minversion=">= Qt 3.3 and < 4.0"
+ else
+ kde_qt_minversion=">= Qt 3.2 and < 4.0"
+ fi
+ else
+ kde_qt_minversion=">= Qt 3.1 (20021021) and < 4.0"
+ fi
+ else
+ kde_qt_minversion=">= Qt 3.0 and < 4.0"
+ fi
+ fi
+ if test "$kde_qtver" = "1"; then
+ kde_qt_minversion=">= 1.42 and < 2.0"
+ fi
+else
+ kde_qt_minversion="$2"
+fi
+
+if test -z "$3"; then
+ if test $kde_qtver = 3; then
+ if test $kde_qtsubver -gt 0; then
+ kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
+ qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
+ kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
+ else
+ kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
+ fi
+ fi
+ if test $kde_qtver = 2; then
+ if test $kde_qtsubver -gt 0; then
+ kde_qt_verstring="QT_VERSION >= 222"
+ else
+ kde_qt_verstring="QT_VERSION >= 200"
+ fi
+ fi
+ if test $kde_qtver = 1; then
+ kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
+ fi
+else
+ kde_qt_verstring="$3"
+fi
+
+if test $kde_qtver = 4; then
+ kde_qt_dirs="$QTDIR /usr/lib/qt4 /usr/lib/qt /usr/share/qt4"
+fi
+if test $kde_qtver = 3; then
+ kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
+fi
+if test $kde_qtver = 2; then
+ kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
+fi
+if test $kde_qtver = 1; then
+ kde_qt_dirs="$QTDIR /usr/lib/qt"
+fi
+])
+
+AC_DEFUN([KDE_CHECK_QT_DIRECT],
+[
+AC_REQUIRE([KDE_USE_QT])
+AC_MSG_CHECKING([if Qt compiles without flags])
+AC_CACHE_VAL(kde_cv_qt_direct,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
+ac_LIBRARY_PATH="$LIBRARY_PATH"
+ac_cxxflags_safe="$CXXFLAGS"
+ac_ldflags_safe="$LDFLAGS"
+ac_libs_safe="$LIBS"
+
+CXXFLAGS="$CXXFLAGS -I$qt_includes"
+LDFLAGS="$LDFLAGS $X_LDFLAGS"
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
+else
+LIBS="$LIBQT $LIBSOCKET"
+fi
+LD_LIBRARY_PATH=
+export LD_LIBRARY_PATH
+LIBRARY_PATH=
+export LIBRARY_PATH
+
+KDE_PRINT_QT_PROGRAM
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ kde_cv_qt_direct="yes"
+else
+ kde_cv_qt_direct="no"
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&AC_FD_CC
+fi
+
+rm -f conftest*
+CXXFLAGS="$ac_cxxflags_safe"
+LDFLAGS="$ac_ldflags_safe"
+LIBS="$ac_libs_safe"
+
+LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
+export LD_LIBRARY_PATH
+LIBRARY_PATH="$ac_LIBRARY_PATH"
+export LIBRARY_PATH
+AC_LANG_RESTORE
+])
+
+if test "$kde_cv_qt_direct" = "yes"; then
+ AC_MSG_RESULT(yes)
+ $1
+else
+ AC_MSG_RESULT(no)
+ $2
+fi
+])
+
+dnl ------------------------------------------------------------------------
+dnl Try to find the Qt headers and libraries.
+dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
+dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_PATH_QT_1_3],
+[
+AC_REQUIRE([K_PATH_X])
+AC_REQUIRE([KDE_USE_QT])
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+dnl ------------------------------------------------------------------------
+dnl Add configure flag to enable linking to MT version of Qt library.
+dnl ------------------------------------------------------------------------
+
+AC_ARG_ENABLE(
+ mt,
+ AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
+ kde_use_qt_mt=$enableval,
+ [
+ if test $kde_qtver = 3; then
+ kde_use_qt_mt=yes
+ else
+ kde_use_qt_mt=no
+ fi
+ ]
+)
+
+USING_QT_MT=""
+
+dnl ------------------------------------------------------------------------
+dnl If we not get --disable-qt-mt then adjust some vars for the host.
+dnl ------------------------------------------------------------------------
+
+KDE_MT_LDFLAGS=
+KDE_MT_LIBS=
+if test "x$kde_use_qt_mt" = "xyes"; then
+ KDE_CHECK_THREADING
+ if test "x$kde_use_threading" = "xyes"; then
+ CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
+ KDE_MT_LDFLAGS="$USE_THREADS"
+ KDE_MT_LIBS="$LIBPTHREAD"
+ else
+ kde_use_qt_mt=no
+ fi
+fi
+AC_SUBST(KDE_MT_LDFLAGS)
+AC_SUBST(KDE_MT_LIBS)
+
+kde_qt_was_given=yes
+
+dnl ------------------------------------------------------------------------
+dnl If we haven't been told how to link to Qt, we work it out for ourselves.
+dnl ------------------------------------------------------------------------
+if test -z "$LIBQT_GLOB"; then
+ if test "x$kde_use_qt_emb" = "xyes"; then
+ LIBQT_GLOB="libqte.*"
+ else
+ LIBQT_GLOB="libqt.*"
+ fi
+fi
+
+dnl ------------------------------------------------------------
+dnl If we got --enable-embedded then adjust the Qt library name.
+dnl ------------------------------------------------------------
+if test "x$kde_use_qt_emb" = "xyes"; then
+ qtlib="qte"
+else
+ qtlib="qt"
+fi
+
+kde_int_qt="-l$qtlib"
+
+if test -z "$LIBQPE"; then
+dnl ------------------------------------------------------------
+dnl If we got --enable-palmtop then add -lqpe to the link line
+dnl ------------------------------------------------------------
+ if test "x$kde_use_qt_emb" = "xyes"; then
+ if test "x$kde_use_qt_emb_palm" = "xyes"; then
+ LIB_QPE="-lqpe"
+ else
+ LIB_QPE=""
+ fi
+ else
+ LIB_QPE=""
+ fi
+fi
+
+dnl ------------------------------------------------------------------------
+dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
+dnl ------------------------------------------------------------------------
+
+if test "x$kde_use_qt_mt" = "xyes"; then
+ LIBQT="-l$qtlib-mt"
+ kde_int_qt="-l$qtlib-mt"
+ LIBQT_GLOB="lib$qtlib-mt.*"
+ USING_QT_MT="using -mt"
+else
+ LIBQT="-l$qtlib"
+fi
+
+if test $kde_qtver != 1; then
+
+ AC_REQUIRE([AC_FIND_PNG])
+ AC_REQUIRE([AC_FIND_JPEG])
+ LIBQT="$LIBQT $LIBPNG $LIBJPEG"
+fi
+
+if test $kde_qtver = 3; then
+ AC_REQUIRE([KDE_CHECK_LIBDL])
+ LIBQT="$LIBQT $LIBDL"
+fi
+
+AC_MSG_CHECKING([for Qt])
+
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
+fi
+ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
+qt_libraries=""
+qt_includes=""
+AC_ARG_WITH(qt-dir,
+ AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
+ [ ac_qt_includes="$withval"/include
+ ac_qt_libraries="$withval"/lib${kdelibsuff}
+ ac_qt_bindir="$withval"/bin
+ ])
+
+AC_ARG_WITH(qt-includes,
+ AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
+ [
+ ac_qt_includes="$withval"
+ ])
+
+kde_qt_libs_given=no
+
+AC_ARG_WITH(qt-libraries,
+ AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
+ [ ac_qt_libraries="$withval"
+ kde_qt_libs_given=yes
+ ])
+
+AC_CACHE_VAL(ac_cv_have_qt,
+[#try to guess Qt locations
+
+qt_incdirs=""
+for dir in $kde_qt_dirs; do
+ qt_incdirs="$qt_incdirs $dir/include $dir"
+done
+qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes"
+if test ! "$ac_qt_includes" = "NO"; then
+ qt_incdirs="$ac_qt_includes $qt_incdirs"
+fi
+
+if test "$kde_qtver" != "1"; then
+ kde_qt_header=qstyle.h
+else
+ kde_qt_header=qglobal.h
+fi
+
+AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
+ac_qt_includes="$qt_incdir"
+
+qt_libdirs=""
+for dir in $kde_qt_dirs; do
+ qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
+done
+qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
+if test ! "$ac_qt_libraries" = "NO"; then
+ qt_libdir=$ac_qt_libraries
+else
+ qt_libdirs="$ac_qt_libraries $qt_libdirs"
+ # if the Qt was given, the chance is too big that libqt.* doesn't exist
+ qt_libdir=NONE
+ for dir in $qt_libdirs; do
+ try="ls -1 $dir/${LIBQT_GLOB}"
+ if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
+ done
+fi
+for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
+ if test -e "$a"; then
+ LIBQT="$LIBQT ${kde_int_qt}_incremental"
+ break
+ fi
+done
+
+ac_qt_libraries="$qt_libdir"
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+ac_cxxflags_safe="$CXXFLAGS"
+ac_ldflags_safe="$LDFLAGS"
+ac_libs_safe="$LIBS"
+
+CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
+LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
+LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
+
+KDE_PRINT_QT_PROGRAM
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ rm -f conftest*
+else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&AC_FD_CC
+ ac_qt_libraries="NO"
+fi
+rm -f conftest*
+CXXFLAGS="$ac_cxxflags_safe"
+LDFLAGS="$ac_ldflags_safe"
+LIBS="$ac_libs_safe"
+
+AC_LANG_RESTORE
+if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+ ac_cv_have_qt="have_qt=no"
+ ac_qt_notfound=""
+ missing_qt_mt=""
+ if test "$ac_qt_includes" = NO; then
+ if test "$ac_qt_libraries" = NO; then
+ ac_qt_notfound="(headers and libraries)";
+ else
+ ac_qt_notfound="(headers)";
+ fi
+ else
+ if test "x$kde_use_qt_mt" = "xyes"; then
+ missing_qt_mt="
+Make sure that you have compiled Qt with thread support!"
+ ac_qt_notfound="(library $qtlib-mt)";
+ else
+ ac_qt_notfound="(library $qtlib)";
+ fi
+ fi
+
+ AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
+For more details about this problem, look at the end of config.log.$missing_qt_mt])
+else
+ have_qt="yes"
+fi
+])
+
+eval "$ac_cv_have_qt"
+
+if test "$have_qt" != yes; then
+ AC_MSG_RESULT([$have_qt]);
+else
+ ac_cv_have_qt="have_qt=yes \
+ ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
+ AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
+
+ qt_libraries="$ac_qt_libraries"
+ qt_includes="$ac_qt_includes"
+fi
+
+if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
+ KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
+fi
+
+AC_SUBST(qt_libraries)
+AC_SUBST(qt_includes)
+
+if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
+ QT_INCLUDES=""
+else
+ QT_INCLUDES="-I$qt_includes"
+ all_includes="$QT_INCLUDES $all_includes"
+fi
+
+if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
+ QT_LDFLAGS=""
+else
+ QT_LDFLAGS="-L$qt_libraries"
+ all_libraries="$QT_LDFLAGS $all_libraries"
+fi
+test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
+
+AC_SUBST(QT_INCLUDES)
+AC_SUBST(QT_LDFLAGS)
+AC_PATH_QT_MOC_UIC
+
+KDE_CHECK_QT_JPEG
+
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
+else
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
+fi
+test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
+for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
+ if test -e "$a"; then
+ LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
+ break
+ fi
+done
+
+AC_SUBST(LIB_QT)
+AC_SUBST(LIB_QPE)
+
+AC_SUBST(kde_qtver)
+])
+
+AC_DEFUN([AC_PATH_QT],
+[
+AC_PATH_QT_1_3
+])
+
+AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
+[
+AC_REQUIRE([AC_PATH_QT_MOC_UIC])
+
+if test x$ac_uic_supports_libpath = xyes; then
+
+AC_MSG_CHECKING([if UIC has KDE plugins available])
+AC_CACHE_VAL(kde_cv_uic_plugins,
+[
+cat > actest.ui << EOF
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>NewConnectionDialog</class>
+<widget class="QDialog">
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>testInput</cstring>
+ </property>
+ </widget>
+</widget>
+</UI>
+EOF
+
+
+
+kde_cv_uic_plugins=no
+kde_line="$UIC_PATH -L $kde_widgetdir"
+if test x$ac_uic_supports_nounload = xyes; then
+ kde_line="$kde_line -nounload"
+fi
+kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
+if AC_TRY_EVAL(kde_line); then
+ # if you're trying to debug this check and think it's incorrect,
+ # better check your installation. The check _is_ correct - your
+ # installation is not.
+ if test -f actest.cpp && grep --color=never klineedit actest.cpp > /dev/null; then
+ kde_cv_uic_plugins=yes
+ fi
+fi
+rm -f actest.ui actest.cpp
+])
+
+AC_MSG_RESULT([$kde_cv_uic_plugins])
+if test "$kde_cv_uic_plugins" != yes; then
+ AC_MSG_ERROR([
+you need to install kdelibs first.
+
+If you did install kdelibs, then the Qt version that is picked up by
+this configure is not the same version you used to compile kdelibs.
+The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the
+_same Qt version_, compiled with the _same compiler_ and the same Qt
+configuration settings.
+])
+fi
+fi
+])
+
+AC_DEFUN([KDE_CHECK_FINAL],
+[
+ AC_ARG_ENABLE(final,
+ AC_HELP_STRING([--enable-final],
+ [build size optimized apps (experimental - needs lots of memory)]),
+ kde_use_final=$enableval, kde_use_final=no)
+
+ if test "x$kde_use_final" = "xyes"; then
+ KDE_USE_FINAL_TRUE=""
+ KDE_USE_FINAL_FALSE="#"
+ else
+ KDE_USE_FINAL_TRUE="#"
+ KDE_USE_FINAL_FALSE=""
+ fi
+ AC_SUBST(KDE_USE_FINAL_TRUE)
+ AC_SUBST(KDE_USE_FINAL_FALSE)
+])
+
+AC_DEFUN([KDE_CHECK_CLOSURE],
+[
+ AC_ARG_ENABLE(closure,
+ AC_HELP_STRING([--enable-closure],[delay template instantiation]),
+ kde_use_closure=$enableval, kde_use_closure=no)
+
+ KDE_NO_UNDEFINED=""
+ if test "x$kde_use_closure" = "xyes"; then
+ KDE_USE_CLOSURE_TRUE=""
+ KDE_USE_CLOSURE_FALSE="#"
+# CXXFLAGS="$CXXFLAGS $REPO"
+ else
+ KDE_USE_CLOSURE_TRUE="#"
+ KDE_USE_CLOSURE_FALSE=""
+ KDE_NO_UNDEFINED=""
+ case $host in
+ *-*-linux-gnu)
+ KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
+ [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
+ [KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
+ [KDE_NO_UNDEFINED=""])],
+ [KDE_NO_UNDEFINED=""])
+ ;;
+ esac
+ fi
+ AC_SUBST(KDE_USE_CLOSURE_TRUE)
+ AC_SUBST(KDE_USE_CLOSURE_FALSE)
+ AC_SUBST(KDE_NO_UNDEFINED)
+])
+
+dnl Check if the linker supports --enable-new-dtags and --as-needed
+AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
+[
+ AC_ARG_ENABLE(new_ldflags,
+ AC_HELP_STRING([--enable-new-ldflags],
+ [enable the new linker flags]),
+ kde_use_new_ldflags=$enableval,
+ kde_use_new_ldflags=no)
+
+ LDFLAGS_AS_NEEDED=""
+ LDFLAGS_NEW_DTAGS=""
+ if test "x$kde_use_new_ldflags" = "xyes"; then
+ LDFLAGS_NEW_DTAGS=""
+ KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
+ [LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
+
+ KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
+ [LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
+ fi
+ AC_SUBST(LDFLAGS_AS_NEEDED)
+ AC_SUBST(LDFLAGS_NEW_DTAGS)
+])
+
+AC_DEFUN([KDE_CHECK_NMCHECK],
+[
+ AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
+ kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
+
+ if test "$kde_use_nmcheck" = "yes"; then
+ KDE_USE_NMCHECK_TRUE=""
+ KDE_USE_NMCHECK_FALSE="#"
+ else
+ KDE_USE_NMCHECK_TRUE="#"
+ KDE_USE_NMCHECK_FALSE=""
+ fi
+ AC_SUBST(KDE_USE_NMCHECK_TRUE)
+ AC_SUBST(KDE_USE_NMCHECK_FALSE)
+])
+
+AC_DEFUN([KDE_EXPAND_MAKEVAR], [
+savex=$exec_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+tmp=$$2
+while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
+exec_prefix=$savex
+])
+
+dnl ------------------------------------------------------------------------
+dnl Now, the same with KDE
+dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
+dnl and $(kde_includes) will be the kdehdrlocation (if needed)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_BASE_PATH_KDE],
+[
+AC_REQUIRE([KDE_CHECK_STL])
+AC_REQUIRE([AC_PATH_QT])dnl
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+AC_CHECK_RPATH
+AC_MSG_CHECKING([for KDE])
+
+if test "${prefix}" != NONE; then
+ kde_includes=${includedir}
+ KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
+
+ kde_libraries=${libdir}
+ KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
+
+else
+ ac_kde_includes=
+ ac_kde_libraries=
+ kde_libraries=""
+ kde_includes=""
+fi
+
+AC_CACHE_VAL(ac_cv_have_kde,
+[#try to guess kde locations
+
+if test "$kde_qtver" = 1; then
+ kde_check_header="ksock.h"
+ kde_check_lib="libkdecore.la"
+else
+ kde_check_header="ksharedptr.h"
+ kde_check_lib="libkio.la"
+fi
+
+if test -z "$1"; then
+
+kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
+test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
+kde_incdirs="$ac_kde_includes $kde_incdirs"
+AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
+ac_kde_includes="$kde_incdir"
+
+if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
+ AC_MSG_ERROR([
+in the prefix, you've chosen, are no KDE headers installed. This will fail.
+So, check this please and use another prefix!])
+fi
+
+kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
+test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
+kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
+AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
+ac_kde_libraries="$kde_libdir"
+
+kde_widgetdir=NO
+dnl this might be somewhere else
+AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
+
+if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
+AC_MSG_ERROR([
+in the prefix, you've chosen, are no KDE libraries installed. This will fail.
+So, check this please and use another prefix!])
+fi
+
+if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
+AC_MSG_ERROR([
+I can't find the designer plugins. These are required and should have been installed
+by kdelibs])
+fi
+
+if test -n "$kde_widgetdir"; then
+ kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
+fi
+
+
+if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
+ ac_cv_have_kde="have_kde=no"
+else
+ ac_cv_have_kde="have_kde=yes \
+ ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
+fi
+
+else dnl test -z $1, e.g. from kdelibs
+
+ ac_cv_have_kde="have_kde=no"
+
+fi
+])dnl
+
+eval "$ac_cv_have_kde"
+
+if test "$have_kde" != "yes"; then
+ if test "${prefix}" = NONE; then
+ ac_kde_prefix="$ac_default_prefix"
+ else
+ ac_kde_prefix="$prefix"
+ fi
+ if test "$exec_prefix" = NONE; then
+ ac_kde_exec_prefix="$ac_kde_prefix"
+ AC_MSG_RESULT([will be installed in $ac_kde_prefix])
+ else
+ ac_kde_exec_prefix="$exec_prefix"
+ AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
+ fi
+
+ kde_libraries="${libdir}"
+ kde_includes="${includedir}"
+
+else
+ ac_cv_have_kde="have_kde=yes \
+ ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
+ AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
+
+ kde_libraries="$ac_kde_libraries"
+ kde_includes="$ac_kde_includes"
+fi
+AC_SUBST(kde_libraries)
+AC_SUBST(kde_includes)
+
+if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
+ KDE_INCLUDES=""
+else
+ KDE_INCLUDES="-I$kde_includes"
+ all_includes="$KDE_INCLUDES $all_includes"
+fi
+
+KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
+
+KDE_LDFLAGS="-L$kde_libraries"
+if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
+ all_libraries="$KDE_LDFLAGS $all_libraries"
+fi
+
+AC_SUBST(KDE_LDFLAGS)
+AC_SUBST(KDE_INCLUDES)
+
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+all_libraries="$all_libraries $USER_LDFLAGS"
+all_includes="$all_includes $USER_INCLUDES"
+AC_SUBST(all_includes)
+AC_SUBST(all_libraries)
+
+if test -z "$1"; then
+KDE_CHECK_UIC_PLUGINS
+fi
+
+ac_kde_libraries="$kde_libdir"
+
+AC_SUBST(AUTODIRS)
+
+
+])
+
+AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
+[
+AC_MSG_CHECKING(for extra includes)
+AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
+ kde_use_extra_includes="$withval",
+ kde_use_extra_includes=NONE
+)
+kde_extra_includes=
+if test -n "$kde_use_extra_includes" && \
+ test "$kde_use_extra_includes" != "NONE"; then
+
+ ac_save_ifs=$IFS
+ IFS=':'
+ for dir in $kde_use_extra_includes; do
+ kde_extra_includes="$kde_extra_includes $dir"
+ USER_INCLUDES="$USER_INCLUDES -I$dir"
+ done
+ IFS=$ac_save_ifs
+ kde_use_extra_includes="added"
+else
+ kde_use_extra_includes="no"
+fi
+AC_SUBST(USER_INCLUDES)
+
+AC_MSG_RESULT($kde_use_extra_includes)
+
+kde_extra_libs=
+AC_MSG_CHECKING(for extra libs)
+AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
+ kde_use_extra_libs=$withval,
+ kde_use_extra_libs=NONE
+)
+if test -n "$kde_use_extra_libs" && \
+ test "$kde_use_extra_libs" != "NONE"; then
+
+ ac_save_ifs=$IFS
+ IFS=':'
+ for dir in $kde_use_extra_libs; do
+ kde_extra_libs="$kde_extra_libs $dir"
+ KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
+ USER_LDFLAGS="$USER_LDFLAGS -L$dir"
+ done
+ IFS=$ac_save_ifs
+ kde_use_extra_libs="added"
+else
+ kde_use_extra_libs="no"
+fi
+
+AC_SUBST(USER_LDFLAGS)
+
+AC_MSG_RESULT($kde_use_extra_libs)
+
+])
+
+AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
+[
+ AC_MSG_CHECKING([for KDE headers installed])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+cat > conftest.$ac_ext <<EOF
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+#include <stdio.h>
+#include "confdefs.h"
+#include <kapp.h>
+
+int main() {
+ printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
+ printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
+ printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
+ printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
+ printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
+ printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
+ printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
+ printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
+ printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
+ printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
+ printf("kde_wallpaperdir=\\"%s\\"\n",
+ KApplication::kde_wallpaperdir().data());
+ printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
+ printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
+ printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
+ printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
+ printf("kde_moduledir=\\"/tmp/dummy\\"\n");
+ printf("kde_styledir=\\"/tmp/dummy\\"\n");
+ printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
+ printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
+ printf("xdg_menudir=\\"/tmp/dummy\\"\n");
+ printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
+ printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
+ return 0;
+ }
+EOF
+
+ ac_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$all_includes $CPPFLAGS"
+ if AC_TRY_EVAL(ac_compile); then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_ERROR([your system is not able to compile a small KDE application!
+Check, if you installed the KDE header files correctly.
+For more details about this problem, look at the end of config.log.])
+ fi
+ CPPFLAGS=$ac_save_CPPFLAGS
+
+ AC_LANG_RESTORE
+])
+
+AC_DEFUN([KDE_CHECK_KDEQTADDON],
+[
+AC_MSG_CHECKING(for kde-qt-addon)
+AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
+[
+ kde_ldflags_safe="$LDFLAGS"
+ kde_libs_safe="$LIBS"
+ kde_cxxflags_safe="$CXXFLAGS"
+
+ LIBS="-lkde-qt-addon $LIBQT $LIBS"
+ CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
+ LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
+
+ AC_TRY_LINK([
+ #include <qdom.h>
+ ],
+ [
+ QDomDocument doc;
+ ],
+ kde_cv_have_kdeqtaddon=yes,
+ kde_cv_have_kdeqtaddon=no
+ )
+
+ LDFLAGS=$kde_ldflags_safe
+ LIBS=$kde_libs_safe
+ CXXFLAGS=$kde_cxxflags_safe
+])
+
+AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
+
+if test "$kde_cv_have_kdeqtaddon" = "no"; then
+ AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
+It is a separate package (and CVS module) named kde-qt-addon.])
+fi
+])
+
+AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
+[
+ AC_REQUIRE([KDE_MISC_TESTS])
+ AC_REQUIRE([KDE_CHECK_LIBDL])
+ AC_REQUIRE([K_PATH_X])
+
+if test $kde_qtver = 3; then
+ case $host in
+ *cygwin*) lib_kded="-lkdeinit_kded" ;;
+ *) lib_kded="" ;;
+ esac
+ AC_SUBST(LIB_KDED, $lib_kded)
+ AC_SUBST(LIB_KDECORE, "-lkdecore")
+ AC_SUBST(LIB_KDEUI, "-lkdeui")
+ AC_SUBST(LIB_KIO, "-lkio")
+ AC_SUBST(LIB_KJS, "-lkjs")
+ AC_SUBST(LIB_SMB, "-lsmb")
+ AC_SUBST(LIB_KAB, "-lkab")
+ AC_SUBST(LIB_KABC, "-lkabc")
+ AC_SUBST(LIB_KHTML, "-lkhtml")
+ AC_SUBST(LIB_KSPELL, "-lkspell")
+ AC_SUBST(LIB_KPARTS, "-lkparts")
+ AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
+ AC_SUBST(LIB_KUTILS, "-lkutils")
+ AC_SUBST(LIB_KDEPIM, "-lkdepim")
+ AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
+ AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
+ AC_SUBST(LIB_KDNSSD, "-lkdnssd")
+ AC_SUBST(LIB_KUNITTEST, "-lkunittest")
+# these are for backward compatibility
+ AC_SUBST(LIB_KSYCOCA, "-lkio")
+ AC_SUBST(LIB_KFILE, "-lkio")
+elif test $kde_qtver = 2; then
+ AC_SUBST(LIB_KDECORE, "-lkdecore")
+ AC_SUBST(LIB_KDEUI, "-lkdeui")
+ AC_SUBST(LIB_KIO, "-lkio")
+ AC_SUBST(LIB_KSYCOCA, "-lksycoca")
+ AC_SUBST(LIB_SMB, "-lsmb")
+ AC_SUBST(LIB_KFILE, "-lkfile")
+ AC_SUBST(LIB_KAB, "-lkab")
+ AC_SUBST(LIB_KHTML, "-lkhtml")
+ AC_SUBST(LIB_KSPELL, "-lkspell")
+ AC_SUBST(LIB_KPARTS, "-lkparts")
+ AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
+else
+ AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
+ AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
+ AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
+ AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
+ AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
+fi
+])
+
+AC_DEFUN([AC_PATH_KDE],
+[
+ AC_BASE_PATH_KDE
+ AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
+ [
+ if test "$enableval" = "no";
+ then ac_use_path_checking="default"
+ else ac_use_path_checking=""
+ fi
+ ],
+ [
+ if test "$kde_qtver" = 1;
+ then ac_use_path_checking=""
+ else ac_use_path_checking="default"
+ fi
+ ]
+ )
+
+ AC_CREATE_KFSSTND($ac_use_path_checking)
+
+ AC_SUBST_KFSSTND
+ KDE_CREATE_LIBS_ALIASES
+])
+
+dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
+AC_DEFUN([KDE_CHECK_FUNC_EXT],
+[
+AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL(kde_cv_func_$1,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+save_CXXFLAGS="$CXXFLAGS"
+kde_safe_LIBS="$LIBS"
+LIBS="$LIBS $X_EXTRA_LIBS"
+if test "$GXX" = "yes"; then
+CXXFLAGS="$CXXFLAGS -pedantic-errors"
+fi
+AC_TRY_COMPILE([
+$2
+],
+[
+$3
+],
+kde_cv_func_$1=yes,
+kde_cv_func_$1=no)
+CXXFLAGS="$save_CXXFLAGS"
+LIBS="$kde_safe_LIBS"
+AC_LANG_RESTORE
+])
+
+AC_MSG_RESULT($kde_cv_func_$1)
+
+AC_MSG_CHECKING([if $1 needs custom prototype])
+AC_CACHE_VAL(kde_cv_proto_$1,
+[
+if test "x$kde_cv_func_$1" = xyes; then
+ kde_cv_proto_$1=no
+else
+ case "$1" in
+ setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
+ kde_cv_proto_$1="yes - in libkdefakes"
+ ;;
+ *)
+ kde_cv_proto_$1=unknown
+ ;;
+ esac
+fi
+
+if test "x$kde_cv_proto_$1" = xunknown; then
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ kde_safe_libs=$LIBS
+ LIBS="$LIBS $X_EXTRA_LIBS"
+ AC_TRY_LINK([
+$2
+
+extern "C" $4;
+],
+[
+$3
+],
+[ kde_cv_func_$1=yes
+ kde_cv_proto_$1=yes ],
+ [kde_cv_proto_$1="$1 unavailable"]
+)
+LIBS=$kde_safe_libs
+AC_LANG_RESTORE
+fi
+])
+AC_MSG_RESULT($kde_cv_proto_$1)
+
+if test "x$kde_cv_func_$1" = xyes; then
+ AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
+ $6
+fi
+if test "x$kde_cv_proto_$1" = xno; then
+ AC_DEFINE(HAVE_$5_PROTO, 1,
+ [Define if you have the $1 prototype])
+fi
+
+AH_VERBATIM([_HAVE_$5_PROTO],
+[
+#if !defined(HAVE_$5_PROTO)
+#ifdef __cplusplus
+extern "C" {
+#endif
+$4;
+#ifdef __cplusplus
+}
+#endif
+#endif
+])
+])
+
+AC_DEFUN([AC_CHECK_SETENV],
+[
+ KDE_CHECK_FUNC_EXT(setenv, [
+#include <stdlib.h>
+],
+ [setenv("VAR", "VALUE", 1);],
+ [int setenv (const char *, const char *, int)],
+ [SETENV])
+])
+
+AC_DEFUN([AC_CHECK_UNSETENV],
+[
+ KDE_CHECK_FUNC_EXT(unsetenv, [
+#include <stdlib.h>
+],
+ [unsetenv("VAR");],
+ [void unsetenv (const char *)],
+ [UNSETENV])
+])
+
+AC_DEFUN([AC_CHECK_GETDOMAINNAME],
+[
+ KDE_CHECK_FUNC_EXT(getdomainname, [
+#include <stdlib.h>
+#include <unistd.h>
+#include <netdb.h>
+],
+ [
+char buffer[200];
+getdomainname(buffer, 200);
+],
+ [#include <sys/types.h>
+ int getdomainname (char *, size_t)],
+ [GETDOMAINNAME])
+])
+
+AC_DEFUN([AC_CHECK_GETHOSTNAME],
+[
+ KDE_CHECK_FUNC_EXT(gethostname, [
+#include <stdlib.h>
+#include <unistd.h>
+],
+ [
+char buffer[200];
+gethostname(buffer, 200);
+],
+ [int gethostname (char *, unsigned int)],
+ [GETHOSTNAME])
+])
+
+AC_DEFUN([AC_CHECK_USLEEP],
+[
+ KDE_CHECK_FUNC_EXT(usleep, [
+#include <unistd.h>
+],
+ [
+usleep(200);
+],
+ [int usleep (unsigned int)],
+ [USLEEP])
+])
+
+
+AC_DEFUN([AC_CHECK_RANDOM],
+[
+ KDE_CHECK_FUNC_EXT(random, [
+#include <stdlib.h>
+],
+ [
+random();
+],
+ [long int random(void)],
+ [RANDOM])
+
+ KDE_CHECK_FUNC_EXT(srandom, [
+#include <stdlib.h>
+],
+ [
+srandom(27);
+],
+ [void srandom(unsigned int)],
+ [SRANDOM])
+
+])
+
+AC_DEFUN([AC_CHECK_INITGROUPS],
+[
+ KDE_CHECK_FUNC_EXT(initgroups, [
+#include <sys/types.h>
+#include <unistd.h>
+#include <grp.h>
+],
+ [
+char buffer[200];
+initgroups(buffer, 27);
+],
+ [int initgroups(const char *, gid_t)],
+ [INITGROUPS])
+])
+
+AC_DEFUN([AC_CHECK_MKSTEMPS],
+[
+ KDE_CHECK_FUNC_EXT(mkstemps, [
+#include <stdlib.h>
+#include <unistd.h>
+],
+ [
+mkstemps("/tmp/aaaXXXXXX", 6);
+],
+ [int mkstemps(char *, int)],
+ [MKSTEMPS])
+])
+
+AC_DEFUN([AC_CHECK_MKSTEMP],
+[
+ KDE_CHECK_FUNC_EXT(mkstemp, [
+#include <stdlib.h>
+#include <unistd.h>
+],
+ [
+mkstemp("/tmp/aaaXXXXXX");
+],
+ [int mkstemp(char *)],
+ [MKSTEMP])
+])
+
+AC_DEFUN([AC_CHECK_MKDTEMP],
+[
+ KDE_CHECK_FUNC_EXT(mkdtemp, [
+#include <stdlib.h>
+#include <unistd.h>
+],
+ [
+mkdtemp("/tmp/aaaXXXXXX");
+],
+ [char *mkdtemp(char *)],
+ [MKDTEMP])
+])
+
+
+AC_DEFUN([AC_CHECK_RES_INIT],
+[
+ AC_MSG_CHECKING([if res_init needs -lresolv])
+ kde_libs_safe="$LIBS"
+ LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
+ AC_TRY_LINK(
+ [
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+ ],
+ [
+ res_init();
+ ],
+ [
+ LIBRESOLV="-lresolv"
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
+ ],
+ [ AC_MSG_RESULT(no) ]
+ )
+ LIBS=$kde_libs_safe
+ AC_SUBST(LIBRESOLV)
+
+ KDE_CHECK_FUNC_EXT(res_init,
+ [
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+ ],
+ [res_init()],
+ [int res_init(void)],
+ [RES_INIT])
+])
+
+AC_DEFUN([AC_CHECK_STRLCPY],
+[
+ KDE_CHECK_FUNC_EXT(strlcpy, [
+#include <string.h>
+],
+[ char buf[20];
+ strlcpy(buf, "KDE function test", sizeof(buf));
+],
+ [unsigned long strlcpy(char*, const char*, unsigned long)],
+ [STRLCPY])
+])
+
+AC_DEFUN([AC_CHECK_STRLCAT],
+[
+ KDE_CHECK_FUNC_EXT(strlcat, [
+#include <string.h>
+],
+[ char buf[20];
+ buf[0]='\0';
+ strlcat(buf, "KDE function test", sizeof(buf));
+],
+ [unsigned long strlcat(char*, const char*, unsigned long)],
+ [STRLCAT])
+])
+
+AC_DEFUN([AC_CHECK_RES_QUERY],
+[
+ KDE_CHECK_FUNC_EXT(res_query, [
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+#include <netdb.h>
+],
+[
+res_query(NULL, 0, 0, NULL, 0);
+],
+ [int res_query(const char *, int, int, unsigned char *, int)],
+ [RES_QUERY])
+])
+
+AC_DEFUN([AC_CHECK_DN_SKIPNAME],
+[
+ KDE_CHECK_FUNC_EXT(dn_skipname, [
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+],
+[
+dn_skipname (NULL, NULL);
+],
+ [int dn_skipname (unsigned char *, unsigned char *)],
+ [DN_SKIPNAME])
+])
+
+
+AC_DEFUN([AC_FIND_GIF],
+ [AC_MSG_CHECKING([for giflib])
+AC_CACHE_VAL(ac_cv_lib_gif,
+[ac_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
+else
+LIBS="$all_libraries -lgif"
+fi
+AC_TRY_LINK(dnl
+[
+#ifdef __cplusplus
+extern "C" {
+#endif
+int GifLastError(void);
+#ifdef __cplusplus
+}
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+],
+ [return GifLastError();],
+ eval "ac_cv_lib_gif=yes",
+ eval "ac_cv_lib_gif=no")
+LIBS="$ac_save_LIBS"
+])dnl
+if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
+else
+ AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
+fi
+])
+
+AC_DEFUN([KDE_FIND_JPEG_HELPER],
+[
+AC_MSG_CHECKING([for libjpeg$2])
+AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
+[
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(
+[
+#ifdef __cplusplus
+extern "C" {
+#endif
+void jpeg_CreateDecompress();
+#ifdef __cplusplus
+}
+#endif
+],
+[jpeg_CreateDecompress();],
+ eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
+ eval "ac_cv_lib_jpeg_$1=no")
+LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+])
+
+if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
+ LIBJPEG="$ac_cv_lib_jpeg_$1"
+ AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
+else
+ AC_MSG_RESULT(no)
+ $3
+fi
+
+])
+
+AC_DEFUN([AC_FIND_JPEG],
+[
+dnl first look for libraries
+KDE_FIND_JPEG_HELPER(6b, 6b,
+ KDE_FIND_JPEG_HELPER(normal, [],
+ [
+ LIBJPEG=
+ ]
+ )
+)
+
+dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
+dnl requires system dependent includes loaded before it)
+jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
+AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
+test "x$jpeg_incdir" = xNO && jpeg_incdir=
+
+dnl if headers _and_ libraries are missing, this is no error, and we
+dnl continue with a warning (the user will get no jpeg support in khtml)
+dnl if only one is missing, it means a configuration error, but we still
+dnl only warn
+if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
+ AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
+else
+ if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
+ AC_MSG_WARN([
+There is an installation error in jpeg support. You seem to have only one
+of either the headers _or_ the libraries installed. You may need to either
+provide correct --with-extra-... options, or the development package of
+libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
+Disabling JPEG support.
+])
+ else
+ AC_MSG_WARN([libjpeg not found. disable JPEG support.])
+ fi
+ jpeg_incdir=
+ LIBJPEG=
+fi
+
+AC_SUBST(LIBJPEG)
+AH_VERBATIM(_AC_CHECK_JPEG,
+[/*
+ * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
+ * headers and I'm too lazy to write a configure test as long as only
+ * unixware is related
+ */
+#ifdef _UNIXWARE
+#define HAVE_BOOLEAN
+#endif
+])
+])
+
+AC_DEFUN([KDE_CHECK_QT_JPEG],
+[
+if test -n "$LIBJPEG"; then
+AC_MSG_CHECKING([if Qt needs $LIBJPEG])
+AC_CACHE_VAL(kde_cv_qt_jpeg,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
+LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
+ac_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(
+[#include <qapplication.h>],
+ [
+ int argc;
+ char** argv;
+ QApplication app(argc, argv);],
+ eval "kde_cv_qt_jpeg=no",
+ eval "kde_cv_qt_jpeg=yes")
+LIBS="$ac_save_LIBS"
+CXXFLAGS="$ac_save_CXXFLAGS"
+AC_LANG_RESTORE
+fi
+])
+
+if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
+ AC_MSG_RESULT(yes)
+ LIBJPEG_QT='$(LIBJPEG)'
+else
+ AC_MSG_RESULT(no)
+ LIBJPEG_QT=
+fi
+
+])
+
+AC_DEFUN([AC_FIND_ZLIB],
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_MSG_CHECKING([for libz])
+AC_CACHE_VAL(ac_cv_lib_z,
+[
+kde_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(dnl
+[
+#include<zlib.h>
+],
+[
+ char buf[42];
+ gzFile f = (gzFile) 0;
+ /* this would segfault.. but we only link, don't run */
+ (void) gzgets(f, buf, sizeof(buf));
+
+ return (zlibVersion() == ZLIB_VERSION);
+],
+ eval "ac_cv_lib_z='-lz'",
+ eval "ac_cv_lib_z=no")
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+])dnl
+if test ! "$ac_cv_lib_z" = no; then
+ AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
+ LIBZ="$ac_cv_lib_z"
+ AC_MSG_RESULT($ac_cv_lib_z)
+else
+ AC_MSG_ERROR(not found.
+ Possibly configure picks up an outdated version
+ installed by XFree86. Remove it from your system.
+
+ Check your installation and look into config.log)
+ LIBZ=""
+fi
+AC_SUBST(LIBZ)
+])
+
+AC_DEFUN([KDE_TRY_TIFFLIB],
+[
+AC_MSG_CHECKING([for libtiff $1])
+
+AC_CACHE_VAL(kde_cv_libtiff_$1,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+kde_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
+else
+LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
+fi
+kde_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+
+AC_TRY_LINK(dnl
+[
+#include<tiffio.h>
+],
+ [return (TIFFOpen( "", "r") == 0); ],
+[
+ kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
+], [
+ kde_cv_libtiff_$1=no
+])
+
+LIBS="$kde_save_LIBS"
+CXXFLAGS="$kde_save_CXXFLAGS"
+AC_LANG_RESTORE
+])
+
+if test "$kde_cv_libtiff_$1" = "no"; then
+ AC_MSG_RESULT(no)
+ LIBTIFF=""
+ $3
+else
+ LIBTIFF="$kde_cv_libtiff_$1"
+ AC_MSG_RESULT(yes)
+ AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
+ $2
+fi
+
+])
+
+AC_DEFUN([AC_FIND_TIFF],
+[
+AC_REQUIRE([K_PATH_X])
+AC_REQUIRE([AC_FIND_ZLIB])
+AC_REQUIRE([AC_FIND_JPEG])
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+KDE_TRY_TIFFLIB(tiff, [],
+ KDE_TRY_TIFFLIB(tiff34))
+
+AC_SUBST(LIBTIFF)
+])
+
+AC_DEFUN([KDE_FIND_LIBEXR],
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_REQUIRE([AC_FIND_ZLIB])
+AC_CACHE_VAL(ac_cv_libexr,
+[
+ if test -z "$PKG_CONFIG"; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ fi
+
+ AC_MSG_CHECKING([for OpenEXR libraries])
+
+ if test "$PKG_CONFIG" = "no" ; then
+ AC_MSG_RESULT(no)
+ 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
+ if !(`$PKG_CONFIG --exists OpenEXR`) ; then
+ AC_MSG_RESULT(no)
+ EXRSTATUS=no
+ else
+ if !(`$PKG_CONFIG --atleast-version="1.1.1" OpenEXR`) ; then
+ AC_MSG_RESULT(no)
+ EXRSTATUS=old
+ else
+ kde_save_LIBS="$LIBS"
+ LIBS="$LIBS $all_libraries $USER_LDFLAGS `pkg-config --libs OpenEXR` $LIBZ"
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ kde_save_CXXFLAGS="$CXXFLAGS"
+ EXR_FLAGS=`$PKG_CONFIG --cflags OpenEXR`
+ CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES $EXR_FLAGS"
+
+ AC_TRY_LINK(dnl
+ [
+ #include <ImfRgbaFile.h>
+ ],
+ [
+ using namespace Imf;
+ RgbaInputFile file ("dummy");
+ return 0;
+ ],
+ eval "ac_cv_libexr='`pkg-config --libs OpenEXR`'",
+ eval "ac_cv_libexr=no"
+ )
+ LIBS="$kde_save_LIBS"
+ CXXFLAGS="$kde_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])dnl
+ if eval "test ! \"`echo $ac_cv_libexr`\" = no"; then
+ AC_DEFINE_UNQUOTED(HAVE_EXR, 1, [Define if you have OpenEXR])
+ LIB_EXR="$ac_cv_libexr"
+ AC_MSG_RESULT($ac_cv_libexr)
+ else
+ AC_MSG_RESULT(no)
+ LIB_EXR=""
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST(LIB_EXR)
+ AC_SUBST(EXR_FLAGS)
+])
+
+
+
+AC_DEFUN([AC_FIND_PNG],
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_REQUIRE([AC_FIND_ZLIB])
+AC_MSG_CHECKING([for libpng])
+AC_CACHE_VAL(ac_cv_lib_png,
+[
+kde_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
+else
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
+fi
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+
+AC_TRY_LINK(dnl
+ [
+ #include<png.h>
+ ],
+ [
+ png_structp png_ptr = png_create_read_struct( /* image ptr */
+ PNG_LIBPNG_VER_STRING, 0, 0, 0 );
+ return( png_ptr != 0 );
+ ],
+ eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
+ eval "ac_cv_lib_png=no"
+)
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+])dnl
+if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
+ AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
+ LIBPNG="$ac_cv_lib_png"
+ AC_SUBST(LIBPNG)
+ AC_MSG_RESULT($ac_cv_lib_png)
+else
+ AC_MSG_RESULT(no)
+ LIBPNG=""
+ AC_SUBST(LIBPNG)
+fi
+])
+
+
+AC_DEFUN([AC_FIND_JASPER],
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_REQUIRE([AC_FIND_JPEG])
+AC_MSG_CHECKING([for jasper])
+AC_CACHE_VAL(ac_cv_jasper,
+[
+kde_save_LIBS="$LIBS"
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+
+AC_TRY_LINK(dnl
+ [
+ #include<jasper/jasper.h>
+ ],
+ [
+ return( jas_init() );
+ ],
+ eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
+ eval "ac_cv_jasper=no"
+)
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+])dnl
+if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
+ AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
+ LIB_JASPER="$ac_cv_jasper"
+ AC_MSG_RESULT($ac_cv_jasper)
+else
+ AC_MSG_RESULT(no)
+ LIB_JASPER=""
+fi
+AC_SUBST(LIB_JASPER)
+])
+
+AC_DEFUN([AC_CHECK_BOOL],
+[
+ AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
+])
+
+AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
+[
+AC_MSG_CHECKING(if you need GNU extensions)
+AC_CACHE_VAL(ac_cv_gnu_extensions,
+[
+cat > conftest.c << EOF
+#include <features.h>
+
+#ifdef __GNU_LIBRARY__
+yes
+#endif
+EOF
+
+if (eval "$ac_cpp conftest.c") 2>&5 |
+ egrep --color=never "yes" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_gnu_extensions=yes
+else
+ ac_cv_gnu_extensions=no
+fi
+])
+
+AC_MSG_RESULT($ac_cv_gnu_extensions)
+if test "$ac_cv_gnu_extensions" = "yes"; then
+ AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
+fi
+])
+
+AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
+[
+AC_MSG_CHECKING([whether $CXX supports -$1])
+kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
+AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
+[
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -$1"
+ AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
+ CXXFLAGS="$save_CXXFLAGS"
+ AC_LANG_RESTORE
+])
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ :
+ $2
+else
+ AC_MSG_RESULT(no)
+ :
+ $3
+fi
+])
+
+AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
+[
+AC_MSG_CHECKING([whether $CC supports -$1])
+kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
+AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
+[
+ AC_LANG_SAVE
+ AC_LANG_C
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -$1"
+ AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
+ CFLAGS="$save_CFLAGS"
+ AC_LANG_RESTORE
+])
+if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ :
+ $2
+else
+ AC_MSG_RESULT(no)
+ :
+ $3
+fi
+])
+
+
+dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
+dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
+dnl it's all white-space separated
+AC_DEFUN([AC_REMOVE_FORBIDDEN],
+[ __val=$$1
+ __forbid=" $2 "
+ if test -n "$__val"; then
+ __new=""
+ ac_save_IFS=$IFS
+ IFS=" "
+ for i in $__val; do
+ case "$__forbid" in
+ *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
+ *) # Careful to not add spaces, where there were none, because otherwise
+ # libtool gets confused, if we change e.g. CXX
+ if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
+ esac
+ done
+ IFS=$ac_save_IFS
+ $1=$__new
+ fi
+])
+
+
+AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER],
+[
+ AC_MSG_CHECKING([whether $CC is blacklisted])
+
+ dnl In theory we have tu run this test against $CC and $CXX
+ dnl in C and in C++ mode, because its perfectly legal for
+ dnl the user to mix compiler versions, since C has a defined
+ dnl ABI.
+ dnl
+ dnl For now, we assume the user is not on crack.
+
+ AC_TRY_COMPILE([
+#ifdef __GNUC__
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
+choke me
+#endif
+#endif
+], ,
+ kde_bad_compiler=no,
+ kde_bad_compiler=yes
+)
+
+ AC_MSG_RESULT($kde_bad_compiler)
+
+if test "$kde_bad_compiler" = "yes"; then
+ AC_MSG_ERROR([
+
+This particular compiler version is blacklisted because it
+is known to miscompile KDE. Please use a newer version, or
+if that is not yet available, choose an older version.
+
+Please do not report a bug or bother us reporting this
+configure error. We know about it, and we introduced
+it by intention to avoid untraceable bugs or crashes in KDE.
+
+])
+fi
+
+])
+
+
+AC_DEFUN([KDE_CHECK_FOR_OPT_NOINLINE_MATCH],
+[
+ AC_CACHE_CHECK([whether system headers can cope with -O2 -fno-inline],
+ kde_cv_opt_noinline_match,
+ [
+ kde_cv_opt_noinline_match=irrelevant
+ dnl if we don't use both -O2 and -fno-inline, this check is moot
+ if echo "$CFLAGS" | grep --color=never -e -O2 >/dev/null 2>/dev/null \
+ && echo "$CFLAGS" | grep --color=never -e -fno-inline >/dev/null 2>/dev/null ; then
+
+ ac_cflags_save="$CFLAGS"
+ CFLAGS="$CFLAGS -D_USE_GNU"
+
+ AC_TRY_LINK([
+ #include <string.h>
+], [ const char *pt, *et;
+ et = __extension__ ({ char __a0, __a1, __a2; (__builtin_constant_p ( ";," ) && ((size_t)(const void *)(( ";," )+ 1) - (size_t)(const void *)( ";," ) == 1) ? ((__a0 =((__const char *) ( ";," ))[0], __a0 == '\0') ? ((void) ( pt ),((void *)0) ) : ((__a1 = ((__const char *) ( ";," ))[1], __a1== '\0') ? (__extension__ (__builtin_constant_p ( __a0 ) && ( __a0 ) == '\0' ? (char *) __rawmemchr ( pt , __a0) : strchr( pt , __a0 ))) : ((__a2 = ((__const char *) ( ";," ))[2], __a2 == '\0') ? __strpbrk_c2 ( pt , __a0, __a1) :(((__const char *) ( ";," ))[3] == '\0' ? __strpbrk_c3 ( pt ,__a0, __a1, __a2): strpbrk ( pt , ";," ))))) : strpbrk ( pt , ";," )); }) ;
+],
+ kde_cv_opt_noinline_match=yes,
+ kde_cv_opt_noinline_match=no
+ )
+
+ CFLAGS="$ac_cflags_save"
+ fi
+ ])
+])
+
+
+dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
+AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
+[dnl
+if test "x$kde_use_qt_emb" != "xyes"; then
+ AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
+ AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
+else
+ AC_REMOVE_FORBIDDEN(CXX, [-rpath])
+ AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
+fi
+])
+
+AC_DEFUN([AC_CHECK_COMPILERS],
+[
+ AC_ARG_ENABLE(debug,
+ AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
+ [
+ case $enableval in
+ yes)
+ kde_use_debug_code="yes"
+ kde_use_debug_define=no
+ ;;
+ full)
+ kde_use_debug_code="full"
+ kde_use_debug_define=no
+ ;;
+ *)
+ kde_use_debug_code="no"
+ kde_use_debug_define=yes
+ ;;
+ esac
+ ],
+ [kde_use_debug_code="no"
+ kde_use_debug_define=no
+ ])
+
+ dnl Just for configure --help
+ AC_ARG_ENABLE(dummyoption,
+ AC_HELP_STRING([--disable-debug],
+ [disables debug output and debug symbols [default=no]]),
+ [],[])
+
+ AC_ARG_ENABLE(strict,
+ AC_HELP_STRING([--enable-strict],
+ [compiles with strict compiler options (may not work!)]),
+ [
+ if test $enableval = "no"; then
+ kde_use_strict_options="no"
+ else
+ kde_use_strict_options="yes"
+ fi
+ ], [kde_use_strict_options="no"])
+
+ AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
+ [
+ if test $enableval = "no"; then
+ kde_use_warnings="no"
+ else
+ kde_use_warnings="yes"
+ fi
+ ], [kde_use_warnings="yes"])
+
+ dnl enable warnings for debug build
+ if test "$kde_use_debug_code" != "no"; then
+ kde_use_warnings=yes
+ fi
+
+ AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
+ [kde_use_profiling=$enableval],
+ [kde_use_profiling="no"]
+ )
+
+ dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
+ CFLAGS=" $CFLAGS"
+
+ AC_PROG_CC
+
+ AC_PROG_CPP
+
+ if test "$GCC" = "yes"; then
+ if test "$kde_use_debug_code" != "no"; then
+ if test $kde_use_debug_code = "full"; then
+ CFLAGS="-g3 -fno-inline $CFLAGS"
+ else
+ CFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CFLAGS"
+ fi
+ else
+ CFLAGS="-O2 $CFLAGS"
+ fi
+ fi
+
+ if test "$kde_use_debug_define" = "yes"; then
+ CFLAGS="-DNDEBUG $CFLAGS"
+ fi
+
+
+ case "$host" in
+ *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
+ *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
+ esac
+
+ if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
+ LDFLAGS=""
+ fi
+
+ CXXFLAGS=" $CXXFLAGS"
+
+ AC_PROG_CXX
+
+ KDE_CHECK_FOR_BAD_COMPILER
+
+ if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
+ if test "$kde_use_debug_code" != "no"; then
+ if test "$CXX" = "KCC"; then
+ CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
+ else
+ if test "$kde_use_debug_code" = "full"; then
+ CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
+ else
+ CXXFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CXXFLAGS"
+ fi
+ fi
+ KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
+
+ dnl convenience compiler flags
+ KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
+ AC_SUBST(WOVERLOADED_VIRTUAL)
+ else
+ if test "$CXX" = "KCC"; then
+ CXXFLAGS="+K3 $CXXFLAGS"
+ else
+ CXXFLAGS="-O2 $CXXFLAGS"
+ fi
+ fi
+ fi
+
+ if test "$kde_use_debug_define" = "yes"; then
+ CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
+ fi
+
+ if test "$kde_use_profiling" = "yes"; then
+ KDE_CHECK_COMPILER_FLAG(pg,
+ [
+ CFLAGS="-pg $CFLAGS"
+ CXXFLAGS="-pg $CXXFLAGS"
+ ])
+ fi
+
+ if test "$kde_use_warnings" = "yes"; then
+ if test "$GCC" = "yes"; then
+ CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS"
+ case $host in
+ *-*-linux-gnu)
+ CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
+ CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts $CXXFLAGS"
+ KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
+ KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
+ ;;
+ esac
+ KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
+ KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
+ dnl ### FIXME: revert for KDE 4
+ KDE_CHECK_COMPILER_FLAG(Wno-non-virtual-dtor,[CXXFLAGS="$CXXFLAGS -Wno-non-virtual-dtor"])
+ fi
+ fi
+
+ if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
+ CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
+ fi
+
+ AC_ARG_ENABLE(pch,
+ AC_HELP_STRING([--enable-pch],
+ [enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
+ [ kde_use_pch=$enableval ],[ kde_use_pch=no ])
+
+ HAVE_GCC_VISIBILITY=0
+ AC_SUBST([HAVE_GCC_VISIBILITY])
+
+ if test "$GXX" = "yes"; then
+ gcc_no_reorder_blocks=NO
+ KDE_CHECK_COMPILER_FLAG(fno-reorder-blocks,[gcc_no_reorder_blocks=YES])
+ if test $kde_use_debug_code != "no" && \
+ test $kde_use_debug_code != "full" && \
+ test "YES" = "$gcc_no_reorder_blocks" ; then
+ CXXFLAGS="$CXXFLAGS -fno-reorder-blocks"
+ CFLAGS="$CFLAGS -fno-reorder-blocks"
+ fi
+ KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
+ KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
+ KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
+ KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
+ ENABLE_PERMISSIVE_FLAG="-fpermissive"
+
+ if test "$kde_use_pch" = "yes"; then
+ AC_MSG_CHECKING(whether gcc supports precompiling c header files)
+ echo >conftest.h
+ if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
+ kde_gcc_supports_pch=yes
+ AC_MSG_RESULT(yes)
+ else
+ kde_gcc_supports_pch=no
+ AC_MSG_RESULT(no)
+ fi
+ if test "$kde_gcc_supports_pch" = "yes"; then
+ AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
+ if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
+ kde_gcc_supports_pch=yes
+ AC_MSG_RESULT(yes)
+ else
+ kde_gcc_supports_pch=no
+ AC_MSG_RESULT(no)
+ fi
+ fi
+ rm -f conftest.h conftest.h.gch
+ fi
+
+ KDE_CHECK_FOR_OPT_NOINLINE_MATCH
+ if test "x$kde_cv_opt_noinline_match" = "xno" ; then
+ CFLAGS="`echo "$CFLAGS" | sed "s/ -fno-inline//"`"
+ fi
+ fi
+ AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
+ if test "$CXX" = "KCC"; then
+ dnl unfortunately we currently cannot disable exception support in KCC
+ dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
+ dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
+ dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
+
+ if test "$kde_use_pch" = "yes"; then
+ dnl TODO: support --pch-dir!
+ KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
+ dnl the below works (but the dir must exist), but it's
+ dnl useless for a whole package.
+ dnl The are precompiled headers for each source file, so when compiling
+ dnl from scratch, it doesn't make a difference, and they take up
+ dnl around ~5Mb _per_ sourcefile.
+ dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
+ dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
+ fi
+ dnl this flag controls inlining. by default KCC inlines in optimisation mode
+ dnl all implementations that are defined inside the class {} declaration.
+ dnl because of templates-compatibility with broken gcc compilers, this
+ dnl can cause excessive inlining. This flag limits it to a sane level
+ KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
+ KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
+ KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
+ KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
+ dnl Some source files are shared between multiple executables
+ dnl (or libraries) and some of those need template instantiations.
+ dnl In that case KCC needs to compile those sources with
+ dnl --one_instantiation_per_object. To make it easy for us we compile
+ dnl _all_ objects with that flag (--one_per is a shorthand).
+ KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
+ fi
+ AC_SUBST(USE_EXCEPTIONS)
+ dnl obsolete macro - provided to keep things going
+ USE_RTTI=
+ AC_SUBST(USE_RTTI)
+
+ case "$host" in
+ *-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
+ *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
+ *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
+ *-*-solaris*)
+ if test "$GXX" = yes; then
+ libstdcpp=`$CXX -print-file-name=libstdc++.so`
+ if test ! -f $libstdcpp; then
+ AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
+ fi
+ fi
+ ;;
+ esac
+
+ AC_VALIDIFY_CXXFLAGS
+
+ AC_PROG_CXXCPP
+
+ if test "$GCC" = yes; then
+ NOOPT_CFLAGS=-O0
+ fi
+ KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
+
+ AC_ARG_ENABLE(coverage,
+ AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
+ if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
+ ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
+ ac_coverage_linker="-lgcc"
+ elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
+ ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
+ ac_coverage_linker=""
+ else
+ AC_MSG_ERROR([coverage with your compiler is not supported])
+ fi
+ CFLAGS="$CFLAGS $ac_coverage_compiler"
+ CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
+ LDFLAGS="$LDFLAGS $ac_coverage_linker"
+ ])
+
+ AC_SUBST(NOOPT_CXXFLAGS)
+ AC_SUBST(NOOPT_CFLAGS)
+ AC_SUBST(ENABLE_PERMISSIVE_FLAG)
+
+ KDE_CHECK_NEW_LDFLAGS
+ KDE_CHECK_FINAL
+ KDE_CHECK_CLOSURE
+ KDE_CHECK_NMCHECK
+
+ ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
+])
+
+AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
+ [
+ AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
+ [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ safe_CXXFLAGS=$CXXFLAGS
+ safe_LDFLAGS=$LDFLAGS
+ CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
+ LDFLAGS="$LDFLAGS -shared -fPIC"
+
+ AC_TRY_LINK(
+ [
+ /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
+ #include <string>
+ int some_function( void ) __attribute__ ((visibility("default")));
+ int some_function( void )
+ {
+ std::string s("blafasel");
+ return 0;
+ }
+ ], [/* elvis is alive */],
+ kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
+
+ CXXFLAGS=$safe_CXXFLAGS
+ LDFLAGS=$safe_LDFLAGS
+ AC_LANG_RESTORE
+ ]
+ )
+
+ if test x$kde_cv_val_gcc_visibility_bug = xno; then
+ CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+ fi
+ ]
+)
+
+AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
+[
+ AC_BEFORE([AC_PATH_QT_1_3], [KDE_ENABLE_HIDDEN_VISIBILITY])
+
+ AC_MSG_CHECKING([grepping for visibility push/pop in headers])
+
+ if test "x$GXX" = "xyes"; then
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_EGREP_CPP(
+ [GCC visibility push],
+ [ #include <exception>
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ kde_stdc_visibility_patched=yes ],
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([Your libstdc++ doesn't appear to be patched for
+ visibility support. Disabling -fvisibility=hidden])
+
+ kde_stdc_visibility_patched=no ])
+
+ AC_LANG_RESTORE
+
+ kde_have_gcc_visibility=no
+ KDE_CHECK_COMPILER_FLAG(fvisibility=hidden,
+ [
+ kde_have_gcc_visibility=yes
+ dnl the whole toolchain is just a mess, gcc is just too buggy
+ dnl to handle STL with visibility enabled. Lets reconsider
+ dnl when gcc 4.2 is out or when things get fixed in the compiler.
+ dnl Contact mueller@kde.org for details.
+ AC_ARG_ENABLE(gcc-hidden-visibility,
+ AC_HELP_STRING([--enable-gcc-hidden-visibility],[toolchain hidden visibility [default=no]]),
+ [kde_have_gcc_visibility=$enableval],
+ [kde_have_gcc_visibility=no])
+
+ AC_CACHE_CHECK([if Qt is patched for -fvisibility], kde_cv_val_qt_gcc_visibility_patched,
+ [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ safe_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS $all_includes"
+
+ AC_TRY_COMPILE(
+ [
+#include <qglobal.h>
+#if Q_EXPORT - 0 != 0
+/* if this compiles, then Q_EXPORT is undefined */
+/* if Q_EXPORT is nonempty, this will break compilation */
+#endif
+ ], [/* elvis is alive */],
+ kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes)
+
+ CXXFLAGS=$safe_CXXFLAGS
+ AC_LANG_RESTORE
+ ]
+ )
+
+ if test x$kde_have_gcc_visibility = "xyes" && test x$kde_stdc_visibility_patched = "xyes" && test x$kde_cv_val_qt_gcc_visibility_patched = "xyes"; then
+ CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+ KDE_CHECK_VISIBILITY_GCC_BUG
+ HAVE_GCC_VISIBILITY=1
+ AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
+ fi
+ ])
+ fi
+])
+
+AC_DEFUN([KDE_ADD_DEPENDENCIES],
+[
+ [A]M_DEPENDENCIES(CC)
+ [A]M_DEPENDENCIES(CXX)
+])
+
+dnl just a wrapper to clean up configure.in
+AC_DEFUN([KDE_PROG_LIBTOOL],
+[
+AC_REQUIRE([AC_CHECK_COMPILERS])
+AC_REQUIRE([AC_ENABLE_SHARED])
+AC_REQUIRE([AC_ENABLE_STATIC])
+
+AC_REQUIRE([AC_LIBTOOL_DLOPEN])
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+AC_OBJEXT
+AC_EXEEXT
+
+AM_PROG_LIBTOOL
+AC_LIBTOOL_CXX
+
+LIBTOOL_SHELL="/bin/sh ./libtool"
+# LIBTOOL="$LIBTOOL --silent"
+KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
+AC_SUBST(KDE_PLUGIN)
+
+# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
+KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)"
+AC_SUBST(KDE_CHECK_PLUGIN)
+
+# we patch configure quite some so we better keep that consistent for incremental runs
+AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
+])
+
+AC_DEFUN([KDE_CHECK_LIB64],
+[
+ AC_ARG_ENABLE(libsuffix,
+ AC_HELP_STRING([--enable-libsuffix],
+ [/lib directory suffix (64,32,none,auto[=default])]),
+ kdelibsuff=$enableval, kdelibsuff="auto")
+
+ if test "$kdelibsuff" = "auto"; then
+
+cat > conftest.c << EOF
+#include <stdio.h>
+int main() {
+ return 0;
+}
+EOF
+ kdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{
+ s,.*/lib\([[^\/]]*\)/.*,\1,
+ p
+}'`
+ rm -rf conftest.*
+ fi
+
+ if test "$kdelibsuff" = "no" || test "$kdelibsuff" = "none"; then
+ kdelibsuff=
+ fi
+ if test -z "$kdelibsuff"; then
+ AC_MSG_RESULT([not using lib directory suffix])
+ AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
+ else
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir="$libdir${kdelibsuff}"
+ AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
+ fi
+ AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
+ AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
+ fi
+])
+
+AC_DEFUN([KDE_CHECK_TYPES],
+[ AC_CHECK_SIZEOF(int, 4)dnl
+ AC_CHECK_SIZEOF(short)dnl
+ AC_CHECK_SIZEOF(long, 4)dnl
+ AC_CHECK_SIZEOF(char *, 4)dnl
+])dnl
+
+dnl Not used - kept for compat only?
+AC_DEFUN([KDE_DO_IT_ALL],
+[
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
+AM_INIT_AUTOMAKE($1, $2)
+AM_DISABLE_LIBRARIES
+AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
+AC_CHECK_COMPILERS
+KDE_PROG_LIBTOOL
+AM_KDE_WITH_NLS
+AC_PATH_KDE
+])
+
+AC_DEFUN([AC_CHECK_RPATH],
+[
+AC_MSG_CHECKING(for rpath)
+AC_ARG_ENABLE(rpath,
+ AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
+ USE_RPATH=$enableval, USE_RPATH=yes)
+
+if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
+
+ KDE_RPATH="-R \$(libdir)"
+
+ if test "$kde_libraries" != "$libdir"; then
+ KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
+ fi
+
+ if test -n "$qt_libraries"; then
+ KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
+ fi
+ dnl $x_libraries is set to /usr/lib in case
+ if test -n "$X_LDFLAGS"; then
+ X_RPATH="-R \$(x_libraries)"
+ KDE_RPATH="$KDE_RPATH $X_RPATH"
+ fi
+ if test -n "$KDE_EXTRA_RPATH"; then
+ KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
+ fi
+fi
+AC_SUBST(KDE_EXTRA_RPATH)
+AC_SUBST(KDE_RPATH)
+AC_SUBST(X_RPATH)
+AC_MSG_RESULT($USE_RPATH)
+])
+
+dnl Check for the type of the third argument of getsockname
+AC_DEFUN([AC_CHECK_SOCKLEN_T],
+[
+ AC_MSG_CHECKING(for socklen_t)
+ AC_CACHE_VAL(kde_cv_socklen_t,
+ [
+ AC_LANG_PUSH(C++)
+ kde_cv_socklen_t=no
+ AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ ],
+ [
+ socklen_t len;
+ getpeername(0,0,&len);
+ ],
+ [
+ kde_cv_socklen_t=yes
+ kde_cv_socklen_t_equiv=socklen_t
+ ])
+ AC_LANG_POP(C++)
+ ])
+ AC_MSG_RESULT($kde_cv_socklen_t)
+ if test $kde_cv_socklen_t = no; then
+ AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
+ AC_CACHE_VAL(kde_cv_socklen_t_equiv,
+ [
+ kde_cv_socklen_t_equiv=int
+ AC_LANG_PUSH(C++)
+ for t in int size_t unsigned long "unsigned long"; do
+ AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ ],
+ [
+ $t len;
+ getpeername(0,0,&len);
+ ],
+ [
+ kde_cv_socklen_t_equiv="$t"
+ break
+ ])
+ done
+ AC_LANG_POP(C++)
+ ])
+ AC_MSG_RESULT($kde_cv_socklen_t_equiv)
+ fi
+ AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
+ [type to use in place of socklen_t if not defined])
+ AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
+ [type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
+])
+
+dnl This is a merge of some macros out of the gettext aclocal.m4
+dnl since we don't need anything, I took the things we need
+dnl the copyright for them is:
+dnl >
+dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+dnl This Makefile.in is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+dnl >
+dnl for this file it is relicensed under LGPL
+
+AC_DEFUN([AM_KDE_WITH_NLS],
+ [
+ dnl If we use NLS figure out what method
+
+ AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
+ [test -n "`$ac_dir/$ac_word --version 2>&1 | grep --color=never 'GNU gettext'`"], msgfmt)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+ if test -z "`$GMSGFMT --version 2>&1 | grep --color=never 'GNU gettext'`"; then
+ AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
+ GMSGFMT=":"
+ fi
+ MSGFMT=$GMSGFMT
+ AC_SUBST(GMSGFMT)
+ AC_SUBST(MSGFMT)
+
+ AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep --color=never '(HELP)'`"], :)
+
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no 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 programs is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
+ AC_SUBST(XGETTEXT)
+
+ ])
+
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+# serial 1
+# Stephan Kulow: I appended a _KDE against name conflicts
+
+dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
+[# 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 -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# serial 1
+
+AC_DEFUN([AM_LC_MESSAGES],
+ [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 contains LC_MESSAGES])
+ fi
+ fi])
+
+dnl From Jim Meyering.
+dnl FIXME: migrate into libit.
+
+AC_DEFUN([AM_FUNC_OBSTACK],
+[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
+ [AC_TRY_LINK([#include "obstack.h"],
+ [struct obstack *mem;obstack_free(mem,(char *) 0)],
+ am_cv_func_obstack=yes,
+ am_cv_func_obstack=no)])
+ if test $am_cv_func_obstack = yes; then
+ AC_DEFINE(HAVE_OBSTACK)
+ else
+ LIBOBJS="$LIBOBJS obstack.o"
+ fi
+])
+
+dnl From Jim Meyering. Use this if you use the GNU error.[ch].
+dnl FIXME: Migrate into libit
+
+AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
+[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
+ [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
+ am_cv_lib_error_at_line=yes,
+ am_cv_lib_error_at_line=no)])
+ if test $am_cv_lib_error_at_line = no; then
+ LIBOBJS="$LIBOBJS error.o"
+ fi
+ AC_SUBST(LIBOBJS)dnl
+])
+
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# serial 1
+# Stephan Kulow: I put a KDE in it to avoid name conflicts
+
+AC_DEFUN([AM_KDE_GNU_GETTEXT],
+ [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+ AC_REQUIRE([AM_KDE_WITH_NLS])dnl
+ AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
+ AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next])
+
+ AC_MSG_CHECKING(for stpcpy)
+ AC_CACHE_VAL(kde_cv_func_stpcpy,
+ [
+ kde_safe_cxxflags=$CXXFLAGS
+ CXXFLAGS="-Werror"
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ #include <string.h>
+ ],
+ [
+ char buffer[200];
+ stpcpy(buffer, buffer);
+ ],
+ kde_cv_func_stpcpy=yes,
+ kde_cv_func_stpcpy=no)
+ AC_LANG_RESTORE
+ CXXFLAGS=$kde_safe_cxxflags
+ ])
+ AC_MSG_RESULT($kde_cv_func_stpcpy)
+ if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
+ AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
+ fi
+
+ AM_LC_MESSAGES
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ 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
+
+ ])
+
+AC_DEFUN([AC_HAVE_XPM],
+ [AC_REQUIRE_CPP()dnl
+ AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+ test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
+ test -z "$XPM_INCLUDE" && XPM_INCLUDE=
+
+ AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
+ xpm_test=$withval, xpm_test="yes")
+ if test "x$xpm_test" = xno; then
+ ac_cv_have_xpm=no
+ else
+ AC_MSG_CHECKING(for XPM)
+ AC_CACHE_VAL(ac_cv_have_xpm,
+ [
+ ac_save_ldflags="$LDFLAGS"
+ ac_save_cflags="$CFLAGS"
+ if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+ LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
+ else
+ LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
+ fi
+ CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
+ test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
+ AC_TRY_LINK([#include <X11/xpm.h>],[],
+ ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
+ LDFLAGS="$ac_save_ldflags"
+ CFLAGS="$ac_save_cflags"
+ ])dnl
+
+ if test "$ac_cv_have_xpm" = no; then
+ AC_MSG_RESULT(no)
+ XPM_LDFLAGS=""
+ XPMINC=""
+ $2
+ else
+ AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
+ if test "$XPM_LDFLAGS" = ""; then
+ XPMLIB='-lXpm $(LIB_X11)'
+ else
+ XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
+ fi
+ if test "$XPM_INCLUDE" = ""; then
+ XPMINC=""
+ else
+ XPMINC="-I$XPM_INCLUDE"
+ fi
+ AC_MSG_RESULT(yes)
+ $1
+ fi
+ fi
+ AC_SUBST(XPMINC)
+ AC_SUBST(XPMLIB)
+])
+
+AC_DEFUN([AC_HAVE_DPMS],
+ [AC_REQUIRE_CPP()dnl
+ AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+ test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
+ test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
+ DPMS_LIB=
+
+ AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
+ dpms_test=$withval, dpms_test="yes")
+ if test "x$dpms_test" = xno; then
+ ac_cv_have_dpms=no
+ else
+ AC_MSG_CHECKING(for DPMS)
+ dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
+ dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
+ AC_CACHE_VAL(ac_cv_have_dpms,
+ [
+ if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
+ AC_MSG_RESULT(no)
+ ac_cv_have_dpms="no"
+ else
+ ac_save_ldflags="$LDFLAGS"
+ ac_save_cflags="$CFLAGS"
+ ac_save_libs="$LIBS"
+ LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries"
+ LIBS="-lX11 -lXext $LIBSOCKET"
+ CFLAGS="$CFLAGS $X_INCLUDES"
+ test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+ AC_TRY_LINK([
+ #include <X11/Xproto.h>
+ #include <X11/X.h>
+ #include <X11/Xlib.h>
+ #include <X11/extensions/dpms.h>
+ int foo_test_dpms()
+ { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
+ ac_cv_have_dpms="yes", [
+ LIBS="-lXdpms $LIBS"
+ AC_TRY_LINK([
+ #include <X11/Xproto.h>
+ #include <X11/X.h>
+ #include <X11/Xlib.h>
+ #include <X11/extensions/dpms.h>
+ int foo_test_dpms()
+ { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
+ [
+ ac_cv_have_dpms="-lXdpms"
+ ],ac_cv_have_dpms="no")
+ ])
+ LDFLAGS="$ac_save_ldflags"
+ CFLAGS="$ac_save_cflags"
+ LIBS="$ac_save_libs"
+ fi
+ ])dnl
+
+ if test "$ac_cv_have_dpms" = no; then
+ AC_MSG_RESULT(no)
+ DPMS_LDFLAGS=""
+ DPMSINC=""
+ $2
+ else
+ AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
+ if test "$ac_cv_have_dpms" = "-lXdpms"; then
+ DPMS_LIB="-lXdpms"
+ fi
+ if test "$DPMS_LDFLAGS" = ""; then
+ DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
+ else
+ DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
+ fi
+ if test "$DPMS_INCLUDE" = ""; then
+ DPMSINC=""
+ else
+ DPMSINC="-I$DPMS_INCLUDE"
+ fi
+ AC_MSG_RESULT(yes)
+ $1
+ fi
+ fi
+ ac_save_cflags="$CFLAGS"
+ CFLAGS="$CFLAGS $X_INCLUDES"
+ test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+ AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
+ [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
+ AC_CHECK_DECL(DPMSCapable,
+ AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
+ [#include <X11/Xlib.h>
+ #include <X11/extensions/dpms.h>])
+ AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
+ [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
+ AC_CHECK_DECL(DPMSInfo,
+ AC_DEFINE(HAVE_DPMSINFO_PROTO),,
+ [#include <X11/Xlib.h>
+ #include <X11/extensions/dpms.h>])
+ CFLAGS="$ac_save_cflags"
+ AC_SUBST(DPMSINC)
+ AC_SUBST(DPMSLIB)
+])
+
+AC_DEFUN([AC_HAVE_GL],
+ [AC_REQUIRE_CPP()dnl
+ AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+ test -z "$GL_LDFLAGS" && GL_LDFLAGS=
+ test -z "$GL_INCLUDE" && GL_INCLUDE=
+
+ AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
+ gl_test=$withval, gl_test="yes")
+ if test "x$kde_use_qt_emb" = "xyes"; then
+ # GL and Qt Embedded is a no-go for now.
+ ac_cv_have_gl=no
+ elif test "x$gl_test" = xno; then
+ ac_cv_have_gl=no
+ else
+ AC_MSG_CHECKING(for GL)
+ AC_CACHE_VAL(ac_cv_have_gl,
+ [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_ldflags=$LDFLAGS
+ ac_save_cxxflags=$CXXFLAGS
+ ac_save_libs=$LIBS
+ LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries"
+ LIBS="$LIBS -lGL -lGLU"
+ test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11"
+ LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET"
+ CXXFLAGS="$CFLAGS $X_INCLUDES"
+ test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
+ AC_TRY_LINK([#include <GL/gl.h>
+#include <GL/glu.h>
+], [],
+ ac_cv_have_gl="yes", ac_cv_have_gl="no")
+ AC_LANG_RESTORE
+ LDFLAGS=$ac_save_ldflags
+ CXXFLAGS=$ac_save_cxxflags
+ LIBS=$ac_save_libs
+ ])dnl
+
+ if test "$ac_cv_have_gl" = "no"; then
+ AC_MSG_RESULT(no)
+ GL_LDFLAGS=""
+ GLINC=""
+ $2
+ else
+ AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
+ if test "$GL_LDFLAGS" = ""; then
+ GLLIB='-lGLU -lGL $(LIB_X11)'
+ else
+ GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
+ fi
+ if test "$GL_INCLUDE" = ""; then
+ GLINC=""
+ else
+ GLINC="-I$GL_INCLUDE"
+ fi
+ AC_MSG_RESULT($ac_cv_have_gl)
+ $1
+ fi
+ fi
+ AC_SUBST(GLINC)
+ AC_SUBST(GLLIB)
+])
+
+
+ dnl shadow password and PAM magic - maintained by ossi@kde.org
+
+AC_DEFUN([KDE_PAM], [
+ AC_REQUIRE([KDE_CHECK_LIBDL])
+
+ want_pam=
+ AC_ARG_WITH(pam,
+ AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
+ [ if test "x$withval" = "xyes"; then
+ want_pam=yes
+ pam_service=kde
+ elif test "x$withval" = "xno"; then
+ want_pam=no
+ else
+ want_pam=yes
+ pam_service=$withval
+ fi
+ ], [ pam_service=kde ])
+
+ use_pam=
+ PAMLIBS=
+ if test "x$want_pam" != xno; then
+ AC_CHECK_LIB(pam, pam_start, [
+ AC_CHECK_HEADER(security/pam_appl.h,
+ [ pam_header=security/pam_appl.h ],
+ [ AC_CHECK_HEADER(pam/pam_appl.h,
+ [ pam_header=pam/pam_appl.h ],
+ [
+ AC_MSG_WARN([PAM detected, but no headers found!
+Make sure you have the necessary development packages installed.])
+ ]
+ )
+ ]
+ )
+ ], , $LIBDL)
+ if test -z "$pam_header"; then
+ if test "x$want_pam" = xyes; then
+ AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
+ fi
+ else
+ AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
+ PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
+ use_pam=yes
+
+ dnl darwin claims to be something special
+ if test "$pam_header" = "pam/pam_appl.h"; then
+ AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
+ fi
+
+ dnl test whether struct pam_message is const (Linux) or not (Sun)
+ AC_MSG_CHECKING(for const pam_message)
+ AC_EGREP_HEADER([struct pam_message], $pam_header,
+ [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
+ [AC_MSG_RESULT([const: Linux-type PAM])],
+ [AC_MSG_RESULT([nonconst: Sun-type PAM])
+ AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
+ )],
+ [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
+ fi
+ fi
+
+ AC_SUBST(PAMLIBS)
+])
+
+dnl DEF_PAM_SERVICE(arg name, full name, define name)
+AC_DEFUN([DEF_PAM_SERVICE], [
+ AC_ARG_WITH($1-pam,
+ AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
+ [ if test "x$use_pam" = xyes; then
+ $3_PAM_SERVICE=$withval
+ else
+ AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
+You may want to enforce it by using --with-pam.])
+ fi
+ ],
+ [ if test "x$use_pam" = xyes; then
+ $3_PAM_SERVICE="$pam_service"
+ fi
+ ])
+ if test -n "$$3_PAM_SERVICE"; then
+ AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
+ AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
+ fi
+ AC_SUBST($3_PAM_SERVICE)
+])
+
+AC_DEFUN([KDE_SHADOWPASSWD], [
+ AC_REQUIRE([KDE_PAM])
+
+ AC_CHECK_LIB(shadow, getspent,
+ [ LIBSHADOW="-lshadow"
+ ac_use_shadow=yes
+ ],
+ [ dnl for UnixWare
+ AC_CHECK_LIB(gen, getspent,
+ [ LIBGEN="-lgen"
+ ac_use_shadow=yes
+ ],
+ [ AC_CHECK_FUNC(getspent,
+ [ ac_use_shadow=yes ],
+ [ ac_use_shadow=no ])
+ ])
+ ])
+ AC_SUBST(LIBSHADOW)
+ AC_SUBST(LIBGEN)
+
+ AC_MSG_CHECKING([for shadow passwords])
+
+ AC_ARG_WITH(shadow,
+ AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
+ [ if test "x$withval" != "xno"; then
+ use_shadow=yes
+ else
+ use_shadow=no
+ fi
+ ], [
+ use_shadow="$ac_use_shadow"
+ ])
+
+ if test "x$use_shadow" = xyes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
+ else
+ AC_MSG_RESULT(no)
+ LIBSHADOW=
+ LIBGEN=
+ fi
+
+ dnl finally make the relevant binaries setuid root, if we have shadow passwds.
+ dnl this still applies, if we could use it indirectly through pam.
+ if test "x$use_shadow" = xyes ||
+ ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
+ case $host in
+ *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
+ SETUIDFLAGS="-m 4755 -o root";;
+ *)
+ SETUIDFLAGS="-m 4755";;
+ esac
+ fi
+ AC_SUBST(SETUIDFLAGS)
+
+])
+
+AC_DEFUN([KDE_PASSWDLIBS], [
+ AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
+ AC_REQUIRE([KDE_PAM])
+ AC_REQUIRE([KDE_SHADOWPASSWD])
+
+ if test "x$use_pam" = "xyes"; then
+ PASSWDLIBS="$PAMLIBS"
+ else
+ PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
+ fi
+
+ dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
+ dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
+ dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
+ dnl may need to read /etc/master.passwd).
+ case $host in
+ *-*-freebsd*)
+ SETUIDFLAGS="-m 4755 -o root"
+ ;;
+ *)
+ ;;
+ esac
+
+ AC_SUBST(PASSWDLIBS)
+])
+
+AC_DEFUN([KDE_CHECK_LIBDL],
+[
+AC_CHECK_LIB(dl, dlopen, [
+LIBDL="-ldl"
+ac_cv_have_dlfcn=yes
+])
+
+AC_CHECK_LIB(dld, shl_unload, [
+LIBDL="-ldld"
+ac_cv_have_shload=yes
+])
+
+AC_SUBST(LIBDL)
+])
+
+AC_DEFUN([KDE_CHECK_DLOPEN],
+[
+KDE_CHECK_LIBDL
+AC_CHECK_HEADERS(dlfcn.h dl.h)
+if test "$ac_cv_header_dlfcn_h" = "no"; then
+ ac_cv_have_dlfcn=no
+fi
+
+if test "$ac_cv_header_dl_h" = "no"; then
+ ac_cv_have_shload=no
+fi
+
+dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
+dnl (MM)
+AC_ARG_ENABLE(dlopen,
+AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
+enable_dlopen=$enableval,
+enable_dlopen=yes)
+
+# override the user's opinion, if we know it better ;)
+if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
+ enable_dlopen=no
+fi
+
+if test "$ac_cv_have_dlfcn" = "yes"; then
+ AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
+fi
+
+if test "$ac_cv_have_shload" = "yes"; then
+ AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
+fi
+
+if test "$enable_dlopen" = no ; then
+ test -n "$1" && eval $1
+else
+ test -n "$2" && eval $2
+fi
+
+])
+
+AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
+[
+KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
+KDE_PROG_LIBTOOL
+AC_MSG_CHECKING([dynamic loading])
+eval "`egrep --color=never '^build_libtool_libs=' libtool`"
+if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
+ dynamic_loading=yes
+ AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
+else
+ dynamic_loading=no
+fi
+AC_MSG_RESULT($dynamic_loading)
+if test "$dynamic_loading" = "yes"; then
+ $1
+else
+ $2
+fi
+])
+
+AC_DEFUN([KDE_ADD_INCLUDES],
+[
+if test -z "$1"; then
+ test_include="Pix.h"
+else
+ test_include="$1"
+fi
+
+AC_MSG_CHECKING([for libg++ ($test_include)])
+
+AC_CACHE_VAL(kde_cv_libgpp_includes,
+[
+kde_cv_libgpp_includes=no
+
+ for ac_dir in \
+ \
+ /usr/include/g++ \
+ /usr/include \
+ /usr/unsupported/include \
+ /opt/include \
+ $extra_include \
+ ; \
+ do
+ if test -r "$ac_dir/$test_include"; then
+ kde_cv_libgpp_includes=$ac_dir
+ break
+ fi
+ done
+])
+
+AC_MSG_RESULT($kde_cv_libgpp_includes)
+if test "$kde_cv_libgpp_includes" != "no"; then
+ all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
+fi
+])
+])
+
+AC_DEFUN([KDE_CHECK_LIBPTHREAD],
+[
+ dnl This code is here specifically to handle the
+ dnl various flavors of threading library on FreeBSD
+ dnl 4-, 5-, and 6-, and the (weird) rules around it.
+ dnl There may be an environment PTHREAD_LIBS that
+ dnl specifies what to use; otherwise, search for it.
+ dnl -pthread is special cased and unsets LIBPTHREAD
+ dnl below if found.
+ LIBPTHREAD=""
+
+ if test -n "$PTHREAD_LIBS"; then
+ if test "x$PTHREAD_LIBS" = "x-pthread" ; then
+ LIBPTHREAD="PTHREAD"
+ else
+ PTHREAD_LIBS_save="$PTHREAD_LIBS"
+ PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
+ AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
+ KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
+ LIBPTHREAD="$PTHREAD_LIBS_save"])
+ PTHREAD_LIBS="$PTHREAD_LIBS_save"
+ fi
+ fi
+
+ dnl Is this test really needed, in the face of the Tru64 test below?
+ if test -z "$LIBPTHREAD"; then
+ AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
+ fi
+
+ dnl This is a special Tru64 check, see BR 76171 issue #18.
+ if test -z "$LIBPTHREAD" ; then
+ AC_MSG_CHECKING([for pthread_create in -lpthread])
+ kde_safe_libs=$LIBS
+ LIBS="$LIBS -lpthread"
+ AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
+ AC_MSG_RESULT(yes)
+ LIBPTHREAD="-lpthread"],[
+ AC_MSG_RESULT(no)])
+ LIBS=$kde_safe_libs
+ fi
+
+ dnl Un-special-case for FreeBSD.
+ if test "x$LIBPTHREAD" = "xPTHREAD" ; then
+ LIBPTHREAD=""
+ fi
+
+ AC_SUBST(LIBPTHREAD)
+])
+
+AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
+[
+ USE_THREADS=""
+ if test -z "$LIBPTHREAD"; then
+ KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
+ fi
+
+ AH_VERBATIM(__svr_define, [
+#if defined(__SVR4) && !defined(__svr4__)
+#define __svr4__ 1
+#endif
+])
+ case $host_os in
+ solaris*)
+ KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
+ CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
+ ;;
+ freebsd*)
+ CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
+ ;;
+ aix*)
+ CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+ LIBPTHREAD="$LIBPTHREAD -lc_r"
+ ;;
+ linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+ if test "$CXX" = "KCC"; then
+ CXXFLAGS="$CXXFLAGS --thread_safe"
+ NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
+ fi
+ ;;
+ *)
+ ;;
+ esac
+ AC_SUBST(USE_THREADS)
+ AC_SUBST(LIBPTHREAD)
+])
+
+AC_DEFUN([KDE_CHECK_THREADING],
+[
+ AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
+ AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
+ dnl default is yes if libpthread is found and no if no libpthread is available
+ if test -z "$LIBPTHREAD"; then
+ if test -z "$USE_THREADS"; then
+ kde_check_threading_default=no
+ else
+ kde_check_threading_default=yes
+ fi
+ else
+ kde_check_threading_default=yes
+ fi
+ AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
+ kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
+ if test "x$kde_use_threading" = "xyes"; then
+ AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
+ fi
+])
+
+AC_DEFUN([KDE_TRY_LINK_PYTHON],
+[
+if test "$kde_python_link_found" = no; then
+
+if test "$1" = normal; then
+ AC_MSG_CHECKING(if a Python application links)
+else
+ AC_MSG_CHECKING(if Python depends on $2)
+fi
+
+AC_CACHE_VAL(kde_cv_try_link_python_$1,
+[
+kde_save_cflags="$CFLAGS"
+CFLAGS="$CFLAGS $PYTHONINC"
+kde_save_libs="$LIBS"
+LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
+kde_save_ldflags="$LDFLAGS"
+LDFLAGS="$LDFLAGS $PYTHONLIB"
+
+AC_TRY_LINK(
+[
+#include <Python.h>
+],[
+ PySys_SetArgv(1, 0);
+],
+ [kde_cv_try_link_python_$1=yes],
+ [kde_cv_try_link_python_$1=no]
+)
+CFLAGS="$kde_save_cflags"
+LIBS="$kde_save_libs"
+LDFLAGS="$kde_save_ldflags"
+])
+
+if test "$kde_cv_try_link_python_$1" = "yes"; then
+ AC_MSG_RESULT(yes)
+ kde_python_link_found=yes
+ if test ! "$1" = normal; then
+ LIBPYTHON="$LIBPYTHON $2"
+ fi
+ $3
+else
+ AC_MSG_RESULT(no)
+ $4
+fi
+
+fi
+
+])
+
+AC_DEFUN([KDE_CHECK_PYTHON_DIR],
+[
+AC_MSG_CHECKING([for Python directory])
+
+AC_CACHE_VAL(kde_cv_pythondir,
+[
+ if test -z "$PYTHONDIR"; then
+ kde_cv_pythondir=/usr/local
+ else
+ kde_cv_pythondir="$PYTHONDIR"
+ fi
+])
+
+AC_ARG_WITH(pythondir,
+AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
+[
+ ac_python_dir=$withval
+], ac_python_dir=$kde_cv_pythondir
+)
+
+AC_MSG_RESULT($ac_python_dir)
+])
+
+AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
+[
+AC_REQUIRE([KDE_CHECK_LIBDL])
+AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
+AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
+
+if test -z "$1"; then
+ version="1.5"
+else
+ version="$1"
+fi
+
+AC_MSG_CHECKING([for Python$version])
+
+python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
+AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
+if test ! -r $python_incdir/Python.h; then
+ AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
+ python_incdir=$python_incdir/python$version
+ if test ! -r $python_incdir/Python.h; then
+ python_incdir=no
+ fi
+fi
+
+PYTHONINC=-I$python_incdir
+
+python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
+AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
+if test ! -r $python_libdir/libpython$version.so; then
+ AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
+ if test ! -r $python_libdir/libpython$version.a; then
+ AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
+ python_libdir=$python_libdir/python$version/config
+ if test ! -r $python_libdir/libpython$version.a; then
+ python_libdir=no
+ fi
+ fi
+fi
+
+PYTHONLIB=-L$python_libdir
+kde_orig_LIBPYTHON=$LIBPYTHON
+if test -z "$LIBPYTHON"; then
+ LIBPYTHON=-lpython$version
+fi
+
+AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
+python_moddir=$python_moddir/python$version
+if test ! -r $python_moddir/copy.py; then
+ python_moddir=no
+fi
+
+PYTHONMODDIR=$python_moddir
+
+AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
+
+if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
+ LIBPYTHON=$kde_orig_LIBPYTHON
+ test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
+ test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
+ $2
+else
+ dnl Note: this test is very weak
+ kde_python_link_found=no
+ KDE_TRY_LINK_PYTHON(normal)
+ KDE_TRY_LINK_PYTHON(m, -lm)
+ KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
+ KDE_TRY_LINK_PYTHON(tcl, -ltcl)
+ KDE_TRY_LINK_PYTHON(db2, -ldb2)
+ KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
+ KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
+ KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
+ KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
+ KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
+ KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
+ KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
+ KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
+ [AC_MSG_WARN([it seems, Python depends on another library.
+ Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
+ and contact the authors to let them know about this problem])
+ ])
+
+ LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
+ AC_SUBST(PYTHONINC)
+ AC_SUBST(PYTHONLIB)
+ AC_SUBST(LIBPYTHON)
+ AC_SUBST(PYTHONMODDIR)
+ AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
+fi
+
+])
+
+
+AC_DEFUN([KDE_CHECK_PYTHON],
+[
+ KDE_CHECK_PYTHON_INTERN("2.5",
+ [KDE_CHECK_PYTHON_INTERN("2.4",
+ [KDE_CHECK_PYTHON_INTERN("2.3",
+ [KDE_CHECK_PYTHON_INTERN("2.2",
+ [KDE_CHECK_PYTHON_INTERN("2.1",
+ [KDE_CHECK_PYTHON_INTERN("2.0",
+ [KDE_CHECK_PYTHON_INTERN($1, $2) ])
+ ])
+ ])
+ ])
+ ])
+ ])
+])
+
+AC_DEFUN([KDE_CHECK_STL],
+[
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
+
+ AC_MSG_CHECKING([if C++ programs can be compiled])
+ AC_CACHE_VAL(kde_cv_stl_works,
+ [
+ AC_TRY_COMPILE([
+#include <string>
+using namespace std;
+],[
+ string astring="Hallo Welt.";
+ astring.erase(0, 6); // now astring is "Welt"
+ return 0;
+], kde_cv_stl_works=yes,
+ kde_cv_stl_works=no)
+])
+
+ AC_MSG_RESULT($kde_cv_stl_works)
+
+ if test "$kde_cv_stl_works" = "yes"; then
+ # back compatible
+ AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
+ else
+ AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
+Check config.log for details - if you're using a Linux distribution you might miss
+a package named similar to libstdc++-dev.])
+ fi
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+])
+
+AC_DEFUN([AC_FIND_QIMGIO],
+ [AC_REQUIRE([AC_FIND_JPEG])
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_MSG_CHECKING([for qimgio])
+AC_CACHE_VAL(ac_cv_lib_qimgio,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_save_LIBS="$LIBS"
+ac_save_CXXFLAGS="$CXXFLAGS"
+LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
+CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
+AC_TRY_RUN(dnl
+[
+#include <qimageio.h>
+#include <qstring.h>
+int main() {
+ QString t = "hallo";
+ t.fill('t');
+ qInitImageIO();
+}
+],
+ ac_cv_lib_qimgio=yes,
+ ac_cv_lib_qimgio=no,
+ ac_cv_lib_qimgio=no)
+LIBS="$ac_save_LIBS"
+CXXFLAGS="$ac_save_CXXFLAGS"
+AC_LANG_RESTORE
+])dnl
+if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
+ LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
+ AC_MSG_RESULT(yes)
+ AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
+ AC_SUBST(LIBQIMGIO)
+else
+ AC_MSG_RESULT(not found)
+fi
+])
+
+AC_DEFUN([AM_DISABLE_LIBRARIES],
+[
+ AC_PROVIDE([AM_ENABLE_STATIC])
+ AC_PROVIDE([AM_ENABLE_SHARED])
+ enable_static=no
+ enable_shared=yes
+])
+
+
+AC_DEFUN([AC_CHECK_UTMP_FILE],
+[
+ AC_MSG_CHECKING([for utmp file])
+
+ AC_CACHE_VAL(kde_cv_utmp_file,
+ [
+ kde_cv_utmp_file=no
+
+ for ac_file in \
+ \
+ /var/run/utmp \
+ /var/adm/utmp \
+ /etc/utmp \
+ ; \
+ do
+ if test -r "$ac_file"; then
+ kde_cv_utmp_file=$ac_file
+ break
+ fi
+ done
+ ])
+
+ if test "$kde_cv_utmp_file" != "no"; then
+ AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
+ $1
+ AC_MSG_RESULT($kde_cv_utmp_file)
+ else
+ $2
+ AC_MSG_RESULT([non found])
+ fi
+])
+
+
+AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
+[
+
+DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
+TOPSUBDIRS=""
+
+if test ! -s $srcdir/subdirs; then
+ dnl Note: Makefile.common creates subdirs, so this is just a fallback
+ files=`cd $srcdir && ls -1`
+ dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
+ for i in $dirs; do
+ echo $i >> $srcdir/subdirs
+ done
+fi
+
+ac_topsubdirs=
+if test -s $srcdir/inst-apps; then
+ ac_topsubdirs="`cat $srcdir/inst-apps`"
+elif test -s $srcdir/subdirs; then
+ ac_topsubdirs="`cat $srcdir/subdirs`"
+fi
+
+for i in $ac_topsubdirs; do
+ AC_MSG_CHECKING([if $i should be compiled])
+ if test -d $srcdir/$i; then
+ install_it="yes"
+ for j in $DO_NOT_COMPILE; do
+ if test $i = $j; then
+ install_it="no"
+ fi
+ done
+ else
+ install_it="no"
+ fi
+ AC_MSG_RESULT($install_it)
+ vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
+ if test $install_it = "yes"; then
+ TOPSUBDIRS="$TOPSUBDIRS $i"
+ eval "$vari""_SUBDIR_included=yes"
+ else
+ eval "$vari""_SUBDIR_included=no"
+ fi
+done
+
+AC_SUBST(TOPSUBDIRS)
+])
+
+AC_DEFUN([KDE_CHECK_NAMESPACES],
+[
+AC_MSG_CHECKING(whether C++ compiler supports namespaces)
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE([
+],
+[
+namespace Foo {
+ extern int i;
+ namespace Bar {
+ extern int i;
+ }
+}
+
+int Foo::i = 0;
+int Foo::Bar::i = 1;
+],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_NAMESPACES)
+], [
+AC_MSG_RESULT(no)
+])
+AC_LANG_RESTORE
+])
+
+dnl ------------------------------------------------------------------------
+dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_CHECK_S_ISSOCK],
+[
+AC_MSG_CHECKING(for S_ISSOCK)
+AC_CACHE_VAL(ac_cv_have_s_issock,
+[
+AC_TRY_LINK(
+[
+#include <sys/stat.h>
+],
+[
+struct stat buff;
+int b = S_ISSOCK( buff.st_mode );
+],
+ac_cv_have_s_issock=yes,
+ac_cv_have_s_issock=no)
+])
+AC_MSG_RESULT($ac_cv_have_s_issock)
+if test "$ac_cv_have_s_issock" = "yes"; then
+ AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
+fi
+
+AH_VERBATIM(_ISSOCK,
+[
+#ifndef HAVE_S_ISSOCK
+#define HAVE_S_ISSOCK
+#define S_ISSOCK(mode) (1==0)
+#endif
+])
+
+])
+
+dnl ------------------------------------------------------------------------
+dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
+[
+AC_MSG_CHECKING(for MAXPATHLEN)
+AC_CACHE_VAL(ac_cv_maxpathlen,
+[
+cat > conftest.$ac_ext <<EOF
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+#include <stdio.h>
+#include <sys/param.h>
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 1024
+#endif
+
+KDE_HELLO MAXPATHLEN
+
+EOF
+
+ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep --color=never '^KDE_HELLO' >conftest.out"
+
+if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
+ ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
+else
+ ac_cv_maxpathlen=1024
+fi
+
+rm conftest.*
+
+])
+AC_MSG_RESULT($ac_cv_maxpathlen)
+AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
+])
+
+AC_DEFUN([KDE_CHECK_HEADER],
+[
+ kde_safe_cppflags=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $all_includes"
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_CHECK_HEADER([$1], [$2], [$3], [$4])
+ AC_LANG_RESTORE
+ CPPFLAGS=$kde_safe_cppflags
+])
+
+AC_DEFUN([KDE_CHECK_HEADERS],
+[
+ AH_CHECK_HEADERS([$1])
+ AC_LANG_SAVE
+ kde_safe_cppflags=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $all_includes"
+ AC_LANG_CPLUSPLUS
+ AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
+ CPPFLAGS=$kde_safe_cppflags
+ AC_LANG_RESTORE
+])
+
+AC_DEFUN([KDE_FAST_CONFIGURE],
+[
+ dnl makes configure fast (needs perl)
+ AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
+ with_fast_perl=$enableval, with_fast_perl=yes)
+])
+
+AC_DEFUN([KDE_CONF_FILES],
+[
+ val=
+ if test -f $srcdir/configure.files ; then
+ val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
+ fi
+ CONF_FILES=
+ if test -n "$val" ; then
+ for i in $val ; do
+ CONF_FILES="$CONF_FILES $i"
+ done
+ fi
+ AC_SUBST(CONF_FILES)
+])dnl
+
+dnl This sets the prefix, for arts and kdelibs
+dnl Do NOT use in any other module.
+dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
+AC_DEFUN([KDE_SET_PREFIX_CORE],
+[
+ unset CDPATH
+ dnl make $KDEDIR the default for the installation
+ AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
+
+ if test "x$prefix" = "xNONE"; then
+ prefix=$ac_default_prefix
+ ac_configure_args="$ac_configure_args --prefix=$prefix"
+ fi
+ # And delete superfluous '/' to make compares easier
+ prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+ exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+
+ kde_libs_prefix='$(prefix)'
+ kde_libs_htmldir='$(kde_htmldir)'
+ AC_SUBST(kde_libs_prefix)
+ AC_SUBST(kde_libs_htmldir)
+ KDE_FAST_CONFIGURE
+ KDE_CONF_FILES
+])
+
+
+AC_DEFUN([KDE_SET_PREFIX],
+[
+ unset CDPATH
+ dnl We can't give real code to that macro, only a value.
+ dnl It only matters for --help, since we set the prefix in this function anyway.
+ AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
+
+ KDE_SET_DEFAULT_BINDIRS
+ if test "x$prefix" = "xNONE"; then
+ dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
+ KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
+ else
+ dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
+ kde_save_PATH="$PATH"
+ PATH="$exec_prefix/bin:$prefix/bin:$PATH"
+ KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
+ PATH="$kde_save_PATH"
+ fi
+
+ kde_libs_prefix=`$KDECONFIG --prefix`
+ if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
+ AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
+ This means it has been moved since you installed it.
+ This won't work. Please recompile kdelibs for the new prefix.
+ ])
+ fi
+ kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
+
+ AC_MSG_CHECKING([where to install])
+ if test "x$prefix" = "xNONE"; then
+ prefix=$kde_libs_prefix
+ AC_MSG_RESULT([$prefix (as returned by kde-config)])
+ else
+ dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
+ given_prefix=$prefix
+ AC_MSG_RESULT([$prefix (as requested)])
+ fi
+
+ # And delete superfluous '/' to make compares easier
+ prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+ exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+ given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+
+ AC_SUBST(KDECONFIG)
+ AC_SUBST(kde_libs_prefix)
+ AC_SUBST(kde_libs_htmldir)
+
+ KDE_FAST_CONFIGURE
+ KDE_CONF_FILES
+])
+
+pushdef([AC_PROG_INSTALL],
+[
+ dnl our own version, testing for a -p flag
+ popdef([AC_PROG_INSTALL])
+ dnl as AC_PROG_INSTALL works as it works we first have
+ dnl to save if the user didn't specify INSTALL, as the
+ dnl autoconf one overwrites INSTALL and we have no chance to find
+ dnl out afterwards
+ test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
+ test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
+ test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
+ AC_PROG_INSTALL
+
+ if test -z "$kde_save_INSTALL_given" ; then
+ # OK, user hasn't given any INSTALL, autoconf found one for us
+ # now we test, if it supports the -p flag
+ AC_MSG_CHECKING(for -p flag to install)
+ rm -f confinst.$$.* > /dev/null 2>&1
+ echo "Testtest" > confinst.$$.orig
+ ac_res=no
+ if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
+ if test -f confinst.$$.new ; then
+ # OK, -p seems to do no harm to install
+ INSTALL="${INSTALL} -p"
+ ac_res=yes
+ fi
+ fi
+ rm -f confinst.$$.*
+ AC_MSG_RESULT($ac_res)
+ fi
+ dnl the following tries to resolve some signs and wonders coming up
+ dnl with different autoconf/automake versions
+ dnl e.g.:
+ dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
+ dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
+ dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
+ dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
+ dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
+ dnl install-@DIR@PROGRAMS targets to explicitly use that flag
+ dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
+ dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
+ dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
+ dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
+ dnl automake (due to broken Makefile.am or whatever) to install programs,
+ dnl and so does not see the -s flag in automake > 1.4
+ dnl to clean up that mess we:
+ dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
+ dnl which cleans KDE's program with automake > 1.4;
+ dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
+ dnl with automake<=1.4
+ dnl note that dues to this sometimes two '-s' flags are used (if KDE
+ dnl properly uses install-@DIR@PROGRAMS, but I don't care
+ dnl
+ dnl And to all this comes, that I even can't write in comments variable
+ dnl names used by automake, because it is so stupid to think I wanted to
+ dnl _use_ them, therefor I have written A_M_... instead of AM_
+ dnl hmm, I wanted to say something ... ahh yes: Arghhh.
+
+ if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
+ INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
+ fi
+ if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
+ INSTALL_SCRIPT='${INSTALL}'
+ fi
+])dnl
+
+AC_DEFUN([KDE_LANG_CPLUSPLUS],
+[AC_LANG_CPLUSPLUS
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
+pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
+])
+
+pushdef([AC_LANG_CPLUSPLUS],
+[popdef([AC_LANG_CPLUSPLUS])
+KDE_LANG_CPLUSPLUS
+])
+
+AC_DEFUN([KDE_CHECK_LONG_LONG],
+[
+AC_MSG_CHECKING(for long long)
+AC_CACHE_VAL(kde_cv_c_long_long,
+[
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_LINK([], [
+ long long foo = 0;
+ foo = foo+1;
+ ],
+ kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
+ AC_LANG_RESTORE
+])
+AC_MSG_RESULT($kde_cv_c_long_long)
+if test "$kde_cv_c_long_long" = yes; then
+ AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
+fi
+])
+
+AC_DEFUN([KDE_CHECK_LIB],
+[
+ kde_save_LDFLAGS="$LDFLAGS"
+ dnl AC_CHECK_LIB modifies LIBS, so save it here
+ kde_save_LIBS="$LIBS"
+ LDFLAGS="$LDFLAGS $all_libraries"
+ case $host_os in
+ aix*) LDFLAGS="-brtl $LDFLAGS"
+ test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
+ ;;
+ esac
+ AC_CHECK_LIB($1, $2, $3, $4, $5)
+ LDFLAGS="$kde_save_LDFLAGS"
+ LIBS="$kde_save_LIBS"
+])
+
+AC_DEFUN([KDE_JAVA_PREFIX],
+[
+ dir=`dirname "$1"`
+ base=`basename "$1"`
+ list=`ls -1 $dir 2> /dev/null`
+ for entry in $list; do
+ if test -d $dir/$entry/bin; then
+ case $entry in
+ $base)
+ javadirs="$javadirs $dir/$entry/bin"
+ ;;
+ esac
+ elif test -d $dir/$entry/jre/bin; then
+ case $entry in
+ $base)
+ javadirs="$javadirs $dir/$entry/jre/bin"
+ ;;
+ esac
+ fi
+ done
+])
+
+dnl KDE_CHEC_JAVA_DIR(onlyjre)
+AC_DEFUN([KDE_CHECK_JAVA_DIR],
+[
+
+AC_ARG_WITH(java,
+AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
+[ ac_java_dir=$withval
+], ac_java_dir=""
+)
+
+AC_MSG_CHECKING([for Java])
+
+dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
+if test "x$ac_java_dir" = "xno"; then
+ kde_java_bindir=no
+ kde_java_includedir=no
+ kde_java_libjvmdir=no
+ kde_java_libgcjdir=no
+ kde_java_libhpidir=no
+else
+ if test "x$ac_java_dir" = "x"; then
+
+
+ dnl No option set -> collect list of candidate paths
+ if test -n "$JAVA_HOME"; then
+ KDE_JAVA_PREFIX($JAVA_HOME)
+ fi
+ KDE_JAVA_PREFIX(/usr/j2se)
+ KDE_JAVA_PREFIX(/usr/lib/j2se)
+ KDE_JAVA_PREFIX(/usr/j*dk*)
+ KDE_JAVA_PREFIX(/usr/lib/j*dk*)
+ KDE_JAVA_PREFIX(/opt/j*sdk*)
+ KDE_JAVA_PREFIX(/usr/lib/java*)
+ KDE_JAVA_PREFIX(/usr/java*)
+ KDE_JAVA_PREFIX(/usr/java/j*dk*)
+ KDE_JAVA_PREFIX(/usr/java/j*re*)
+ KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
+ KDE_JAVA_PREFIX(/usr/lib/SunJava*)
+ KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
+ KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
+ KDE_JAVA_PREFIX(/opt/java*)
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ for dir in $PATH; do
+ if test -d "$dir"; then
+ javadirs="$javadirs $dir"
+ fi
+ done
+ IFS=$kde_save_IFS
+ jredirs=
+
+ dnl Now javadirs contains a list of paths that exist, all ending with bin/
+ for dir in $javadirs; do
+ dnl Check for the java executable
+ if test -x "$dir/java"; then
+ sane_path=$(cd $dir; /bin/pwd)
+ dnl And also check for a libjvm.so somewhere under there
+ dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
+ if test "$sane_path" != "/usr/bin"; then
+ libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
+ if test ! -f $libjvmdir/libjvm.so; then continue; fi
+ jredirs="$jredirs $dir"
+ fi
+ fi
+ done
+
+ dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
+ JAVAC=
+ JAVA=
+ kde_java_bindir=no
+ for dir in $jredirs; do
+ JAVA="$dir/java"
+ kde_java_bindir=$dir
+ if test -x "$dir/javac"; then
+ JAVAC="$dir/javac"
+ break
+ fi
+ done
+
+ if test -n "$JAVAC"; then
+ dnl this substitution might not work - well, we test for jni.h below
+ kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
+ else
+ kde_java_includedir=no
+ fi
+ else
+ dnl config option set
+ kde_java_bindir=$ac_java_dir/bin
+ if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
+ kde_java_includedir=no
+ else
+ kde_java_includedir=$ac_java_dir/include
+ fi
+ fi
+fi
+
+dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
+if test "x$kde_java_bindir" != "xno"; then
+
+ dnl Look for libjvm.so
+ kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
+ dnl Look for libgcj.so
+ kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
+ dnl Look for libhpi.so and avoid green threads
+ kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep --color=never -v green | sed 's,libhpi.so,,' | head -n 1`
+
+ dnl Now check everything's fine under there
+ dnl the include dir is our flag for having the JDK
+ if test -d "$kde_java_includedir"; then
+ if test ! -x "$kde_java_bindir/javac"; then
+ AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
+ fi
+ if test ! -x "$kde_java_bindir/javah"; then
+ AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
+ fi
+ if test ! -x "$kde_java_bindir/jar"; then
+ AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
+ fi
+ if test ! -r "$kde_java_includedir/jni.h"; then
+ AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
+ fi
+
+ jni_includes="-I$kde_java_includedir"
+ dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
+ dnl and under linux here..
+
+ dnl not needed for gcj
+
+ if test "x$kde_java_libgcjdir" = "x"; then
+ test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
+ test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
+ test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
+ fi
+
+ else
+ JAVAC=
+ jni_includes=
+ fi
+
+ if test "x$kde_java_libgcjdir" = "x"; then
+ if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
+ AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
+ fi
+ else
+ if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
+ AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
+ fi
+ fi
+
+ if test ! -x "$kde_java_bindir/java"; then
+ AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
+ fi
+
+ dnl not needed for gcj compile
+
+ if test "x$kde_java_libgcjdir" = "x"; then
+ if test ! -r "$kde_java_libhpidir/libhpi.so"; then
+ AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
+ fi
+ fi
+
+ if test -n "$jni_includes"; then
+ dnl Check for JNI version
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_cxxflags_safe="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
+
+ AC_TRY_COMPILE([
+ #include <jni.h>
+ ],
+ [
+ #ifndef JNI_VERSION_1_2
+ Syntax Error
+ #endif
+ ],[ kde_jni_works=yes ],
+ [ kde_jni_works=no ])
+
+ if test $kde_jni_works = no; then
+ AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
+ You need to have Java Development Kit (JDK) version 1.2.
+
+ Use --with-java to specify another location.
+ Use --without-java to configure without java support.
+ Or download a newer JDK and try again.
+ See e.g. http://java.sun.com/products/jdk/1.2 ])
+ fi
+
+ CXXFLAGS="$ac_cxxflags_safe"
+ AC_LANG_RESTORE
+
+ dnl All tests ok, inform and subst the variables
+
+ JAVAC=$kde_java_bindir/javac
+ JAVAH=$kde_java_bindir/javah
+ JAR=$kde_java_bindir/jar
+ AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
+ if test "x$kde_java_libgcjdir" = "x"; then
+ JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
+ else
+ JVMLIBS="-L$kde_java_libgcjdir -lgcj"
+ fi
+ AC_MSG_RESULT([java JDK in $kde_java_bindir])
+
+ else
+ AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
+ AC_MSG_RESULT([java JRE in $kde_java_bindir])
+ fi
+elif test -d "/Library/Java/Home"; then
+ kde_java_bindir="/Library/Java/Home/bin"
+ jni_includes="-I/Library/Java/Home/include"
+
+ JAVAC=$kde_java_bindir/javac
+ JAVAH=$kde_java_bindir/javah
+ JAR=$kde_java_bindir/jar
+ JVMLIBS="-Wl,-framework,JavaVM"
+
+ AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
+ AC_MSG_RESULT([Apple Java Framework])
+else
+ AC_MSG_RESULT([none found])
+fi
+
+AC_SUBST(JAVAC)
+AC_SUBST(JAVAH)
+AC_SUBST(JAR)
+AC_SUBST(JVMLIBS)
+AC_SUBST(jni_includes)
+
+# for backward compat
+kde_cv_java_includedir=$kde_java_includedir
+kde_cv_java_bindir=$kde_java_bindir
+])
+
+dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
+dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
+dnl big packages, m4_foreach is dog-slow. So use our own version of
+dnl it. (matz@kde.org)
+m4_define([mm_foreach],
+[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
+m4_define([mm_car], [[$1]])
+m4_define([mm_car2], [[$@]])
+m4_define([_mm_foreach],
+[m4_if(m4_quote($2), [], [],
+ [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
+ mm_car2(m4_shift($2)),
+ [$3])])])
+m4_define([AC_FOREACH],
+[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
+
+AC_DEFUN([KDE_NEED_FLEX],
+[
+kde_libs_safe=$LIBS
+LIBS="$LIBS $USER_LDFLAGS"
+AM_PROG_LEX
+LIBS=$kde_libs_safe
+if test -z "$LEXLIB"; then
+ AC_MSG_ERROR([You need to have flex installed.])
+fi
+AC_SUBST(LEXLIB)
+])
+
+AC_DEFUN([AC_PATH_QTOPIA],
+[
+ dnl TODO: use AC_CACHE_VAL
+
+ if test -z "$1"; then
+ qtopia_minver_maj=1
+ qtopia_minver_min=5
+ qtopia_minver_pat=0
+ else
+ qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
+ qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
+ qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
+ fi
+
+ qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
+ qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
+
+ AC_REQUIRE([AC_PATH_QT])
+
+ AC_MSG_CHECKING([for Qtopia])
+
+ LIB_QTOPIA="-lqpe"
+ AC_SUBST(LIB_QTOPIA)
+
+ kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
+
+ ac_qtopia_incdir=NO
+
+ AC_ARG_WITH(qtopia-dir,
+ AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
+ [ ac_qtopia_incdir="$withval"/include] )
+
+ qtopia_incdirs=""
+ for dir in $kde_qtopia_dirs; do
+ qtopia_incdirs="$qtopia_incdirs $dir/include"
+ done
+
+ if test ! "$ac_qtopia_incdir" = "NO"; then
+ qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
+ fi
+
+ qtopia_incdir=""
+ AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
+ ac_qtopia_incdir="$qtopia_incdir"
+
+ if test -z "$qtopia_incdir"; then
+ AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
+ fi
+
+ qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
+ qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
+ qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
+
+ qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
+ qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
+ if test "$qtopia_ver" -lt "$qtopia_minver"; then
+ AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
+is required.])
+ fi
+
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ ac_cxxflags_safe="$CXXFLAGS"
+ ac_ldflags_safe="$LDFLAGS"
+ ac_libs_safe="$LIBS"
+
+ CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
+ LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
+ LIBS="$LIBS $LIB_QTOPIA $LIBQT"
+
+ cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <qpe/qpeapplication.h>
+#include <qpe/version.h>
+
+int main( int argc, char **argv )
+{
+ QPEApplication app( argc, argv );
+ return 0;
+}
+EOF
+
+ if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ rm -f conftest*
+ else
+ rm -f conftest*
+ AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
+the end of config.log])
+ fi
+
+ CXXFLAGS="$ac_cxxflags_safe"
+ LDFLAGS="$ac_ldflags_safe"
+ LIBS="$ac_libs_safe"
+
+ AC_LANG_RESTORE
+
+ QTOPIA_INCLUDES="-I$qtopia_incdir"
+ AC_SUBST(QTOPIA_INCLUDES)
+
+ AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
+])
+
+
+AC_DEFUN([KDE_INIT_DOXYGEN],
+[
+AC_MSG_CHECKING([for Qt docs])
+kde_qtdir=
+if test "${with_qt_dir+set}" = set; then
+ kde_qtdir="$with_qt_dir"
+fi
+
+AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
+AC_MSG_RESULT($QTDOCDIR)
+
+AC_SUBST(QTDOCDIR)
+
+KDE_FIND_PATH(dot, DOT, [], [])
+if test -n "$DOT"; then
+ KDE_HAVE_DOT="YES"
+else
+ KDE_HAVE_DOT="NO"
+fi
+AC_SUBST(KDE_HAVE_DOT)
+KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
+AC_SUBST(DOXYGEN)
+
+DOXYGEN_PROJECT_NAME="$1"
+DOXYGEN_PROJECT_NUMBER="$2"
+AC_SUBST(DOXYGEN_PROJECT_NAME)
+AC_SUBST(DOXYGEN_PROJECT_NUMBER)
+
+KDE_HAS_DOXYGEN=no
+if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
+ KDE_HAS_DOXYGEN=yes
+fi
+AC_SUBST(KDE_HAS_DOXYGEN)
+
+])
+
+
+AC_DEFUN([AC_FIND_BZIP2],
+[
+AC_MSG_CHECKING([for bzDecompress in libbz2])
+AC_CACHE_VAL(ac_cv_lib_bzip2,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+kde_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
+kde_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(dnl
+[
+#define BZ_NO_STDIO
+#include<bzlib.h>
+],
+ [ bz_stream s; (void) bzDecompress(&s); ],
+ eval "ac_cv_lib_bzip2='-lbz2'",
+ eval "ac_cv_lib_bzip2=no")
+LIBS="$kde_save_LIBS"
+CXXFLAGS="$kde_save_CXXFLAGS"
+AC_LANG_RESTORE
+])dnl
+AC_MSG_RESULT($ac_cv_lib_bzip2)
+
+if test ! "$ac_cv_lib_bzip2" = no; then
+ BZIP2DIR=bzip2
+
+ LIBBZ2="$ac_cv_lib_bzip2"
+ AC_SUBST(LIBBZ2)
+
+else
+
+ cxx_shared_flag=
+ ld_shared_flag=
+ KDE_CHECK_COMPILER_FLAG(shared, [
+ ld_shared_flag="-shared"
+ ])
+ KDE_CHECK_COMPILER_FLAG(fPIC, [
+ cxx_shared_flag="-fPIC"
+ ])
+
+ AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
+ AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
+ [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ kde_save_LIBS="$LIBS"
+ LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
+ kde_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
+
+ AC_TRY_LINK(dnl
+ [
+ #define BZ_NO_STDIO
+ #include<bzlib.h>
+ ],
+ [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
+ eval "ac_cv_lib_bzip2_prefix='-lbz2'",
+ eval "ac_cv_lib_bzip2_prefix=no")
+ LIBS="$kde_save_LIBS"
+ CXXFLAGS="$kde_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])dnl
+
+ AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
+
+ if test ! "$ac_cv_lib_bzip2_prefix" = no; then
+ BZIP2DIR=bzip2
+
+ LIBBZ2="$ac_cv_lib_bzip2_prefix"
+ AC_SUBST(LIBBZ2)
+
+ AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
+ dnl else, we just ignore this
+ fi
+
+fi
+AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
+])
+
+dnl ------------------------------------------------------------------------
+dnl Try to find the SSL headers and libraries.
+dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
+dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([KDE_CHECK_SSL],
+[
+LIBSSL="-lssl -lcrypto"
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+ac_ssl_includes=NO ac_ssl_libraries=NO
+ssl_libraries=""
+ssl_includes=""
+AC_ARG_WITH(ssl-dir,
+ AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
+ [ ac_ssl_includes="$withval"/include
+ ac_ssl_libraries="$withval"/lib$kdelibsuff
+ ])
+
+want_ssl=yes
+AC_ARG_WITH(ssl,
+ AC_HELP_STRING([--without-ssl],[disable SSL checks]),
+ [want_ssl=$withval])
+
+if test $want_ssl = yes; then
+
+AC_MSG_CHECKING(for OpenSSL)
+
+AC_CACHE_VAL(ac_cv_have_ssl,
+[#try to guess OpenSSL locations
+
+ ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
+ ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
+ AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
+ ac_ssl_includes="$ssl_incdir"
+
+ ssl_libdirs="/usr/lib$kdelibsuff /usr/local/lib$kdelibsuff /usr/ssl/lib$kdelibsuff /usr/local/ssl/lib$kdelibsuff $libdir $prefix/lib$kdelibsuff $exec_prefix/lib$kdelibsuff $kde_extra_libs"
+ if test ! "$ac_ssl_libraries" = "NO"; then
+ ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
+ fi
+
+ test=NONE
+ ssl_libdir=NONE
+ for dir in $ssl_libdirs; do
+ try="ls -1 $dir/libssl*"
+ if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
+ done
+
+ ac_ssl_libraries="$ssl_libdir"
+
+ ac_ldflags_safe="$LDFLAGS"
+ ac_libs_safe="$LIBS"
+
+ LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
+ LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
+
+ AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
+ ac_ssl_rsaref="yes"
+ ,
+ ac_ssl_rsaref="no"
+ )
+
+ LDFLAGS="$ac_ldflags_safe"
+ LIBS="$ac_libs_safe"
+
+ if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
+ have_ssl=no
+ else
+ have_ssl=yes;
+ fi
+
+ ])
+
+ eval "$ac_cv_have_ssl"
+
+ AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
+
+ AC_MSG_CHECKING([whether OpenSSL uses rsaref])
+ AC_MSG_RESULT($ac_ssl_rsaref)
+
+ AC_MSG_CHECKING([for easter eggs])
+ AC_MSG_RESULT([none found])
+
+else
+ have_ssl=no
+fi
+
+if test "$have_ssl" = yes; then
+ AC_MSG_CHECKING(for OpenSSL version)
+ dnl Check for SSL version
+ AC_CACHE_VAL(ac_cv_ssl_version,
+ [
+
+ cat >conftest.$ac_ext <<EOF
+#include <openssl/opensslv.h>
+#include <stdio.h>
+ int main() {
+
+#ifndef OPENSSL_VERSION_NUMBER
+ printf("ssl_version=\\"error\\"\n");
+#else
+ if (OPENSSL_VERSION_NUMBER < 0x00906000)
+ printf("ssl_version=\\"old\\"\n");
+ else
+ printf("ssl_version=\\"ok\\"\n");
+#endif
+ return (0);
+ }
+EOF
+
+ ac_save_CPPFLAGS=$CPPFLAGS
+ if test "$ac_ssl_includes" != "/usr/include"; then
+ CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
+ fi
+
+ if AC_TRY_EVAL(ac_link); then
+
+ if eval `./conftest 2>&5`; then
+ if test $ssl_version = error; then
+ AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
+ else
+ if test $ssl_version = old; then
+ AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
+ have_ssl=no
+ fi
+ fi
+ ac_cv_ssl_version="ssl_version=$ssl_version"
+ else
+ AC_MSG_ERROR([Your system couldn't run a small SSL test program.
+ Check config.log, and if you can't figure it out, send a mail to
+ David Faure <faure@kde.org>, attaching your config.log])
+ fi
+
+ else
+ AC_MSG_ERROR([Your system couldn't link a small SSL test program.
+ Check config.log, and if you can't figure it out, send a mail to
+ David Faure <faure@kde.org>, attaching your config.log])
+ fi
+ CPPFLAGS=$ac_save_CPPFLAGS
+
+ ])
+
+ eval "$ac_cv_ssl_version"
+ AC_MSG_RESULT($ssl_version)
+fi
+
+if test "$have_ssl" != yes; then
+ LIBSSL="";
+else
+ AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
+ ac_cv_have_ssl="have_ssl=yes \
+ ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
+
+
+ ssl_libraries="$ac_ssl_libraries"
+ ssl_includes="$ac_ssl_includes"
+
+ if test "$ac_ssl_rsaref" = yes; then
+ LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
+ fi
+
+ if test $ssl_version = "old"; then
+ AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
+ fi
+fi
+
+SSL_INCLUDES=
+
+if test "$ssl_includes" = "/usr/include"; then
+ if test -f /usr/kerberos/include/krb5.h; then
+ SSL_INCLUDES="-I/usr/kerberos/include"
+ fi
+elif test "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
+ SSL_INCLUDES="-I$ssl_includes"
+fi
+
+if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
+ SSL_LDFLAGS=""
+else
+ SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
+fi
+
+AC_SUBST(SSL_INCLUDES)
+AC_SUBST(SSL_LDFLAGS)
+AC_SUBST(LIBSSL)
+])
+
+AC_DEFUN([KDE_CHECK_STRLCPY],
+[
+ AC_REQUIRE([AC_CHECK_STRLCAT])
+ AC_REQUIRE([AC_CHECK_STRLCPY])
+ AC_CHECK_SIZEOF(size_t)
+ AC_CHECK_SIZEOF(unsigned long)
+
+ AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
+ AC_TRY_COMPILE(,[
+ #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
+ choke me
+ #endif
+ ],AC_MSG_RESULT([yes]),[
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([
+ Apparently on your system our assumption sizeof size_t == sizeof unsigned long
+ does not apply. Please mail kde-devel@kde.org with a description of your system!
+ ])
+ ])
+])
+
+AC_DEFUN([KDE_CHECK_BINUTILS],
+[
+ AC_MSG_CHECKING([if ld supports unversioned version maps])
+
+ kde_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
+ echo "{ local: extern \"C++\" { foo }; };" > conftest.map
+ AC_TRY_LINK([int foo;],
+[
+#ifdef __INTEL_COMPILER
+icc apparently does not support libtools version-info and version-script
+at the same time. Dunno where the bug is, but until somebody figured out,
+better disable the optional version scripts.
+#endif
+
+ foo = 42;
+], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
+ LDFLAGS="$kde_save_LDFLAGS"
+ rm -f conftest.map
+ AM_CONDITIONAL(include_VERSION_SCRIPT,
+ [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
+
+ AC_MSG_RESULT($kde_supports_versionmaps)
+])
+
+AC_DEFUN([AM_PROG_OBJC],[
+AC_CHECK_PROGS(OBJC, gcc, gcc)
+test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
+if test "x${OBJCFLAGS-unset}" = xunset; then
+ OBJCFLAGS="-g -O2"
+fi
+AC_SUBST(OBJCFLAGS)
+_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
+])
+
+AC_DEFUN([KDE_CHECK_PERL],
+[
+ KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
+ AC_MSG_ERROR([No Perl found in your $PATH.
+We need perl to generate some code.])
+ ])
+ AC_SUBST(PERL)
+])
+
+AC_DEFUN([KDE_CHECK_LARGEFILE],
+[
+AC_SYS_LARGEFILE
+if test "$ac_cv_sys_file_offset_bits" != no; then
+ CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
+fi
+
+if test "x$ac_cv_sys_large_files" != "xno"; then
+ CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
+fi
+
+])
+
+dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
+dnl which allows to search for libs that get installed into the KDE prefix.
+dnl
+dnl Syntax: KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not)
+dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
+dnl also defines KSTUFF_PKG_ERRORS on error
+AC_DEFUN([KDE_PKG_CHECK_MODULES], [
+
+ PKG_CONFIG_PATH="$prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
+ if test "$prefix" != "$kde_libs_prefix"; then
+ PKG_CONFIG_PATH="$kde_libs_prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
+ fi
+ export PKG_CONFIG_PATH
+ PKG_CHECK_MODULES([$1],[$2],[$3],[$4])
+])
+
+
+dnl Check for PIE support in the compiler and linker
+AC_DEFUN([KDE_CHECK_PIE_SUPPORT],
+[
+ AC_CACHE_CHECK([for PIE support], kde_cv_val_pie_support,
+ [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ safe_CXXFLAGS=$CXXFLAGS
+ safe_LDFLAGS=$LDFLAGS
+ CXXFLAGS="$CXXFLAGS -fPIE"
+ LDFLAGS="$LDFLAGS -pie"
+
+ AC_TRY_LINK([int foo;], [], [kde_cv_val_pie_support=yes], [kde_cv_val_pie_support=no])
+
+ CXXFLAGS=$safe_CXXFLAGS
+ LDFLAGS=$safe_LDFLAGS
+ AC_LANG_RESTORE
+ ])
+
+ AC_MSG_CHECKING(if enabling -pie/fPIE support)
+
+ AC_ARG_ENABLE(pie,
+ AC_HELP_STRING([--enable-pie],[platform supports PIE linking [default=detect]]),
+ [kde_has_pie_support=$enableval],
+ [kde_has_pie_support=detect])
+
+ if test "$kde_has_pie_support" = "detect"; then
+ kde_has_pie_support=$kde_cv_val_pie_support
+ fi
+
+ AC_MSG_RESULT([$kde_has_pie_support])
+
+ KDE_USE_FPIE=""
+ KDE_USE_PIE=""
+
+ AC_SUBST([KDE_USE_FPIE])
+ AC_SUBST([KDE_USE_PIE])
+
+ if test "$kde_has_pie_support" = "yes"; then
+ KDE_USE_FPIE="-fPIE"
+ KDE_USE_PIE="-pie"
+ fi
+])
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+## Copyright 1996, 1997, 1998, 1999, 2000, 2001
+## 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+##
+## As a special exception to the GNU General Public License, if you
+## distribute this file as part of a program that contains a
+## configuration script generated by Autoconf, you may include it under
+## the same distribution terms that you use for the rest of that program.
+
+# 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 --silent'
+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*)
+ LINUX_64_MODE="32"
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*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*)
+ LINUX_64_MODE="64"
+ 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
+ testring="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;
+ ;;
+
+ *)
+ # 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$testring" 2>/dev/null` \
+ = "XX$testring") >/dev/null 2>&1 &&
+ new_result=`expr "X$testring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ testring=$testring$testring
+ done
+ testring=
+ # 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
+
+ # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
+ # that will create temporary files in the current directory regardless of
+ # the output directory. Thus, making CWD read-only will cause this test
+ # to fail, enabling locking or at least warning the user not to do parallel
+ # builds.
+ chmod -w .
+
+ 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* 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 --color=never "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=".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"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ 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 --color=never 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=".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 --color=never "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | [grep --color=never ';[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='$(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 --color=never "^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='.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='.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='.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'
+ libsuff=
+ if test "x$LINUX_64_MODE" = x64; then
+ # Some platforms are per default 64-bit, so there's no /lib64
+ if test -d /lib64 -a ! -h /lib64; then
+ libsuff=64
+ fi
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ # 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
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | grep --color=never __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}${release}${shared_ext} ${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=no
+ 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 --color=never __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=".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 --color=never '^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 --color=never "^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 --color=never "^# ### 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 --color=never -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 --color=never "$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*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+mingw* | pw32*)
+ # 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='win32_libid'
+ ;;
+
+darwin* | rhapsody*)
+ # this will be overwritten by pass_all, but leave it in just in case
+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
+ ;;
+ *) # Darwin 1.3 on
+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+ ;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | kfreebsd*-gnu)
+ if echo __ELF__ | $CC -E - | grep --color=never __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 $host_os in
+ irix5* | nonstopux*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
+ ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ 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* | x86_64* )
+ lt_cv_deplibs_check_method=pass_all ;;
+ # the debian people say, arm and glibc 2.3.1 works for them with pass_all
+ arm* )
+ lt_cv_deplibs_check_method=pass_all ;;
+ *)
+ # glibc up to 2.1.1 does not perform some relocations on ARM
+ 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`
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | grep --color=never __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 --color=never __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*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sco3.2v5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+
+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 --color=never "[[ ]]$]_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)=])
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+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*)
+ 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)='-Wl,-undefined -Wl,suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ output_verbose_link_cmd='echo'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
+ # 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 $compiler_flags $libobjs $deplibs -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 $compiler_flags $libobjs $deplibs~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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 --color=never '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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -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 --color=never "\-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
+ # KDE requires run time linking. Make it the default.
+ aix_use_runtimelinking=yes
+ 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 --color=never 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='-qmkshrobj ${wl}-G'
+ else
+ shared_flag='-qmkshrobj'
+ fi
+ fi
+ fi
+
+ # Let the compiler handle the export list.
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ 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_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${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 $compiler_flags $libobjs $deplibs ${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 $compiler_flags $libobjs $deplibs ${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)=no
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | grep --color=never 'auto-import' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -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)='-Wl,-undefined -Wl,suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | grep --color=never '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 $compiler_flags $libobjs $deplibs -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 $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
+ fi
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
+
+ # 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 $compiler_flags $libobjs $deplibs -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 $compiler_flags $deplibs -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 $compiler_flags $libobjs $deplibs~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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep --color=never "\-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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
+ ;;
+ 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 --color=never "\-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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
+ ;;
+ 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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --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 --color=never "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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 --color=never "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 --color=never __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 --color=never 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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --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} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 --color=never "ld" | grep --color=never -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} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 --color=never "\-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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --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} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -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 --color=never "ld" | grep --color=never -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} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 --color=never "\-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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
+ _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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$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 --color=never "\-[[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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 --color=never -v '^2\.7' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$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 --color=never \"\-L\""
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$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 --color=never \"\-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"
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+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|*.$libext)
+ # 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*)
+ 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
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+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 \
+ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# 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=$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='$shrext'
+
+# 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.
+ test -f Makefile && make "$ltmain"
+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='[[BDT]]'
+ ;;
+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='[[ABCDGISTW]]' ;;
+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 --color=never ' nm_test_var$' "$nlist" >/dev/null; then
+ if grep --color=never ' 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 --color=never -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 --color=never -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 --color=never '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 --color=never ': 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 $compiler_flags $libobjs $deplibs ${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)=no
+ _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 --color=never 'auto-import' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -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 $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep --color=never __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 $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | grep --color=never '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 --color=never ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${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
+ ;;
+
+ *)
+ if $LD --help 2>&1 | grep --color=never ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${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 --color=never '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 --color=never '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
+
+ # KDE requires run time linking. Make it the default.
+ aix_use_runtimelinking=yes
+ 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 --color=never 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='-qmkshrobj ${wl}-G'
+ else
+ shared_flag='-qmkshrobj'
+ fi
+ fi
+ fi
+
+ # Let the compiler handle the export list.
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ 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_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${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 $compiler_flags $libobjs $deplibs ${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 $compiler_flags $libobjs $deplibs ${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)=no
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `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)='-Wl,-undefined -Wl,suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | grep --color=never '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 $compiler_flags $libobjs $deplibs -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 $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
+ fi
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
+ # 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 $compiler_flags $libobjs $deplibs -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 $compiler_flags $deplibs -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 $compiler_flags $libobjs $deplibs~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 $compiler_flags $libobjs $deplibs'
+ _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 $compiler_flags $libobjs $deplibs~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 $compiler_flags $libobjs $deplibs'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
+ ;;
+ 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 $compiler_flags $libobjs $deplibs ${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 --color=never __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 --color=never __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
+ _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 $compiler_flags $libobjs $deplibs'
+ _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 $compiler_flags $libobjs $deplibs$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} $compiler_flags $libobjs $deplibs ${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} $compiler_flags $libobjs $deplibs ${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 $compiler_flags $libobjs $deplibs'
+ _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 $compiler_flags $libobjs $deplibs~$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 $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
+ 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 --color=never \" -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 --color=never '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])
+])
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..9e11d0d
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,1021 @@
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005 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.
+
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+ if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ else
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_failed=yes])
+ fi
+else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+ [AC_MSG_RESULT([no])
+ $4])
+elif test $pkg_failed = untried; then
+ ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+ [$4])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+
+# 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.9.6])])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# 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.
+
+# serial 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ 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])])
+
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# 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.
+
+# serial 8
+
+# 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
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch 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
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --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 (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# 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.
+
+#serial 3
+
+# _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
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -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"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# 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.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# 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.
+
+# serial 12
+
+# 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.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# 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_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [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 (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 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.
+
+# serial 3
+
+# 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
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# 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.
+
+# serial 4
+
+# 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
+])
+
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+#
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake. There are at least two reasons why we must not
+# use `-m 0755':
+# - it causes special bits like SGID to be ignored,
+# - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out. Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 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.
+
+# serial 3
+
+# _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. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# 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.
+
+# serial 4
+
+# 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)])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([acinclude.m4])
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..df66139
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,253 @@
+/* config.h.in. Generated from configure.in by autoheader. */
+
+/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
+#undef HAVE_CARBON_CARBON_H
+
+/* Define if you have the CoreAudio API */
+#undef HAVE_COREAUDIO
+
+/* Define to 1 if you have the <crt_externs.h> header file. */
+#undef HAVE_CRT_EXTERNS_H
+
+/* Defines if your system has the crypt function */
+#undef HAVE_CRYPT
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if you have libjpeg */
+#undef HAVE_LIBJPEG
+
+/* Define if you have libpng */
+#undef HAVE_LIBPNG
+
+/* Define if you have a working libpthread (will enable threaded code) */
+#undef HAVE_LIBPTHREAD
+
+/* Define if you have libz */
+#undef HAVE_LIBZ
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define if your system needs _NSGetEnviron to set up the environment */
+#undef HAVE_NSGETENVIRON
+
+/* Define if you have res_init */
+#undef HAVE_RES_INIT
+
+/* Define if you have the res_init prototype */
+#undef HAVE_RES_INIT_PROTO
+
+/* Define if you have a STL implementation by SGI */
+#undef HAVE_SGI_STL
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* 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 if you have strlcat */
+#undef HAVE_STRLCAT
+
+/* Define if you have the strlcat prototype */
+#undef HAVE_STRLCAT_PROTO
+
+/* Define if you have strlcpy */
+#undef HAVE_STRLCPY
+
+/* Define if you have the strlcpy prototype */
+#undef HAVE_STRLCPY_PROTO
+
+/* Define to 1 if you have the <sys/bitypes.h> header file. */
+#undef HAVE_SYS_BITYPES_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#undef HAVE_VSNPRINTF
+
+/* Define to 1 if you have libxml installed. */
+#undef HAVE_XML
+
+/* Define to 1 if you have libxslt installed. */
+#undef HAVE_XSLT
+
+/* Define to 1 if you have the YAZ library installed. */
+#undef HAVE_YAZ
+
+/* Suffix for lib directories */
+#undef KDELIBSUFF
+
+/* Define a safe value for MAXPATHLEN */
+#undef KDEMAXPATHLEN
+
+/* 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
+
+/* The size of `char *', as computed by sizeof. */
+#undef SIZEOF_CHAR_P
+
+/* The size of `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
+/* The size of `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* The size of `short', as computed by sizeof. */
+#undef SIZEOF_SHORT
+
+/* The size of `size_t', as computed by sizeof. */
+#undef SIZEOF_SIZE_T
+
+/* The size of `unsigned long', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Defined if compiling without arts */
+#undef WITHOUT_ARTS
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/*
+ * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
+ * headers and I'm too lazy to write a configure test as long as only
+ * unixware is related
+ */
+#ifdef _UNIXWARE
+#define HAVE_BOOLEAN
+#endif
+
+
+
+/*
+ * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
+ * that defines bzero.
+ */
+
+#if defined(_AIX)
+#include <strings.h>
+#endif
+
+
+
+#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
+# include <sys/time.h>
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron())
+#endif
+
+
+
+#if !defined(HAVE_RES_INIT_PROTO)
+#ifdef __cplusplus
+extern "C" {
+#endif
+int res_init(void);
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+
+
+#if !defined(HAVE_STRLCAT_PROTO)
+#ifdef __cplusplus
+extern "C" {
+#endif
+unsigned long strlcat(char*, const char*, unsigned long);
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+
+
+#if !defined(HAVE_STRLCPY_PROTO)
+#ifdef __cplusplus
+extern "C" {
+#endif
+unsigned long strlcpy(char*, const char*, unsigned long);
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+
+
+/*
+ * On HP-UX, the declaration of vsnprintf() is needed every time !
+ */
+
+#if !defined(HAVE_VSNPRINTF) || defined(hpux)
+#if __STDC__
+#include <stdarg.h>
+#include <stdlib.h>
+#else
+#include <varargs.h>
+#endif
+#ifdef __cplusplus
+extern "C"
+#endif
+int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
+#ifdef __cplusplus
+extern "C"
+#endif
+int snprintf(char *str, size_t n, char const *fmt, ...);
+#endif
+
+
+
+#if defined(__SVR4) && !defined(__svr4__)
+#define __svr4__ 1
+#endif
+
+
+/* type to use in place of socklen_t if not defined */
+#undef kde_socklen_t
+
+/* type to use in place of socklen_t if not defined (deprecated, use
+ kde_socklen_t) */
+#undef ksize_t
diff --git a/configure b/configure
new file mode 100755
index 0000000..d7efb39
--- /dev/null
+++ b/configure
@@ -0,0 +1,35299 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# 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
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+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) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# 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'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ 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=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell autoconf@gnu.org about your system,
+ echo including any error possibly output before this
+ echo message
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # 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 after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, 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
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { 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 sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+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$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# 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'"
+
+
+
+
+# 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
+
+exec 7<&0 </dev/null 6>&1
+
+# 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`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="acinclude.m4"
+ac_default_prefix=${KDEDIR:-the kde prefix}
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+target
+target_cpu
+target_vendor
+target_os
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+CYGPATH_W
+PACKAGE
+VERSION
+ACLOCAL
+AUTOCONF
+AUTOMAKE
+AUTOHEADER
+MAKEINFO
+install_sh
+STRIP
+INSTALL_STRIP_PROGRAM
+mkdir_p
+AWK
+SET_MAKE
+am__leading_dot
+AMTAR
+am__tar
+am__untar
+KDECONFIG
+kde_libs_prefix
+kde_libs_htmldir
+CONF_FILES
+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
+CXX
+CXXFLAGS
+ac_ct_CXX
+CXXDEPMODE
+am__fastdepCXX_TRUE
+am__fastdepCXX_FALSE
+WOVERLOADED_VIRTUAL
+HAVE_GCC_VISIBILITY
+unsermake_enable_pch_TRUE
+unsermake_enable_pch_FALSE
+USE_EXCEPTIONS
+USE_RTTI
+CXXCPP
+NOOPT_CXXFLAGS
+NOOPT_CFLAGS
+ENABLE_PERMISSIVE_FLAG
+LDFLAGS_AS_NEEDED
+LDFLAGS_NEW_DTAGS
+KDE_USE_FINAL_TRUE
+KDE_USE_FINAL_FALSE
+KDE_USE_CLOSURE_TRUE
+KDE_USE_CLOSURE_FALSE
+KDE_NO_UNDEFINED
+KDE_USE_NMCHECK_TRUE
+KDE_USE_NMCHECK_FALSE
+GREP
+EGREP
+LN_S
+ECHO
+AR
+RANLIB
+F77
+FFLAGS
+ac_ct_F77
+LIBTOOL
+KDE_PLUGIN
+KDE_CHECK_PLUGIN
+MSGFMT
+GMSGFMT
+XGETTEXT
+LIBUTIL
+LIBCOMPAT
+LIBCRYPT
+LIBRESOLV
+LIB_POLL
+FRAMEWORK_COREAUDIO
+LIBSOCKET
+X_EXTRA_LIBS
+LIBUCB
+LIBDL
+KDE_USE_FPIE
+KDE_USE_PIE
+include_x11_TRUE
+include_x11_FALSE
+XMKMF
+X_PRE_LIBS
+LIB_X11
+LIB_XRENDER
+LIBSM
+X_INCLUDES
+X_LDFLAGS
+x_includes
+x_libraries
+QTE_NORTTI
+LIB_XEXT
+LIBPTHREAD
+USE_THREADS
+KDE_MT_LDFLAGS
+KDE_MT_LIBS
+USER_INCLUDES
+USER_LDFLAGS
+LIBZ
+LIBPNG
+LIBJPEG
+qt_libraries
+qt_includes
+QT_INCLUDES
+QT_LDFLAGS
+PERL
+MOC
+UIC
+UIC_TR
+LIB_QT
+LIB_QPE
+kde_qtver
+KDE_EXTRA_RPATH
+KDE_RPATH
+X_RPATH
+kde_libraries
+kde_includes
+KDE_LDFLAGS
+KDE_INCLUDES
+all_includes
+all_libraries
+AUTODIRS
+include_ARTS_TRUE
+include_ARTS_FALSE
+MAKEKDEWIDGETS
+KCONFIG_COMPILER
+KCFG_DEPENDENCIES
+DCOPIDLNG
+DCOPIDL
+DCOPIDL2CPP
+DCOP_DEPENDENCIES
+MCOPIDL
+ARTSCCONFIG
+MEINPROC
+KDE_XSL_STYLESHEET
+XMLLINT
+kde_htmldir
+kde_appsdir
+kde_icondir
+kde_sounddir
+kde_datadir
+kde_locale
+kde_confdir
+kde_kcfgdir
+kde_mimedir
+kde_wallpaperdir
+kde_bindir
+xdg_appsdir
+xdg_menudir
+xdg_directorydir
+kde_templatesdir
+kde_servicesdir
+kde_servicetypesdir
+kde_moduledir
+kdeinitdir
+kde_styledir
+kde_widgetdir
+LIB_KDED
+LIB_KDECORE
+LIB_KDEUI
+LIB_KIO
+LIB_KJS
+LIB_SMB
+LIB_KAB
+LIB_KABC
+LIB_KHTML
+LIB_KSPELL
+LIB_KPARTS
+LIB_KDEPRINT
+LIB_KUTILS
+LIB_KDEPIM
+LIB_KIMPROXY
+LIB_KNEWSTUFF
+LIB_KDNSSD
+LIB_KUNITTEST
+LIB_KSYCOCA
+LIB_KFILE
+LIB_KFM
+PKG_CONFIG
+LIBYAZ_CFLAGS
+LIBYAZ_LIBS
+LIBYAZ_RPATH
+LIBXML_CFLAGS
+LIBXML_LIBS
+LIBXSLT_CFLAGS
+LIBXSLT_LIBS
+TOPSUBDIRS
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+CXX
+CXXFLAGS
+CCC
+CXXCPP
+F77
+FFLAGS
+XMKMF
+PKG_CONFIG
+LIBYAZ_CFLAGS
+LIBYAZ_LIBS
+LIBXML_CFLAGS
+LIBXML_LIBS
+LIBXSLT_CFLAGS
+LIBXSLT_LIBS'
+
+
+# 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.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_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 ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_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'`
+ 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 ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_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'`
+ 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; }; }
+ 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 directory names.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
+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
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { echo "$as_me: error: Working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$0" ||
+$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
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures 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 \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_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-fast-perl disable fast Makefile generation (needs perl)
+ --enable-debug=ARG enables debug symbols (yes|no|full) default=no
+ --disable-debug disables debug output and debug symbols default=no
+ --enable-strict compiles with strict compiler options (may not
+ work!)
+ --disable-warnings disables compilation with -Wall and similar
+ --enable-profile creates profiling infos default=no
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-pch enables precompiled header support (currently only
+ KCC or gcc >=3.4+unsermake) default=no
+ --enable-coverage use gcc coverage testing
+ --enable-new-ldflags enable the new linker flags
+ --enable-final build size optimized apps (experimental - needs lots
+ of memory)
+ --enable-closure delay template instantiation
+ --enable-nmcheck enable automatic namespace cleanness check
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=no]
+ --enable-libsuffix /lib directory suffix (64,32,none,auto=default)
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-pie platform supports PIE linking default=detect
+ --enable-embedded link to Qt-embedded, don't use X
+ --enable-qtopia link to Qt-embedded, link to the Qtopia Environment
+ --enable-mac link to Qt/Mac (don't use X)
+ --disable-mt link to non-threaded Qt (deprecated)
+ --disable-threading disables threading even if libpthread found
+ --disable-rpath do not use the rpath feature of ld
+ --disable-path-check don't try to find out, where to install
+
+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-extra-includes=DIR
+ adds non standard include paths
+ --with-extra-libs=DIR adds non standard library paths
+ --with-qt-dir=DIR where the root of Qt is installed
+ --with-qt-includes=DIR where the Qt includes are.
+ --with-qt-libraries=DIR where the Qt library is installed.
+ --without-arts build without aRts default=no
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS C/C++/Objective 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
+ XMKMF Path to xmkmf, Makefile generator for X Window System
+ PKG_CONFIG path to pkg-config utility
+ LIBYAZ_CFLAGS
+ C compiler flags for LIBYAZ, overriding pkg-config
+ LIBYAZ_LIBS linker flags for LIBYAZ, overriding pkg-config
+ LIBXML_CFLAGS
+ C compiler flags for LIBXML, overriding pkg-config
+ LIBXML_LIBS linker flags for LIBXML, overriding pkg-config
+ LIBXSLT_CFLAGS
+ C compiler flags for LIBXSLT, overriding pkg-config
+ LIBXSLT_LIBS
+ linker flags for LIBXSLT, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" || continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`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_arg'"
+ ;;
+ 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: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# 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 -n "$CONFIG_SITE"; then
+ set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+ set x "$ac_default_prefix/share/config.site" \
+ "$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+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 $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { 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
+
+
+ac_aux_dir=
+for ac_dir in admin "$srcdir"/admin; 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 admin \"$srcdir\"/admin" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in admin \"$srcdir\"/admin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+unset CDPATH
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/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_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ { { 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=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_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; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+echo "$as_me: error: invalid value of canonical build" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ 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
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "x$target_alias" = x; then
+ ac_cv_target=$ac_cv_host
+else
+ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
+echo "$as_me: error: invalid value of canonical target" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+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 -f conftest.sed
+
+
+am__api_version="1.9"
+
+
+ test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
+ test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
+ test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
+ # 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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ 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'
+
+
+ if test -z "$kde_save_INSTALL_given" ; then
+ # OK, user hasn't given any INSTALL, autoconf found one for us
+ # now we test, if it supports the -p flag
+ { echo "$as_me:$LINENO: checking for -p flag to install" >&5
+echo $ECHO_N "checking for -p flag to install... $ECHO_C" >&6; }
+ rm -f confinst.$$.* > /dev/null 2>&1
+ echo "Testtest" > confinst.$$.orig
+ ac_res=no
+ if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
+ if test -f confinst.$$.new ; then
+ # OK, -p seems to do no harm to install
+ INSTALL="${INSTALL} -p"
+ ac_res=yes
+ fi
+ fi
+ rm -f confinst.$$.*
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+ fi
+
+ if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
+ INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
+ fi
+ if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
+ INSTALL_SCRIPT='${INSTALL}'
+ fi
+
+{ 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; }
+# 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
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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 x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { 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=kbibtex
+ VERSION=0.2.3.91
+
+
+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"}
+
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+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.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+ unset CDPATH
+
+
+
+ kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
+ test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
+ if test -n "$KDEDIRS"; then
+ kde_save_IFS=$IFS
+ IFS=:
+ for dir in $KDEDIRS; do
+ kde_default_bindirs="$dir/bin $kde_default_bindirs "
+ done
+ IFS=$kde_save_IFS
+ fi
+
+ if test "x$prefix" = "xNONE"; then
+
+ { echo "$as_me:$LINENO: checking for kde-config" >&5
+echo $ECHO_N "checking for kde-config... $ECHO_C" >&6; }
+ if test -n "$KDECONFIG"; then
+ kde_cv_path="$KDECONFIG";
+ else
+ kde_cache=`echo kde-config | sed 'y%./+-%__p_%'`
+
+ if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z "prepend"; then dirs="$kde_default_bindirs $dirs"
+ else dirs="$dirs $kde_default_bindirs"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/kde-config"; then
+ if test -n ""
+ then
+ evalstr="$dir/kde-config 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/kde-config"
+ break
+ fi
+ else
+ kde_cv_path="$dir/kde-config"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+ { { echo "$as_me:$LINENO: error: The important program kde-config was not found!
+Please check whether you installed KDE correctly.
+" >&5
+echo "$as_me: error: The important program kde-config was not found!
+Please check whether you installed KDE correctly.
+" >&2;}
+ { (exit 1); exit 1; }; }
+
+ else
+ { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+ KDECONFIG=$kde_cv_path
+
+ fi
+
+ else
+ kde_save_PATH="$PATH"
+ PATH="$exec_prefix/bin:$prefix/bin:$PATH"
+
+ { echo "$as_me:$LINENO: checking for kde-config" >&5
+echo $ECHO_N "checking for kde-config... $ECHO_C" >&6; }
+ if test -n "$KDECONFIG"; then
+ kde_cv_path="$KDECONFIG";
+ else
+ kde_cache=`echo kde-config | sed 'y%./+-%__p_%'`
+
+ if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z "prepend"; then dirs="$kde_default_bindirs $dirs"
+ else dirs="$dirs $kde_default_bindirs"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/kde-config"; then
+ if test -n ""
+ then
+ evalstr="$dir/kde-config 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/kde-config"
+ break
+ fi
+ else
+ kde_cv_path="$dir/kde-config"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+ { { echo "$as_me:$LINENO: error: The important program kde-config was not found!
+Please check whether you installed KDE correctly.
+" >&5
+echo "$as_me: error: The important program kde-config was not found!
+Please check whether you installed KDE correctly.
+" >&2;}
+ { (exit 1); exit 1; }; }
+
+ else
+ { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+ KDECONFIG=$kde_cv_path
+
+ fi
+
+ PATH="$kde_save_PATH"
+ fi
+
+ kde_libs_prefix=`$KDECONFIG --prefix`
+ if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
+ { { echo "$as_me:$LINENO: error: $KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
+ This means it has been moved since you installed it.
+ This won't work. Please recompile kdelibs for the new prefix.
+ " >&5
+echo "$as_me: error: $KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
+ This means it has been moved since you installed it.
+ This won't work. Please recompile kdelibs for the new prefix.
+ " >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
+
+ { echo "$as_me:$LINENO: checking where to install" >&5
+echo $ECHO_N "checking where to install... $ECHO_C" >&6; }
+ if test "x$prefix" = "xNONE"; then
+ prefix=$kde_libs_prefix
+ { echo "$as_me:$LINENO: result: $prefix (as returned by kde-config)" >&5
+echo "${ECHO_T}$prefix (as returned by kde-config)" >&6; }
+ else
+ given_prefix=$prefix
+ { echo "$as_me:$LINENO: result: $prefix (as requested)" >&5
+echo "${ECHO_T}$prefix (as requested)" >&6; }
+ fi
+
+ # And delete superfluous '/' to make compares easier
+ prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+ exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+ given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+
+
+
+
+
+
+ # Check whether --enable-fast-perl was given.
+if test "${enable_fast_perl+set}" = set; then
+ enableval=$enable_fast_perl; with_fast_perl=$enableval
+else
+ with_fast_perl=yes
+fi
+
+
+
+ val=
+ if test -f $srcdir/configure.files ; then
+ val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
+ fi
+ CONF_FILES=
+ if test -n "$val" ; then
+ for i in $val ; do
+ CONF_FILES="$CONF_FILES $i"
+ done
+ fi
+
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+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 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
+
+
+
+
+
+
+ # Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then
+ enableval=$enable_debug;
+ case $enableval in
+ yes)
+ kde_use_debug_code="yes"
+ kde_use_debug_define=no
+ ;;
+ full)
+ kde_use_debug_code="full"
+ kde_use_debug_define=no
+ ;;
+ *)
+ kde_use_debug_code="no"
+ kde_use_debug_define=yes
+ ;;
+ esac
+
+else
+ kde_use_debug_code="no"
+ kde_use_debug_define=no
+
+fi
+
+
+ # Check whether --enable-dummyoption was given.
+if test "${enable_dummyoption+set}" = set; then
+ enableval=$enable_dummyoption;
+fi
+
+
+ # Check whether --enable-strict was given.
+if test "${enable_strict+set}" = set; then
+ enableval=$enable_strict;
+ if test $enableval = "no"; then
+ kde_use_strict_options="no"
+ else
+ kde_use_strict_options="yes"
+ fi
+
+else
+ kde_use_strict_options="no"
+fi
+
+
+ # Check whether --enable-warnings was given.
+if test "${enable_warnings+set}" = set; then
+ enableval=$enable_warnings;
+ if test $enableval = "no"; then
+ kde_use_warnings="no"
+ else
+ kde_use_warnings="yes"
+ fi
+
+else
+ kde_use_warnings="yes"
+fi
+
+
+ if test "$kde_use_debug_code" != "no"; then
+ kde_use_warnings=yes
+ fi
+
+ # Check whether --enable-profile was given.
+if test "${enable_profile+set}" = set; then
+ enableval=$enable_profile; kde_use_profiling=$enableval
+else
+ kde_use_profiling="no"
+
+fi
+
+
+ CFLAGS=" $CFLAGS"
+
+ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { 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.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+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`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&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[^ ]*//'`
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort. b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions. Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
+ 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
+
+# Check that 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'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 that 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 { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 | *.map | *.inf | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+ *) 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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
+{ 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
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ 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 ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_c89=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 -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c89=$ac_arg
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+ xno)
+ { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+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
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch 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
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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
+
+
+ if test "$GCC" = "yes"; then
+ if test "$kde_use_debug_code" != "no"; then
+ if test $kde_use_debug_code = "full"; then
+ CFLAGS="-g3 -fno-inline $CFLAGS"
+ else
+ CFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CFLAGS"
+ fi
+ else
+ CFLAGS="-O2 $CFLAGS"
+ fi
+ fi
+
+ if test "$kde_use_debug_define" = "yes"; then
+ CFLAGS="-DNDEBUG $CFLAGS"
+ fi
+
+
+ case "$host" in
+ *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
+ *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
+ esac
+
+ if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
+ LDFLAGS=""
+ fi
+
+ CXXFLAGS=" $CXXFLAGS"
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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 g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+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`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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
+{ 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
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cxx_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CXXFLAGS=""
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cxx_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ 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
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX" am_compiler_list=
+
+{ 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
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch 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
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ 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
+
+
+
+
+ { echo "$as_me:$LINENO: checking whether $CC is blacklisted" >&5
+echo $ECHO_N "checking whether $CC is blacklisted... $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. */
+
+#ifdef __GNUC__
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
+choke me
+#endif
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ kde_bad_compiler=no
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ kde_bad_compiler=yes
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ { echo "$as_me:$LINENO: result: $kde_bad_compiler" >&5
+echo "${ECHO_T}$kde_bad_compiler" >&6; }
+
+if test "$kde_bad_compiler" = "yes"; then
+ { { echo "$as_me:$LINENO: error:
+
+This particular compiler version is blacklisted because it
+is known to miscompile KDE. Please use a newer version, or
+if that is not yet available, choose an older version.
+
+Please do not report a bug or bother us reporting this
+configure error. We know about it, and we introduced
+it by intention to avoid untraceable bugs or crashes in KDE.
+
+" >&5
+echo "$as_me: error:
+
+This particular compiler version is blacklisted because it
+is known to miscompile KDE. Please use a newer version, or
+if that is not yet available, choose an older version.
+
+Please do not report a bug or bother us reporting this
+configure error. We know about it, and we introduced
+it by intention to avoid untraceable bugs or crashes in KDE.
+
+" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+ if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
+ if test "$kde_use_debug_code" != "no"; then
+ if test "$CXX" = "KCC"; then
+ CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
+ else
+ if test "$kde_use_debug_code" = "full"; then
+ CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
+ else
+ CXXFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CXXFLAGS"
+ fi
+ fi
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -fno-builtin" >&5
+echo $ECHO_N "checking whether $CXX supports -fno-builtin... $ECHO_C" >&6; }
+kde_cache=`echo fno-builtin | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-builtin"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CXXFLAGS="-fno-builtin $CXXFLAGS"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -Woverloaded-virtual" >&5
+echo $ECHO_N "checking whether $CXX supports -Woverloaded-virtual... $ECHO_C" >&6; }
+kde_cache=`echo Woverloaded-virtual | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Woverloaded-virtual"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ WOVERLOADED_VIRTUAL="-Woverloaded-virtual"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+ WOVERLOADED_VRITUAL=""
+fi
+
+
+ else
+ if test "$CXX" = "KCC"; then
+ CXXFLAGS="+K3 $CXXFLAGS"
+ else
+ CXXFLAGS="-O2 $CXXFLAGS"
+ fi
+ fi
+ fi
+
+ if test "$kde_use_debug_define" = "yes"; then
+ CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
+ fi
+
+ if test "$kde_use_profiling" = "yes"; then
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -pg" >&5
+echo $ECHO_N "checking whether $CXX supports -pg... $ECHO_C" >&6; }
+kde_cache=`echo pg | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -pg"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+
+ CFLAGS="-pg $CFLAGS"
+ CXXFLAGS="-pg $CXXFLAGS"
+
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+ fi
+
+ if test "$kde_use_warnings" = "yes"; then
+ if test "$GCC" = "yes"; then
+ CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS"
+ case $host in
+ *-*-linux-gnu)
+ CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
+ CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts $CXXFLAGS"
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -Wmissing-format-attribute" >&5
+echo $ECHO_N "checking whether $CXX supports -Wmissing-format-attribute... $ECHO_C" >&6; }
+kde_cache=`echo Wmissing-format-attribute | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Wmissing-format-attribute"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether $CC supports -Wmissing-format-attribute" >&5
+echo $ECHO_N "checking whether $CC supports -Wmissing-format-attribute... $ECHO_C" >&6; }
+kde_cache=`echo Wmissing-format-attribute | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cc_$kde_cache; eval "test \"\${$as_var+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
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wmissing-format-attribute"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cc_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$save_CFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+ ;;
+ esac
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -Wundef" >&5
+echo $ECHO_N "checking whether $CXX supports -Wundef... $ECHO_C" >&6; }
+kde_cache=`echo Wundef | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Wundef"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CXXFLAGS="-Wundef $CXXFLAGS"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -Wno-long-long" >&5
+echo $ECHO_N "checking whether $CXX supports -Wno-long-long... $ECHO_C" >&6; }
+kde_cache=`echo Wno-long-long | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Wno-long-long"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CXXFLAGS="-Wno-long-long $CXXFLAGS"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -Wno-non-virtual-dtor" >&5
+echo $ECHO_N "checking whether $CXX supports -Wno-non-virtual-dtor... $ECHO_C" >&6; }
+kde_cache=`echo Wno-non-virtual-dtor | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Wno-non-virtual-dtor"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CXXFLAGS="$CXXFLAGS -Wno-non-virtual-dtor"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+ fi
+ fi
+
+ if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
+ CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
+ fi
+
+ # Check whether --enable-pch was given.
+if test "${enable_pch+set}" = set; then
+ enableval=$enable_pch; kde_use_pch=$enableval
+else
+ kde_use_pch=no
+fi
+
+
+ HAVE_GCC_VISIBILITY=0
+
+
+ if test "$GXX" = "yes"; then
+ gcc_no_reorder_blocks=NO
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -fno-reorder-blocks" >&5
+echo $ECHO_N "checking whether $CXX supports -fno-reorder-blocks... $ECHO_C" >&6; }
+kde_cache=`echo fno-reorder-blocks | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-reorder-blocks"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ gcc_no_reorder_blocks=YES
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+ if test $kde_use_debug_code != "no" && \
+ test $kde_use_debug_code != "full" && \
+ test "YES" = "$gcc_no_reorder_blocks" ; then
+ CXXFLAGS="$CXXFLAGS -fno-reorder-blocks"
+ CFLAGS="$CFLAGS -fno-reorder-blocks"
+ fi
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -fno-exceptions" >&5
+echo $ECHO_N "checking whether $CXX supports -fno-exceptions... $ECHO_C" >&6; }
+kde_cache=`echo fno-exceptions | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -fno-check-new" >&5
+echo $ECHO_N "checking whether $CXX supports -fno-check-new... $ECHO_C" >&6; }
+kde_cache=`echo fno-check-new | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-check-new"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CXXFLAGS="$CXXFLAGS -fno-check-new"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -fno-common" >&5
+echo $ECHO_N "checking whether $CXX supports -fno-common... $ECHO_C" >&6; }
+kde_cache=`echo fno-common | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-common"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CXXFLAGS="$CXXFLAGS -fno-common"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -fexceptions" >&5
+echo $ECHO_N "checking whether $CXX supports -fexceptions... $ECHO_C" >&6; }
+kde_cache=`echo fexceptions | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fexceptions"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ USE_EXCEPTIONS="-fexceptions"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+ USE_EXCEPTIONS=
+fi
+
+ ENABLE_PERMISSIVE_FLAG="-fpermissive"
+
+ if test "$kde_use_pch" = "yes"; then
+ { echo "$as_me:$LINENO: checking whether gcc supports precompiling c header files" >&5
+echo $ECHO_N "checking whether gcc supports precompiling c header files... $ECHO_C" >&6; }
+ echo >conftest.h
+ if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
+ kde_gcc_supports_pch=yes
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ else
+ kde_gcc_supports_pch=no
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ fi
+ if test "$kde_gcc_supports_pch" = "yes"; then
+ { echo "$as_me:$LINENO: checking whether gcc supports precompiling c++ header files" >&5
+echo $ECHO_N "checking whether gcc supports precompiling c++ header files... $ECHO_C" >&6; }
+ if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
+ kde_gcc_supports_pch=yes
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ else
+ kde_gcc_supports_pch=no
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ fi
+ fi
+ rm -f conftest.h conftest.h.gch
+ fi
+
+
+ { echo "$as_me:$LINENO: checking whether system headers can cope with -O2 -fno-inline" >&5
+echo $ECHO_N "checking whether system headers can cope with -O2 -fno-inline... $ECHO_C" >&6; }
+if test "${kde_cv_opt_noinline_match+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_opt_noinline_match=irrelevant
+ if echo "$CFLAGS" | grep --color=never -e -O2 >/dev/null 2>/dev/null \
+ && echo "$CFLAGS" | grep --color=never -e -fno-inline >/dev/null 2>/dev/null ; then
+
+ ac_cflags_save="$CFLAGS"
+ CFLAGS="$CFLAGS -D_USE_GNU"
+
+ 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>
+
+int
+main ()
+{
+ const char *pt, *et;
+ et = __extension__ ({ char __a0, __a1, __a2; (__builtin_constant_p ( ";," ) && ((size_t)(const void *)(( ";," )+ 1) - (size_t)(const void *)( ";," ) == 1) ? ((__a0 =((__const char *) ( ";," ))[0], __a0 == '\0') ? ((void) ( pt ),((void *)0) ) : ((__a1 = ((__const char *) ( ";," ))[1], __a1== '\0') ? (__extension__ (__builtin_constant_p ( __a0 ) && ( __a0 ) == '\0' ? (char *) __rawmemchr ( pt , __a0) : strchr( pt , __a0 ))) : ((__a2 = ((__const char *) ( ";," ))[2], __a2 == '\0') ? __strpbrk_c2 ( pt , __a0, __a1) :(((__const char *) ( ";," ))[3] == '\0' ? __strpbrk_c3 ( pt ,__a0, __a1, __a2): strpbrk ( pt , ";," ))))) : strpbrk ( pt , ";," )); }) ;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ kde_cv_opt_noinline_match=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ kde_cv_opt_noinline_match=no
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+ CFLAGS="$ac_cflags_save"
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $kde_cv_opt_noinline_match" >&5
+echo "${ECHO_T}$kde_cv_opt_noinline_match" >&6; }
+
+ if test "x$kde_cv_opt_noinline_match" = "xno" ; then
+ CFLAGS="`echo "$CFLAGS" | sed "s/ -fno-inline//"`"
+ fi
+ fi
+
+
+if test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes"; then
+ unsermake_enable_pch_TRUE=
+ unsermake_enable_pch_FALSE='#'
+else
+ unsermake_enable_pch_TRUE='#'
+ unsermake_enable_pch_FALSE=
+fi
+
+ if test "$CXX" = "KCC"; then
+
+ if test "$kde_use_pch" = "yes"; then
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports --pch" >&5
+echo $ECHO_N "checking whether $CXX supports --pch... $ECHO_C" >&6; }
+kde_cache=`echo -pch | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS --pch"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CXXFLAGS="$CXXFLAGS --pch"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+ fi
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports --inline_keyword_space_time=6" >&5
+echo $ECHO_N "checking whether $CXX supports --inline_keyword_space_time=6... $ECHO_C" >&6; }
+kde_cache=`echo -inline_keyword_space_time=6 | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports --inline_auto_space_time=2" >&5
+echo $ECHO_N "checking whether $CXX supports --inline_auto_space_time=2... $ECHO_C" >&6; }
+kde_cache=`echo -inline_auto_space_time=2 | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports --inline_implicit_space_time=2.0" >&5
+echo $ECHO_N "checking whether $CXX supports --inline_implicit_space_time=2.0... $ECHO_C" >&6; }
+kde_cache=`echo -inline_implicit_space_time=2.0 | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports --inline_generated_space_time=2.0" >&5
+echo $ECHO_N "checking whether $CXX supports --inline_generated_space_time=2.0... $ECHO_C" >&6; }
+kde_cache=`echo -inline_generated_space_time=2.0 | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports --one_per" >&5
+echo $ECHO_N "checking whether $CXX supports --one_per... $ECHO_C" >&6; }
+kde_cache=`echo -one_per | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS --one_per"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ CXXFLAGS="$CXXFLAGS --one_per"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+ fi
+
+ USE_RTTI=
+
+
+ case "$host" in
+ *-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
+ *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
+ *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
+ *-*-solaris*)
+ if test "$GXX" = yes; then
+ libstdcpp=`$CXX -print-file-name=libstdc++.so`
+ if test ! -f $libstdcpp; then
+ { { echo "$as_me:$LINENO: error: You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so" >&5
+echo "$as_me: error: You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+ ;;
+ esac
+
+ if test "x$kde_use_qt_emb" != "xyes"; then
+ __val=$CXX
+ __forbid=" -fno-rtti -rpath "
+ if test -n "$__val"; then
+ __new=""
+ ac_save_IFS=$IFS
+ IFS=" "
+ for i in $__val; do
+ case "$__forbid" in
+ *" $i "*) { echo "$as_me:$LINENO: WARNING: found forbidden $i in CXX, removing it" >&5
+echo "$as_me: WARNING: found forbidden $i in CXX, removing it" >&2;} ;;
+ *) # Careful to not add spaces, where there were none, because otherwise
+ # libtool gets confused, if we change e.g. CXX
+ if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
+ esac
+ done
+ IFS=$ac_save_IFS
+ CXX=$__new
+ fi
+
+ __val=$CXXFLAGS
+ __forbid=" -fno-rtti -rpath "
+ if test -n "$__val"; then
+ __new=""
+ ac_save_IFS=$IFS
+ IFS=" "
+ for i in $__val; do
+ case "$__forbid" in
+ *" $i "*) { echo "$as_me:$LINENO: WARNING: found forbidden $i in CXXFLAGS, removing it" >&5
+echo "$as_me: WARNING: found forbidden $i in CXXFLAGS, removing it" >&2;} ;;
+ *) # Careful to not add spaces, where there were none, because otherwise
+ # libtool gets confused, if we change e.g. CXX
+ if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
+ esac
+ done
+ IFS=$ac_save_IFS
+ CXXFLAGS=$__new
+ fi
+
+else
+ __val=$CXX
+ __forbid=" -rpath "
+ if test -n "$__val"; then
+ __new=""
+ ac_save_IFS=$IFS
+ IFS=" "
+ for i in $__val; do
+ case "$__forbid" in
+ *" $i "*) { echo "$as_me:$LINENO: WARNING: found forbidden $i in CXX, removing it" >&5
+echo "$as_me: WARNING: found forbidden $i in CXX, removing it" >&2;} ;;
+ *) # Careful to not add spaces, where there were none, because otherwise
+ # libtool gets confused, if we change e.g. CXX
+ if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
+ esac
+ done
+ IFS=$ac_save_IFS
+ CXX=$__new
+ fi
+
+ __val=$CXXFLAGS
+ __forbid=" -rpath "
+ if test -n "$__val"; then
+ __new=""
+ ac_save_IFS=$IFS
+ IFS=" "
+ for i in $__val; do
+ case "$__forbid" in
+ *" $i "*) { echo "$as_me:$LINENO: WARNING: found forbidden $i in CXXFLAGS, removing it" >&5
+echo "$as_me: WARNING: found forbidden $i in CXXFLAGS, removing it" >&2;} ;;
+ *) # Careful to not add spaces, where there were none, because otherwise
+ # libtool gets confused, if we change e.g. CXX
+ if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
+ esac
+ done
+ IFS=$ac_save_IFS
+ CXXFLAGS=$__new
+ fi
+
+fi
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.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=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 "$GCC" = yes; then
+ NOOPT_CFLAGS=-O0
+ fi
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -O0" >&5
+echo $ECHO_N "checking whether $CXX supports -O0... $ECHO_C" >&6; }
+kde_cache=`echo O0 | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -O0"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ NOOPT_CXXFLAGS=-O0
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+
+ # Check whether --enable-coverage was given.
+if test "${enable_coverage+set}" = set; then
+ enableval=$enable_coverage;
+ if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
+ ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
+ ac_coverage_linker="-lgcc"
+ elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
+ ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
+ ac_coverage_linker=""
+ else
+ { { echo "$as_me:$LINENO: error: coverage with your compiler is not supported" >&5
+echo "$as_me: error: coverage with your compiler is not supported" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ CFLAGS="$CFLAGS $ac_coverage_compiler"
+ CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
+ LDFLAGS="$LDFLAGS $ac_coverage_linker"
+
+fi
+
+
+
+
+
+
+
+ # Check whether --enable-new_ldflags was given.
+if test "${enable_new_ldflags+set}" = set; then
+ enableval=$enable_new_ldflags; kde_use_new_ldflags=$enableval
+else
+ kde_use_new_ldflags=no
+fi
+
+
+ LDFLAGS_AS_NEEDED=""
+ LDFLAGS_NEW_DTAGS=""
+ if test "x$kde_use_new_ldflags" = "xyes"; then
+ LDFLAGS_NEW_DTAGS=""
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -Wl,--enable-new-dtags" >&5
+echo $ECHO_N "checking whether $CXX supports -Wl,--enable-new-dtags... $ECHO_C" >&6; }
+kde_cache=`echo Wl,--enable-new-dtags | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Wl,--enable-new-dtags"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -Wl,--as-needed" >&5
+echo $ECHO_N "checking whether $CXX supports -Wl,--as-needed... $ECHO_C" >&6; }
+kde_cache=`echo Wl,--as-needed | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Wl,--as-needed"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ LDFLAGS_AS_NEEDED="-Wl,--as-needed"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+ fi
+
+
+
+
+ # Check whether --enable-final was given.
+if test "${enable_final+set}" = set; then
+ enableval=$enable_final; kde_use_final=$enableval
+else
+ kde_use_final=no
+fi
+
+
+ if test "x$kde_use_final" = "xyes"; then
+ KDE_USE_FINAL_TRUE=""
+ KDE_USE_FINAL_FALSE="#"
+ else
+ KDE_USE_FINAL_TRUE="#"
+ KDE_USE_FINAL_FALSE=""
+ fi
+
+
+
+
+ # Check whether --enable-closure was given.
+if test "${enable_closure+set}" = set; then
+ enableval=$enable_closure; kde_use_closure=$enableval
+else
+ kde_use_closure=no
+fi
+
+
+ KDE_NO_UNDEFINED=""
+ if test "x$kde_use_closure" = "xyes"; then
+ KDE_USE_CLOSURE_TRUE=""
+ KDE_USE_CLOSURE_FALSE="#"
+# CXXFLAGS="$CXXFLAGS $REPO"
+ else
+ KDE_USE_CLOSURE_TRUE="#"
+ KDE_USE_CLOSURE_FALSE=""
+ KDE_NO_UNDEFINED=""
+ case $host in
+ *-*-linux-gnu)
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -Wl,--no-undefined" >&5
+echo $ECHO_N "checking whether $CXX supports -Wl,--no-undefined... $ECHO_C" >&6; }
+kde_cache=`echo Wl,--no-undefined | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Wl,--no-undefined"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -Wl,--allow-shlib-undefined" >&5
+echo $ECHO_N "checking whether $CXX supports -Wl,--allow-shlib-undefined... $ECHO_C" >&6; }
+kde_cache=`echo Wl,--allow-shlib-undefined | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Wl,--allow-shlib-undefined"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+ KDE_NO_UNDEFINED=""
+fi
+
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+ KDE_NO_UNDEFINED=""
+fi
+
+ ;;
+ esac
+ fi
+
+
+
+
+
+ # Check whether --enable-nmcheck was given.
+if test "${enable_nmcheck+set}" = set; then
+ enableval=$enable_nmcheck; kde_use_nmcheck=$enableval
+else
+ kde_use_nmcheck=no
+fi
+
+
+ if test "$kde_use_nmcheck" = "yes"; then
+ KDE_USE_NMCHECK_TRUE=""
+ KDE_USE_NMCHECK_FALSE="#"
+ else
+ KDE_USE_NMCHECK_TRUE="#"
+ KDE_USE_NMCHECK_FALSE=""
+ fi
+
+
+
+
+
+
+# Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+# Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=no
+fi
+
+
+
+
+
+ # Check whether --enable-libsuffix was given.
+if test "${enable_libsuffix+set}" = set; then
+ enableval=$enable_libsuffix; kdelibsuff=$enableval
+else
+ kdelibsuff="auto"
+fi
+
+
+ if test "$kdelibsuff" = "auto"; then
+
+cat > conftest.c << EOF
+#include <stdio.h>
+int main() {
+ return 0;
+}
+EOF
+ kdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{
+ s,.*/lib\([^\/]*\)/.*,\1,
+ p
+}'`
+ rm -rf conftest.*
+ fi
+
+ if test "$kdelibsuff" = "no" || test "$kdelibsuff" = "none"; then
+ kdelibsuff=
+ fi
+ if test -z "$kdelibsuff"; then
+ { echo "$as_me:$LINENO: result: not using lib directory suffix" >&5
+echo "${ECHO_T}not using lib directory suffix" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define KDELIBSUFF ""
+_ACEOF
+
+ else
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir="$libdir${kdelibsuff}"
+ libdir="$libdir"
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define KDELIBSUFF "${kdelibsuff}"
+_ACEOF
+
+ { echo "$as_me:$LINENO: result: using lib directory suffix $kdelibsuff" >&5
+echo "${ECHO_T}using lib directory suffix $kdelibsuff" >&6; }
+ fi
+
+# Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+{ 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 --color=never '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
+
+fi
+
+SED=$lt_cv_path_SED
+{ echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6; }
+
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_GREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_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_path_EGREP="$GREP -E"
+ else
+ # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ # Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_EGREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { 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 --color=never "$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*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+mingw* | pw32*)
+ # 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='win32_libid'
+ ;;
+
+darwin* | rhapsody*)
+ # this will be overwritten by pass_all, but leave it in just in case
+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ case "$host_os" in
+ rhapsody* | darwin1.[012])
+ lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
+ ;;
+ *) # Darwin 1.3 on
+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+ ;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | kfreebsd*-gnu)
+ if echo __ELF__ | $CC -E - | grep --color=never __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 $host_os in
+ irix5* | nonstopux*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+ ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ 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* | x86_64* )
+ lt_cv_deplibs_check_method=pass_all ;;
+ # the debian people say, arm and glibc 2.3.1 works for them with pass_all
+ arm* )
+ lt_cv_deplibs_check_method=pass_all ;;
+ *)
+ # glibc up to 2.1.1 does not perform some relocations on ARM
+ 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`
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | grep --color=never __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 --color=never __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*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sco3.2v5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+
+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 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 8400 "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*)
+ LINUX_64_MODE="32"
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*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*)
+ LINUX_64_MODE="64"
+ 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 { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >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>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core.conftest.* 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 { as_var=$as_ac_Header; eval "test \"\${$as_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. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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=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 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+ if test "x$ac_ct_F77" = x; then
+ F77=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ F77=$ac_ct_F77
+ fi
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_f77_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_f77_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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
+ testring="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;
+ ;;
+
+ *)
+ # 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$testring" 2>/dev/null` \
+ = "XX$testring") >/dev/null 2>&1 &&
+ new_result=`expr "X$testring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ testring=$testring$testring
+ done
+ testring=
+ # 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='[BDT]'
+ ;;
+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='[ABCDGISTW]' ;;
+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 --color=never ' nm_test_var$' "$nlist" >/dev/null; then
+ if grep --color=never ' 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 --color=never -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 --color=never -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+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=yes
+enable_win32_dll=no
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+
+# Check whether --with-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 --color=never "[ ]$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
+
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+
+lt_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:10141: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:10145: \$? = $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:10374: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:10378: \$? = $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
+
+ # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
+ # that will create temporary files in the current directory regardless of
+ # the output directory. Thus, making CWD read-only will cause this test
+ # to fail, enabling locking or at least warning the user not to do parallel
+ # builds.
+ chmod -w .
+
+ 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:10441: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:10445: \$? = $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* 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 --color=never ': 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 $compiler_flags $libobjs $deplibs ${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=no
+ 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 --color=never 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $compiler_flags $libobjs $deplibs -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 $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep --color=never __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | grep --color=never '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 --color=never ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $compiler_flags $libobjs $deplibs ${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
+ ;;
+
+ *)
+ if $LD --help 2>&1 | grep --color=never ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $compiler_flags $libobjs $deplibs ${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 --color=never '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 --color=never '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
+
+ # KDE requires run time linking. Make it the default.
+ aix_use_runtimelinking=yes
+ 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 --color=never 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='-qmkshrobj ${wl}-G'
+ else
+ shared_flag='-qmkshrobj'
+ fi
+ fi
+ fi
+
+ # Let the compiler handle the export list.
+ always_export_symbols=no
+ 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 { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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_cmds="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
+ archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${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 { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 $compiler_flags $libobjs $deplibs ${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=no
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $compiler_flags $libobjs `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='-Wl,-undefined -Wl,suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.012)
+ allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag='-Wl,-undefined -Wl,dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | grep --color=never '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 $compiler_flags $libobjs $deplibs -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 $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
+ fi
+ module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
+ # 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 $compiler_flags $libobjs $deplibs -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 $compiler_flags $deplibs -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 $compiler_flags $libobjs $deplibs~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 $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs~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 $compiler_flags $libobjs $deplibs'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
+ ;;
+ 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 $compiler_flags $libobjs $deplibs ${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 --color=never __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 --color=never __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs$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} $compiler_flags $libobjs $deplibs ${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} $compiler_flags $libobjs $deplibs ${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 $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs~$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 $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs'
+ else
+ archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
+ 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 --color=never \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds 2\>\&1 \| grep --color=never \" -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=".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"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ 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 --color=never 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=".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 --color=never "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep --color=never ';[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='$(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 --color=never "^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='.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='.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='.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'
+ libsuff=
+ if test "x$LINUX_64_MODE" = x64; then
+ # Some platforms are per default 64-bit, so there's no /lib64
+ if test -d /lib64 -a ! -h /lib64; then
+ libsuff=64
+ fi
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ # 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
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | grep --color=never __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}${release}${shared_ext} ${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=no
+ 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 --color=never __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=".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 --color=never "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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+/* 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
+#endif
+
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+/* 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
+#endif
+
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 12527 "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 12625 "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*)
+ 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='-Wl,-undefined -Wl,suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.012)
+ allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag='-Wl,-undefined -Wl,dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ output_verbose_link_cmd='echo'
+ archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
+ # 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 $compiler_flags $libobjs $deplibs -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 $compiler_flags $libobjs $deplibs~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 \
+ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# 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=$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='$shrext'
+
+# 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.
+ test -f Makefile && make "$ltmain"
+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 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 --color=never '^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 --color=never "^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 --color=never "^# ### 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=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+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 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 --color=never "$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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 --color=never '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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -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 --color=never "\-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
+ # KDE requires run time linking. Make it the default.
+ aix_use_runtimelinking=yes
+ 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 --color=never 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='-qmkshrobj ${wl}-G'
+ else
+ shared_flag='-qmkshrobj'
+ fi
+ fi
+ fi
+
+ # Let the compiler handle the export list.
+ always_export_symbols_CXX=no
+ 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 { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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_cmds_CXX="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
+ archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag_CXX="-z nodefs"
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${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 { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 $compiler_flags $libobjs $deplibs ${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=no
+ always_export_symbols_CXX=no
+ enable_shared_with_static_runtimes_CXX=yes
+
+ if $LD --help 2>&1 | grep --color=never 'auto-import' > /dev/null; then
+ archive_cmds_CXX='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -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='-Wl,-undefined -Wl,suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ allow_undefined_flag_CXX='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.012)
+ allow_undefined_flag_CXX='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag_CXX='-Wl,-undefined -Wl,dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | grep --color=never '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 $compiler_flags $libobjs $deplibs -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 $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
+ fi
+ module_cmds_CXX='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
+
+ # 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 $compiler_flags $libobjs $deplibs -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 $compiler_flags $deplibs -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 $compiler_flags $libobjs $deplibs~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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep --color=never "\-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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
+ ;;
+ 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 --color=never "\-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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
+ ;;
+ 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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --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 --color=never "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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 --color=never "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 --color=never __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 --color=never 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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --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} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 --color=never "ld" | grep --color=never -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} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 --color=never "\-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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --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} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -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 --color=never "ld" | grep --color=never -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} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 --color=never "\-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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
+ 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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$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 --color=never "\-[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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 --color=never -v '^2\.7' > /dev/null; then
+ archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$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 --color=never \"\-L\""
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$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 --color=never \"\-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"
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+
+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|*.$libext)
+ # 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:14786: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:14790: \$? = $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
+
+ # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
+ # that will create temporary files in the current directory regardless of
+ # the output directory. Thus, making CWD read-only will cause this test
+ # to fail, enabling locking or at least warning the user not to do parallel
+ # builds.
+ chmod -w .
+
+ 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:14853: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:14857: \$? = $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* 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 --color=never '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 --color=never \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds_CXX 2\>\&1 \| grep --color=never \" -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=".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"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ 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 --color=never 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=".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 --color=never "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep --color=never ';[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='$(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 --color=never "^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='.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='.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='.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'
+ libsuff=
+ if test "x$LINUX_64_MODE" = x64; then
+ # Some platforms are per default 64-bit, so there's no /lib64
+ if test -d /lib64 -a ! -h /lib64; then
+ libsuff=64
+ fi
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ # 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
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | grep --color=never __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}${release}${shared_ext} ${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=no
+ 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 --color=never __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=".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 --color=never "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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+/* 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
+#endif
+
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+/* 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
+#endif
+
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 16156 "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 16254 "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 \
+ 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=$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='$shrext'
+
+# 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.
+ test -f Makefile && make "$ltmain"
+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*)
+ 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:17077: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:17081: \$? = $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
+
+ # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
+ # that will create temporary files in the current directory regardless of
+ # the output directory. Thus, making CWD read-only will cause this test
+ # to fail, enabling locking or at least warning the user not to do parallel
+ # builds.
+ chmod -w .
+
+ 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:17144: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:17148: \$? = $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* 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 --color=never ': 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 $compiler_flags $libobjs $deplibs ${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=no
+ 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 --color=never 'auto-import' > /dev/null; then
+ archive_cmds_F77='$CC -shared $compiler_flags $libobjs $deplibs -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 $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep --color=never __ELF__ >/dev/null; then
+ archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds_F77='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_F77='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | grep --color=never '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 --color=never ': supported targets:.* elf' > /dev/null; then
+ archive_cmds_F77='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_F77='$CC -shared $compiler_flags $libobjs $deplibs ${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
+ ;;
+
+ *)
+ if $LD --help 2>&1 | grep --color=never ': supported targets:.* elf' > /dev/null; then
+ archive_cmds_F77='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_F77='$CC -shared $compiler_flags $libobjs $deplibs ${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 --color=never '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 --color=never '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
+
+ # KDE requires run time linking. Make it the default.
+ aix_use_runtimelinking=yes
+ 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 --color=never 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='-qmkshrobj ${wl}-G'
+ else
+ shared_flag='-qmkshrobj'
+ fi
+ fi
+ fi
+
+ # Let the compiler handle the export list.
+ always_export_symbols_F77=no
+ 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 { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_f77_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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_cmds_F77="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
+ archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag_F77="-z nodefs"
+ archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${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 { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_f77_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 $compiler_flags $libobjs $deplibs ${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=no
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds_F77='$CC -o $lib $compiler_flags $libobjs `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='-Wl,-undefined -Wl,suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ allow_undefined_flag_F77='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.012)
+ allow_undefined_flag_F77='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag_F77='-Wl,-undefined -Wl,dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | grep --color=never '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 $compiler_flags $libobjs $deplibs -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 $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
+ fi
+ module_cmds_F77='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
+ # 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 $compiler_flags $libobjs $deplibs -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 $compiler_flags $deplibs -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 $compiler_flags $libobjs $deplibs~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 $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs~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 $compiler_flags $libobjs $deplibs'
+ ;;
+ *)
+ archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
+ ;;
+ 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 $compiler_flags $libobjs $deplibs ${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 --color=never __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 --color=never __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds_F77='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs$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} $compiler_flags $libobjs $deplibs ${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} $compiler_flags $libobjs $deplibs ${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 $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs~$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 $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs'
+ else
+ archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
+ 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 --color=never \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds_F77 2\>\&1 \| grep --color=never \" -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=".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"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ 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 --color=never 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=".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 --color=never "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep --color=never ';[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='$(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 --color=never "^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='.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='.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='.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'
+ libsuff=
+ if test "x$LINUX_64_MODE" = x64; then
+ # Some platforms are per default 64-bit, so there's no /lib64
+ if test -d /lib64 -a ! -h /lib64; then
+ libsuff=64
+ fi
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ # 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
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | grep --color=never __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}${release}${shared_ext} ${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=no
+ 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 --color=never __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=".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 --color=never "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 \
+ 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=$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='$shrext'
+
+# 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.
+ test -f Makefile && make "$ltmain"
+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
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+
+lt_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:19112: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:19116: \$? = $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:19345: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:19349: \$? = $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
+
+ # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
+ # that will create temporary files in the current directory regardless of
+ # the output directory. Thus, making CWD read-only will cause this test
+ # to fail, enabling locking or at least warning the user not to do parallel
+ # builds.
+ chmod -w .
+
+ 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:19412: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:19416: \$? = $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* 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 --color=never ': 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 $compiler_flags $libobjs $deplibs ${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=no
+ 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 --color=never 'auto-import' > /dev/null; then
+ archive_cmds_GCJ='$CC -shared $compiler_flags $libobjs $deplibs -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 $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep --color=never __ELF__ >/dev/null; then
+ archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds_GCJ='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_GCJ='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | grep --color=never '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 --color=never ': supported targets:.* elf' > /dev/null; then
+ archive_cmds_GCJ='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_GCJ='$CC -shared $compiler_flags $libobjs $deplibs ${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
+ ;;
+
+ *)
+ if $LD --help 2>&1 | grep --color=never ': supported targets:.* elf' > /dev/null; then
+ archive_cmds_GCJ='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_GCJ='$CC -shared $compiler_flags $libobjs $deplibs ${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 --color=never '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 --color=never '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
+
+ # KDE requires run time linking. Make it the default.
+ aix_use_runtimelinking=yes
+ 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 --color=never 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='-qmkshrobj ${wl}-G'
+ else
+ shared_flag='-qmkshrobj'
+ fi
+ fi
+ fi
+
+ # Let the compiler handle the export list.
+ always_export_symbols_GCJ=no
+ 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 { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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_cmds_GCJ="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
+ archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag_GCJ="-z nodefs"
+ archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${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 { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 $compiler_flags $libobjs $deplibs ${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=no
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds_GCJ='$CC -o $lib $compiler_flags $libobjs `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='-Wl,-undefined -Wl,suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ allow_undefined_flag_GCJ='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.012)
+ allow_undefined_flag_GCJ='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag_GCJ='-Wl,-undefined -Wl,dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | grep --color=never '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 $compiler_flags $libobjs $deplibs -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 $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
+ fi
+ module_cmds_GCJ='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
+ # 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 $compiler_flags $libobjs $deplibs -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 $compiler_flags $deplibs -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 $compiler_flags $libobjs $deplibs~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 $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs~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 $compiler_flags $libobjs $deplibs'
+ ;;
+ *)
+ archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
+ ;;
+ 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 $compiler_flags $libobjs $deplibs ${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 --color=never __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 --color=never __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs$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} $compiler_flags $libobjs $deplibs ${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} $compiler_flags $libobjs $deplibs ${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 $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs~$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 $compiler_flags $libobjs $deplibs'
+ 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 $compiler_flags $libobjs $deplibs'
+ else
+ archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
+ 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 --color=never \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds_GCJ 2\>\&1 \| grep --color=never \" -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=".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"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ 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 --color=never 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=".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 --color=never "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep --color=never ';[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='$(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 --color=never "^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='.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='.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='.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'
+ libsuff=
+ if test "x$LINUX_64_MODE" = x64; then
+ # Some platforms are per default 64-bit, so there's no /lib64
+ if test -d /lib64 -a ! -h /lib64; then
+ libsuff=64
+ fi
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ # 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
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | grep --color=never __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}${release}${shared_ext} ${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=no
+ 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 --color=never __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=".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 --color=never "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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+/* 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
+#endif
+
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+/* 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
+#endif
+
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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 21498 "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 21596 "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 \
+ 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=$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='$shrext'
+
+# 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.
+ test -f Makefile && make "$ltmain"
+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 \
+ 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=$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='$shrext'
+
+# 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.
+ test -f Makefile && make "$ltmain"
+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 --silent'
+
+# Prevent multiple expansion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+LIBTOOL_SHELL="/bin/sh ./libtool"
+# LIBTOOL="$LIBTOOL --silent"
+KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
+
+
+# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
+KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)"
+
+
+# we patch configure quite some so we better keep that consistent for incremental runs
+AUTOCONF='$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure'
+
+
+
+
+
+ # 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 -n "`$ac_dir/$ac_word --version 2>&1 | grep --color=never 'GNU gettext'`"; 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="msgfmt"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; 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
+
+ # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+ 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
+
+
+
+ if test -z "`$GMSGFMT --version 2>&1 | grep --color=never 'GNU gettext'`"; then
+ { echo "$as_me:$LINENO: result: found msgfmt program is not GNU msgfmt; ignore it" >&5
+echo "${ECHO_T}found msgfmt program is not GNU msgfmt; ignore it" >&6; }
+ GMSGFMT=":"
+ fi
+ MSGFMT=$GMSGFMT
+
+
+
+ # 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 --color=never '(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 -n "$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
+
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ { echo "$as_me:$LINENO: result: found xgettext programs is not GNU xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6; }
+ XGETTEXT=":"
+ fi
+ fi
+
+
+
+
+
+if test -z "3.0.0"; then
+ # Current default Qt version: 3.3
+ kde_qtver=3
+ kde_qtsubver=3
+else
+ kde_qtsubver=`echo "3.0.0" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
+ # following is the check if subversion isnt found in passed argument
+ if test "$kde_qtsubver" = "3.0.0"; then
+ kde_qtsubver=1
+ fi
+ kde_qtver=`echo "3.0.0" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
+ if test "$kde_qtver" = "1"; then
+ kde_qtsubver=42
+ fi
+fi
+
+if test -z ""; then
+ if test "$kde_qtver" = "2"; then
+ if test $kde_qtsubver -gt 0; then
+ kde_qt_minversion=">= Qt 2.2.2"
+ else
+ kde_qt_minversion=">= Qt 2.0.2"
+ fi
+ fi
+ if test "$kde_qtver" = "3"; then
+ if test $kde_qtsubver -gt 0; then
+ if test $kde_qtsubver -gt 1; then
+ if test $kde_qtsubver -gt 2; then
+ kde_qt_minversion=">= Qt 3.3 and < 4.0"
+ else
+ kde_qt_minversion=">= Qt 3.2 and < 4.0"
+ fi
+ else
+ kde_qt_minversion=">= Qt 3.1 (20021021) and < 4.0"
+ fi
+ else
+ kde_qt_minversion=">= Qt 3.0 and < 4.0"
+ fi
+ fi
+ if test "$kde_qtver" = "1"; then
+ kde_qt_minversion=">= 1.42 and < 2.0"
+ fi
+else
+ kde_qt_minversion=""
+fi
+
+if test -z ""; then
+ if test $kde_qtver = 3; then
+ if test $kde_qtsubver -gt 0; then
+ kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
+ qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
+ kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
+ else
+ kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
+ fi
+ fi
+ if test $kde_qtver = 2; then
+ if test $kde_qtsubver -gt 0; then
+ kde_qt_verstring="QT_VERSION >= 222"
+ else
+ kde_qt_verstring="QT_VERSION >= 200"
+ fi
+ fi
+ if test $kde_qtver = 1; then
+ kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
+ fi
+else
+ kde_qt_verstring=""
+fi
+
+if test $kde_qtver = 4; then
+ kde_qt_dirs="$QTDIR /usr/lib/qt4 /usr/lib/qt /usr/share/qt4"
+fi
+if test $kde_qtver = 3; then
+ kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
+fi
+if test $kde_qtver = 2; then
+ kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
+fi
+if test $kde_qtver = 1; then
+ kde_qt_dirs="$QTDIR /usr/lib/qt"
+fi
+
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
+
+ { echo "$as_me:$LINENO: checking if C++ programs can be compiled" >&5
+echo $ECHO_N "checking if C++ programs can be compiled... $ECHO_C" >&6; }
+ if test "${kde_cv_stl_works+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 <string>
+using namespace std;
+
+int
+main ()
+{
+
+ string astring="Hallo Welt.";
+ astring.erase(0, 6); // now astring is "Welt"
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ kde_cv_stl_works=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ kde_cv_stl_works=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+
+ { echo "$as_me:$LINENO: result: $kde_cv_stl_works" >&5
+echo "${ECHO_T}$kde_cv_stl_works" >&6; }
+
+ if test "$kde_cv_stl_works" = "yes"; then
+ # back compatible
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SGI_STL 1
+_ACEOF
+
+ else
+ { { echo "$as_me:$LINENO: error: Your Installation isn't able to compile simple C++ programs.
+Check config.log for details - if you're using a Linux distribution you might miss
+a package named similar to libstdc++-dev." >&5
+echo "$as_me: error: Your Installation isn't able to compile simple C++ programs.
+Check config.log for details - if you're using a Linux distribution you might miss
+a package named similar to libstdc++-dev." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ 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 for strlcat" >&5
+echo $ECHO_N "checking for strlcat... $ECHO_C" >&6; }
+if test "${kde_cv_func_strlcat+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+save_CXXFLAGS="$CXXFLAGS"
+kde_safe_LIBS="$LIBS"
+LIBS="$LIBS $X_EXTRA_LIBS"
+if test "$GXX" = "yes"; then
+CXXFLAGS="$CXXFLAGS -pedantic-errors"
+fi
+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>
+
+
+int
+main ()
+{
+
+ char buf[20];
+ buf[0]='\0';
+ strlcat(buf, "KDE function test", sizeof(buf));
+
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ kde_cv_func_strlcat=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ kde_cv_func_strlcat=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CXXFLAGS="$save_CXXFLAGS"
+LIBS="$kde_safe_LIBS"
+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: $kde_cv_func_strlcat" >&5
+echo "${ECHO_T}$kde_cv_func_strlcat" >&6; }
+
+{ echo "$as_me:$LINENO: checking if strlcat needs custom prototype" >&5
+echo $ECHO_N "checking if strlcat needs custom prototype... $ECHO_C" >&6; }
+if test "${kde_cv_proto_strlcat+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+if test "x$kde_cv_func_strlcat" = xyes; then
+ kde_cv_proto_strlcat=no
+else
+ case "strlcat" in
+ setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
+ kde_cv_proto_strlcat="yes - in libkdefakes"
+ ;;
+ *)
+ kde_cv_proto_strlcat=unknown
+ ;;
+ esac
+fi
+
+if test "x$kde_cv_proto_strlcat" = xunknown; then
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ kde_safe_libs=$LIBS
+ LIBS="$LIBS $X_EXTRA_LIBS"
+ 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>
+
+
+extern "C" unsigned long strlcat(char*, const char*, unsigned long);
+
+int
+main ()
+{
+
+ char buf[20];
+ buf[0]='\0';
+ strlcat(buf, "KDE function test", sizeof(buf));
+
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ kde_cv_func_strlcat=yes
+ kde_cv_proto_strlcat=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ kde_cv_proto_strlcat="strlcat unavailable"
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$kde_safe_libs
+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
+
+fi
+
+{ echo "$as_me:$LINENO: result: $kde_cv_proto_strlcat" >&5
+echo "${ECHO_T}$kde_cv_proto_strlcat" >&6; }
+
+if test "x$kde_cv_func_strlcat" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRLCAT 1
+_ACEOF
+
+
+fi
+if test "x$kde_cv_proto_strlcat" = xno; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRLCAT_PROTO 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for strlcpy" >&5
+echo $ECHO_N "checking for strlcpy... $ECHO_C" >&6; }
+if test "${kde_cv_func_strlcpy+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+save_CXXFLAGS="$CXXFLAGS"
+kde_safe_LIBS="$LIBS"
+LIBS="$LIBS $X_EXTRA_LIBS"
+if test "$GXX" = "yes"; then
+CXXFLAGS="$CXXFLAGS -pedantic-errors"
+fi
+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>
+
+
+int
+main ()
+{
+
+ char buf[20];
+ strlcpy(buf, "KDE function test", sizeof(buf));
+
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ kde_cv_func_strlcpy=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ kde_cv_func_strlcpy=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CXXFLAGS="$save_CXXFLAGS"
+LIBS="$kde_safe_LIBS"
+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: $kde_cv_func_strlcpy" >&5
+echo "${ECHO_T}$kde_cv_func_strlcpy" >&6; }
+
+{ echo "$as_me:$LINENO: checking if strlcpy needs custom prototype" >&5
+echo $ECHO_N "checking if strlcpy needs custom prototype... $ECHO_C" >&6; }
+if test "${kde_cv_proto_strlcpy+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+if test "x$kde_cv_func_strlcpy" = xyes; then
+ kde_cv_proto_strlcpy=no
+else
+ case "strlcpy" in
+ setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
+ kde_cv_proto_strlcpy="yes - in libkdefakes"
+ ;;
+ *)
+ kde_cv_proto_strlcpy=unknown
+ ;;
+ esac
+fi
+
+if test "x$kde_cv_proto_strlcpy" = xunknown; then
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ kde_safe_libs=$LIBS
+ LIBS="$LIBS $X_EXTRA_LIBS"
+ 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>
+
+
+extern "C" unsigned long strlcpy(char*, const char*, unsigned long);
+
+int
+main ()
+{
+
+ char buf[20];
+ strlcpy(buf, "KDE function test", sizeof(buf));
+
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ kde_cv_func_strlcpy=yes
+ kde_cv_proto_strlcpy=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ kde_cv_proto_strlcpy="strlcpy unavailable"
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$kde_safe_libs
+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
+
+fi
+
+{ echo "$as_me:$LINENO: result: $kde_cv_proto_strlcpy" >&5
+echo "${ECHO_T}$kde_cv_proto_strlcpy" >&6; }
+
+if test "x$kde_cv_func_strlcpy" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRLCPY 1
+_ACEOF
+
+
+fi
+if test "x$kde_cv_proto_strlcpy" = xno; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRLCPY_PROTO 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking for main in -lutil" >&5
+echo $ECHO_N "checking for main in -lutil... $ECHO_C" >&6; }
+if test "${ac_cv_lib_util_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lutil $LIBS"
+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 main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_util_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_util_main=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_main" >&5
+echo "${ECHO_T}$ac_cv_lib_util_main" >&6; }
+if test $ac_cv_lib_util_main = yes; then
+ LIBUTIL="-lutil"
+fi
+
+ { echo "$as_me:$LINENO: checking for main in -lcompat" >&5
+echo $ECHO_N "checking for main in -lcompat... $ECHO_C" >&6; }
+if test "${ac_cv_lib_compat_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcompat $LIBS"
+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 main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_compat_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_compat_main=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_compat_main" >&5
+echo "${ECHO_T}$ac_cv_lib_compat_main" >&6; }
+if test $ac_cv_lib_compat_main = yes; then
+ LIBCOMPAT="-lcompat"
+fi
+
+ kde_have_crypt=
+ { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
+echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
+if test "${ac_cv_lib_crypt_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypt $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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char crypt ();
+int
+main ()
+{
+return crypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_crypt_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_crypt_crypt=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
+if test $ac_cv_lib_crypt_crypt = yes; then
+ LIBCRYPT="-lcrypt"; kde_have_crypt=yes
+else
+ { echo "$as_me:$LINENO: checking for crypt in -lc" >&5
+echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6; }
+if test "${ac_cv_lib_c_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc $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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char crypt ();
+int
+main ()
+{
+return crypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_c_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_c_crypt=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6; }
+if test $ac_cv_lib_c_crypt = yes; then
+ kde_have_crypt=yes
+else
+
+ { echo "$as_me:$LINENO: WARNING: you have no crypt in either libcrypt or libc.
+You should install libcrypt from another source or configure with PAM
+support" >&5
+echo "$as_me: WARNING: you have no crypt in either libcrypt or libc.
+You should install libcrypt from another source or configure with PAM
+support" >&2;}
+ kde_have_crypt=no
+
+fi
+
+fi
+
+
+ if test $kde_have_crypt = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CRYPT 1
+_ACEOF
+
+ fi
+
+ { echo "$as_me:$LINENO: checking for socklen_t" >&5
+echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
+ if test "${kde_cv_socklen_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ kde_cv_socklen_t=no
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <sys/types.h>
+ #include <sys/socket.h>
+
+int
+main ()
+{
+
+ socklen_t len;
+ getpeername(0,0,&len);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+
+ kde_cv_socklen_t=yes
+ kde_cv_socklen_t_equiv=socklen_t
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ { echo "$as_me:$LINENO: result: $kde_cv_socklen_t" >&5
+echo "${ECHO_T}$kde_cv_socklen_t" >&6; }
+ if test $kde_cv_socklen_t = no; then
+ { echo "$as_me:$LINENO: checking for socklen_t equivalent for socket functions" >&5
+echo $ECHO_N "checking for socklen_t equivalent for socket functions... $ECHO_C" >&6; }
+ if test "${kde_cv_socklen_t_equiv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_socklen_t_equiv=int
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ for t in int size_t unsigned long "unsigned long"; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <sys/types.h>
+ #include <sys/socket.h>
+
+int
+main ()
+{
+
+ $t len;
+ getpeername(0,0,&len);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+
+ kde_cv_socklen_t_equiv="$t"
+ break
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ 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: $kde_cv_socklen_t_equiv" >&5
+echo "${ECHO_T}$kde_cv_socklen_t_equiv" >&6; }
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define kde_socklen_t $kde_cv_socklen_t_equiv
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define ksize_t $kde_cv_socklen_t_equiv
+_ACEOF
+
+
+ { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
+echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet $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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+int
+main ()
+{
+return dnet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_dnet_dnet_ntoa=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dnet_dnet_ntoa=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
+if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+fi
+
+ if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+ { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
+echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet_stub $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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+int
+main ()
+{
+return dnet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_dnet_stub_dnet_ntoa=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dnet_stub_dnet_ntoa=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
+if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+fi
+
+ fi
+ { echo "$as_me:$LINENO: checking for inet_ntoa" >&5
+echo $ECHO_N "checking for inet_ntoa... $ECHO_C" >&6; }
+if test "${ac_cv_func_inet_ntoa+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 inet_ntoa to an innocuous variant, in case <limits.h> declares inet_ntoa.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define inet_ntoa innocuous_inet_ntoa
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char inet_ntoa (); 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 inet_ntoa
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_ntoa ();
+/* 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_inet_ntoa || defined __stub___inet_ntoa
+choke me
+#endif
+
+int
+main ()
+{
+return inet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_inet_ntoa=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_inet_ntoa=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_inet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_func_inet_ntoa" >&6; }
+
+ if test $ac_cv_func_inet_ntoa = no; then
+ { echo "$as_me:$LINENO: checking for inet_ntoa in -lnsl" >&5
+echo $ECHO_N "checking for inet_ntoa in -lnsl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_nsl_inet_ntoa+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_ntoa ();
+int
+main ()
+{
+return inet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_nsl_inet_ntoa=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_nsl_inet_ntoa=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_inet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_inet_ntoa" >&6; }
+if test $ac_cv_lib_nsl_inet_ntoa = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+fi
+
+ fi
+ { echo "$as_me:$LINENO: checking for connect" >&5
+echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
+if test "${ac_cv_func_connect+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 connect to an innocuous variant, in case <limits.h> declares connect.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define connect innocuous_connect
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect (); 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 connect
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char connect ();
+/* 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_connect || defined __stub___connect
+choke me
+#endif
+
+int
+main ()
+{
+return connect ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_connect=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+echo "${ECHO_T}$ac_cv_func_connect" >&6; }
+
+ if test $ac_cv_func_connect = no; then
+ { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
+echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
+if test "${ac_cv_lib_socket_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $X_EXTRA_LIBS $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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char connect ();
+int
+main ()
+{
+return connect ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_socket_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_socket_connect=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
+if test $ac_cv_lib_socket_connect = yes; then
+ X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+fi
+
+ fi
+
+ { echo "$as_me:$LINENO: checking for remove" >&5
+echo $ECHO_N "checking for remove... $ECHO_C" >&6; }
+if test "${ac_cv_func_remove+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 remove to an innocuous variant, in case <limits.h> declares remove.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define remove innocuous_remove
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char remove (); 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 remove
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char remove ();
+/* 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_remove || defined __stub___remove
+choke me
+#endif
+
+int
+main ()
+{
+return remove ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_remove=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_remove=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
+echo "${ECHO_T}$ac_cv_func_remove" >&6; }
+
+ if test $ac_cv_func_remove = no; then
+ { echo "$as_me:$LINENO: checking for remove in -lposix" >&5
+echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; }
+if test "${ac_cv_lib_posix_remove+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix $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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char remove ();
+int
+main ()
+{
+return remove ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_posix_remove=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_posix_remove=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
+echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; }
+if test $ac_cv_lib_posix_remove = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+fi
+
+ fi
+
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ { echo "$as_me:$LINENO: checking for shmat" >&5
+echo $ECHO_N "checking for shmat... $ECHO_C" >&6; }
+if test "${ac_cv_func_shmat+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 shmat to an innocuous variant, in case <limits.h> declares shmat.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define shmat innocuous_shmat
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shmat (); 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 shmat
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shmat ();
+/* 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_shmat || defined __stub___shmat
+choke me
+#endif
+
+int
+main ()
+{
+return shmat ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_shmat=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_shmat=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
+echo "${ECHO_T}$ac_cv_func_shmat" >&6; }
+if test $ac_cv_func_shmat = yes; then
+ :
+else
+ { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
+echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ipc_shmat+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lipc $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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shmat ();
+int
+main ()
+{
+return shmat ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_ipc_shmat=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_ipc_shmat=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
+echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; }
+if test $ac_cv_lib_ipc_shmat = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+fi
+
+fi
+
+
+ # more headers that need to be explicitly included on darwin
+
+
+for ac_header in sys/types.h stdint.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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
+
+
+ # sys/bitypes.h is needed for uint32_t and friends on Tru64
+
+for ac_header in sys/bitypes.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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
+
+
+ # darwin requires a poll emulation library
+ { echo "$as_me:$LINENO: checking for poll in -lpoll" >&5
+echo $ECHO_N "checking for poll in -lpoll... $ECHO_C" >&6; }
+if test "${ac_cv_lib_poll_poll+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpoll $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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char poll ();
+int
+main ()
+{
+return poll ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_poll_poll=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_poll_poll=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_poll_poll" >&5
+echo "${ECHO_T}$ac_cv_lib_poll_poll" >&6; }
+if test $ac_cv_lib_poll_poll = yes; then
+ LIB_POLL="-lpoll"
+fi
+
+
+ # for some image handling on Mac OS X
+
+for ac_header in Carbon/Carbon.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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
+
+
+ # CoreAudio framework
+ if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then
+ { echo "$as_me:$LINENO: checking for CoreAudio/CoreAudio.h" >&5
+echo $ECHO_N "checking for CoreAudio/CoreAudio.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5
+echo "${ECHO_T}$ac_cv_header_CoreAudio_CoreAudio_h" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking CoreAudio/CoreAudio.h usability" >&5
+echo $ECHO_N "checking CoreAudio/CoreAudio.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 <CoreAudio/CoreAudio.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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 CoreAudio/CoreAudio.h presence" >&5
+echo $ECHO_N "checking CoreAudio/CoreAudio.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 <CoreAudio/CoreAudio.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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: CoreAudio/CoreAudio.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: CoreAudio/CoreAudio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: CoreAudio/CoreAudio.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: CoreAudio/CoreAudio.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: CoreAudio/CoreAudio.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: CoreAudio/CoreAudio.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: CoreAudio/CoreAudio.h: in the future, the compiler will take precedence" >&2;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for CoreAudio/CoreAudio.h" >&5
+echo $ECHO_N "checking for CoreAudio/CoreAudio.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_CoreAudio_CoreAudio_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5
+echo "${ECHO_T}$ac_cv_header_CoreAudio_CoreAudio_h" >&6; }
+
+fi
+if test $ac_cv_header_CoreAudio_CoreAudio_h = yes; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_COREAUDIO 1
+_ACEOF
+
+ FRAMEWORK_COREAUDIO="-Wl,-framework,CoreAudio"
+
+fi
+
+
+
+
+ { echo "$as_me:$LINENO: checking if res_init needs -lresolv" >&5
+echo $ECHO_N "checking if res_init needs -lresolv... $ECHO_C" >&6; }
+ kde_libs_safe="$LIBS"
+ LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+
+int
+main ()
+{
+
+ res_init();
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+ LIBRESOLV="-lresolv"
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RES_INIT 1
+_ACEOF
+
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$kde_libs_safe
+
+
+
+{ echo "$as_me:$LINENO: checking for res_init" >&5
+echo $ECHO_N "checking for res_init... $ECHO_C" >&6; }
+if test "${kde_cv_func_res_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+save_CXXFLAGS="$CXXFLAGS"
+kde_safe_LIBS="$LIBS"
+LIBS="$LIBS $X_EXTRA_LIBS"
+if test "$GXX" = "yes"; then
+CXXFLAGS="$CXXFLAGS -pedantic-errors"
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+
+
+int
+main ()
+{
+
+res_init()
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ kde_cv_func_res_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ kde_cv_func_res_init=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CXXFLAGS="$save_CXXFLAGS"
+LIBS="$kde_safe_LIBS"
+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: $kde_cv_func_res_init" >&5
+echo "${ECHO_T}$kde_cv_func_res_init" >&6; }
+
+{ echo "$as_me:$LINENO: checking if res_init needs custom prototype" >&5
+echo $ECHO_N "checking if res_init needs custom prototype... $ECHO_C" >&6; }
+if test "${kde_cv_proto_res_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+if test "x$kde_cv_func_res_init" = xyes; then
+ kde_cv_proto_res_init=no
+else
+ case "res_init" in
+ setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
+ kde_cv_proto_res_init="yes - in libkdefakes"
+ ;;
+ *)
+ kde_cv_proto_res_init=unknown
+ ;;
+ esac
+fi
+
+if test "x$kde_cv_proto_res_init" = xunknown; then
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ kde_safe_libs=$LIBS
+ LIBS="$LIBS $X_EXTRA_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+
+
+extern "C" int res_init(void);
+
+int
+main ()
+{
+
+res_init()
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ kde_cv_func_res_init=yes
+ kde_cv_proto_res_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ kde_cv_proto_res_init="res_init unavailable"
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$kde_safe_libs
+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
+
+fi
+
+{ echo "$as_me:$LINENO: result: $kde_cv_proto_res_init" >&5
+echo "${ECHO_T}$kde_cv_proto_res_init" >&6; }
+
+if test "x$kde_cv_func_res_init" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RES_INIT 1
+_ACEOF
+
+
+fi
+if test "x$kde_cv_proto_res_init" = xno; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RES_INIT_PROTO 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+ LIBSOCKET="$X_EXTRA_LIBS"
+
+
+ { echo "$as_me:$LINENO: checking for killpg in -lucb" >&5
+echo $ECHO_N "checking for killpg in -lucb... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ucb_killpg+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lucb $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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char killpg ();
+int
+main ()
+{
+return killpg ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_ucb_killpg=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_ucb_killpg=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_killpg" >&5
+echo "${ECHO_T}$ac_cv_lib_ucb_killpg" >&6; }
+if test $ac_cv_lib_ucb_killpg = yes; then
+ LIBUCB="-lucb"
+fi
+
+
+ case $host in *-*-lynxos* )
+ { echo "$as_me:$LINENO: checking LynxOS header file wrappers" >&5
+echo $ECHO_N "checking LynxOS header file wrappers... $ECHO_C" >&6; }
+ CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
+ { echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}disabled" >&6; }
+ { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
+echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; }
+if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd $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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_bsd_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_bsd_gethostbyname=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; }
+if test $ac_cv_lib_bsd_gethostbyname = yes; then
+ LIBSOCKET="-lbsd"
+fi
+ ;;
+ esac
+
+ { echo "$as_me:$LINENO: checking for int" >&5
+echo $ECHO_N "checking for int... $ECHO_C" >&6; }
+if test "${ac_cv_type_int+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
+typedef int ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_int=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_int=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
+echo "${ECHO_T}$ac_cv_type_int" >&6; }
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ echo "$as_me:$LINENO: checking size of int" >&5
+echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+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
+ typedef int ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ 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
+ typedef int ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ 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
+ typedef int ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ 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
+ typedef int ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ 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
+ typedef int ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_int=$ac_lo;;
+'') if test "$ac_cv_type_int" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+ else
+ ac_cv_sizeof_int=0
+ fi ;;
+esac
+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
+ typedef int ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_int=`cat conftest.val`
+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 )
+if test "$ac_cv_type_int" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+ else
+ ac_cv_sizeof_int=0
+ fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+ { echo "$as_me:$LINENO: checking for short" >&5
+echo $ECHO_N "checking for short... $ECHO_C" >&6; }
+if test "${ac_cv_type_short+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
+typedef short ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_short=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_short=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
+echo "${ECHO_T}$ac_cv_type_short" >&6; }
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ echo "$as_me:$LINENO: checking size of short" >&5
+echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_short+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+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
+ typedef short ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ 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
+ typedef short ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ 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
+ typedef short ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ 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
+ typedef short ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ 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
+ typedef short ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_short=$ac_lo;;
+'') if test "$ac_cv_type_short" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (short)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+ else
+ ac_cv_sizeof_short=0
+ fi ;;
+esac
+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
+ typedef short ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_short=`cat conftest.val`
+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 )
+if test "$ac_cv_type_short" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (short)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+ else
+ ac_cv_sizeof_short=0
+ fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
+echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+
+ { echo "$as_me:$LINENO: checking for long" >&5
+echo $ECHO_N "checking for long... $ECHO_C" >&6; }
+if test "${ac_cv_type_long+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
+typedef long ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_long=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+echo "${ECHO_T}$ac_cv_type_long" >&6; }
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+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
+ typedef long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ 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
+ typedef long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ 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
+ typedef long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ 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
+ typedef long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ 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
+ typedef long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long=$ac_lo;;
+'') if test "$ac_cv_type_long" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+ else
+ ac_cv_sizeof_long=0
+ fi ;;
+esac
+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
+ typedef long ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long=`cat conftest.val`
+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 )
+if test "$ac_cv_type_long" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+ { echo "$as_me:$LINENO: checking for char *" >&5
+echo $ECHO_N "checking for char *... $ECHO_C" >&6; }
+if test "${ac_cv_type_char_p+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
+typedef char * ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_char_p=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_char_p=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_char_p" >&5
+echo "${ECHO_T}$ac_cv_type_char_p" >&6; }
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ echo "$as_me:$LINENO: checking size of char *" >&5
+echo $ECHO_N "checking size of char *... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_char_p+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+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
+ typedef char * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ 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
+ typedef char * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ 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
+ typedef char * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ 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
+ typedef char * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ 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
+ typedef char * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_char_p=$ac_lo;;
+'') if test "$ac_cv_type_char_p" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot compute sizeof (char *)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (char *)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+ else
+ ac_cv_sizeof_char_p=0
+ fi ;;
+esac
+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
+ typedef char * ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_char_p=`cat conftest.val`
+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 )
+if test "$ac_cv_type_char_p" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot compute sizeof (char *)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (char *)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+ else
+ ac_cv_sizeof_char_p=0
+ fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_char_p" >&5
+echo "${ECHO_T}$ac_cv_sizeof_char_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
+_ACEOF
+
+
+
+{ 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ 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
+
+LIBDL="-ldl"
+ac_cv_have_dlfcn=yes
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking for shl_unload in -ldld" >&5
+echo $ECHO_N "checking for shl_unload in -ldld... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dld_shl_unload+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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_unload ();
+int
+main ()
+{
+return shl_unload ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_dld_shl_unload=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dld_shl_unload=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_unload" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_unload" >&6; }
+if test $ac_cv_lib_dld_shl_unload = yes; then
+
+LIBDL="-ldld"
+ac_cv_have_shload=yes
+
+fi
+
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_size_t+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
+typedef size_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_size_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_size_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ echo "$as_me:$LINENO: checking size of size_t" >&5
+echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_size_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+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
+ typedef size_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ 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
+ typedef size_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ 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
+ typedef size_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ 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
+ typedef size_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ 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
+ typedef size_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_size_t=$ac_lo;;
+'') if test "$ac_cv_type_size_t" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (size_t)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+ else
+ ac_cv_sizeof_size_t=0
+ fi ;;
+esac
+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
+ typedef size_t ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_size_t=`cat conftest.val`
+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 )
+if test "$ac_cv_type_size_t" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (size_t)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+ else
+ ac_cv_sizeof_size_t=0
+ fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+_ACEOF
+
+
+ { echo "$as_me:$LINENO: checking for unsigned long" >&5
+echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6; }
+if test "${ac_cv_type_unsigned_long+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
+typedef unsigned long ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_unsigned_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_unsigned_long=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
+echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6; }
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ echo "$as_me:$LINENO: checking size of unsigned long" >&5
+echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+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
+ typedef unsigned long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ 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
+ typedef unsigned long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ 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
+ typedef unsigned long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ 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
+ typedef unsigned long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ 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
+ typedef unsigned long ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
+'') if test "$ac_cv_type_unsigned_long" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (unsigned long)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+ else
+ ac_cv_sizeof_unsigned_long=0
+ fi ;;
+esac
+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
+ typedef unsigned long ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_unsigned_long=`cat conftest.val`
+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 )
+if test "$ac_cv_type_unsigned_long" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (unsigned long)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+ else
+ ac_cv_sizeof_unsigned_long=0
+ fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
+_ACEOF
+
+
+
+ { echo "$as_me:$LINENO: checking sizeof size_t == sizeof unsigned long" >&5
+echo $ECHO_N "checking sizeof size_t == sizeof unsigned long... $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. */
+
+int
+main ()
+{
+
+ #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
+ choke me
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ { { echo "$as_me:$LINENO: error:
+ Apparently on your system our assumption sizeof size_t == sizeof unsigned long
+ does not apply. Please mail kde-devel@kde.org with a description of your system!
+ " >&5
+echo "$as_me: error:
+ Apparently on your system our assumption sizeof size_t == sizeof unsigned long
+ does not apply. Please mail kde-devel@kde.org with a description of your system!
+ " >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+ { echo "$as_me:$LINENO: checking for PIE support" >&5
+echo $ECHO_N "checking for PIE support... $ECHO_C" >&6; }
+if test "${kde_cv_val_pie_support+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ safe_CXXFLAGS=$CXXFLAGS
+ safe_LDFLAGS=$LDFLAGS
+ CXXFLAGS="$CXXFLAGS -fPIE"
+ LDFLAGS="$LDFLAGS -pie"
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ kde_cv_val_pie_support=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ kde_cv_val_pie_support=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+ CXXFLAGS=$safe_CXXFLAGS
+ LDFLAGS=$safe_LDFLAGS
+ 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: $kde_cv_val_pie_support" >&5
+echo "${ECHO_T}$kde_cv_val_pie_support" >&6; }
+
+ { echo "$as_me:$LINENO: checking if enabling -pie/fPIE support" >&5
+echo $ECHO_N "checking if enabling -pie/fPIE support... $ECHO_C" >&6; }
+
+ # Check whether --enable-pie was given.
+if test "${enable_pie+set}" = set; then
+ enableval=$enable_pie; kde_has_pie_support=$enableval
+else
+ kde_has_pie_support=detect
+fi
+
+
+ if test "$kde_has_pie_support" = "detect"; then
+ kde_has_pie_support=$kde_cv_val_pie_support
+ fi
+
+ { echo "$as_me:$LINENO: result: $kde_has_pie_support" >&5
+echo "${ECHO_T}$kde_has_pie_support" >&6; }
+
+ KDE_USE_FPIE=""
+ KDE_USE_PIE=""
+
+
+
+
+ if test "$kde_has_pie_support" = "yes"; then
+ KDE_USE_FPIE="-fPIE"
+ KDE_USE_PIE="-pie"
+ fi
+
+
+# darwin needs this to initialize the environment
+
+for ac_header in crt_externs.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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
+
+{ echo "$as_me:$LINENO: checking for _NSGetEnviron" >&5
+echo $ECHO_N "checking for _NSGetEnviron... $ECHO_C" >&6; }
+if test "${ac_cv_func__NSGetEnviron+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 _NSGetEnviron to an innocuous variant, in case <limits.h> declares _NSGetEnviron.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define _NSGetEnviron innocuous__NSGetEnviron
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char _NSGetEnviron (); 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 _NSGetEnviron
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char _NSGetEnviron ();
+/* 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__NSGetEnviron || defined __stub____NSGetEnviron
+choke me
+#endif
+
+int
+main ()
+{
+return _NSGetEnviron ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func__NSGetEnviron=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func__NSGetEnviron=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func__NSGetEnviron" >&5
+echo "${ECHO_T}$ac_cv_func__NSGetEnviron" >&6; }
+if test $ac_cv_func__NSGetEnviron = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NSGETENVIRON 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+
+
+for ac_func in vsnprintf snprintf
+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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $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
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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
+
+
+
+
+
+
+
+
+
+# Check whether --enable-embedded was given.
+if test "${enable_embedded+set}" = set; then
+ enableval=$enable_embedded; kde_use_qt_emb=$enableval
+else
+ kde_use_qt_emb=no
+
+fi
+
+
+# Check whether --enable-qtopia was given.
+if test "${enable_qtopia+set}" = set; then
+ enableval=$enable_qtopia; kde_use_qt_emb_palm=$enableval
+else
+ kde_use_qt_emb_palm=no
+
+fi
+
+
+# Check whether --enable-mac was given.
+if test "${enable_mac+set}" = set; then
+ enableval=$enable_mac; kde_use_qt_mac=$enableval
+else
+ kde_use_qt_mac=no
+
+fi
+
+
+# used to disable x11-specific stuff on special platforms
+
+
+if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
+ include_x11_TRUE=
+ include_x11_FALSE='#'
+else
+ include_x11_TRUE='#'
+ include_x11_FALSE=
+fi
+
+
+if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
+
+{ echo "$as_me:$LINENO: checking for X" >&5
+echo $ECHO_N "checking for X... $ECHO_C" >&6; }
+
+if test "${kde_cv_have_x+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # One or both of the vars are not set, and there is no cached value.
+if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
+ kde_x_includes=NO
+else
+ kde_x_includes=$x_includes
+fi
+if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
+ kde_x_libraries=NO
+else
+ kde_x_libraries=$x_libraries
+fi
+
+# below we use the standard autoconf calls
+ac_x_libraries=$kde_x_libraries
+ac_x_includes=$kde_x_includes
+
+
+
+
+if test "$ac_x_includes" = NO; then
+ # Guess where to find include files, by looking for this one X11 .h file.
+ test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
+
+ # First, try using that file with no special directory specified.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$x_direct_test_include>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Look for the header file in a standard set of common directories.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ for ac_dir in \
+ /usr/X11/include \
+ /usr/X11R6/include \
+ /usr/X11R5/include \
+ /usr/X11R4/include \
+ \
+ /usr/include/X11 \
+ /usr/include/X11R6 \
+ /usr/include/X11R5 \
+ /usr/include/X11R4 \
+ \
+ /usr/local/X11/include \
+ /usr/local/X11R6/include \
+ /usr/local/X11R5/include \
+ /usr/local/X11R4/include \
+ \
+ /usr/local/include/X11 \
+ /usr/local/include/X11R6 \
+ /usr/local/include/X11R5 \
+ /usr/local/include/X11R4 \
+ \
+ /usr/X386/include \
+ /usr/x386/include \
+ /usr/XFree86/include/X11 \
+ \
+ /usr/include \
+ /usr/local/include \
+ /usr/unsupported/include \
+ /usr/athena/include \
+ /usr/local/x11r5/include \
+ /usr/lpp/Xamples/include \
+ \
+ /usr/openwin/include \
+ /usr/openwin/share/include \
+ ; \
+ do
+ if test -r "$ac_dir/$x_direct_test_include"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+ done
+fi
+
+rm -f conftest.err conftest.$ac_ext
+fi # $ac_x_includes = NO
+
+if test "$ac_x_libraries" = NO; then
+ # Check for the libraries.
+
+ test -z "$x_direct_test_library" && x_direct_test_library=Xt
+ test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
+
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS="$LIBS"
+ LIBS="-l$x_direct_test_library $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <X11/Intrinsic.h>
+int
+main ()
+{
+${x_direct_test_function}(1)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ LIBS="$ac_save_LIBS"
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ LIBS="$ac_save_LIBS"
+# First see if replacing the include by lib works.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
+ /usr/X11/lib${kdelibsuff} \
+ /usr/X11R6/lib${kdelibsuff} \
+ /usr/X11R5/lib${kdelibsuff} \
+ /usr/X11R4/lib${kdelibsuff} \
+ \
+ /usr/lib${kdelibsuff}/X11 \
+ /usr/lib${kdelibsuff}/X11R6 \
+ /usr/lib${kdelibsuff}/X11R5 \
+ /usr/lib${kdelibsuff}/X11R4 \
+ \
+ /usr/local/X11/lib${kdelibsuff} \
+ /usr/local/X11R6/lib${kdelibsuff} \
+ /usr/local/X11R5/lib${kdelibsuff} \
+ /usr/local/X11R4/lib${kdelibsuff} \
+ \
+ /usr/local/lib${kdelibsuff}/X11 \
+ /usr/local/lib${kdelibsuff}/X11R6 \
+ /usr/local/lib${kdelibsuff}/X11R5 \
+ /usr/local/lib${kdelibsuff}/X11R4 \
+ \
+ /usr/X386/lib${kdelibsuff} \
+ /usr/x386/lib${kdelibsuff} \
+ /usr/XFree86/lib${kdelibsuff}/X11 \
+ \
+ /usr/lib${kdelibsuff} \
+ /usr/local/lib${kdelibsuff} \
+ /usr/unsupported/lib${kdelibsuff} \
+ /usr/athena/lib${kdelibsuff} \
+ /usr/local/x11r5/lib${kdelibsuff} \
+ /usr/lpp/Xamples/lib${kdelibsuff} \
+ /lib/usr/lib${kdelibsuff}/X11 \
+ \
+ /usr/openwin/lib${kdelibsuff} \
+ /usr/openwin/share/lib${kdelibsuff} \
+ ; \
+do
+ for ac_extension in a so sl; do
+ if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = NO
+
+case "$host" in
+mips-sgi-irix6*)
+ ;;
+*-*-solaris*)
+ ;;
+*)
+ rm -f -r conftest.dir
+if mkdir conftest.dir; then
+ cd conftest.dir
+ cat >Imakefile <<'_ACEOF'
+incroot:
+ @echo incroot='${INCROOT}'
+usrlibdir:
+ @echo usrlibdir='${USRLIBDIR}'
+libdir:
+ @echo libdir='${LIBDIR}'
+_ACEOF
+ if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ for ac_var in incroot usrlibdir libdir; do
+ eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+ done
+ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+ for ac_extension in a so sl; do
+ if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+ test -f "$ac_im_libdir/libX11.$ac_extension"; then
+ ac_im_usrlibdir=$ac_im_libdir; break
+ fi
+ done
+ # Screen out bogus values from the imake configuration. They are
+ # bogus both because they are the default anyway, and because
+ # using them would break gcc on systems where it needs fixed includes.
+ case $ac_im_incroot in
+ /usr/include) ac_x_includes= ;;
+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+ esac
+ case $ac_im_usrlibdir in
+ /usr/lib | /lib) ;;
+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+ esac
+ fi
+ cd ..
+ rm -f -r conftest.dir
+fi
+
+ if test -z "$ac_x_includes"; then
+ ac_x_includes="."
+ fi
+ if test -z "$ac_x_libraries"; then
+ ac_x_libraries="/usr/lib${kdelibsuff}"
+ fi
+esac
+#from now on we use our own again
+
+# when the user already gave --x-includes, we ignore
+# what the standard autoconf macros told us.
+if test "$kde_x_includes" = NO; then
+ kde_x_includes=$ac_x_includes
+fi
+
+# for --x-libraries too
+if test "$kde_x_libraries" = NO; then
+ kde_x_libraries=$ac_x_libraries
+fi
+
+if test "$kde_x_includes" = NO; then
+ { { echo "$as_me:$LINENO: error: Can't find X includes. Please check your installation and add the correct paths!" >&5
+echo "$as_me: error: Can't find X includes. Please check your installation and add the correct paths!" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+if test "$kde_x_libraries" = NO; then
+ { { echo "$as_me:$LINENO: error: Can't find X libraries. Please check your installation and add the correct paths!" >&5
+echo "$as_me: error: Can't find X libraries. Please check your installation and add the correct paths!" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# Record where we found X for the cache.
+kde_cv_have_x="have_x=yes \
+ kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
+
+fi
+
+eval "$kde_cv_have_x"
+
+if test "$have_x" != yes; then
+ { echo "$as_me:$LINENO: result: $have_x" >&5
+echo "${ECHO_T}$have_x" >&6; }
+ no_x=yes
+else
+ { echo "$as_me:$LINENO: result: libraries $kde_x_libraries, headers $kde_x_includes" >&5
+echo "${ECHO_T}libraries $kde_x_libraries, headers $kde_x_includes" >&6; }
+fi
+
+if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
+ X_INCLUDES=""
+ x_includes="."; else
+ x_includes=$kde_x_includes
+ X_INCLUDES="-I$x_includes"
+fi
+
+if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE || test "$kde_x_libraries" = "/usr/lib"; then
+ X_LDFLAGS=""
+ x_libraries="/usr/lib"; else
+ x_libraries=$kde_x_libraries
+ X_LDFLAGS="-L$x_libraries"
+fi
+all_includes="$X_INCLUDES"
+all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
+
+# Check for libraries that X11R6 Xt/Xaw programs need.
+ac_save_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS $X_LDFLAGS"
+# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+# check for ICE first), but we must link in the order -lSM -lICE or
+# we get undefined symbols. So assume we have SM if we have ICE.
+# These have to be linked with before -lX11, unlike the other
+# libraries we check for below, so use a different variable.
+# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
+{ echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
+echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lICE $X_EXTRA_LIBS $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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char IceConnectionNumber ();
+int
+main ()
+{
+return IceConnectionNumber ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_ICE_IceConnectionNumber=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_ICE_IceConnectionNumber=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
+if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
+ LIBSM="-lSM -lICE"
+fi
+
+LDFLAGS="$ac_save_LDFLAGS"
+
+LIB_X11='-lX11 $(LIBSOCKET)'
+
+{ echo "$as_me:$LINENO: checking for libXext" >&5
+echo $ECHO_N "checking for libXext... $ECHO_C" >&6; }
+if test "${kde_cv_have_libXext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+kde_ldflags_safe="$LDFLAGS"
+kde_libs_safe="$LIBS"
+
+LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
+LIBS="-lXext -lX11 $LIBSOCKET"
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+
+int
+main ()
+{
+
+printf("hello Xext\n");
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ kde_cv_have_libXext=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ kde_cv_have_libXext=no
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+LDFLAGS=$kde_ldflags_safe
+LIBS=$kde_libs_safe
+
+fi
+
+
+{ echo "$as_me:$LINENO: result: $kde_cv_have_libXext" >&5
+echo "${ECHO_T}$kde_cv_have_libXext" >&6; }
+
+if test "$kde_cv_have_libXext" = "no"; then
+ { { echo "$as_me:$LINENO: error: We need a working libXext to proceed. Since configure
+can't find it itself, we stop here assuming that make wouldn't find
+them either." >&5
+echo "$as_me: error: We need a working libXext to proceed. Since configure
+can't find it itself, we stop here assuming that make wouldn't find
+them either." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+LIB_XEXT="-lXext"
+QTE_NORTTI=""
+
+elif test "$kde_use_qt_emb" = "yes"; then
+ CPPFLAGS=-DQWS
+ CXXFLAGS="$CXXFLAGS -fno-rtti"
+ QTE_NORTTI="-fno-rtti -DQWS"
+ X_PRE_LIBS=""
+ LIB_X11=""
+ LIB_XEXT=""
+ LIB_XRENDER=""
+ LIBSM=""
+ X_INCLUDES=""
+ X_LDFLAGS=""
+ x_includes=""
+ x_libraries=""
+elif test "$kde_use_qt_mac" = "yes"; then
+ CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
+ CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
+ X_PRE_LIBS=""
+ LIB_X11=""
+ LIB_XEXT=""
+ LIB_XRENDER=""
+ LIBSM=""
+ X_INCLUDES=""
+ X_LDFLAGS=""
+ x_includes=""
+ x_libraries=""
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LIBPTHREAD=""
+
+ if test -n "$PTHREAD_LIBS"; then
+ if test "x$PTHREAD_LIBS" = "x-pthread" ; then
+ LIBPTHREAD="PTHREAD"
+ else
+ PTHREAD_LIBS_save="$PTHREAD_LIBS"
+ PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
+ { echo "$as_me:$LINENO: checking for pthread_create in $PTHREAD_LIBS" >&5
+echo $ECHO_N "checking for pthread_create in $PTHREAD_LIBS... $ECHO_C" >&6; }
+
+ kde_save_LDFLAGS="$LDFLAGS"
+ kde_save_LIBS="$LIBS"
+ LDFLAGS="$LDFLAGS $all_libraries"
+ case $host_os in
+ aix*) LDFLAGS="-brtl $LDFLAGS"
+ test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
+ ;;
+ esac
+ as_ac_Lib=`echo "ac_cv_lib_$PTHREAD_LIBS''_pthread_create" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for pthread_create in -l$PTHREAD_LIBS" >&5
+echo $ECHO_N "checking for pthread_create in -l$PTHREAD_LIBS... $ECHO_C" >&6; }
+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$PTHREAD_LIBS $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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Lib=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+ac_res=`eval echo '${'$as_ac_Lib'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ LIBPTHREAD="$PTHREAD_LIBS_save"
+fi
+
+ LDFLAGS="$kde_save_LDFLAGS"
+ LIBS="$kde_save_LIBS"
+
+ PTHREAD_LIBS="$PTHREAD_LIBS_save"
+ fi
+ fi
+
+ if test -z "$LIBPTHREAD"; then
+ { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_pthread_pthread_create=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_pthread_pthread_create=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
+if test $ac_cv_lib_pthread_pthread_create = yes; then
+ LIBPTHREAD="-lpthread"
+fi
+
+ fi
+
+ if test -z "$LIBPTHREAD" ; then
+ { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
+ kde_safe_libs=$LIBS
+ LIBS="$LIBS -lpthread"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main ()
+{
+(void)pthread_create(0,0,0,0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ LIBPTHREAD="-lpthread"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$kde_safe_libs
+ fi
+
+ if test "x$LIBPTHREAD" = "xPTHREAD" ; then
+ LIBPTHREAD=""
+ fi
+
+
+
+
+ USE_THREADS=""
+ if test -z "$LIBPTHREAD"; then
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -pthread" >&5
+echo $ECHO_N "checking whether $CXX supports -pthread... $ECHO_C" >&6; }
+kde_cache=`echo pthread | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -pthread"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ USE_THREADS="-D_THREAD_SAFE -pthread"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+ fi
+
+
+
+ case $host_os in
+ solaris*)
+
+{ echo "$as_me:$LINENO: checking whether $CXX supports -mt" >&5
+echo $ECHO_N "checking whether $CXX supports -mt... $ECHO_C" >&6; }
+kde_cache=`echo mt | sed 'y% .=/+-,%____p__%'`
+if { as_var=kde_cv_prog_cxx_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -mt"
+ 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;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_prog_cxx_$kde_cache=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$save_CXXFLAGS"
+ 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
+
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ USE_THREADS="-mt"
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+
+fi
+
+ CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
+ ;;
+ freebsd*)
+ CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
+ ;;
+ aix*)
+ CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+ LIBPTHREAD="$LIBPTHREAD -lc_r"
+ ;;
+ linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+ if test "$CXX" = "KCC"; then
+ CXXFLAGS="$CXXFLAGS --thread_safe"
+ NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+
+
+
+{ echo "$as_me:$LINENO: checking for extra includes" >&5
+echo $ECHO_N "checking for extra includes... $ECHO_C" >&6; }
+
+# Check whether --with-extra-includes was given.
+if test "${with_extra_includes+set}" = set; then
+ withval=$with_extra_includes; kde_use_extra_includes="$withval"
+else
+ kde_use_extra_includes=NONE
+
+fi
+
+kde_extra_includes=
+if test -n "$kde_use_extra_includes" && \
+ test "$kde_use_extra_includes" != "NONE"; then
+
+ ac_save_ifs=$IFS
+ IFS=':'
+ for dir in $kde_use_extra_includes; do
+ kde_extra_includes="$kde_extra_includes $dir"
+ USER_INCLUDES="$USER_INCLUDES -I$dir"
+ done
+ IFS=$ac_save_ifs
+ kde_use_extra_includes="added"
+else
+ kde_use_extra_includes="no"
+fi
+
+
+{ echo "$as_me:$LINENO: result: $kde_use_extra_includes" >&5
+echo "${ECHO_T}$kde_use_extra_includes" >&6; }
+
+kde_extra_libs=
+{ echo "$as_me:$LINENO: checking for extra libs" >&5
+echo $ECHO_N "checking for extra libs... $ECHO_C" >&6; }
+
+# Check whether --with-extra-libs was given.
+if test "${with_extra_libs+set}" = set; then
+ withval=$with_extra_libs; kde_use_extra_libs=$withval
+else
+ kde_use_extra_libs=NONE
+
+fi
+
+if test -n "$kde_use_extra_libs" && \
+ test "$kde_use_extra_libs" != "NONE"; then
+
+ ac_save_ifs=$IFS
+ IFS=':'
+ for dir in $kde_use_extra_libs; do
+ kde_extra_libs="$kde_extra_libs $dir"
+ KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
+ USER_LDFLAGS="$USER_LDFLAGS -L$dir"
+ done
+ IFS=$ac_save_ifs
+ kde_use_extra_libs="added"
+else
+ kde_use_extra_libs="no"
+fi
+
+
+
+{ echo "$as_me:$LINENO: result: $kde_use_extra_libs" >&5
+echo "${ECHO_T}$kde_use_extra_libs" >&6; }
+
+
+
+
+{ echo "$as_me:$LINENO: checking for libz" >&5
+echo $ECHO_N "checking for libz... $ECHO_C" >&6; }
+if test "${ac_cv_lib_z+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+kde_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include<zlib.h>
+
+int
+main ()
+{
+
+ char buf[42];
+ gzFile f = (gzFile) 0;
+ /* this would segfault.. but we only link, don't run */
+ (void) gzgets(f, buf, sizeof(buf));
+
+ return (zlibVersion() == ZLIB_VERSION);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "ac_cv_lib_z='-lz'"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "ac_cv_lib_z=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+
+fi
+if test ! "$ac_cv_lib_z" = no; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+ LIBZ="$ac_cv_lib_z"
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_z" >&5
+echo "${ECHO_T}$ac_cv_lib_z" >&6; }
+else
+ { { echo "$as_me:$LINENO: error: not found.
+ Possibly configure picks up an outdated version
+ installed by XFree86. Remove it from your system.
+
+ Check your installation and look into config.log" >&5
+echo "$as_me: error: not found.
+ Possibly configure picks up an outdated version
+ installed by XFree86. Remove it from your system.
+
+ Check your installation and look into config.log" >&2;}
+ { (exit 1); exit 1; }; }
+ LIBZ=""
+fi
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for libpng" >&5
+echo $ECHO_N "checking for libpng... $ECHO_C" >&6; }
+if test "${ac_cv_lib_png+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+kde_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
+else
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
+fi
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include<png.h>
+
+int
+main ()
+{
+
+ png_structp png_ptr = png_create_read_struct( /* image ptr */
+ PNG_LIBPNG_VER_STRING, 0, 0, 0 );
+ return( png_ptr != 0 );
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "ac_cv_lib_png='-lpng $LIBZ -lm'"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "ac_cv_lib_png=no"
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+
+fi
+if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPNG 1
+_ACEOF
+
+ LIBPNG="$ac_cv_lib_png"
+
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_png" >&5
+echo "${ECHO_T}$ac_cv_lib_png" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ LIBPNG=""
+
+fi
+
+
+
+{ echo "$as_me:$LINENO: checking for libjpeg6b" >&5
+echo $ECHO_N "checking for libjpeg6b... $ECHO_C" >&6; }
+if test "${ac_cv_lib_jpeg_6b+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -ljpeg6b -lm"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void jpeg_CreateDecompress();
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+jpeg_CreateDecompress();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "ac_cv_lib_jpeg_6b=-ljpeg6b"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "ac_cv_lib_jpeg_6b=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+
+fi
+
+
+if eval "test ! \"`echo $ac_cv_lib_jpeg_6b`\" = no"; then
+ LIBJPEG="$ac_cv_lib_jpeg_6b"
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_6b" >&5
+echo "${ECHO_T}$ac_cv_lib_jpeg_6b" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+{ echo "$as_me:$LINENO: checking for libjpeg" >&5
+echo $ECHO_N "checking for libjpeg... $ECHO_C" >&6; }
+if test "${ac_cv_lib_jpeg_normal+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -ljpeg -lm"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void jpeg_CreateDecompress();
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+jpeg_CreateDecompress();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "ac_cv_lib_jpeg_normal=-ljpeg"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "ac_cv_lib_jpeg_normal=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+
+fi
+
+
+if eval "test ! \"`echo $ac_cv_lib_jpeg_normal`\" = no"; then
+ LIBJPEG="$ac_cv_lib_jpeg_normal"
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_normal" >&5
+echo "${ECHO_T}$ac_cv_lib_jpeg_normal" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+ LIBJPEG=
+
+
+fi
+
+
+
+fi
+
+
+
+jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
+
+jpeg_incdir=NO
+for i in $jpeg_incdirs;
+do
+ for j in jpeglib.h;
+ do
+ echo "configure: 30086: $i/$j" >&5
+ if test -r "$i/$j"; then
+ echo "taking that" >&5
+ jpeg_incdir=$i
+ break 2
+ fi
+ done
+done
+
+test "x$jpeg_incdir" = xNO && jpeg_incdir=
+
+if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBJPEG 1
+_ACEOF
+
+else
+ if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
+ { echo "$as_me:$LINENO: WARNING:
+There is an installation error in jpeg support. You seem to have only one
+of either the headers _or_ the libraries installed. You may need to either
+provide correct --with-extra-... options, or the development package of
+libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
+Disabling JPEG support.
+" >&5
+echo "$as_me: WARNING:
+There is an installation error in jpeg support. You seem to have only one
+of either the headers _or_ the libraries installed. You may need to either
+provide correct --with-extra-... options, or the development package of
+libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
+Disabling JPEG support.
+" >&2;}
+ else
+ { echo "$as_me:$LINENO: WARNING: libjpeg not found. disable JPEG support." >&5
+echo "$as_me: WARNING: libjpeg not found. disable JPEG support." >&2;}
+ fi
+ jpeg_incdir=
+ LIBJPEG=
+fi
+
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking for perl" >&5
+echo $ECHO_N "checking for perl... $ECHO_C" >&6; }
+ if test -n "$PERL"; then
+ kde_cv_path="$PERL";
+ else
+ kde_cache=`echo perl | sed 'y%./+-%__p_%'`
+
+ if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z ""; then dirs="$bindir $exec_prefix/bin $prefix/bin $dirs"
+ else dirs="$dirs $bindir $exec_prefix/bin $prefix/bin"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/perl"; then
+ if test -n ""
+ then
+ evalstr="$dir/perl 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/perl"
+ break
+ fi
+ else
+ kde_cv_path="$dir/perl"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+ { { echo "$as_me:$LINENO: error: No Perl found in your $PATH.
+We need perl to generate some code." >&5
+echo "$as_me: error: No Perl found in your $PATH.
+We need perl to generate some code." >&2;}
+ { (exit 1); exit 1; }; }
+
+ else
+ { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+ PERL=$kde_cv_path
+
+ fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-mt was given.
+if test "${enable_mt+set}" = set; then
+ enableval=$enable_mt; kde_use_qt_mt=$enableval
+else
+
+ if test $kde_qtver = 3; then
+ kde_use_qt_mt=yes
+ else
+ kde_use_qt_mt=no
+ fi
+
+
+fi
+
+
+USING_QT_MT=""
+
+
+KDE_MT_LDFLAGS=
+KDE_MT_LIBS=
+if test "x$kde_use_qt_mt" = "xyes"; then
+
+
+
+ if test -z "$LIBPTHREAD"; then
+ if test -z "$USE_THREADS"; then
+ kde_check_threading_default=no
+ else
+ kde_check_threading_default=yes
+ fi
+ else
+ kde_check_threading_default=yes
+ fi
+ # Check whether --enable-threading was given.
+if test "${enable_threading+set}" = set; then
+ enableval=$enable_threading; kde_use_threading=$enableval
+else
+ kde_use_threading=$kde_check_threading_default
+fi
+
+ if test "x$kde_use_threading" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBPTHREAD 1
+_ACEOF
+
+ fi
+
+ if test "x$kde_use_threading" = "xyes"; then
+ CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
+ KDE_MT_LDFLAGS="$USE_THREADS"
+ KDE_MT_LIBS="$LIBPTHREAD"
+ else
+ kde_use_qt_mt=no
+ fi
+fi
+
+
+
+kde_qt_was_given=yes
+
+if test -z "$LIBQT_GLOB"; then
+ if test "x$kde_use_qt_emb" = "xyes"; then
+ LIBQT_GLOB="libqte.*"
+ else
+ LIBQT_GLOB="libqt.*"
+ fi
+fi
+
+if test "x$kde_use_qt_emb" = "xyes"; then
+ qtlib="qte"
+else
+ qtlib="qt"
+fi
+
+kde_int_qt="-l$qtlib"
+
+if test -z "$LIBQPE"; then
+ if test "x$kde_use_qt_emb" = "xyes"; then
+ if test "x$kde_use_qt_emb_palm" = "xyes"; then
+ LIB_QPE="-lqpe"
+ else
+ LIB_QPE=""
+ fi
+ else
+ LIB_QPE=""
+ fi
+fi
+
+
+if test "x$kde_use_qt_mt" = "xyes"; then
+ LIBQT="-l$qtlib-mt"
+ kde_int_qt="-l$qtlib-mt"
+ LIBQT_GLOB="lib$qtlib-mt.*"
+ USING_QT_MT="using -mt"
+else
+ LIBQT="-l$qtlib"
+fi
+
+if test $kde_qtver != 1; then
+
+
+
+ LIBQT="$LIBQT $LIBPNG $LIBJPEG"
+fi
+
+if test $kde_qtver = 3; then
+
+ LIBQT="$LIBQT $LIBDL"
+fi
+
+{ echo "$as_me:$LINENO: checking for Qt" >&5
+echo $ECHO_N "checking for Qt... $ECHO_C" >&6; }
+
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
+fi
+ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
+qt_libraries=""
+qt_includes=""
+
+# Check whether --with-qt-dir was given.
+if test "${with_qt_dir+set}" = set; then
+ withval=$with_qt_dir; ac_qt_includes="$withval"/include
+ ac_qt_libraries="$withval"/lib${kdelibsuff}
+ ac_qt_bindir="$withval"/bin
+
+fi
+
+
+
+# Check whether --with-qt-includes was given.
+if test "${with_qt_includes+set}" = set; then
+ withval=$with_qt_includes;
+ ac_qt_includes="$withval"
+
+fi
+
+
+kde_qt_libs_given=no
+
+
+# Check whether --with-qt-libraries was given.
+if test "${with_qt_libraries+set}" = set; then
+ withval=$with_qt_libraries; ac_qt_libraries="$withval"
+ kde_qt_libs_given=yes
+
+fi
+
+
+if test "${ac_cv_have_qt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ #try to guess Qt locations
+
+qt_incdirs=""
+for dir in $kde_qt_dirs; do
+ qt_incdirs="$qt_incdirs $dir/include $dir"
+done
+qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes"
+if test ! "$ac_qt_includes" = "NO"; then
+ qt_incdirs="$ac_qt_includes $qt_incdirs"
+fi
+
+if test "$kde_qtver" != "1"; then
+ kde_qt_header=qstyle.h
+else
+ kde_qt_header=qglobal.h
+fi
+
+
+qt_incdir=NO
+for i in $qt_incdirs;
+do
+ for j in $kde_qt_header;
+ do
+ echo "configure: 30384: $i/$j" >&5
+ if test -r "$i/$j"; then
+ echo "taking that" >&5
+ qt_incdir=$i
+ break 2
+ fi
+ done
+done
+
+ac_qt_includes="$qt_incdir"
+
+qt_libdirs=""
+for dir in $kde_qt_dirs; do
+ qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
+done
+qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
+if test ! "$ac_qt_libraries" = "NO"; then
+ qt_libdir=$ac_qt_libraries
+else
+ qt_libdirs="$ac_qt_libraries $qt_libdirs"
+ # if the Qt was given, the chance is too big that libqt.* doesn't exist
+ qt_libdir=NONE
+ for dir in $qt_libdirs; do
+ try="ls -1 $dir/${LIBQT_GLOB}"
+ if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&5 ; fi
+ done
+fi
+for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
+ if test -e "$a"; then
+ LIBQT="$LIBQT ${kde_int_qt}_incremental"
+ break
+ fi
+done
+
+ac_qt_libraries="$qt_libdir"
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+
+ac_cxxflags_safe="$CXXFLAGS"
+ac_ldflags_safe="$LDFLAGS"
+ac_libs_safe="$LIBS"
+
+CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
+LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
+LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
+
+
+
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <qglobal.h>
+#include <qapplication.h>
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qevent.h>
+#include <qstring.h>
+#include <qstyle.h>
+EOF
+
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+#if QT_VERSION < 210
+#error 1
+#endif
+EOF
+fi
+fi
+
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qcursor.h>
+#include <qstylefactory.h>
+#include <private/qucomextra_p.h>
+EOF
+fi
+
+echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
+cat >> conftest.$ac_ext <<EOF
+#error 1
+#endif
+
+int main() {
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+ QStringList *t = new QStringList();
+ Q_UNUSED(t);
+EOF
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+ QString s;
+ s.setLatin1("Elvis is alive", 14);
+EOF
+fi
+fi
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+ (void)QStyleFactory::create(QString::null);
+ QCursor c(Qt::WhatsThisCursor);
+EOF
+fi
+cat >> conftest.$ac_ext <<EOF
+ return 0;
+}
+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; then
+ rm -f conftest*
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_qt_libraries="NO"
+fi
+rm -f conftest*
+CXXFLAGS="$ac_cxxflags_safe"
+LDFLAGS="$ac_ldflags_safe"
+LIBS="$ac_libs_safe"
+
+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 "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+ ac_cv_have_qt="have_qt=no"
+ ac_qt_notfound=""
+ missing_qt_mt=""
+ if test "$ac_qt_includes" = NO; then
+ if test "$ac_qt_libraries" = NO; then
+ ac_qt_notfound="(headers and libraries)";
+ else
+ ac_qt_notfound="(headers)";
+ fi
+ else
+ if test "x$kde_use_qt_mt" = "xyes"; then
+ missing_qt_mt="
+Make sure that you have compiled Qt with thread support!"
+ ac_qt_notfound="(library $qtlib-mt)";
+ else
+ ac_qt_notfound="(library $qtlib)";
+ fi
+ fi
+
+ { { echo "$as_me:$LINENO: error: Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
+For more details about this problem, look at the end of config.log.$missing_qt_mt" >&5
+echo "$as_me: error: Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
+For more details about this problem, look at the end of config.log.$missing_qt_mt" >&2;}
+ { (exit 1); exit 1; }; }
+else
+ have_qt="yes"
+fi
+
+fi
+
+
+eval "$ac_cv_have_qt"
+
+if test "$have_qt" != yes; then
+ { echo "$as_me:$LINENO: result: $have_qt" >&5
+echo "${ECHO_T}$have_qt" >&6; };
+else
+ ac_cv_have_qt="have_qt=yes \
+ ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
+ { echo "$as_me:$LINENO: result: libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT" >&5
+echo "${ECHO_T}libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT" >&6; }
+
+ qt_libraries="$ac_qt_libraries"
+ qt_includes="$ac_qt_includes"
+fi
+
+if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
+
+
+{ echo "$as_me:$LINENO: checking if Qt compiles without flags" >&5
+echo $ECHO_N "checking if Qt compiles without flags... $ECHO_C" >&6; }
+if test "${kde_cv_qt_direct+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
+ac_LIBRARY_PATH="$LIBRARY_PATH"
+ac_cxxflags_safe="$CXXFLAGS"
+ac_ldflags_safe="$LDFLAGS"
+ac_libs_safe="$LIBS"
+
+CXXFLAGS="$CXXFLAGS -I$qt_includes"
+LDFLAGS="$LDFLAGS $X_LDFLAGS"
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
+else
+LIBS="$LIBQT $LIBSOCKET"
+fi
+LD_LIBRARY_PATH=
+export LD_LIBRARY_PATH
+LIBRARY_PATH=
+export LIBRARY_PATH
+
+
+
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <qglobal.h>
+#include <qapplication.h>
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qevent.h>
+#include <qstring.h>
+#include <qstyle.h>
+EOF
+
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+#if QT_VERSION < 210
+#error 1
+#endif
+EOF
+fi
+fi
+
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qcursor.h>
+#include <qstylefactory.h>
+#include <private/qucomextra_p.h>
+EOF
+fi
+
+echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
+cat >> conftest.$ac_ext <<EOF
+#error 1
+#endif
+
+int main() {
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+ QStringList *t = new QStringList();
+ Q_UNUSED(t);
+EOF
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+ QString s;
+ s.setLatin1("Elvis is alive", 14);
+EOF
+fi
+fi
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+ (void)QStyleFactory::create(QString::null);
+ QCursor c(Qt::WhatsThisCursor);
+EOF
+fi
+cat >> conftest.$ac_ext <<EOF
+ return 0;
+}
+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; then
+ kde_cv_qt_direct="yes"
+else
+ kde_cv_qt_direct="no"
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+
+rm -f conftest*
+CXXFLAGS="$ac_cxxflags_safe"
+LDFLAGS="$ac_ldflags_safe"
+LIBS="$ac_libs_safe"
+
+LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
+export LD_LIBRARY_PATH
+LIBRARY_PATH="$ac_LIBRARY_PATH"
+export LIBRARY_PATH
+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
+
+
+if test "$kde_cv_qt_direct" = "yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ qt_libraries=
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+fi
+
+
+
+
+if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
+ QT_INCLUDES=""
+else
+ QT_INCLUDES="-I$qt_includes"
+ all_includes="$QT_INCLUDES $all_includes"
+fi
+
+if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
+ QT_LDFLAGS=""
+else
+ QT_LDFLAGS="-L$qt_libraries"
+ all_libraries="$QT_LDFLAGS $all_libraries"
+fi
+test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
+
+
+
+
+
+ qt_bindirs=""
+ for dir in $kde_qt_dirs; do
+ qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
+ done
+ qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
+ if test ! "$ac_qt_bindir" = "NO"; then
+ qt_bindirs="$ac_qt_bindir $qt_bindirs"
+ fi
+
+
+ { echo "$as_me:$LINENO: checking for moc" >&5
+echo $ECHO_N "checking for moc... $ECHO_C" >&6; }
+ if test -n "$MOC"; then
+ kde_cv_path="$MOC";
+ else
+ kde_cache=`echo moc | sed 'y%./+-%__p_%'`
+
+ if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z ""; then dirs="$qt_bindirs $dirs"
+ else dirs="$dirs $qt_bindirs"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/moc"; then
+ if test -n ""
+ then
+ evalstr="$dir/moc 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/moc"
+ break
+ fi
+ else
+ kde_cv_path="$dir/moc"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+ { { echo "$as_me:$LINENO: error: No Qt meta object compiler (moc) found!
+Please check whether you installed Qt correctly.
+You need to have a running moc binary.
+configure tried to run $ac_cv_path_moc and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable MOC to the right one before running
+configure.
+" >&5
+echo "$as_me: error: No Qt meta object compiler (moc) found!
+Please check whether you installed Qt correctly.
+You need to have a running moc binary.
+configure tried to run $ac_cv_path_moc and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable MOC to the right one before running
+configure.
+" >&2;}
+ { (exit 1); exit 1; }; }
+
+ else
+ { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+ MOC=$kde_cv_path
+
+ fi
+
+ if test -z "$UIC_NOT_NEEDED"; then
+
+ { echo "$as_me:$LINENO: checking for uic" >&5
+echo $ECHO_N "checking for uic... $ECHO_C" >&6; }
+ if test -n "$UIC_PATH"; then
+ kde_cv_path="$UIC_PATH";
+ else
+ kde_cache=`echo uic | sed 'y%./+-%__p_%'`
+
+ if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z ""; then dirs="$qt_bindirs $dirs"
+ else dirs="$dirs $qt_bindirs"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/uic"; then
+ if test -n ""
+ then
+ evalstr="$dir/uic 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/uic"
+ break
+ fi
+ else
+ kde_cv_path="$dir/uic"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+ UIC_PATH=""
+ else
+ { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+ UIC_PATH=$kde_cv_path
+
+ fi
+
+ if test -z "$UIC_PATH" ; then
+
+ { echo "$as_me:$LINENO: WARNING: No Qt ui compiler (uic) found!
+Please check whether you installed Qt correctly.
+You need to have a running uic binary.
+configure tried to run $ac_cv_path_uic and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable UIC to the right one before running
+configure.
+" >&5
+echo "$as_me: WARNING: No Qt ui compiler (uic) found!
+Please check whether you installed Qt correctly.
+You need to have a running uic binary.
+configure tried to run $ac_cv_path_uic and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable UIC to the right one before running
+configure.
+" >&2;}
+
+ exit 1
+ else
+ UIC=$UIC_PATH
+
+ if test $kde_qtver = 3; then
+
+ { echo "$as_me:$LINENO: checking whether uic supports -L " >&5
+echo $ECHO_N "checking whether uic supports -L ... $ECHO_C" >&6; }
+ kde_cache=`echo L | sed 'y% .=/+-%____p_%'`
+ if { as_var=kde_cv_prog_uic_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.ui <<EOT
+ <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
+EOT
+ ac_uic_testrun="$UIC_PATH -L /nonexistent conftest.ui >/dev/null"
+ if { (eval echo "$as_me:$LINENO: \"$ac_uic_testrun\"") >&5
+ (eval $ac_uic_testrun) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ eval "kde_cv_prog_uic_$kde_cache=yes"
+ else
+ eval "kde_cv_prog_uic_$kde_cache=no"
+ fi
+ rm -f conftest*
+
+fi
+
+
+ if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ ac_uic_supports_libpath=yes
+ else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+ ac_uic_supports_libpath=no
+ fi
+
+
+ { echo "$as_me:$LINENO: checking whether uic supports -nounload " >&5
+echo $ECHO_N "checking whether uic supports -nounload ... $ECHO_C" >&6; }
+ kde_cache=`echo nounload | sed 'y% .=/+-%____p_%'`
+ if { as_var=kde_cv_prog_uic_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.ui <<EOT
+ <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
+EOT
+ ac_uic_testrun="$UIC_PATH -nounload conftest.ui >/dev/null"
+ if { (eval echo "$as_me:$LINENO: \"$ac_uic_testrun\"") >&5
+ (eval $ac_uic_testrun) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ eval "kde_cv_prog_uic_$kde_cache=yes"
+ else
+ eval "kde_cv_prog_uic_$kde_cache=no"
+ fi
+ rm -f conftest*
+
+fi
+
+
+ if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ ac_uic_supports_nounload=yes
+ else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ :
+ ac_uic_supports_nounload=no
+ fi
+
+
+ if test x$ac_uic_supports_libpath = xyes; then
+ UIC="$UIC -L \$(kde_widgetdir)"
+ fi
+ if test x$ac_uic_supports_nounload = xyes; then
+ UIC="$UIC -nounload"
+ fi
+ fi
+ fi
+ else
+ UIC="echo uic not available: "
+ fi
+
+
+
+
+ UIC_TR="i18n"
+ if test $kde_qtver = 3; then
+ UIC_TR="tr2i18n"
+ fi
+
+
+
+
+
+if test -n "$LIBJPEG"; then
+{ echo "$as_me:$LINENO: checking if Qt needs $LIBJPEG" >&5
+echo $ECHO_N "checking if Qt needs $LIBJPEG... $ECHO_C" >&6; }
+if test "${kde_cv_qt_jpeg+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
+LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
+ac_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <qapplication.h>
+int
+main ()
+{
+
+ int argc;
+ char** argv;
+ QApplication app(argc, argv);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "kde_cv_qt_jpeg=no"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "kde_cv_qt_jpeg=yes"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS="$ac_save_LIBS"
+CXXFLAGS="$ac_save_CXXFLAGS"
+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
+
+fi
+
+
+if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ LIBJPEG_QT='$(LIBJPEG)'
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ LIBJPEG_QT=
+fi
+
+
+
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
+else
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
+fi
+test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
+for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
+ if test -e "$a"; then
+ LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
+ break
+ fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for rpath" >&5
+echo $ECHO_N "checking for rpath... $ECHO_C" >&6; }
+# Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then
+ enableval=$enable_rpath; USE_RPATH=$enableval
+else
+ USE_RPATH=yes
+fi
+
+
+if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
+
+ KDE_RPATH="-R \$(libdir)"
+
+ if test "$kde_libraries" != "$libdir"; then
+ KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
+ fi
+
+ if test -n "$qt_libraries"; then
+ KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
+ fi
+ if test -n "$X_LDFLAGS"; then
+ X_RPATH="-R \$(x_libraries)"
+ KDE_RPATH="$KDE_RPATH $X_RPATH"
+ fi
+ if test -n "$KDE_EXTRA_RPATH"; then
+ KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
+ fi
+fi
+
+
+
+{ echo "$as_me:$LINENO: result: $USE_RPATH" >&5
+echo "${ECHO_T}$USE_RPATH" >&6; }
+
+{ echo "$as_me:$LINENO: checking for KDE" >&5
+echo $ECHO_N "checking for KDE... $ECHO_C" >&6; }
+
+if test "${prefix}" != NONE; then
+ kde_includes=${includedir}
+
+savex=$exec_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+tmp=$includedir
+while ac_kde_includes=`eval echo "$tmp"`; test "x$ac_kde_includes" != "x$tmp"; do tmp=$ac_kde_includes; done
+exec_prefix=$savex
+
+
+ kde_libraries=${libdir}
+
+savex=$exec_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+tmp=$libdir
+while ac_kde_libraries=`eval echo "$tmp"`; test "x$ac_kde_libraries" != "x$tmp"; do tmp=$ac_kde_libraries; done
+exec_prefix=$savex
+
+
+else
+ ac_kde_includes=
+ ac_kde_libraries=
+ kde_libraries=""
+ kde_includes=""
+fi
+
+if test "${ac_cv_have_kde+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ #try to guess kde locations
+
+if test "$kde_qtver" = 1; then
+ kde_check_header="ksock.h"
+ kde_check_lib="libkdecore.la"
+else
+ kde_check_header="ksharedptr.h"
+ kde_check_lib="libkio.la"
+fi
+
+if test -z ""; then
+
+kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
+test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
+kde_incdirs="$ac_kde_includes $kde_incdirs"
+
+kde_incdir=NO
+for i in $kde_incdirs;
+do
+ for j in $kde_check_header;
+ do
+ echo "configure: 31215: $i/$j" >&5
+ if test -r "$i/$j"; then
+ echo "taking that" >&5
+ kde_incdir=$i
+ break 2
+ fi
+ done
+done
+
+ac_kde_includes="$kde_incdir"
+
+if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
+ { { echo "$as_me:$LINENO: error:
+in the prefix, you've chosen, are no KDE headers installed. This will fail.
+So, check this please and use another prefix!" >&5
+echo "$as_me: error:
+in the prefix, you've chosen, are no KDE headers installed. This will fail.
+So, check this please and use another prefix!" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
+test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
+kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
+
+kde_libdir=NO
+for i in $kde_libdirs;
+do
+ for j in $kde_check_lib;
+ do
+ echo "configure: 31245: $i/$j" >&5
+ if test -r "$i/$j"; then
+ echo "taking that" >&5
+ kde_libdir=$i
+ break 2
+ fi
+ done
+done
+
+ac_kde_libraries="$kde_libdir"
+
+kde_widgetdir=NO
+
+kde_widgetdir=NO
+for i in $kde_libdirs;
+do
+ for j in "kde3/plugins/designer/kdewidgets.la";
+ do
+ echo "configure: 31263: $i/$j" >&5
+ if test -r "$i/$j"; then
+ echo "taking that" >&5
+ kde_widgetdir=$i
+ break 2
+ fi
+ done
+done
+
+
+if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
+{ { echo "$as_me:$LINENO: error:
+in the prefix, you've chosen, are no KDE libraries installed. This will fail.
+So, check this please and use another prefix!" >&5
+echo "$as_me: error:
+in the prefix, you've chosen, are no KDE libraries installed. This will fail.
+So, check this please and use another prefix!" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
+{ { echo "$as_me:$LINENO: error:
+I can't find the designer plugins. These are required and should have been installed
+by kdelibs" >&5
+echo "$as_me: error:
+I can't find the designer plugins. These are required and should have been installed
+by kdelibs" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+if test -n "$kde_widgetdir"; then
+ kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
+fi
+
+
+if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
+ ac_cv_have_kde="have_kde=no"
+else
+ ac_cv_have_kde="have_kde=yes \
+ ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
+fi
+
+else
+ ac_cv_have_kde="have_kde=no"
+
+fi
+
+fi
+
+eval "$ac_cv_have_kde"
+
+if test "$have_kde" != "yes"; then
+ if test "${prefix}" = NONE; then
+ ac_kde_prefix="$ac_default_prefix"
+ else
+ ac_kde_prefix="$prefix"
+ fi
+ if test "$exec_prefix" = NONE; then
+ ac_kde_exec_prefix="$ac_kde_prefix"
+ { echo "$as_me:$LINENO: result: will be installed in $ac_kde_prefix" >&5
+echo "${ECHO_T}will be installed in $ac_kde_prefix" >&6; }
+ else
+ ac_kde_exec_prefix="$exec_prefix"
+ { echo "$as_me:$LINENO: result: will be installed in $ac_kde_prefix and $ac_kde_exec_prefix" >&5
+echo "${ECHO_T}will be installed in $ac_kde_prefix and $ac_kde_exec_prefix" >&6; }
+ fi
+
+ kde_libraries="${libdir}"
+ kde_includes="${includedir}"
+
+else
+ ac_cv_have_kde="have_kde=yes \
+ ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
+ { echo "$as_me:$LINENO: result: libraries $ac_kde_libraries, headers $ac_kde_includes" >&5
+echo "${ECHO_T}libraries $ac_kde_libraries, headers $ac_kde_includes" >&6; }
+
+ kde_libraries="$ac_kde_libraries"
+ kde_includes="$ac_kde_includes"
+fi
+
+
+
+if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
+ KDE_INCLUDES=""
+else
+ KDE_INCLUDES="-I$kde_includes"
+ all_includes="$KDE_INCLUDES $all_includes"
+fi
+
+KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
+
+KDE_LDFLAGS="-L$kde_libraries"
+if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
+ all_libraries="$KDE_LDFLAGS $all_libraries"
+fi
+
+
+
+
+
+
+all_libraries="$all_libraries $USER_LDFLAGS"
+all_includes="$all_includes $USER_INCLUDES"
+
+
+
+if test -z ""; then
+
+
+
+if test x$ac_uic_supports_libpath = xyes; then
+
+{ echo "$as_me:$LINENO: checking if UIC has KDE plugins available" >&5
+echo $ECHO_N "checking if UIC has KDE plugins available... $ECHO_C" >&6; }
+if test "${kde_cv_uic_plugins+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat > actest.ui << EOF
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>NewConnectionDialog</class>
+<widget class="QDialog">
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>testInput</cstring>
+ </property>
+ </widget>
+</widget>
+</UI>
+EOF
+
+
+
+kde_cv_uic_plugins=no
+kde_line="$UIC_PATH -L $kde_widgetdir"
+if test x$ac_uic_supports_nounload = xyes; then
+ kde_line="$kde_line -nounload"
+fi
+kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
+if { (eval echo "$as_me:$LINENO: \"$kde_line\"") >&5
+ (eval $kde_line) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # if you're trying to debug this check and think it's incorrect,
+ # better check your installation. The check _is_ correct - your
+ # installation is not.
+ if test -f actest.cpp && grep --color=never klineedit actest.cpp > /dev/null; then
+ kde_cv_uic_plugins=yes
+ fi
+fi
+rm -f actest.ui actest.cpp
+
+fi
+
+
+{ echo "$as_me:$LINENO: result: $kde_cv_uic_plugins" >&5
+echo "${ECHO_T}$kde_cv_uic_plugins" >&6; }
+if test "$kde_cv_uic_plugins" != yes; then
+ { { echo "$as_me:$LINENO: error:
+you need to install kdelibs first.
+
+If you did install kdelibs, then the Qt version that is picked up by
+this configure is not the same version you used to compile kdelibs.
+The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the
+_same Qt version_, compiled with the _same compiler_ and the same Qt
+configuration settings.
+" >&5
+echo "$as_me: error:
+you need to install kdelibs first.
+
+If you did install kdelibs, then the Qt version that is picked up by
+this configure is not the same version you used to compile kdelibs.
+The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the
+_same Qt version_, compiled with the _same compiler_ and the same Qt
+configuration settings.
+" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+fi
+
+fi
+
+ac_kde_libraries="$kde_libdir"
+
+
+
+
+
+ # Check whether --enable-path-check was given.
+if test "${enable_path_check+set}" = set; then
+ enableval=$enable_path_check;
+ if test "$enableval" = "no";
+ then ac_use_path_checking="default"
+ else ac_use_path_checking=""
+ fi
+
+else
+
+ if test "$kde_qtver" = 1;
+ then ac_use_path_checking=""
+ else ac_use_path_checking="default"
+ fi
+
+
+fi
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for KDE paths" >&5
+echo $ECHO_N "checking for KDE paths... $ECHO_C" >&6; }
+kde_result=""
+kde_cached_paths=yes
+if test "${kde_cv_all_paths+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+if test "$ac_use_path_checking" = "default"; then
+
+ if test -z "$kde_htmldir"; then
+ kde_htmldir='\${datadir}/doc/HTML'
+ fi
+ if test -z "$kde_appsdir"; then
+ kde_appsdir='\${datadir}/applnk'
+ fi
+ if test -z "$kde_icondir"; then
+ kde_icondir='\${datadir}/icons'
+ fi
+ if test -z "$kde_sounddir"; then
+ kde_sounddir='\${datadir}/sounds'
+ fi
+ if test -z "$kde_datadir"; then
+ kde_datadir='\${datadir}/apps'
+ fi
+ if test -z "$kde_locale"; then
+ kde_locale='\${datadir}/locale'
+ fi
+ if test -z "$kde_cgidir"; then
+ kde_cgidir='\${exec_prefix}/cgi-bin'
+ fi
+ if test -z "$kde_confdir"; then
+ kde_confdir='\${datadir}/config'
+ fi
+ if test -z "$kde_kcfgdir"; then
+ kde_kcfgdir='\${datadir}/config.kcfg'
+ fi
+ if test -z "$kde_mimedir"; then
+ kde_mimedir='\${datadir}/mimelnk'
+ fi
+ if test -z "$kde_toolbardir"; then
+ kde_toolbardir='\${datadir}/toolbar'
+ fi
+ if test -z "$kde_wallpaperdir"; then
+ kde_wallpaperdir='\${datadir}/wallpapers'
+ fi
+ if test -z "$kde_templatesdir"; then
+ kde_templatesdir='\${datadir}/templates'
+ fi
+ if test -z "$kde_bindir"; then
+ kde_bindir='\${exec_prefix}/bin'
+ fi
+ if test -z "$kde_servicesdir"; then
+ kde_servicesdir='\${datadir}/services'
+ fi
+ if test -z "$kde_servicetypesdir"; then
+ kde_servicetypesdir='\${datadir}/servicetypes'
+ fi
+ if test -z "$kde_moduledir"; then
+ if test "$kde_qtver" = "2"; then
+ kde_moduledir='\${libdir}/kde2'
+ else
+ kde_moduledir='\${libdir}/kde3'
+ fi
+ fi
+ if test -z "$kde_styledir"; then
+ kde_styledir='\${libdir}/kde3/plugins/styles'
+ fi
+ if test -z "$kde_widgetdir"; then
+ kde_widgetdir='\${libdir}/kde3/plugins/designer'
+ fi
+ if test -z "$xdg_appsdir"; then
+ xdg_appsdir='\${datadir}/applications/kde'
+ fi
+ if test -z "$xdg_menudir"; then
+ xdg_menudir='\${sysconfdir}/xdg/menus'
+ fi
+ if test -z "$xdg_directorydir"; then
+ xdg_directorydir='\${datadir}/desktop-directories'
+ fi
+
+
+ kde_cv_all_paths="kde_have_all_paths=\"yes\" \
+ kde_htmldir=\"$kde_htmldir\" \
+ kde_appsdir=\"$kde_appsdir\" \
+ kde_icondir=\"$kde_icondir\" \
+ kde_sounddir=\"$kde_sounddir\" \
+ kde_datadir=\"$kde_datadir\" \
+ kde_locale=\"$kde_locale\" \
+ kde_cgidir=\"$kde_cgidir\" \
+ kde_confdir=\"$kde_confdir\" \
+ kde_kcfgdir=\"$kde_kcfgdir\" \
+ kde_mimedir=\"$kde_mimedir\" \
+ kde_toolbardir=\"$kde_toolbardir\" \
+ kde_wallpaperdir=\"$kde_wallpaperdir\" \
+ kde_templatesdir=\"$kde_templatesdir\" \
+ kde_bindir=\"$kde_bindir\" \
+ kde_servicesdir=\"$kde_servicesdir\" \
+ kde_servicetypesdir=\"$kde_servicetypesdir\" \
+ kde_moduledir=\"$kde_moduledir\" \
+ kde_styledir=\"$kde_styledir\" \
+ kde_widgetdir=\"$kde_widgetdir\" \
+ xdg_appsdir=\"$xdg_appsdir\" \
+ xdg_menudir=\"$xdg_menudir\" \
+ xdg_directorydir=\"$xdg_directorydir\" \
+ kde_result=defaults"
+
+
+else
+
+ if test $kde_qtver = 1; then
+ { echo "$as_me:$LINENO: result: compiling" >&5
+echo "${ECHO_T}compiling" >&6; }
+
+
+ { echo "$as_me:$LINENO: checking for KDE headers installed" >&5
+echo $ECHO_N "checking for KDE headers installed... $ECHO_C" >&6; }
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+cat > conftest.$ac_ext <<EOF
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+#include <stdio.h>
+#include "confdefs.h"
+#include <kapp.h>
+
+int main() {
+ printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
+ printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
+ printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
+ printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
+ printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
+ printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
+ printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
+ printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
+ printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
+ printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
+ printf("kde_wallpaperdir=\\"%s\\"\n",
+ KApplication::kde_wallpaperdir().data());
+ printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
+ printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
+ printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
+ printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
+ printf("kde_moduledir=\\"/tmp/dummy\\"\n");
+ printf("kde_styledir=\\"/tmp/dummy\\"\n");
+ printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
+ printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
+ printf("xdg_menudir=\\"/tmp/dummy\\"\n");
+ printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
+ printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
+ return 0;
+ }
+EOF
+
+ ac_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$all_includes $CPPFLAGS"
+ 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
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ else
+ { { echo "$as_me:$LINENO: error: your system is not able to compile a small KDE application!
+Check, if you installed the KDE header files correctly.
+For more details about this problem, look at the end of config.log." >&5
+echo "$as_me: error: your system is not able to compile a small KDE application!
+Check, if you installed the KDE header files correctly.
+For more details about this problem, look at the end of config.log." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ CPPFLAGS=$ac_save_CPPFLAGS
+
+ 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
+
+
+
+ KDE_TEST_RPATH=
+
+ if test -n "$USE_RPATH"; then
+
+ if test -n "$kde_libraries"; then
+ KDE_TEST_RPATH="-R $kde_libraries"
+ fi
+
+ if test -n "$qt_libraries"; then
+ KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
+ fi
+
+ if test -n "$x_libraries"; then
+ KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
+ fi
+
+ KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
+ fi
+
+{ echo "$as_me:$LINENO: checking for KDE libraries installed" >&5
+echo $ECHO_N "checking for KDE libraries installed... $ECHO_C" >&6; }
+ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
+
+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; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+ { { echo "$as_me:$LINENO: error: your system fails at linking a small KDE application!
+Check, if your compiler is installed correctly and if you have used the
+same compiler to compile Qt and kdelibs as you did use now.
+For more details about this problem, look at the end of config.log." >&5
+echo "$as_me: error: your system fails at linking a small KDE application!
+Check, if your compiler is installed correctly and if you have used the
+same compiler to compile Qt and kdelibs as you did use now.
+For more details about this problem, look at the end of config.log." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+if eval `KDEDIR= ./conftest 2>&5`; then
+ kde_result=done
+else
+ kde_result=problems
+fi
+
+KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
+kde_have_all_paths=yes
+
+
+ kde_cv_all_paths="kde_have_all_paths=\"yes\" \
+ kde_htmldir=\"$kde_htmldir\" \
+ kde_appsdir=\"$kde_appsdir\" \
+ kde_icondir=\"$kde_icondir\" \
+ kde_sounddir=\"$kde_sounddir\" \
+ kde_datadir=\"$kde_datadir\" \
+ kde_locale=\"$kde_locale\" \
+ kde_cgidir=\"$kde_cgidir\" \
+ kde_confdir=\"$kde_confdir\" \
+ kde_kcfgdir=\"$kde_kcfgdir\" \
+ kde_mimedir=\"$kde_mimedir\" \
+ kde_toolbardir=\"$kde_toolbardir\" \
+ kde_wallpaperdir=\"$kde_wallpaperdir\" \
+ kde_templatesdir=\"$kde_templatesdir\" \
+ kde_bindir=\"$kde_bindir\" \
+ kde_servicesdir=\"$kde_servicesdir\" \
+ kde_servicetypesdir=\"$kde_servicetypesdir\" \
+ kde_moduledir=\"$kde_moduledir\" \
+ kde_styledir=\"$kde_styledir\" \
+ kde_widgetdir=\"$kde_widgetdir\" \
+ xdg_appsdir=\"$xdg_appsdir\" \
+ xdg_menudir=\"$xdg_menudir\" \
+ xdg_directorydir=\"$xdg_directorydir\" \
+ kde_result=$kde_result"
+
+
+
+ else
+ { { echo "$as_me:$LINENO: error: path checking not yet supported for KDE 2" >&5
+echo "$as_me: error: path checking not yet supported for KDE 2" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+fi
+
+ kde_cached_paths=no
+
+fi
+
+eval "$kde_cv_all_paths"
+ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
+ test -z "$kde_icondir" || test -z "$kde_sounddir" ||
+ test -z "$kde_datadir" || test -z "$kde_locale" ||
+ test -z "$kde_cgidir" || test -z "$kde_confdir" ||
+ test -z "$kde_kcfgdir" ||
+ test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
+ test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
+ test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
+ test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
+ test -z "$kde_styledir" || test -z "kde_widgetdir" ||
+ test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
+ test "x$kde_have_all_paths" != "xyes"; then
+ kde_have_all_paths=no
+ fi
+
+if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
+ # wrong values were cached, may be, we can set better ones
+ kde_result=
+ kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
+ kde_datadir= kde_locale= kde_cgidir= kde_confdir= kde_kcfgdir=
+ kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
+ kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
+ kde_have_all_paths=
+ kde_styledir=
+ kde_widgetdir=
+ xdg_appsdir = xdg_menudir= xdg_directorydir=
+
+if test "$ac_use_path_checking" = "default"; then
+
+ if test -z "$kde_htmldir"; then
+ kde_htmldir='\${datadir}/doc/HTML'
+ fi
+ if test -z "$kde_appsdir"; then
+ kde_appsdir='\${datadir}/applnk'
+ fi
+ if test -z "$kde_icondir"; then
+ kde_icondir='\${datadir}/icons'
+ fi
+ if test -z "$kde_sounddir"; then
+ kde_sounddir='\${datadir}/sounds'
+ fi
+ if test -z "$kde_datadir"; then
+ kde_datadir='\${datadir}/apps'
+ fi
+ if test -z "$kde_locale"; then
+ kde_locale='\${datadir}/locale'
+ fi
+ if test -z "$kde_cgidir"; then
+ kde_cgidir='\${exec_prefix}/cgi-bin'
+ fi
+ if test -z "$kde_confdir"; then
+ kde_confdir='\${datadir}/config'
+ fi
+ if test -z "$kde_kcfgdir"; then
+ kde_kcfgdir='\${datadir}/config.kcfg'
+ fi
+ if test -z "$kde_mimedir"; then
+ kde_mimedir='\${datadir}/mimelnk'
+ fi
+ if test -z "$kde_toolbardir"; then
+ kde_toolbardir='\${datadir}/toolbar'
+ fi
+ if test -z "$kde_wallpaperdir"; then
+ kde_wallpaperdir='\${datadir}/wallpapers'
+ fi
+ if test -z "$kde_templatesdir"; then
+ kde_templatesdir='\${datadir}/templates'
+ fi
+ if test -z "$kde_bindir"; then
+ kde_bindir='\${exec_prefix}/bin'
+ fi
+ if test -z "$kde_servicesdir"; then
+ kde_servicesdir='\${datadir}/services'
+ fi
+ if test -z "$kde_servicetypesdir"; then
+ kde_servicetypesdir='\${datadir}/servicetypes'
+ fi
+ if test -z "$kde_moduledir"; then
+ if test "$kde_qtver" = "2"; then
+ kde_moduledir='\${libdir}/kde2'
+ else
+ kde_moduledir='\${libdir}/kde3'
+ fi
+ fi
+ if test -z "$kde_styledir"; then
+ kde_styledir='\${libdir}/kde3/plugins/styles'
+ fi
+ if test -z "$kde_widgetdir"; then
+ kde_widgetdir='\${libdir}/kde3/plugins/designer'
+ fi
+ if test -z "$xdg_appsdir"; then
+ xdg_appsdir='\${datadir}/applications/kde'
+ fi
+ if test -z "$xdg_menudir"; then
+ xdg_menudir='\${sysconfdir}/xdg/menus'
+ fi
+ if test -z "$xdg_directorydir"; then
+ xdg_directorydir='\${datadir}/desktop-directories'
+ fi
+
+
+ kde_cv_all_paths="kde_have_all_paths=\"yes\" \
+ kde_htmldir=\"$kde_htmldir\" \
+ kde_appsdir=\"$kde_appsdir\" \
+ kde_icondir=\"$kde_icondir\" \
+ kde_sounddir=\"$kde_sounddir\" \
+ kde_datadir=\"$kde_datadir\" \
+ kde_locale=\"$kde_locale\" \
+ kde_cgidir=\"$kde_cgidir\" \
+ kde_confdir=\"$kde_confdir\" \
+ kde_kcfgdir=\"$kde_kcfgdir\" \
+ kde_mimedir=\"$kde_mimedir\" \
+ kde_toolbardir=\"$kde_toolbardir\" \
+ kde_wallpaperdir=\"$kde_wallpaperdir\" \
+ kde_templatesdir=\"$kde_templatesdir\" \
+ kde_bindir=\"$kde_bindir\" \
+ kde_servicesdir=\"$kde_servicesdir\" \
+ kde_servicetypesdir=\"$kde_servicetypesdir\" \
+ kde_moduledir=\"$kde_moduledir\" \
+ kde_styledir=\"$kde_styledir\" \
+ kde_widgetdir=\"$kde_widgetdir\" \
+ xdg_appsdir=\"$xdg_appsdir\" \
+ xdg_menudir=\"$xdg_menudir\" \
+ xdg_directorydir=\"$xdg_directorydir\" \
+ kde_result=defaults"
+
+
+else
+
+ if test $kde_qtver = 1; then
+ { echo "$as_me:$LINENO: result: compiling" >&5
+echo "${ECHO_T}compiling" >&6; }
+
+
+ { echo "$as_me:$LINENO: checking for KDE headers installed" >&5
+echo $ECHO_N "checking for KDE headers installed... $ECHO_C" >&6; }
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+
+cat > conftest.$ac_ext <<EOF
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+#include <stdio.h>
+#include "confdefs.h"
+#include <kapp.h>
+
+int main() {
+ printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
+ printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
+ printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
+ printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
+ printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
+ printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
+ printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
+ printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
+ printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
+ printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
+ printf("kde_wallpaperdir=\\"%s\\"\n",
+ KApplication::kde_wallpaperdir().data());
+ printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
+ printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
+ printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
+ printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
+ printf("kde_moduledir=\\"/tmp/dummy\\"\n");
+ printf("kde_styledir=\\"/tmp/dummy\\"\n");
+ printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
+ printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
+ printf("xdg_menudir=\\"/tmp/dummy\\"\n");
+ printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
+ printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
+ return 0;
+ }
+EOF
+
+ ac_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$all_includes $CPPFLAGS"
+ 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
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ else
+ { { echo "$as_me:$LINENO: error: your system is not able to compile a small KDE application!
+Check, if you installed the KDE header files correctly.
+For more details about this problem, look at the end of config.log." >&5
+echo "$as_me: error: your system is not able to compile a small KDE application!
+Check, if you installed the KDE header files correctly.
+For more details about this problem, look at the end of config.log." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ CPPFLAGS=$ac_save_CPPFLAGS
+
+ 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
+
+
+
+ KDE_TEST_RPATH=
+
+ if test -n "$USE_RPATH"; then
+
+ if test -n "$kde_libraries"; then
+ KDE_TEST_RPATH="-R $kde_libraries"
+ fi
+
+ if test -n "$qt_libraries"; then
+ KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
+ fi
+
+ if test -n "$x_libraries"; then
+ KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
+ fi
+
+ KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
+ fi
+
+{ echo "$as_me:$LINENO: checking for KDE libraries installed" >&5
+echo $ECHO_N "checking for KDE libraries installed... $ECHO_C" >&6; }
+ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
+
+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; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+ { { echo "$as_me:$LINENO: error: your system fails at linking a small KDE application!
+Check, if your compiler is installed correctly and if you have used the
+same compiler to compile Qt and kdelibs as you did use now.
+For more details about this problem, look at the end of config.log." >&5
+echo "$as_me: error: your system fails at linking a small KDE application!
+Check, if your compiler is installed correctly and if you have used the
+same compiler to compile Qt and kdelibs as you did use now.
+For more details about this problem, look at the end of config.log." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+if eval `KDEDIR= ./conftest 2>&5`; then
+ kde_result=done
+else
+ kde_result=problems
+fi
+
+KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
+kde_have_all_paths=yes
+
+
+ kde_cv_all_paths="kde_have_all_paths=\"yes\" \
+ kde_htmldir=\"$kde_htmldir\" \
+ kde_appsdir=\"$kde_appsdir\" \
+ kde_icondir=\"$kde_icondir\" \
+ kde_sounddir=\"$kde_sounddir\" \
+ kde_datadir=\"$kde_datadir\" \
+ kde_locale=\"$kde_locale\" \
+ kde_cgidir=\"$kde_cgidir\" \
+ kde_confdir=\"$kde_confdir\" \
+ kde_kcfgdir=\"$kde_kcfgdir\" \
+ kde_mimedir=\"$kde_mimedir\" \
+ kde_toolbardir=\"$kde_toolbardir\" \
+ kde_wallpaperdir=\"$kde_wallpaperdir\" \
+ kde_templatesdir=\"$kde_templatesdir\" \
+ kde_bindir=\"$kde_bindir\" \
+ kde_servicesdir=\"$kde_servicesdir\" \
+ kde_servicetypesdir=\"$kde_servicetypesdir\" \
+ kde_moduledir=\"$kde_moduledir\" \
+ kde_styledir=\"$kde_styledir\" \
+ kde_widgetdir=\"$kde_widgetdir\" \
+ xdg_appsdir=\"$xdg_appsdir\" \
+ xdg_menudir=\"$xdg_menudir\" \
+ xdg_directorydir=\"$xdg_directorydir\" \
+ kde_result=$kde_result"
+
+
+
+ else
+ { { echo "$as_me:$LINENO: error: path checking not yet supported for KDE 2" >&5
+echo "$as_me: error: path checking not yet supported for KDE 2" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+fi
+
+ eval "$kde_cv_all_paths"
+ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
+ test -z "$kde_icondir" || test -z "$kde_sounddir" ||
+ test -z "$kde_datadir" || test -z "$kde_locale" ||
+ test -z "$kde_cgidir" || test -z "$kde_confdir" ||
+ test -z "$kde_kcfgdir" ||
+ test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
+ test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
+ test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
+ test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
+ test -z "$kde_styledir" || test -z "kde_widgetdir" ||
+ test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
+ test "x$kde_have_all_paths" != "xyes"; then
+ kde_have_all_paths=no
+ fi
+
+ kde_result="$kde_result (cache overridden)"
+fi
+if test "$kde_have_all_paths" = "no"; then
+ { { echo "$as_me:$LINENO: error: configure could not run a little KDE program to test the environment.
+Since it had compiled and linked before, it must be a strange problem on your system.
+Look at config.log for details. If you are not able to fix this, look at
+http://www.kde.org/faq/installation.html or any www.kde.org mirror.
+(If you're using an egcs version on Linux, you may update binutils!)
+" >&5
+echo "$as_me: error: configure could not run a little KDE program to test the environment.
+Since it had compiled and linked before, it must be a strange problem on your system.
+Look at config.log for details. If you are not able to fix this, look at
+http://www.kde.org/faq/installation.html or any www.kde.org mirror.
+(If you're using an egcs version on Linux, you may update binutils!)
+" >&2;}
+ { (exit 1); exit 1; }; }
+else
+ rm -f conftest*
+ { echo "$as_me:$LINENO: result: $kde_result" >&5
+echo "${ECHO_T}$kde_result" >&6; }
+fi
+
+bindir=$kde_bindir
+
+
+
+# Check whether --with-arts was given.
+if test "${with_arts+set}" = set; then
+ withval=$with_arts; build_arts=$withval
+else
+ build_arts=yes
+
+fi
+
+
+
+if test "$build_arts" '!=' "no"; then
+ include_ARTS_TRUE=
+ include_ARTS_FALSE='#'
+else
+ include_ARTS_TRUE='#'
+ include_ARTS_FALSE=
+fi
+
+ if test "$build_arts" = "no"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define WITHOUT_ARTS 1
+_ACEOF
+
+ fi
+
+
+ kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
+ test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
+ if test -n "$KDEDIRS"; then
+ kde_save_IFS=$IFS
+ IFS=:
+ for dir in $KDEDIRS; do
+ kde_default_bindirs="$dir/bin $kde_default_bindirs "
+ done
+ IFS=$kde_save_IFS
+ fi
+
+ kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
+
+ { echo "$as_me:$LINENO: checking for dcopidl" >&5
+echo $ECHO_N "checking for dcopidl... $ECHO_C" >&6; }
+ if test -n "$DCOPIDL"; then
+ kde_cv_path="$DCOPIDL";
+ else
+ kde_cache=`echo dcopidl | sed 'y%./+-%__p_%'`
+
+ if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z ""; then dirs="$kde_default_bindirs $dirs"
+ else dirs="$dirs $kde_default_bindirs"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/dcopidl"; then
+ if test -n ""
+ then
+ evalstr="$dir/dcopidl 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/dcopidl"
+ break
+ fi
+ else
+ kde_cv_path="$dir/dcopidl"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+ { { echo "$as_me:$LINENO: error: The important program dcopidl was not found!
+Please check whether you installed KDE correctly.
+" >&5
+echo "$as_me: error: The important program dcopidl was not found!
+Please check whether you installed KDE correctly.
+" >&2;}
+ { (exit 1); exit 1; }; }
+
+ else
+ { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+ DCOPIDL=$kde_cv_path
+
+ fi
+
+
+ { echo "$as_me:$LINENO: checking for dcopidl2cpp" >&5
+echo $ECHO_N "checking for dcopidl2cpp... $ECHO_C" >&6; }
+ if test -n "$DCOPIDL2CPP"; then
+ kde_cv_path="$DCOPIDL2CPP";
+ else
+ kde_cache=`echo dcopidl2cpp | sed 'y%./+-%__p_%'`
+
+ if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z ""; then dirs="$kde_default_bindirs $dirs"
+ else dirs="$dirs $kde_default_bindirs"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/dcopidl2cpp"; then
+ if test -n ""
+ then
+ evalstr="$dir/dcopidl2cpp 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/dcopidl2cpp"
+ break
+ fi
+ else
+ kde_cv_path="$dir/dcopidl2cpp"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+ { { echo "$as_me:$LINENO: error: The important program dcopidl2cpp was not found!
+Please check whether you installed KDE correctly.
+" >&5
+echo "$as_me: error: The important program dcopidl2cpp was not found!
+Please check whether you installed KDE correctly.
+" >&2;}
+ { (exit 1); exit 1; }; }
+
+ else
+ { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+ DCOPIDL2CPP=$kde_cv_path
+
+ fi
+
+ if test "$build_arts" '!=' "no"; then
+
+ { echo "$as_me:$LINENO: checking for mcopidl" >&5
+echo $ECHO_N "checking for mcopidl... $ECHO_C" >&6; }
+ if test -n "$MCOPIDL"; then
+ kde_cv_path="$MCOPIDL";
+ else
+ kde_cache=`echo mcopidl | sed 'y%./+-%__p_%'`
+
+ if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z ""; then dirs="$kde_default_bindirs $dirs"
+ else dirs="$dirs $kde_default_bindirs"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/mcopidl"; then
+ if test -n ""
+ then
+ evalstr="$dir/mcopidl 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/mcopidl"
+ break
+ fi
+ else
+ kde_cv_path="$dir/mcopidl"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+ { { echo "$as_me:$LINENO: error: The important program mcopidl was not found!
+Please check whether you installed aRts correctly or use
+--without-arts to compile without aRts support (this will remove functionality).
+" >&5
+echo "$as_me: error: The important program mcopidl was not found!
+Please check whether you installed aRts correctly or use
+--without-arts to compile without aRts support (this will remove functionality).
+" >&2;}
+ { (exit 1); exit 1; }; }
+
+ else
+ { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+ MCOPIDL=$kde_cv_path
+
+ fi
+
+
+ { echo "$as_me:$LINENO: checking for artsc-config" >&5
+echo $ECHO_N "checking for artsc-config... $ECHO_C" >&6; }
+ if test -n "$ARTSCCONFIG"; then
+ kde_cv_path="$ARTSCCONFIG";
+ else
+ kde_cache=`echo artsc-config | sed 'y%./+-%__p_%'`
+
+ if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z ""; then dirs="$kde_default_bindirs $dirs"
+ else dirs="$dirs $kde_default_bindirs"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/artsc-config"; then
+ if test -n ""
+ then
+ evalstr="$dir/artsc-config 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/artsc-config"
+ break
+ fi
+ else
+ kde_cv_path="$dir/artsc-config"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+ { { echo "$as_me:$LINENO: error: The important program artsc-config was not found!
+Please check whether you installed aRts correctly or use
+--without-arts to compile without aRts support (this will remove functionality).
+" >&5
+echo "$as_me: error: The important program artsc-config was not found!
+Please check whether you installed aRts correctly or use
+--without-arts to compile without aRts support (this will remove functionality).
+" >&2;}
+ { (exit 1); exit 1; }; }
+
+ else
+ { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+ ARTSCCONFIG=$kde_cv_path
+
+ fi
+
+ fi
+
+ { echo "$as_me:$LINENO: checking for meinproc" >&5
+echo $ECHO_N "checking for meinproc... $ECHO_C" >&6; }
+ if test -n "$MEINPROC"; then
+ kde_cv_path="$MEINPROC";
+ else
+ kde_cache=`echo meinproc | sed 'y%./+-%__p_%'`
+
+ if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z ""; then dirs="$kde_default_bindirs $dirs"
+ else dirs="$dirs $kde_default_bindirs"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/meinproc"; then
+ if test -n ""
+ then
+ evalstr="$dir/meinproc 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/meinproc"
+ break
+ fi
+ else
+ kde_cv_path="$dir/meinproc"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+ else
+ { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+ MEINPROC=$kde_cv_path
+
+ fi
+
+
+ kde32ornewer=1
+ kde33ornewer=1
+ if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
+ kde32ornewer=
+ kde33ornewer=
+ else
+ if test "$kde_qtver" = "3"; then
+ if test "$kde_qtsubver" -le 1; then
+ kde32ornewer=
+ fi
+ if test "$kde_qtsubver" -le 2; then
+ kde33ornewer=
+ fi
+ if test "$KDECONFIG" != "compiled"; then
+ if test `$KDECONFIG --version | grep --color=never KDE | sed 's/KDE: \(...\).*/\1/'` = 3.2; then
+ kde33ornewer=
+ fi
+ fi
+ fi
+ fi
+
+ if test -n "$kde32ornewer"; then
+
+ { echo "$as_me:$LINENO: checking for kconfig_compiler" >&5
+echo $ECHO_N "checking for kconfig_compiler... $ECHO_C" >&6; }
+ if test -n "$KCONFIG_COMPILER"; then
+ kde_cv_path="$KCONFIG_COMPILER";
+ else
+ kde_cache=`echo kconfig_compiler | sed 'y%./+-%__p_%'`
+
+ if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z ""; then dirs="$kde_default_bindirs $dirs"
+ else dirs="$dirs $kde_default_bindirs"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/kconfig_compiler"; then
+ if test -n ""
+ then
+ evalstr="$dir/kconfig_compiler 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/kconfig_compiler"
+ break
+ fi
+ else
+ kde_cv_path="$dir/kconfig_compiler"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+ { { echo "$as_me:$LINENO: error: The important program kconfig_compiler was not found!
+Please check whether you installed KDE correctly.
+" >&5
+echo "$as_me: error: The important program kconfig_compiler was not found!
+Please check whether you installed KDE correctly.
+" >&2;}
+ { (exit 1); exit 1; }; }
+
+ else
+ { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+ KCONFIG_COMPILER=$kde_cv_path
+
+ fi
+
+
+ { echo "$as_me:$LINENO: checking for dcopidlng" >&5
+echo $ECHO_N "checking for dcopidlng... $ECHO_C" >&6; }
+ if test -n "$DCOPIDLNG"; then
+ kde_cv_path="$DCOPIDLNG";
+ else
+ kde_cache=`echo dcopidlng | sed 'y%./+-%__p_%'`
+
+ if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z ""; then dirs="$kde_default_bindirs $dirs"
+ else dirs="$dirs $kde_default_bindirs"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/dcopidlng"; then
+ if test -n ""
+ then
+ evalstr="$dir/dcopidlng 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/dcopidlng"
+ break
+ fi
+ else
+ kde_cv_path="$dir/dcopidlng"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+ { { echo "$as_me:$LINENO: error: The important program dcopidlng was not found!
+Please check whether you installed KDE correctly.
+" >&5
+echo "$as_me: error: The important program dcopidlng was not found!
+Please check whether you installed KDE correctly.
+" >&2;}
+ { (exit 1); exit 1; }; }
+
+ else
+ { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+ DCOPIDLNG=$kde_cv_path
+
+ fi
+
+ fi
+ if test -n "$kde33ornewer"; then
+
+ { echo "$as_me:$LINENO: checking for makekdewidgets" >&5
+echo $ECHO_N "checking for makekdewidgets... $ECHO_C" >&6; }
+ if test -n "$MAKEKDEWIDGETS"; then
+ kde_cv_path="$MAKEKDEWIDGETS";
+ else
+ kde_cache=`echo makekdewidgets | sed 'y%./+-%__p_%'`
+
+ if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z ""; then dirs="$kde_default_bindirs $dirs"
+ else dirs="$dirs $kde_default_bindirs"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/makekdewidgets"; then
+ if test -n ""
+ then
+ evalstr="$dir/makekdewidgets 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/makekdewidgets"
+ break
+ fi
+ else
+ kde_cv_path="$dir/makekdewidgets"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+
+ { { echo "$as_me:$LINENO: error: The important program makekdewidgets was not found!
+Please check whether you installed KDE correctly.
+" >&5
+echo "$as_me: error: The important program makekdewidgets was not found!
+Please check whether you installed KDE correctly.
+" >&2;}
+ { (exit 1); exit 1; }; }
+
+ else
+ { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+ MAKEKDEWIDGETS=$kde_cv_path
+
+ fi
+
+
+ fi
+
+ { echo "$as_me:$LINENO: checking for xmllint" >&5
+echo $ECHO_N "checking for xmllint... $ECHO_C" >&6; }
+ if test -n "$XMLLINT"; then
+ kde_cv_path="$XMLLINT";
+ else
+ kde_cache=`echo xmllint | sed 'y%./+-%__p_%'`
+
+ if { as_var=kde_cv_path_$kde_cache; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z ""; then dirs="${prefix}/bin ${exec_prefix}/bin $dirs"
+ else dirs="$dirs ${prefix}/bin ${exec_prefix}/bin"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/xmllint"; then
+ if test -n ""
+ then
+ evalstr="$dir/xmllint 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/xmllint"
+ break
+ fi
+ else
+ kde_cv_path="$dir/xmllint"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+
+fi
+
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+ XMLLINT=""
+ else
+ { echo "$as_me:$LINENO: result: $kde_cv_path" >&5
+echo "${ECHO_T}$kde_cv_path" >&6; }
+ XMLLINT=$kde_cv_path
+
+ fi
+
+
+ if test -n "$MEINPROC" -a "$MEINPROC" != "compiled"; then
+ kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
+ test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
+
+KDE_XSL_STYLESHEET=NO
+for i in $kde_sharedirs;
+do
+ for j in apps/ksgmltools2/customization/kde-chunk.xsl;
+ do
+ echo "configure: 32784: $i/$j" >&5
+ if test -r "$i/$j"; then
+ echo "taking that" >&5
+ KDE_XSL_STYLESHEET=$i
+ break 2
+ fi
+ done
+done
+
+ if test "$KDE_XSL_STYLESHEET" = "NO"; then
+ KDE_XSL_STYLESHEET=""
+ else
+ KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
+ fi
+ fi
+
+ DCOP_DEPENDENCIES='$(DCOPIDL)'
+ if test -n "$kde32ornewer"; then
+ KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
+ DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
+
+
+
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+kdeinitdir='$(kde_moduledir)'
+
+
+
+if test "$kde_qtver" = 1; then
+ kde_minidir="$kde_icondir/mini"
+else
+# for KDE 1 - this breaks KDE2 apps using minidir, but
+# that's the plan ;-/
+ kde_minidir="/dev/null"
+fi
+
+
+
+
+
+
+if test $kde_qtver = 3; then
+ case $host in
+ *cygwin*) lib_kded="-lkdeinit_kded" ;;
+ *) lib_kded="" ;;
+ esac
+ LIB_KDED=$lib_kded
+
+ LIB_KDECORE="-lkdecore"
+
+ LIB_KDEUI="-lkdeui"
+
+ LIB_KIO="-lkio"
+
+ LIB_KJS="-lkjs"
+
+ LIB_SMB="-lsmb"
+
+ LIB_KAB="-lkab"
+
+ LIB_KABC="-lkabc"
+
+ LIB_KHTML="-lkhtml"
+
+ LIB_KSPELL="-lkspell"
+
+ LIB_KPARTS="-lkparts"
+
+ LIB_KDEPRINT="-lkdeprint"
+
+ LIB_KUTILS="-lkutils"
+
+ LIB_KDEPIM="-lkdepim"
+
+ LIB_KIMPROXY="-lkimproxy"
+
+ LIB_KNEWSTUFF="-lknewstuff"
+
+ LIB_KDNSSD="-lkdnssd"
+
+ LIB_KUNITTEST="-lkunittest"
+
+# these are for backward compatibility
+ LIB_KSYCOCA="-lkio"
+
+ LIB_KFILE="-lkio"
+
+elif test $kde_qtver = 2; then
+ LIB_KDECORE="-lkdecore"
+
+ LIB_KDEUI="-lkdeui"
+
+ LIB_KIO="-lkio"
+
+ LIB_KSYCOCA="-lksycoca"
+
+ LIB_SMB="-lsmb"
+
+ LIB_KFILE="-lkfile"
+
+ LIB_KAB="-lkab"
+
+ LIB_KHTML="-lkhtml"
+
+ LIB_KSPELL="-lkspell"
+
+ LIB_KPARTS="-lkparts"
+
+ LIB_KDEPRINT="-lkdeprint"
+
+else
+ LIB_KDECORE="-lkdecore -lXext $(LIB_QT)"
+
+ LIB_KDEUI="-lkdeui $(LIB_KDECORE)"
+
+ LIB_KFM="-lkfm $(LIB_KDECORE)"
+
+ LIB_KFILE="-lkfile $(LIB_KFM) $(LIB_KDEUI)"
+
+ LIB_KAB="-lkab $(LIB_KIMGIO) $(LIB_KDECORE)"
+
+fi
+
+
+
+#MIN_CONFIG(3.0.0)
+
+{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
+if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
+ && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
+ bogus endian macros
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_bigendian=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_c_bigendian=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+ # try to guess the endianness by grepping values into an object file
+ ac_cv_c_bigendian=unknown
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+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
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=no
+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_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
+case $ac_cv_c_bigendian in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+ no)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+
+
+{ echo "$as_me:$LINENO: checking for MAXPATHLEN" >&5
+echo $ECHO_N "checking for MAXPATHLEN... $ECHO_C" >&6; }
+if test "${ac_cv_maxpathlen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+#include <stdio.h>
+#include <sys/param.h>
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 1024
+#endif
+
+KDE_HELLO MAXPATHLEN
+
+EOF
+
+ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep --color=never '^KDE_HELLO' >conftest.out"
+
+if { (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); } && test -s conftest.out; then
+ ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
+else
+ ac_cv_maxpathlen=1024
+fi
+
+rm conftest.*
+
+
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_cv_maxpathlen" >&5
+echo "${ECHO_T}$ac_cv_maxpathlen" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define KDEMAXPATHLEN $ac_cv_maxpathlen
+_ACEOF
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+ ;;
+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 -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_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
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { 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; }
+ PKG_CONFIG=""
+ fi
+
+fi
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for LIBYAZ" >&5
+echo $ECHO_N "checking for LIBYAZ... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$LIBYAZ_CFLAGS"; then
+ pkg_cv_LIBYAZ_CFLAGS="$LIBYAZ_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"yaz\"") >&5
+ ($PKG_CONFIG --exists --print-errors "yaz") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_LIBYAZ_CFLAGS=`$PKG_CONFIG --cflags "yaz" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$LIBYAZ_LIBS"; then
+ pkg_cv_LIBYAZ_LIBS="$LIBYAZ_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"yaz\"") >&5
+ ($PKG_CONFIG --exists --print-errors "yaz") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_LIBYAZ_LIBS=`$PKG_CONFIG --libs "yaz" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBYAZ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "yaz"`
+ else
+ LIBYAZ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "yaz"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBYAZ_PKG_ERRORS" >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+elif test $pkg_failed = untried; then
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+else
+ LIBYAZ_CFLAGS=$pkg_cv_LIBYAZ_CFLAGS
+ LIBYAZ_LIBS=$pkg_cv_LIBYAZ_LIBS
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_YAZ 1
+_ACEOF
+
+fi
+
+
+
+
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for LIBXML" >&5
+echo $ECHO_N "checking for LIBXML... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$LIBXML_CFLAGS"; then
+ pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5
+ ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$LIBXML_LIBS"; then
+ pkg_cv_LIBXML_LIBS="$LIBXML_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5
+ ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0"`
+ else
+ LIBXML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBXML_PKG_ERRORS" >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+elif test $pkg_failed = untried; then
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+else
+ LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS
+ LIBXML_LIBS=$pkg_cv_LIBXML_LIBS
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XML 1
+_ACEOF
+
+fi
+
+
+
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for LIBXSLT" >&5
+echo $ECHO_N "checking for LIBXSLT... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$LIBXSLT_CFLAGS"; then
+ pkg_cv_LIBXSLT_CFLAGS="$LIBXSLT_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxslt\"") >&5
+ ($PKG_CONFIG --exists --print-errors "libxslt") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_LIBXSLT_CFLAGS=`$PKG_CONFIG --cflags "libxslt" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$LIBXSLT_LIBS"; then
+ pkg_cv_LIBXSLT_LIBS="$LIBXSLT_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxslt\"") >&5
+ ($PKG_CONFIG --exists --print-errors "libxslt") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_LIBXSLT_LIBS=`$PKG_CONFIG --libs "libxslt" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBXSLT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxslt"`
+ else
+ LIBXSLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxslt"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBXSLT_PKG_ERRORS" >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+elif test $pkg_failed = untried; then
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+else
+ LIBXSLT_CFLAGS=$pkg_cv_LIBXSLT_CFLAGS
+ LIBXSLT_LIBS=$pkg_cv_LIBXSLT_LIBS
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XSLT 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
+TOPSUBDIRS=""
+
+if test ! -s $srcdir/subdirs; then
+ files=`cd $srcdir && ls -1`
+ dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
+ for i in $dirs; do
+ echo $i >> $srcdir/subdirs
+ done
+fi
+
+ac_topsubdirs=
+if test -s $srcdir/inst-apps; then
+ ac_topsubdirs="`cat $srcdir/inst-apps`"
+elif test -s $srcdir/subdirs; then
+ ac_topsubdirs="`cat $srcdir/subdirs`"
+fi
+
+for i in $ac_topsubdirs; do
+ { echo "$as_me:$LINENO: checking if $i should be compiled" >&5
+echo $ECHO_N "checking if $i should be compiled... $ECHO_C" >&6; }
+ if test -d $srcdir/$i; then
+ install_it="yes"
+ for j in $DO_NOT_COMPILE; do
+ if test $i = $j; then
+ install_it="no"
+ fi
+ done
+ else
+ install_it="no"
+ fi
+ { echo "$as_me:$LINENO: result: $install_it" >&5
+echo "${ECHO_T}$install_it" >&6; }
+ vari=`echo $i | sed -e 's,[-+.@],_,g'`
+ if test $install_it = "yes"; then
+ TOPSUBDIRS="$TOPSUBDIRS $i"
+ eval "$vari""_SUBDIR_included=yes"
+ else
+ eval "$vari""_SUBDIR_included=no"
+ fi
+done
+
+
+
+ac_config_files="$ac_config_files Makefile"
+
+ac_config_files="$ac_config_files doc/Makefile"
+
+ac_config_files="$ac_config_files doc/en/Makefile"
+
+ac_config_files="$ac_config_files man/Makefile"
+
+ac_config_files="$ac_config_files po/Makefile"
+
+ac_config_files="$ac_config_files src/Makefile"
+
+ac_config_files="$ac_config_files xslt/Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$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 "${unsermake_enable_pch_TRUE}" && test -z "${unsermake_enable_pch_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"unsermake_enable_pch\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"unsermake_enable_pch\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${include_x11_TRUE}" && test -z "${include_x11_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"include_x11\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"include_x11\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${include_ARTS_TRUE}" && test -z "${include_ARTS_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"include_ARTS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"include_ARTS\" 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 more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# 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
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+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) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# 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'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # 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 after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, 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
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { 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 sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+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$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_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 and configuration settings, 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.61,
+ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+_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
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --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;;
+ --he | --h)
+ # Conflict between --help and --header
+ { 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 ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { 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"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ CONFIG_SHELL=$SHELL
+ export CONFIG_SHELL
+ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "doc/en/Makefile") CONFIG_FILES="$CONFIG_FILES doc/en/Makefile" ;;
+ "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
+ "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "xslt/Makefile") CONFIG_FILES="$CONFIG_FILES xslt/Makefile" ;;
+
+ *) { { 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 against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$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 "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for 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
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+build!$build$ac_delim
+build_cpu!$build_cpu$ac_delim
+build_vendor!$build_vendor$ac_delim
+build_os!$build_os$ac_delim
+host!$host$ac_delim
+host_cpu!$host_cpu$ac_delim
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+target!$target$ac_delim
+target_cpu!$target_cpu$ac_delim
+target_vendor!$target_vendor$ac_delim
+target_os!$target_os$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+CYGPATH_W!$CYGPATH_W$ac_delim
+PACKAGE!$PACKAGE$ac_delim
+VERSION!$VERSION$ac_delim
+ACLOCAL!$ACLOCAL$ac_delim
+AUTOCONF!$AUTOCONF$ac_delim
+AUTOMAKE!$AUTOMAKE$ac_delim
+AUTOHEADER!$AUTOHEADER$ac_delim
+MAKEINFO!$MAKEINFO$ac_delim
+install_sh!$install_sh$ac_delim
+STRIP!$STRIP$ac_delim
+INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
+mkdir_p!$mkdir_p$ac_delim
+AWK!$AWK$ac_delim
+SET_MAKE!$SET_MAKE$ac_delim
+am__leading_dot!$am__leading_dot$ac_delim
+AMTAR!$AMTAR$ac_delim
+am__tar!$am__tar$ac_delim
+am__untar!$am__untar$ac_delim
+KDECONFIG!$KDECONFIG$ac_delim
+kde_libs_prefix!$kde_libs_prefix$ac_delim
+kde_libs_htmldir!$kde_libs_htmldir$ac_delim
+CONF_FILES!$CONF_FILES$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+DEPDIR!$DEPDIR$ac_delim
+am__include!$am__include$ac_delim
+am__quote!$am__quote$ac_delim
+AMDEP_TRUE!$AMDEP_TRUE$ac_delim
+AMDEP_FALSE!$AMDEP_FALSE$ac_delim
+AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
+CCDEPMODE!$CCDEPMODE$ac_delim
+am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
+am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
+CPP!$CPP$ac_delim
+CXX!$CXX$ac_delim
+CXXFLAGS!$CXXFLAGS$ac_delim
+ac_ct_CXX!$ac_ct_CXX$ac_delim
+CXXDEPMODE!$CXXDEPMODE$ac_delim
+am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
+am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+WOVERLOADED_VIRTUAL!$WOVERLOADED_VIRTUAL$ac_delim
+HAVE_GCC_VISIBILITY!$HAVE_GCC_VISIBILITY$ac_delim
+unsermake_enable_pch_TRUE!$unsermake_enable_pch_TRUE$ac_delim
+unsermake_enable_pch_FALSE!$unsermake_enable_pch_FALSE$ac_delim
+USE_EXCEPTIONS!$USE_EXCEPTIONS$ac_delim
+USE_RTTI!$USE_RTTI$ac_delim
+CXXCPP!$CXXCPP$ac_delim
+NOOPT_CXXFLAGS!$NOOPT_CXXFLAGS$ac_delim
+NOOPT_CFLAGS!$NOOPT_CFLAGS$ac_delim
+ENABLE_PERMISSIVE_FLAG!$ENABLE_PERMISSIVE_FLAG$ac_delim
+LDFLAGS_AS_NEEDED!$LDFLAGS_AS_NEEDED$ac_delim
+LDFLAGS_NEW_DTAGS!$LDFLAGS_NEW_DTAGS$ac_delim
+KDE_USE_FINAL_TRUE!$KDE_USE_FINAL_TRUE$ac_delim
+KDE_USE_FINAL_FALSE!$KDE_USE_FINAL_FALSE$ac_delim
+KDE_USE_CLOSURE_TRUE!$KDE_USE_CLOSURE_TRUE$ac_delim
+KDE_USE_CLOSURE_FALSE!$KDE_USE_CLOSURE_FALSE$ac_delim
+KDE_NO_UNDEFINED!$KDE_NO_UNDEFINED$ac_delim
+KDE_USE_NMCHECK_TRUE!$KDE_USE_NMCHECK_TRUE$ac_delim
+KDE_USE_NMCHECK_FALSE!$KDE_USE_NMCHECK_FALSE$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+LN_S!$LN_S$ac_delim
+ECHO!$ECHO$ac_delim
+AR!$AR$ac_delim
+RANLIB!$RANLIB$ac_delim
+F77!$F77$ac_delim
+FFLAGS!$FFLAGS$ac_delim
+ac_ct_F77!$ac_ct_F77$ac_delim
+LIBTOOL!$LIBTOOL$ac_delim
+KDE_PLUGIN!$KDE_PLUGIN$ac_delim
+KDE_CHECK_PLUGIN!$KDE_CHECK_PLUGIN$ac_delim
+MSGFMT!$MSGFMT$ac_delim
+GMSGFMT!$GMSGFMT$ac_delim
+XGETTEXT!$XGETTEXT$ac_delim
+LIBUTIL!$LIBUTIL$ac_delim
+LIBCOMPAT!$LIBCOMPAT$ac_delim
+LIBCRYPT!$LIBCRYPT$ac_delim
+LIBRESOLV!$LIBRESOLV$ac_delim
+LIB_POLL!$LIB_POLL$ac_delim
+FRAMEWORK_COREAUDIO!$FRAMEWORK_COREAUDIO$ac_delim
+LIBSOCKET!$LIBSOCKET$ac_delim
+X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
+LIBUCB!$LIBUCB$ac_delim
+LIBDL!$LIBDL$ac_delim
+KDE_USE_FPIE!$KDE_USE_FPIE$ac_delim
+KDE_USE_PIE!$KDE_USE_PIE$ac_delim
+include_x11_TRUE!$include_x11_TRUE$ac_delim
+include_x11_FALSE!$include_x11_FALSE$ac_delim
+XMKMF!$XMKMF$ac_delim
+X_PRE_LIBS!$X_PRE_LIBS$ac_delim
+LIB_X11!$LIB_X11$ac_delim
+LIB_XRENDER!$LIB_XRENDER$ac_delim
+LIBSM!$LIBSM$ac_delim
+X_INCLUDES!$X_INCLUDES$ac_delim
+X_LDFLAGS!$X_LDFLAGS$ac_delim
+x_includes!$x_includes$ac_delim
+x_libraries!$x_libraries$ac_delim
+QTE_NORTTI!$QTE_NORTTI$ac_delim
+LIB_XEXT!$LIB_XEXT$ac_delim
+LIBPTHREAD!$LIBPTHREAD$ac_delim
+USE_THREADS!$USE_THREADS$ac_delim
+KDE_MT_LDFLAGS!$KDE_MT_LDFLAGS$ac_delim
+KDE_MT_LIBS!$KDE_MT_LIBS$ac_delim
+USER_INCLUDES!$USER_INCLUDES$ac_delim
+USER_LDFLAGS!$USER_LDFLAGS$ac_delim
+LIBZ!$LIBZ$ac_delim
+LIBPNG!$LIBPNG$ac_delim
+LIBJPEG!$LIBJPEG$ac_delim
+qt_libraries!$qt_libraries$ac_delim
+qt_includes!$qt_includes$ac_delim
+QT_INCLUDES!$QT_INCLUDES$ac_delim
+QT_LDFLAGS!$QT_LDFLAGS$ac_delim
+PERL!$PERL$ac_delim
+MOC!$MOC$ac_delim
+UIC!$UIC$ac_delim
+UIC_TR!$UIC_TR$ac_delim
+LIB_QT!$LIB_QT$ac_delim
+LIB_QPE!$LIB_QPE$ac_delim
+kde_qtver!$kde_qtver$ac_delim
+KDE_EXTRA_RPATH!$KDE_EXTRA_RPATH$ac_delim
+KDE_RPATH!$KDE_RPATH$ac_delim
+X_RPATH!$X_RPATH$ac_delim
+kde_libraries!$kde_libraries$ac_delim
+kde_includes!$kde_includes$ac_delim
+KDE_LDFLAGS!$KDE_LDFLAGS$ac_delim
+KDE_INCLUDES!$KDE_INCLUDES$ac_delim
+all_includes!$all_includes$ac_delim
+all_libraries!$all_libraries$ac_delim
+AUTODIRS!$AUTODIRS$ac_delim
+include_ARTS_TRUE!$include_ARTS_TRUE$ac_delim
+include_ARTS_FALSE!$include_ARTS_FALSE$ac_delim
+MAKEKDEWIDGETS!$MAKEKDEWIDGETS$ac_delim
+KCONFIG_COMPILER!$KCONFIG_COMPILER$ac_delim
+KCFG_DEPENDENCIES!$KCFG_DEPENDENCIES$ac_delim
+DCOPIDLNG!$DCOPIDLNG$ac_delim
+DCOPIDL!$DCOPIDL$ac_delim
+DCOPIDL2CPP!$DCOPIDL2CPP$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+DCOP_DEPENDENCIES!$DCOP_DEPENDENCIES$ac_delim
+MCOPIDL!$MCOPIDL$ac_delim
+ARTSCCONFIG!$ARTSCCONFIG$ac_delim
+MEINPROC!$MEINPROC$ac_delim
+KDE_XSL_STYLESHEET!$KDE_XSL_STYLESHEET$ac_delim
+XMLLINT!$XMLLINT$ac_delim
+kde_htmldir!$kde_htmldir$ac_delim
+kde_appsdir!$kde_appsdir$ac_delim
+kde_icondir!$kde_icondir$ac_delim
+kde_sounddir!$kde_sounddir$ac_delim
+kde_datadir!$kde_datadir$ac_delim
+kde_locale!$kde_locale$ac_delim
+kde_confdir!$kde_confdir$ac_delim
+kde_kcfgdir!$kde_kcfgdir$ac_delim
+kde_mimedir!$kde_mimedir$ac_delim
+kde_wallpaperdir!$kde_wallpaperdir$ac_delim
+kde_bindir!$kde_bindir$ac_delim
+xdg_appsdir!$xdg_appsdir$ac_delim
+xdg_menudir!$xdg_menudir$ac_delim
+xdg_directorydir!$xdg_directorydir$ac_delim
+kde_templatesdir!$kde_templatesdir$ac_delim
+kde_servicesdir!$kde_servicesdir$ac_delim
+kde_servicetypesdir!$kde_servicetypesdir$ac_delim
+kde_moduledir!$kde_moduledir$ac_delim
+kdeinitdir!$kdeinitdir$ac_delim
+kde_styledir!$kde_styledir$ac_delim
+kde_widgetdir!$kde_widgetdir$ac_delim
+LIB_KDED!$LIB_KDED$ac_delim
+LIB_KDECORE!$LIB_KDECORE$ac_delim
+LIB_KDEUI!$LIB_KDEUI$ac_delim
+LIB_KIO!$LIB_KIO$ac_delim
+LIB_KJS!$LIB_KJS$ac_delim
+LIB_SMB!$LIB_SMB$ac_delim
+LIB_KAB!$LIB_KAB$ac_delim
+LIB_KABC!$LIB_KABC$ac_delim
+LIB_KHTML!$LIB_KHTML$ac_delim
+LIB_KSPELL!$LIB_KSPELL$ac_delim
+LIB_KPARTS!$LIB_KPARTS$ac_delim
+LIB_KDEPRINT!$LIB_KDEPRINT$ac_delim
+LIB_KUTILS!$LIB_KUTILS$ac_delim
+LIB_KDEPIM!$LIB_KDEPIM$ac_delim
+LIB_KIMPROXY!$LIB_KIMPROXY$ac_delim
+LIB_KNEWSTUFF!$LIB_KNEWSTUFF$ac_delim
+LIB_KDNSSD!$LIB_KDNSSD$ac_delim
+LIB_KUNITTEST!$LIB_KUNITTEST$ac_delim
+LIB_KSYCOCA!$LIB_KSYCOCA$ac_delim
+LIB_KFILE!$LIB_KFILE$ac_delim
+LIB_KFM!$LIB_KFM$ac_delim
+PKG_CONFIG!$PKG_CONFIG$ac_delim
+LIBYAZ_CFLAGS!$LIBYAZ_CFLAGS$ac_delim
+LIBYAZ_LIBS!$LIBYAZ_LIBS$ac_delim
+LIBYAZ_RPATH!$LIBYAZ_RPATH$ac_delim
+LIBXML_CFLAGS!$LIBXML_CFLAGS$ac_delim
+LIBXML_LIBS!$LIBXML_LIBS$ac_delim
+LIBXSLT_CFLAGS!$LIBXSLT_CFLAGS$ac_delim
+LIBXSLT_LIBS!$LIBXSLT_LIBS$ac_delim
+TOPSUBDIRS!$TOPSUBDIRS$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 59; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# 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
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ ac_file_inputs="$ac_file_inputs $ac_f"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input="Generated from "`IFS=:
+ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ fi
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin";;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+ 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&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out"; rm -f "$tmp/out";;
+ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+ esac
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+_ACEOF
+
+# Transform confdefs.h into a sed script `conftest.defines', that
+# substitutes the proper values into config.h.in to produce config.h.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status. If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless. But do not sort them, since the last
+# AC_DEFINE must be honored.
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
+ac_dB='\\)[ (].*,\\1define\\2'
+ac_dC=' '
+ac_dD=' ,'
+
+uniq confdefs.h |
+ sed -n '
+ t rset
+ :rset
+ s/^[ ]*#[ ]*define[ ][ ]*//
+ t ok
+ d
+ :ok
+ s/[\\&,]/\\&/g
+ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+ ' >>conftest.defines
+
+# Remove the space that was appended to ease matching.
+# Then replace #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[ #]*u.*,/* & */,' >>conftest.defines
+
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
+do
+ # Write a here document:
+ cat >>$CONFIG_STATUS <<_ACEOF
+ # First, check the format of the line:
+ cat >"\$tmp/defines.sed" <<\\CEOF
+/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
+/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
+b
+:def
+_ACEOF
+ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+ grep . conftest.tail >/dev/null || break
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines conftest.tail
+
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
+cat >>$CONFIG_STATUS <<\_ACEOF
+ if test x"$ac_file" != x-; then
+ echo "/* $configure_input */" >"$tmp/config.h"
+ cat "$ac_result" >>"$tmp/config.h"
+ 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
+ rm -f $ac_file
+ mv "$tmp/config.h" $ac_file
+ fi
+ else
+ echo "/* $configure_input */"
+ cat "$ac_result"
+ fi
+ rm -f "$tmp/out12"
+# 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" >`$as_dirname -- $ac_file ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X$ac_file : 'X\(//\)[^/]' \| \
+ X$ac_file : 'X\(//\)$' \| \
+ X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
+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
+ ;;
+
+ :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
+echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) 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=`$as_dirname -- "$mf" ||
+$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
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir=$dirpart/$fdir
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+
+ esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+if test "x$with_fast_perl" = "xyes"; then
+ perl -i.bak $ac_aux_dir/conf.change.pl $CONFIG_STATUS \
+ || mv $CONFIG_STATUS.bak $CONFIG_STATUS
+ rm -f $CONFIG_STATUS.bak
+fi
+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
+
+# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
+if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
+ # And if so, warn when they don't match
+ if test "$kde_libs_prefix" != "$given_prefix"; then
+ # And if kde doesn't know about the prefix yet
+ echo ":"`kde-config --path exe`":" | grep --color=never ":$given_prefix/bin/:" 2>&1 >/dev/null
+ if test $? -ne 0; then
+ echo ""
+ echo "Warning: you chose to install this package in $given_prefix,"
+ echo "but KDE was found in $kde_libs_prefix."
+ echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
+ echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
+ echo "Then restart KDE."
+ echo ""
+ fi
+ fi
+fi
+
+if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
+ echo ""
+ echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
+ echo "was not included. Therefore, GCC symbol visibility support remains disabled."
+ echo ""
+ echo "For better performance, consider including the Qt visibility supporting patch"
+ echo "located at:"
+ echo ""
+ echo "http://bugs.kde.org/show_bug.cgi?id=109386"
+ echo ""
+ echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
+ echo "everything will continue to work just fine without it."
+ echo ""
+fi
+
+if test "$all_tests" = "bad"; then
+ if test ! "$cache_file" = "/dev/null"; then
+ echo ""
+ echo "Please remove the file $cache_file after changing your setup"
+ echo "so that configure will find the changes next time."
+ echo ""
+ fi
+else
+ echo ""
+ echo "Good - your configure finished. Start make now"
+ echo ""
+fi
diff --git a/configure.files b/configure.files
new file mode 100644
index 0000000..030bce8
--- /dev/null
+++ b/configure.files
@@ -0,0 +1,2 @@
+./admin/configure.in.min
+configure.in.in
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..72c07da
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,139 @@
+dnl =======================================================
+dnl FILE: ./admin/configure.in.min
+dnl =======================================================
+
+dnl This file is part of the KDE libraries/packages
+dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
+
+dnl This file is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Library General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2 of the License, or (at your option) any later version.
+
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Library General Public License for more details.
+
+dnl You should have received a copy of the GNU Library General Public License
+dnl along with this library; see the file COPYING.LIB. If not, write to
+dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+dnl Boston, MA 02110-1301, USA.
+
+# Original Author was Kalle@kde.org
+# I lifted it in some mater. (Stephan Kulow)
+# I used much code from Janos Farkas
+
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT(acinclude.m4) dnl a source file from your sub dir
+
+dnl This is so we can use kde-common
+AC_CONFIG_AUX_DIR(admin)
+
+dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
+unset CDPATH
+
+dnl Checking host/target/build systems, for make, install etc.
+AC_CANONICAL_SYSTEM
+dnl Perform program name transformation
+AC_ARG_PROGRAM
+
+dnl Automake doc recommends to do this only here. (Janos)
+AM_INIT_AUTOMAKE(kbibtex, 0.2.3.91) dnl searches for some needed programs
+
+KDE_SET_PREFIX
+
+dnl generate the config header
+AM_CONFIG_HEADER(config.h) dnl at the distribution this done
+
+dnl Checks for programs.
+AC_CHECK_COMPILERS
+AC_ENABLE_SHARED(yes)
+AC_ENABLE_STATIC(no)
+KDE_PROG_LIBTOOL
+
+dnl for NLS support. Call them in this order!
+dnl WITH_NLS is for the po files
+AM_KDE_WITH_NLS
+
+KDE_USE_QT(3.0.0)
+AC_PATH_KDE
+dnl =======================================================
+dnl FILE: configure.in.in
+dnl =======================================================
+
+#MIN_CONFIG(3.0.0)
+
+dnl PACKAGE set before
+AC_C_BIGENDIAN
+AC_CHECK_KDEMAXPATHLEN
+
+PKG_CHECK_MODULES([LIBYAZ], [yaz], [AC_DEFINE([HAVE_YAZ],1,[Define to 1 if you have the YAZ library installed.])],[AC_MSG_RESULT(no)])
+AC_SUBST(LIBYAZ_CFLAGS)
+AC_SUBST(LIBYAZ_LIBS)
+AC_SUBST(LIBYAZ_RPATH)
+
+PKG_CHECK_MODULES([LIBXML], [libxml-2.0], [AC_DEFINE([HAVE_XML],1,[Define to 1 if you have libxml installed.])],[AC_MSG_RESULT(no)])
+AC_SUBST(LIBXML_LIBS)
+AC_SUBST(LIBXML_CFLAGS)
+
+PKG_CHECK_MODULES([LIBXSLT], [libxslt], [AC_DEFINE([HAVE_XSLT],1,[Define to 1 if you have libxslt installed.])],[AC_MSG_RESULT(no)])
+AC_SUBST(LIBXSLT_LIBS)
+AC_SUBST(LIBXSLT_CFLAGS)
+
+
+KDE_CREATE_SUBDIRSLIST
+AC_CONFIG_FILES([ Makefile ])
+AC_CONFIG_FILES([ doc/Makefile ])
+AC_CONFIG_FILES([ doc/en/Makefile ])
+AC_CONFIG_FILES([ man/Makefile ])
+AC_CONFIG_FILES([ po/Makefile ])
+AC_CONFIG_FILES([ src/Makefile ])
+AC_CONFIG_FILES([ xslt/Makefile ])
+AC_OUTPUT
+# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
+if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
+ # And if so, warn when they don't match
+ if test "$kde_libs_prefix" != "$given_prefix"; then
+ # And if kde doesn't know about the prefix yet
+ echo ":"`kde-config --path exe`":" | grep --color=never ":$given_prefix/bin/:" 2>&1 >/dev/null
+ if test $? -ne 0; then
+ echo ""
+ echo "Warning: you chose to install this package in $given_prefix,"
+ echo "but KDE was found in $kde_libs_prefix."
+ echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
+ echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
+ echo "Then restart KDE."
+ echo ""
+ fi
+ fi
+fi
+
+if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
+ echo ""
+ echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
+ echo "was not included. Therefore, GCC symbol visibility support remains disabled."
+ echo ""
+ echo "For better performance, consider including the Qt visibility supporting patch"
+ echo "located at:"
+ echo ""
+ echo "http://bugs.kde.org/show_bug.cgi?id=109386"
+ echo ""
+ echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
+ echo "everything will continue to work just fine without it."
+ echo ""
+fi
+
+if test "$all_tests" = "bad"; then
+ if test ! "$cache_file" = "/dev/null"; then
+ echo ""
+ echo "Please remove the file $cache_file after changing your setup"
+ echo "so that configure will find the changes next time."
+ echo ""
+ fi
+else
+ echo ""
+ echo "Good - your configure finished. Start make now"
+ echo ""
+fi
diff --git a/configure.in.in b/configure.in.in
new file mode 100644
index 0000000..8468170
--- /dev/null
+++ b/configure.in.in
@@ -0,0 +1,20 @@
+#MIN_CONFIG(3.0.0)
+
+AM_INIT_AUTOMAKE(kbibtex, 0.2.3.91)
+AC_C_BIGENDIAN
+AC_CHECK_KDEMAXPATHLEN
+
+PKG_CHECK_MODULES([LIBYAZ], [yaz], [AC_DEFINE([HAVE_YAZ],1,[Define to 1 if you have the YAZ library installed.])],[AC_MSG_RESULT(no)])
+AC_SUBST(LIBYAZ_CFLAGS)
+AC_SUBST(LIBYAZ_LIBS)
+AC_SUBST(LIBYAZ_RPATH)
+
+PKG_CHECK_MODULES([LIBXML], [libxml-2.0], [AC_DEFINE([HAVE_XML],1,[Define to 1 if you have libxml installed.])],[AC_MSG_RESULT(no)])
+AC_SUBST(LIBXML_LIBS)
+AC_SUBST(LIBXML_CFLAGS)
+
+PKG_CHECK_MODULES([LIBXSLT], [libxslt], [AC_DEFINE([HAVE_XSLT],1,[Define to 1 if you have libxslt installed.])],[AC_MSG_RESULT(no)])
+AC_SUBST(LIBXSLT_LIBS)
+AC_SUBST(LIBXSLT_CFLAGS)
+
+
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..81fee21
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = en
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644
index 0000000..cc5e870
--- /dev/null
+++ b/doc/Makefile.in
@@ -0,0 +1,721 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = doc
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+#>- RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+#>- html-recursive info-recursive install-data-recursive \
+#>- install-exec-recursive install-info-recursive \
+#>- install-recursive installcheck-recursive installdirs-recursive \
+#>- pdf-recursive ps-recursive uninstall-info-recursive \
+#>- uninstall-recursive
+#>+ 6
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive nmcheck-recursive bcheck-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSCCONFIG = @ARTSCCONFIG@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOPIDLNG = @DCOPIDLNG@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KCFG_DEPENDENCIES = @KCFG_DEPENDENCIES@
+KCONFIG_COMPILER = @KCONFIG_COMPILER@
+KDECONFIG = @KDECONFIG@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_RPATH = @KDE_RPATH@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_FPIE = @KDE_USE_FPIE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+KDE_USE_PIE = @KDE_USE_PIE@
+KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBYAZ_CFLAGS = @LIBYAZ_CFLAGS@
+LIBYAZ_LIBS = @LIBYAZ_LIBS@
+LIBYAZ_RPATH = @LIBYAZ_RPATH@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KABC = @LIB_KABC@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDED = @LIB_KDED@
+LIB_KDEPIM = @LIB_KDEPIM@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KDNSSD = @LIB_KDNSSD@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIMPROXY = @LIB_KIMPROXY@
+LIB_KIO = @LIB_KIO@
+LIB_KJS = @LIB_KJS@
+LIB_KNEWSTUFF = @LIB_KNEWSTUFF@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_KUNITTEST = @LIB_KUNITTEST@
+LIB_KUTILS = @LIB_KUTILS@
+LIB_POLL = @LIB_POLL@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LIB_XRENDER = @LIB_XRENDER@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKEKDEWIDGETS = @MAKEKDEWIDGETS@
+MCOPIDL = @MCOPIDL@
+MEINPROC = @MEINPROC@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+XGETTEXT = @XGETTEXT@
+XMKMF = @XMKMF@
+XMLLINT = @XMLLINT@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+X_PRE_LIBS = @X_PRE_LIBS@
+X_RPATH = @X_RPATH@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+include_ARTS_FALSE = @include_ARTS_FALSE@
+include_ARTS_TRUE = @include_ARTS_TRUE@
+include_x11_FALSE = @include_x11_FALSE@
+include_x11_TRUE = @include_x11_TRUE@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_kcfgdir = @kde_kcfgdir@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+kdeinitdir = @kdeinitdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+xdg_appsdir = @xdg_appsdir@
+xdg_directorydir = @xdg_directorydir@
+xdg_menudir = @xdg_menudir@
+SUBDIRS = en
+#>- all: all-recursive
+#>+ 1
+all: docs-am all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu doc/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/Makefile
+ cd $(top_srcdir) && perl admin/am_edit doc/Makefile.in
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+# 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):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ 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) \
+ || eval $$failcom; \
+ 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:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ 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) \
+ || eval $$failcom; \
+ 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
+
+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
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ 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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(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
+
+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"; \
+ $(mkdir_p) "$(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='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-recursive
+
+#>- clean-am: clean-generic clean-libtool mostlyclean-am
+#>+ 1
+clean-am: clean-bcheck clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -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-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 distclean distclean-generic distclean-libtool \
+ distclean-recursive distclean-tags distdir dvi dvi-am html \
+ html-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-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-libtool \
+ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-info-am
+
+# 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:
+
+#>+ 2
+KDE_DIST=Makefile.in Makefile.am
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/Makefile
+ cd $(top_srcdir) && perl admin/am_edit doc/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-recursive
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXX) $(DEFS) -I. -I$(srcdir) -I$(top_builddir) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/doc/en/Makefile.am b/doc/en/Makefile.am
new file mode 100644
index 0000000..1bbcebb
--- /dev/null
+++ b/doc/en/Makefile.am
@@ -0,0 +1,2 @@
+KDE_LANG = en
+KDE_DOCS = kbibtex
diff --git a/doc/en/Makefile.in b/doc/en/Makefile.in
new file mode 100644
index 0000000..a7c41b9
--- /dev/null
+++ b/doc/en/Makefile.in
@@ -0,0 +1,606 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = doc/en
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSCCONFIG = @ARTSCCONFIG@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOPIDLNG = @DCOPIDLNG@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KCFG_DEPENDENCIES = @KCFG_DEPENDENCIES@
+KCONFIG_COMPILER = @KCONFIG_COMPILER@
+KDECONFIG = @KDECONFIG@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_RPATH = @KDE_RPATH@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_FPIE = @KDE_USE_FPIE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+KDE_USE_PIE = @KDE_USE_PIE@
+KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBYAZ_CFLAGS = @LIBYAZ_CFLAGS@
+LIBYAZ_LIBS = @LIBYAZ_LIBS@
+LIBYAZ_RPATH = @LIBYAZ_RPATH@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KABC = @LIB_KABC@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDED = @LIB_KDED@
+LIB_KDEPIM = @LIB_KDEPIM@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KDNSSD = @LIB_KDNSSD@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIMPROXY = @LIB_KIMPROXY@
+LIB_KIO = @LIB_KIO@
+LIB_KJS = @LIB_KJS@
+LIB_KNEWSTUFF = @LIB_KNEWSTUFF@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_KUNITTEST = @LIB_KUNITTEST@
+LIB_KUTILS = @LIB_KUTILS@
+LIB_POLL = @LIB_POLL@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LIB_XRENDER = @LIB_XRENDER@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKEKDEWIDGETS = @MAKEKDEWIDGETS@
+MCOPIDL = @MCOPIDL@
+MEINPROC = @MEINPROC@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+XGETTEXT = @XGETTEXT@
+XMKMF = @XMKMF@
+XMLLINT = @XMLLINT@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+X_PRE_LIBS = @X_PRE_LIBS@
+X_RPATH = @X_RPATH@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+include_ARTS_FALSE = @include_ARTS_FALSE@
+include_ARTS_TRUE = @include_ARTS_TRUE@
+include_x11_FALSE = @include_x11_FALSE@
+include_x11_TRUE = @include_x11_TRUE@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_kcfgdir = @kde_kcfgdir@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+kdeinitdir = @kdeinitdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+xdg_appsdir = @xdg_appsdir@
+xdg_directorydir = @xdg_directorydir@
+xdg_menudir = @xdg_menudir@
+KDE_LANG = en
+KDE_DOCS = kbibtex
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/en/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu doc/en/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/en/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/en/Makefile
+ cd $(top_srcdir) && perl admin/am_edit doc/en/Makefile.in
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+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:
+
+
+#>- distdir: $(DISTFILES)
+#>+ 1
+distdir: distdir-nls $(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"; \
+ $(mkdir_p) "$(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
+#>+ 1
+uninstall: uninstall-docs uninstall-nls 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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libtool mostlyclean-am
+#>+ 1
+clean-am: clean-docs clean-bcheck 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:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+#>- install-data-am:
+#>+ 1
+install-data-am: install-docs install-nls
+
+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
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-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-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
+
+# 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:
+
+#>+ 2
+KDE_DIST=Makefile.in index.docbook Makefile.am
+
+#>+ 24
+index.cache.bz2: $(srcdir)/index.docbook $(KDE_XSL_STYLESHEET) index.docbook
+ @if test -n "$(MEINPROC)"; then echo $(MEINPROC) --check --cache index.cache.bz2 $(srcdir)/index.docbook; $(MEINPROC) --check --cache index.cache.bz2 $(srcdir)/index.docbook; fi
+
+docs-am: index.cache.bz2
+
+install-docs: docs-am install-nls
+ $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kbibtex
+ @if test -f index.cache.bz2; then \
+ echo $(INSTALL_DATA) index.cache.bz2 $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kbibtex/; \
+ $(INSTALL_DATA) index.cache.bz2 $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kbibtex/; \
+ elif test -f $(srcdir)/index.cache.bz2; then \
+ echo $(INSTALL_DATA) $(srcdir)/index.cache.bz2 $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kbibtex/; \
+ $(INSTALL_DATA) $(srcdir)/index.cache.bz2 $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kbibtex/; \
+ fi
+ -rm -f $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kbibtex/common
+ $(LN_S) $(kde_libs_htmldir)/$(KDE_LANG)/common $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kbibtex/common
+
+uninstall-docs:
+ -rm -rf $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kbibtex
+
+clean-docs:
+ -rm -f index.cache.bz2
+
+
+#>+ 13
+install-nls:
+ $(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kbibtex
+ @for base in index.docbook ; do \
+ echo $(INSTALL_DATA) $$base $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kbibtex/$$base ;\
+ $(INSTALL_DATA) $(srcdir)/$$base $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kbibtex/$$base ;\
+ done
+
+uninstall-nls:
+ for base in index.docbook ; do \
+ rm -f $(DESTDIR)$(kde_htmldir)/$(KDE_LANG)/kbibtex/$$base ;\
+ done
+
+
+#>+ 5
+distdir-nls:
+ for file in index.docbook ; do \
+ cp $(srcdir)/$$file $(distdir); \
+ done
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/en/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/en/Makefile
+ cd $(top_srcdir) && perl admin/am_edit doc/en/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXX) $(DEFS) -I. -I$(srcdir) -I$(top_builddir) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/doc/en/index.docbook b/doc/en/index.docbook
new file mode 100644
index 0000000..313503d
--- /dev/null
+++ b/doc/en/index.docbook
@@ -0,0 +1,106 @@
+<?xml version="1.0" ?>
+<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN"
+"dtd/kdex.dtd" [
+ <!ENTITY kbibtex "<application>KBibTeX</application>" >
+ <!ENTITY kappname "&kbibtex;">
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE"><!-- change language only here -->
+]>
+
+<book lang="&language;">
+<title>The KBibTeX Handbook</title>
+
+<bookinfo>
+<authorgroup>
+<author><personname><firstname>Thomas</firstname><surname>Fischer</surname></personname>
+<email>fischer@unix-ag.uni-kl.de</email></author>
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+</authorgroup>
+
+<copyright>
+<year>2005</year>
+<holder>Thomas Fischer</holder>
+</copyright>
+
+<legalnotice>&GPLNotice;</legalnotice>
+
+<date>2005-11-26</date>
+<releaseinfo>0.00.01</releaseinfo>
+
+<abstract>
+<para>&kbibtex; is a BibTeX editor for &kde; 3.3 and above.</para>
+
+<para>This handbook documents &kbibtex; Version 0.2.x</para>
+</abstract>
+
+<keywordset>
+<keyword>KDE</keyword>
+<keyword>KBibTeX</keyword>
+</keywordset>
+
+</bookinfo>
+
+
+<chapter id="introduction">
+<title>Introduction</title>
+
+<para>
+Welcome to &kbibtex;, a BibTeX editor for &kde; version 3.3 and
+above. &kbibtex; allows you to create, edit and export bibliography
+documents. Supported formats include BibTeX and, limited, EndNote.
+</para>
+
+<para>
+&kbibtex; offers the user a simple, yet powerful interface to edit
+and maintain bibliography databases.
+</para>
+
+<section id="helpwanted">
+<title>Help Wanted</title>
+
+<para>
+Currently, this help is only a stub. If you are interested
+in writing a more comprehensive help documentation, please contact
+Thomas Fischer (Project Manager).
+</para>
+
+</section>
+
+</chapter>
+
+<chapter id="credits">
+
+<title>Credits and License</title>
+
+<para>
+&kbibtex; Program copyright 2004, 2005 by the &kbibtex; developer team.
+</para>
+
+<variablelist>
+<title>The &kbibtex; team:</title>
+<varlistentry>
+<term>Thomas Fischer <email>fischer@unix-ag.uni-kl.de</email></term>
+<listitem><para>Project Manager &amp; Core Developer</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>Documentation copyright 2005 Thomas Fischer
+<email>fischer@unix-ag.uni-kl.de</email></para>
+
+&underGPL; <!-- GPL License -->
+
+</chapter>
+
+
+</book>
+
+<!--
+Local Variables:
+mode: sgml
+sgml-namecase-general: t
+sgml-namecase-entity: nil
+sgml-general-insert-case: lower
+sgml-minimize-attributes: nil
+sgml-omittag: nil
+End:
+-->
diff --git a/kbibtex.kdevelop b/kbibtex.kdevelop
new file mode 100644
index 0000000..8bf4846
--- /dev/null
+++ b/kbibtex.kdevelop
@@ -0,0 +1,299 @@
+<?xml version = '1.0'?>
+<kdevelop>
+ <general>
+ <author>Thomas Fischer</author>
+ <email>fischer@unix-ag.uni-kl.de</email>
+ <version>0.2.3.91</version>
+ <projectmanagement>KDevKDEAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>C++</keyword>
+ <keyword>Code</keyword>
+ <keyword>Qt</keyword>
+ <keyword>KDE</keyword>
+ </keywords>
+ <projectdirectory>.</projectdirectory>
+ <absoluteprojectpath>false</absoluteprojectpath>
+ <description/>
+ <ignoreparts/>
+ <secondaryLanguages/>
+ <defaultencoding/>
+ <versioncontrol>kdevsubversion</versioncontrol>
+ <projectname>kbibtex</projectname>
+ </general>
+ <kdevautoproject>
+ <general>
+ <activetarget>src/kbibtex</activetarget>
+ <useconfiguration>debug</useconfiguration>
+ </general>
+ <run>
+ <mainprogram>/home/fish/playground/kbibtexKDE3/debug/src/kbibtex</mainprogram>
+ <directoryradio>build</directoryradio>
+ <customdirectory>/</customdirectory>
+ <programargs>--geometry 960x720+0+0</programargs>
+ <terminal>false</terminal>
+ <autocompile>true</autocompile>
+ <envvars>
+ <envvar value="en_US.utf8" name="LANG" />
+ <envvar value="C" name="LC_ALL" />
+ </envvars>
+ <autoinstall>false</autoinstall>
+ <autokdesu>false</autokdesu>
+ <globaldebugarguments/>
+ <globalcwd>/home/fish/playground/kbibtexKDE3/testset</globalcwd>
+ <useglobalprogram>true</useglobalprogram>
+ </run>
+ <configurations>
+ <optimized>
+ <builddir>optimized</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O2 -g0</cxxflags>
+ </optimized>
+ <debug>
+ <configargs>--enable-debug=full --without-arts</configargs>
+ <builddir>debug</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-Wall -g3 -O0</cxxflags>
+ <envvars>
+ <envvar value="en_US.utf8" name="LANG" />
+ <envvar value="C" name="LC_ALL" />
+ </envvars>
+ <topsourcedir/>
+ <cppflags>`xml2-config --cflags` `xslt-config --cflags`</cppflags>
+ <ldflags>`xml2-config --libs` `xslt-config --libs`</ldflags>
+ <ccompilerbinary/>
+ <cxxcompilerbinary>g++</cxxcompilerbinary>
+ <f77compilerbinary>g77</f77compilerbinary>
+ <cflags>-Wall -g3 -O0</cflags>
+ <f77flags/>
+ </debug>
+ <profiling>
+ <envvars/>
+ <configargs>--without-arts</configargs>
+ <builddir>profiling</builddir>
+ <topsourcedir/>
+ <cppflags>`xml2-config --cflags` `xslt-config --cflags`</cppflags>
+ <ldflags>`xml2-config --libs` `xslt-config --libs`</ldflags>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags>-Wall -O1 -pg</cflags>
+ <cxxflags>-Wall -O1 -pg</cxxflags>
+ <f77flags/>
+ </profiling>
+ <default>
+ <envvars/>
+ <configargs>--without-arts</configargs>
+ <builddir>default</builddir>
+ <topsourcedir/>
+ <cppflags>`xml2-config --cflags` `xslt-config --cflags`</cppflags>
+ <ldflags>`xml2-config --libs` `xslt-config --libs`</ldflags>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags>-Wall -O2</cflags>
+ <cxxflags>-Wall -O2</cxxflags>
+ <f77flags/>
+ </default>
+ </configurations>
+ <make>
+ <envvars>
+ <envvar value="en_US.utf8" name="LANG" />
+ <envvar value="C" name="LC_ALL" />
+ </envvars>
+ <abortonerror>true</abortonerror>
+ <numberofjobs>2</numberofjobs>
+ <dontact>false</dontact>
+ <makebin/>
+ <prio>2</prio>
+ <runmultiplejobs>false</runmultiplejobs>
+ </make>
+ </kdevautoproject>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.1" name="Man Pages" />
+ <group pattern="*.cpp;*.cxx;*.h" name="Sources" />
+ <group pattern="*.ui" name="User Interface" />
+ <group pattern="*.png" name="Icons" />
+ <group pattern="*.po;*.ts" name="Translations" />
+ <group pattern="*" name="Others" />
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidenonlocation>false</hidenonlocation>
+ </groups>
+ <tree>
+ <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <showvcsfields>false</showvcsfields>
+ </tree>
+ </kdevfileview>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>clanlib</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>php</toc>
+ <toc>php_bugs</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>w3c-svg</toc>
+ <toc>sw</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>qmake User Guide</toc>
+ </ignoreqt_xml>
+ </kdevdoctreeview>
+ <kdevdebugger>
+ <general>
+ <dbgshell>/usr/bin/libtool</dbgshell>
+ <programargs>--geometry 800x640+0+0</programargs>
+ <gdbpath>/usr/bin/gdb</gdbpath>
+ <configGdbScript/>
+ <runShellScript/>
+ <runGdbScript/>
+ <breakonloadinglibs>true</breakonloadinglibs>
+ <separatetty>false</separatetty>
+ <floatingtoolbar>false</floatingtoolbar>
+ <raiseGDBOnStart>false</raiseGDBOnStart>
+ </general>
+ <display>
+ <staticmembers>true</staticmembers>
+ <demanglenames>true</demanglenames>
+ <outputradix>16</outputradix>
+ </display>
+ </kdevdebugger>
+ <kdevfilecreate>
+ <filetypes/>
+ <useglobaltypes>
+ <type ext="ui" />
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevcppsupport>
+ <references/>
+ <codecompletion>
+ <includeGlobalFunctions>true</includeGlobalFunctions>
+ <includeTypes>true</includeTypes>
+ <includeEnums>true</includeEnums>
+ <includeTypedefs>false</includeTypedefs>
+ <automaticCodeCompletion>false</automaticCodeCompletion>
+ <automaticArgumentsHint>false</automaticArgumentsHint>
+ <automaticHeaderCompletion>true</automaticHeaderCompletion>
+ <codeCompletionDelay>250</codeCompletionDelay>
+ <argumentsHintDelay>400</argumentsHintDelay>
+ <headerCompletionDelay>250</headerCompletionDelay>
+ <showOnlyAccessibleItems>false</showOnlyAccessibleItems>
+ <completionBoxItemOrder>0</completionBoxItemOrder>
+ <howEvaluationContextMenu>true</howEvaluationContextMenu>
+ <showCommentWithArgumentHint>true</showCommentWithArgumentHint>
+ <statusBarTypeEvaluation>true</statusBarTypeEvaluation>
+ <namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
+ <processPrimaryTypes>true</processPrimaryTypes>
+ <processFunctionArguments>true</processFunctionArguments>
+ <preProcessAllHeaders>true</preProcessAllHeaders>
+ <parseMissingHeaders>false</parseMissingHeaders>
+ <resolveIncludePaths>true</resolveIncludePaths>
+ <alwaysParseInBackground>true</alwaysParseInBackground>
+ <usePermanentCaching>true</usePermanentCaching>
+ <alwaysIncludeNamespaces>true</alwaysIncludeNamespaces>
+ <includePaths>.;</includePaths>
+ <parseMissingHeadersExperimental>false</parseMissingHeadersExperimental>
+ <resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
+ </codecompletion>
+ <creategettersetter>
+ <prefixGet/>
+ <prefixSet>set</prefixSet>
+ <prefixVariable>m_,_</prefixVariable>
+ <parameterName>theValue</parameterName>
+ <inlineGet>true</inlineGet>
+ <inlineSet>true</inlineSet>
+ </creategettersetter>
+ <qt>
+ <used>true</used>
+ <version>3</version>
+ <root>/usr/lib/qt3</root>
+ <includestyle>3</includestyle>
+ <designerintegration>ExternalDesigner</designerintegration>
+ <qmake>/usr/lib/qt3/bin/qmake</qmake>
+ <designer>/usr/lib/qt3/bin/designer</designer>
+ <designerpluginpaths/>
+ </qt>
+ <splitheadersource>
+ <enabled>false</enabled>
+ <synchronize>true</synchronize>
+ <orientation>Vertical</orientation>
+ </splitheadersource>
+ </kdevcppsupport>
+ <dist>
+ <custom>false</custom>
+ <bzip>false</bzip>
+ <archname/>
+ <appname>kbibtex</appname>
+ <version>0.2.3.91</version>
+ <release/>
+ <vendor/>
+ <licence/>
+ <summary/>
+ <group/>
+ <packager/>
+ <description/>
+ <changelog/>
+ <devpackage>false</devpackage>
+ <docspackage>false</docspackage>
+ <appicon>false</appicon>
+ <arch>0</arch>
+ <genHTML>false</genHTML>
+ <useRPM>false</useRPM>
+ <ftpkde>false</ftpkde>
+ <appskde>false</appskde>
+ <url/>
+ </dist>
+ <cppsupportpart>
+ <filetemplates>
+ <interfacesuffix>.h</interfacesuffix>
+ <implementationsuffix>.cpp</implementationsuffix>
+ </filetemplates>
+ </cppsupportpart>
+ <kdevdocumentation>
+ <projectdoc>
+ <docsystem/>
+ <docurl/>
+ <usermanualurl/>
+ </projectdoc>
+ </kdevdocumentation>
+ <ctagspart>
+ <customArguments/>
+ <customTagfilePath>//home/fish/playground/kbibtexKDE3/tags</customTagfilePath>
+ <activeTagsFiles/>
+ </ctagspart>
+</kdevelop>
diff --git a/kbibtex.kdevelop.pcs b/kbibtex.kdevelop.pcs
new file mode 100644
index 0000000..b2eb093
--- /dev/null
+++ b/kbibtex.kdevelop.pcs
Binary files differ
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 0000000..bdf945d
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,2 @@
+kbibtex_man_DATA = kbibtex.1
+kbibtex_mandir = $(mandir)/man1
diff --git a/man/Makefile.in b/man/Makefile.in
new file mode 100644
index 0000000..d05c4a2
--- /dev/null
+++ b/man/Makefile.in
@@ -0,0 +1,589 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = man
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(kbibtex_mandir)"
+kbibtex_manDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(kbibtex_man_DATA)
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSCCONFIG = @ARTSCCONFIG@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOPIDLNG = @DCOPIDLNG@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KCFG_DEPENDENCIES = @KCFG_DEPENDENCIES@
+KCONFIG_COMPILER = @KCONFIG_COMPILER@
+KDECONFIG = @KDECONFIG@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_RPATH = @KDE_RPATH@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_FPIE = @KDE_USE_FPIE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+KDE_USE_PIE = @KDE_USE_PIE@
+KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBYAZ_CFLAGS = @LIBYAZ_CFLAGS@
+LIBYAZ_LIBS = @LIBYAZ_LIBS@
+LIBYAZ_RPATH = @LIBYAZ_RPATH@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KABC = @LIB_KABC@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDED = @LIB_KDED@
+LIB_KDEPIM = @LIB_KDEPIM@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KDNSSD = @LIB_KDNSSD@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIMPROXY = @LIB_KIMPROXY@
+LIB_KIO = @LIB_KIO@
+LIB_KJS = @LIB_KJS@
+LIB_KNEWSTUFF = @LIB_KNEWSTUFF@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_KUNITTEST = @LIB_KUNITTEST@
+LIB_KUTILS = @LIB_KUTILS@
+LIB_POLL = @LIB_POLL@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LIB_XRENDER = @LIB_XRENDER@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKEKDEWIDGETS = @MAKEKDEWIDGETS@
+MCOPIDL = @MCOPIDL@
+MEINPROC = @MEINPROC@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+XGETTEXT = @XGETTEXT@
+XMKMF = @XMKMF@
+XMLLINT = @XMLLINT@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+X_PRE_LIBS = @X_PRE_LIBS@
+X_RPATH = @X_RPATH@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+include_ARTS_FALSE = @include_ARTS_FALSE@
+include_ARTS_TRUE = @include_ARTS_TRUE@
+include_x11_FALSE = @include_x11_FALSE@
+include_x11_TRUE = @include_x11_TRUE@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_kcfgdir = @kde_kcfgdir@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+kdeinitdir = @kdeinitdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+xdg_appsdir = @xdg_appsdir@
+xdg_directorydir = @xdg_directorydir@
+xdg_menudir = @xdg_menudir@
+kbibtex_man_DATA = kbibtex.1
+kbibtex_mandir = $(mandir)/man1
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu man/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu man/Makefile
+ cd $(top_srcdir) && perl admin/am_edit man/Makefile.in
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+install-kbibtex_manDATA: $(kbibtex_man_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(kbibtex_mandir)" || $(mkdir_p) "$(DESTDIR)$(kbibtex_mandir)"
+ @list='$(kbibtex_man_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(kbibtex_manDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(kbibtex_mandir)/$$f'"; \
+ $(kbibtex_manDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(kbibtex_mandir)/$$f"; \
+ done
+
+uninstall-kbibtex_manDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(kbibtex_man_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(kbibtex_mandir)/$$f'"; \
+ rm -f "$(DESTDIR)$(kbibtex_mandir)/$$f"; \
+ done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+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"; \
+ $(mkdir_p) "$(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 $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(kbibtex_mandir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libtool mostlyclean-am
+#>+ 1
+clean-am: clean-bcheck 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:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-kbibtex_manDATA
+
+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-kbibtex_manDATA
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-exec install-exec-am \
+ install-info install-info-am install-kbibtex_manDATA \
+ 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-kbibtex_manDATA
+
+# 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:
+
+#>+ 2
+KDE_DIST=Makefile.in kbibtex.1 Makefile.am
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu man/Makefile
+ cd $(top_srcdir) && perl admin/am_edit man/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXX) $(DEFS) -I. -I$(srcdir) -I$(top_builddir) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/man/kbibtex.1 b/man/kbibtex.1
new file mode 100644
index 0000000..78be2cd
--- /dev/null
+++ b/man/kbibtex.1
@@ -0,0 +1,25 @@
+.\"
+.TH "KBibTeX" "1" "11 September 2005" "KDE" "KDE Application"
+.SH "NAME"
+kbibtex \- a bibtex editor for KDE
+
+.SH "SYNOPSIS"
+.B kbibtex
+[\fIQt\-options\fR] [\fIKDE\-options\fR] [\fIfile\fR]
+.SH "DESCRIPTION"
+KBibTeX is a BibTeX editor for KDE written by Thomas Fischer and released under the GPL.
+
+KBibTeX can be started as a stand\-alone program or embedded into virtually every KDE program (e.g. Konqueror).
+
+It supports searching for citations via Google and CiteSeer.
+.SH "AUTHOR"
+Thomas Fischer <fischer@unix\-ag.uni\-kl.de>
+
+.SH "SEE ALSO"
+.BR bibtex "(1)"
+.PP
+The \fBkbibtex\fR homepage at:
+.I http://www.unix\-ag.uni\-kl.de/~fischer/kbibtex/
+
+.SH "BUGS"
+When reporting bugs, please submit the BibTeX file for diagnostics, too.
diff --git a/po/Makefile.am b/po/Makefile.am
new file mode 100644
index 0000000..59773af
--- /dev/null
+++ b/po/Makefile.am
@@ -0,0 +1,2 @@
+POFILES = AUTO
+EXTRA_DIST = kbibtex.pot
diff --git a/po/Makefile.in b/po/Makefile.in
new file mode 100644
index 0000000..38084a8
--- /dev/null
+++ b/po/Makefile.in
@@ -0,0 +1,628 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = po
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+#>+ 1
+DISTFILES = $(GMOFILES) $(POFILES) $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSCCONFIG = @ARTSCCONFIG@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOPIDLNG = @DCOPIDLNG@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KCFG_DEPENDENCIES = @KCFG_DEPENDENCIES@
+KCONFIG_COMPILER = @KCONFIG_COMPILER@
+KDECONFIG = @KDECONFIG@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_RPATH = @KDE_RPATH@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_FPIE = @KDE_USE_FPIE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+KDE_USE_PIE = @KDE_USE_PIE@
+KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBYAZ_CFLAGS = @LIBYAZ_CFLAGS@
+LIBYAZ_LIBS = @LIBYAZ_LIBS@
+LIBYAZ_RPATH = @LIBYAZ_RPATH@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KABC = @LIB_KABC@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDED = @LIB_KDED@
+LIB_KDEPIM = @LIB_KDEPIM@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KDNSSD = @LIB_KDNSSD@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIMPROXY = @LIB_KIMPROXY@
+LIB_KIO = @LIB_KIO@
+LIB_KJS = @LIB_KJS@
+LIB_KNEWSTUFF = @LIB_KNEWSTUFF@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_KUNITTEST = @LIB_KUNITTEST@
+LIB_KUTILS = @LIB_KUTILS@
+LIB_POLL = @LIB_POLL@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LIB_XRENDER = @LIB_XRENDER@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKEKDEWIDGETS = @MAKEKDEWIDGETS@
+MCOPIDL = @MCOPIDL@
+MEINPROC = @MEINPROC@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+XGETTEXT = @XGETTEXT@
+XMKMF = @XMKMF@
+XMLLINT = @XMLLINT@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+X_PRE_LIBS = @X_PRE_LIBS@
+X_RPATH = @X_RPATH@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+include_ARTS_FALSE = @include_ARTS_FALSE@
+include_ARTS_TRUE = @include_ARTS_TRUE@
+include_x11_FALSE = @include_x11_FALSE@
+include_x11_TRUE = @include_x11_TRUE@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_kcfgdir = @kde_kcfgdir@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+kdeinitdir = @kdeinitdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+xdg_appsdir = @xdg_appsdir@
+xdg_directorydir = @xdg_directorydir@
+xdg_menudir = @xdg_menudir@
+#>- POFILES = AUTO
+#>+ 2
+POFILES = de.po it.po fr.po pl.po ru.po
+GMOFILES = de.gmo it.gmo fr.gmo pl.gmo ru.gmo
+EXTRA_DIST = kbibtex.pot
+#>- all: all-am
+#>+ 1
+all: all-nls docs-am all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu po/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu po/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu po/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu po/Makefile
+ cd $(top_srcdir) && perl admin/am_edit po/Makefile.in
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+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:
+
+
+#>- distdir: $(DISTFILES)
+#>+ 1
+distdir: distdir-nls $(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"; \
+ $(mkdir_p) "$(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
+#>+ 1
+uninstall: uninstall-nls 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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libtool mostlyclean-am
+#>+ 1
+clean-am: clean-bcheck 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:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+#>- install-data-am:
+#>+ 1
+install-data-am: install-nls
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+#>- maintainer-clean: maintainer-clean-am
+#>+ 1
+maintainer-clean: clean-nls 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
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-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-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
+
+# 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:
+
+#>+ 2
+KDE_DIST=Makefile.in ru.po messages.sh pl.po de.po fr.po it.po Makefile.am
+
+#>+ 16
+de.gmo: de.po
+ rm -f de.gmo; $(GMSGFMT) -o de.gmo $(srcdir)/de.po
+ test ! -f de.gmo || touch de.gmo
+it.gmo: it.po
+ rm -f it.gmo; $(GMSGFMT) -o it.gmo $(srcdir)/it.po
+ test ! -f it.gmo || touch it.gmo
+fr.gmo: fr.po
+ rm -f fr.gmo; $(GMSGFMT) -o fr.gmo $(srcdir)/fr.po
+ test ! -f fr.gmo || touch fr.gmo
+pl.gmo: pl.po
+ rm -f pl.gmo; $(GMSGFMT) -o pl.gmo $(srcdir)/pl.po
+ test ! -f pl.gmo || touch pl.gmo
+ru.gmo: ru.po
+ rm -f ru.gmo; $(GMSGFMT) -o ru.gmo $(srcdir)/ru.po
+ test ! -f ru.gmo || touch ru.gmo
+
+#>+ 3
+clean-nls:
+ -rm -f de.gmo it.gmo fr.gmo pl.gmo ru.gmo
+
+#>+ 10
+install-nls:
+ @for base in de it fr pl ru ; do \
+ echo $(INSTALL_DATA) $$base.gmo $(DESTDIR)$(kde_locale)/$$base/LC_MESSAGES/$(PACKAGE).mo ;\
+ $(mkinstalldirs) $(DESTDIR)$(kde_locale)/$$base/LC_MESSAGES ; \
+ if test -f $$base.gmo; then $(INSTALL_DATA) $$base.gmo $(DESTDIR)$(kde_locale)/$$base/LC_MESSAGES/$(PACKAGE).mo ;\
+ elif test -f $(srcdir)/$$base.gmo; then $(INSTALL_DATA) $(srcdir)/$$base.gmo $(DESTDIR)$(kde_locale)/$$base/LC_MESSAGES/$(PACKAGE).mo ;\
+ fi ;\
+ done
+
+
+#>+ 7
+uninstall-nls:
+ rm -f $(DESTDIR)$(kde_locale)/de/LC_MESSAGES/$(PACKAGE).mo
+ rm -f $(DESTDIR)$(kde_locale)/it/LC_MESSAGES/$(PACKAGE).mo
+ rm -f $(DESTDIR)$(kde_locale)/fr/LC_MESSAGES/$(PACKAGE).mo
+ rm -f $(DESTDIR)$(kde_locale)/pl/LC_MESSAGES/$(PACKAGE).mo
+ rm -f $(DESTDIR)$(kde_locale)/ru/LC_MESSAGES/$(PACKAGE).mo
+
+#>+ 2
+all-nls: $(GMOFILES)
+
+#>+ 8
+distdir-nls:$(GMOFILES)
+ for file in $(POFILES); do \
+ cp $(srcdir)/$$file $(distdir); \
+ done
+ for file in $(GMOFILES); do \
+ cp $(srcdir)/$$file $(distdir); \
+ done
+
+#>+ 4
+merge:
+ $(MAKE) -f $(top_srcdir)/admin/Makefile.common package-merge POFILES="${POFILES}" PACKAGE=${PACKAGE}
+
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu po/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu po/Makefile
+ cd $(top_srcdir) && perl admin/am_edit po/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXX) $(DEFS) -I. -I$(srcdir) -I$(top_builddir) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..cd97935
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,2799 @@
+# translation of de.po to Deutsch
+# Header entry was created by KBabel!
+#
+# Thomas Fischer <fischer@unix-ag.uni-kl.de>, 2008, 2009.
+# Thomas Fischer <thomas.fischer@t-fischer.net>, 2009.
+# Thomas Fischer (t-fischer.net) <thomas.fischer@t-fischer.net>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: de\n"
+"POT-Creation-Date: 2010-07-01 13:55+0200\n"
+"PO-Revision-Date: 2009-11-05 01:26+0100\n"
+"Last-Translator: Thomas Fischer <fischer@unix-ag.uni-kl.de>\n"
+"Language-Team: Deutsch\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Report-Msgid-Bugs-To: \n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: _translatorinfo.cpp:1
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Thomas Fischer"
+
+#: _translatorinfo.cpp:3
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "fischer@unix-ag.uni-kl.de"
+
+#: commentwidget.cpp:55
+msgid "Co&mment:"
+msgstr "Ko&mmentar:"
+
+#: commentwidget.cpp:64
+msgid "&Use @Comment for comment instead of plain text"
+msgstr "@Comment für Kommentar anstatt von reinem Text ver&wenden"
+
+#: commentwidget.cpp:82
+msgid "Edit BibTeX Comment"
+msgstr "BibTeX-Kommentar bearbeiten"
+
+#: documentlistview.cpp:120
+msgid "List View"
+msgstr "Listenansicht"
+
+#: documentlistview.cpp:120
+msgid "Updating main view ..."
+msgstr "Hauptansicht wird aktualisiert ..."
+
+#: documentlistview.cpp:253
+msgid "Show Columns"
+msgstr "Spalten zeigen"
+
+#: documentlistview.cpp:259 documentlistview.cpp:756 settingsediting.cpp:164
+msgid "Element Type"
+msgstr "Elementtyp"
+
+#: documentlistview.cpp:450
+msgid "Paste text as..."
+msgstr "Text einfügen als..."
+
+#: documentlistview.cpp:757 settingsediting.cpp:165
+msgid "Entry Id"
+msgstr "Eintragsbezeichner"
+
+#: documentlistviewitem.cpp:114 kbibtex_part.cpp:506
+msgid "Comment"
+msgstr "Kommentar"
+
+#: documentlistviewitem.cpp:124 kbibtex_part.cpp:507 macrowidget.cpp:93
+msgid "Macro"
+msgstr "Makro"
+
+#: documentlistviewitem.cpp:138 kbibtex_part.cpp:505 preamblewidget.cpp:78
+msgid "Preamble"
+msgstr "Präambel"
+
+#: documentsourceview.cpp:214
+msgid "Source View"
+msgstr "Quelltextansicht"
+
+#: documentsourceview.cpp:214
+msgid "Converting BibTeX document to plain text ..."
+msgstr "BibTeX-Dokument wird in reinen Text umgewandelt ..."
+
+#: documentsourceview.cpp:369
+msgid ""
+"Could not find text '%1' in the document.\n"
+"Start from the beginning?"
+msgstr ""
+"Der Text \"%1\" wurde nicht im Dokument gefunden.\n"
+"Suche von vorne beginnen?"
+
+#: documentsourceview.cpp:369
+msgid "Find text in source view"
+msgstr "Text in Queltextansicht suchen"
+
+#: documentsourceview.cpp:369
+msgid "Restart search"
+msgstr "Suche neu starten"
+
+#: documentwidget.cpp:120
+msgid "L&ist view"
+msgstr "Listenansicht"
+
+#: documentwidget.cpp:142
+msgid "So&urce view"
+msgstr "Quelltextansicht"
+
+#: documentwidget.cpp:174
+msgid "<qt>Loading file <b>%1</b></qt>"
+msgstr "<qt>Datei <b>%1</b> wird geladen</qt>"
+
+#: documentwidget.cpp:221
+msgid "Do you want to search for duplicates in the merged document?"
+msgstr "Nach Duplikaten suchen im zusammengeführten Dokument?"
+
+#: documentwidget.cpp:221
+msgid "Find duplicates?"
+msgstr "Duplikate suchen"
+
+#: documentwidget.cpp:221 findduplicates.cpp:58 mergeelements.cpp:484
+#: mergeelements.cpp:492 settingsediting.cpp:216
+msgid "Find Duplicates"
+msgstr "Duplikate suchen"
+
+#: documentwidget.cpp:281 documentwidget.cpp:1345 documentwidget.cpp:1359
+#: kbibtex_part.cpp:306 kbibtex_part.cpp:320
+msgid "Choose file format"
+msgstr "Dateiformat auswählen"
+
+#: documentwidget.cpp:281 documentwidget.cpp:1345 documentwidget.cpp:1359
+#: kbibtex_part.cpp:306 kbibtex_part.cpp:320
+msgid "Choose file format of file '%1':"
+msgstr "Dateiformat von Datei \"%1\" auswählen:"
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid ""
+"The selected filename \"%1\" is a symbolic link pointing to \"%2\".\n"
+"Replace the link with a new file or overwrite the existing file the link "
+"points to?"
+msgstr ""
+"Der gewählte Dateiname \"%1\" ist eine symbolische Verknüpfung auf"
+"\"%2\".\nSoll die Vernknüpfung mit einer neuen Datei ersetzt werden"
+"oder die existierende Datei auf die die Verknüpfung zeigt?"
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Symbolic Link"
+msgstr "Symbolische Verknüpfung"
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Replace link"
+msgstr "Verknüpfung ersetzen"
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Overwrite file the link points to"
+msgstr "Datei auf die die Verknüpfung zeigt überschreiben"
+
+#: documentwidget.cpp:301
+msgid "<qt>Writing file <b>%1</b></qt>"
+msgstr "<qt>Datei <b>%1</b> wird geschrieben</qt>"
+
+#: documentwidget.cpp:388
+msgid ""
+"To export a BibTeX document to the Rich Text Format (RTF) KBibTeX requires "
+"the program 'latex2rtf'."
+msgstr ""
+"Das Programm \"latex2rtf\" wird zum Export von BibTeX-Dateien nach RTF "
+"benötigt."
+
+#: documentwidget.cpp:405
+msgid ""
+"To export a BibTeX document to the DocBook5 format KBibTeX requires the "
+"program 'bib2db5'."
+msgstr ""
+"Das Programm \"bib2db5\" wird zum Export von BibTeX-Dateien nach DocBook5 "
+"(Bibliographie) benötigt."
+
+#: documentwidget.cpp:420
+msgid ""
+"Embedding files into the PDF file is enabled, but the required file "
+"'embedfile.sty' was not found. Embedding files will be disabled."
+msgstr ""
+"Das Einbetten von PDF-Dateien ist aktiviert, aber die erforderliche Datei "
+"'embedfile.sty' wurde nicht gefunden. Das Einbetten wird daher deaktiviert."
+
+#: documentwidget.cpp:420
+msgid "Embedding files disabled"
+msgstr "Einbetten von Dateien deaktiviert"
+
+#: documentwidget.cpp:471
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewMacro%1"
+msgstr "NeuesMakro%1"
+
+#: documentwidget.cpp:489
+msgid "Put your comment here..."
+msgstr "Hier den Kommentar schreiben..."
+
+#: documentwidget.cpp:543
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewString%1"
+msgstr "NeuerSchluessel%1"
+
+#: documentwidget.cpp:544
+msgid "No text yet"
+msgstr "Kein Text bisher"
+
+#: documentwidget.cpp:548
+msgid "@comment{ Put your comment here... }"
+msgstr "@comment{ Hier den Kommentar schreiben... }"
+
+#: documentwidget.cpp:552
+msgid "@preamble{\"Put your preamble here using double quotes...\"}"
+msgstr ""
+"@preamble{\"Hier die Präambel mit doppelten Anführungszeichen "
+"schreiben...\"}"
+
+#: documentwidget.cpp:568
+msgid "REQUIRED"
+msgstr "ERFORDERLICH"
+
+#: documentwidget.cpp:568
+msgid "optional"
+msgstr "optional"
+
+#: documentwidget.cpp:610
+#, c-format
+msgid ""
+"_n: This BibTeX file contains 1 element.\n"
+"This BibTeX file contains %n elements."
+msgstr ""
+"Die BibTeX-Datei enthält 1 Element.\n"
+"Die BibTeX-Datei enthält %n Elemente."
+
+#: documentwidget.cpp:610
+msgid "File Statistics"
+msgstr "Dateistatistik"
+
+#: documentwidget.cpp:806 documentwidget.cpp:815
+msgid "%1 ... %2"
+msgstr "%1 ... %2"
+
+#: documentwidget.cpp:827
+msgid "New keyword:"
+msgstr "Neues Schlüsselwort:"
+
+#: documentwidget.cpp:999
+msgid ""
+"\n"
+"\n"
+"Either LyX is not running or has not been correctly configured to send "
+"references to."
+msgstr ""
+"\n"
+"\n"
+"Entweder läuft LyX nicht oder es wurde nicht konfiguriert und Referenzen zu "
+"empfangen."
+
+#: documentwidget.cpp:1000
+msgid "Error communicating with LyX"
+msgstr "Kann nicht mit LyX kommunizieren"
+
+#: documentwidget.cpp:1007
+msgid "Cannot determine how to send references to LyX."
+msgstr ""
+"Es kann nicht festgestellt werden, wie Referenzen zu LyX gesendet werden "
+"sollen."
+
+#: documentwidget.cpp:1012
+msgid "The inpipe as configured in LyX does not exist."
+msgstr "Die in LyX konfigurierte Pipe existiert nicht."
+
+#: documentwidget.cpp:1016
+msgid "Cannot open the inpipe as configured in LyX."
+msgstr "Die in LyX konfigurierte Pipe kann nicht geöffnet werden."
+
+#: documentwidget.cpp:1288 documentwidget.cpp:1293
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewEntry%1"
+msgstr "NeuerEintrag%1"
+
+#: documentwidget.cpp:1398
+msgid "The file '%1' does not contain a known type of bibliography."
+msgstr "Die Datei \"%1\" enthält keine bekannten Bibliographiedaten."
+
+#: documentwidget.cpp:1398
+msgid "Unknown file format"
+msgstr "Unbekanntes Dateiformat"
+
+#: documentwidget.cpp:1453
+msgid "No preview available"
+msgstr "Keine Vorschau verfügbar"
+
+#: documentwidget.cpp:1554
+msgid ""
+"File '%1' has been modified. Reload file to import changes or ignore changes?"
+msgstr ""
+"Die Datei \"%1\" wurde bearbeitet. Datei neu laden um die Änderungen zu "
+"übernehmen oder Änderungen ignorieren?"
+
+#: documentwidget.cpp:1554
+msgid "Reload file?"
+msgstr "Dokument neu laden?"
+
+#: documentwidget.cpp:1554
+msgid "Ignore"
+msgstr "Ignorieren"
+
+#: documentwidget.cpp:1691
+msgid "You must set a default id suggestion in the settings dialog."
+msgstr "Ein Standardbezeichner muss im Einstellungsdialog gesetzt werden"
+
+#: documentwidget.cpp:1713
+msgid "No entries were selected."
+msgstr "Keine Einträge wurden ausgewählt."
+
+#: documentwidget.cpp:1714
+msgid ""
+"The following changes will be applied to the currently selected elements.\n"
+"Conflicts with duplicate entry ids will be resolved when applying the new "
+"ids."
+msgstr ""
+"Die folgenden Änderungen werden auf die aktuell ausgewählten Elemente "
+"angewandt.\n"
+"Konflikte mit doppelten Eintragsbezeichnern werden aufgelöst wenn die neuen "
+"Bezeichner bestimmt werden."
+
+#: documentwidget.cpp:1714 kbibtex_part.cpp:482
+msgid "Normalize Entry Ids"
+msgstr "Eintragsbezeichner normalisieren"
+
+#: documentwidget.cpp:1714
+msgid "Replace Entry Ids"
+msgstr "Eintragsbezeichner ersetzen"
+
+#: entrywidget.cpp:65
+msgid "Edit BibTeX Entry"
+msgstr "BibTeX-Eintrag bearbeiten"
+
+#: entrywidget.cpp:142
+msgid ""
+"The current entry has been modified. Do you want do discard your changes?"
+msgstr ""
+"Der aktuelle Eintrag wurde bearbeitet. Sollen die Änderungen verworfen "
+"werden?"
+
+#: entrywidget.cpp:142
+msgid "Discard changes"
+msgstr "Änderungen verwerfen"
+
+#: entrywidget.cpp:256
+msgid ""
+"The source code does not contain valid BibTeX code.\n"
+"\n"
+"Restore previous version or continue editing?"
+msgstr ""
+"Der Quellcode enthält keinen gültigen BibTeX-Code.\n"
+"\n"
+"Vorherige Version wiederherstellen oder mit dem Bearbeiten fortfahren?"
+
+#: entrywidget.cpp:256
+msgid "Invalid BibTeX code"
+msgstr "Ungültiger BibTeX-Code"
+
+#: entrywidget.cpp:314
+msgid "E&ntry Type:"
+msgstr "Ei&ntragstyp:"
+
+#: entrywidget.cpp:324
+msgid "&Identifier"
+msgstr "&Bezeichner"
+
+#: entrywidget.cpp:341
+msgid "Use the default id suggestion to set the entry id"
+msgstr "Standard für Bezeicher-Vorschläge für diesen Eintrag verwenden"
+
+#: entrywidget.cpp:342
+msgid ""
+"Use the default id suggestion to set the entry id.\n"
+"You can edit and select the default id suggestion in the configuration "
+"dialog."
+msgstr ""
+"Standard für Bezeicher-Vorschläge für diesen Eintrag verwenden.\n"
+"Der Standard für Bezeichner-Vorschläge kann im Einstellungsfenster "
+"bearbeitet und ausgewählt werden."
+
+#: entrywidget.cpp:350 settingsediting.cpp:194
+msgid "Enable all &fields for editing"
+msgstr "Alle &Felder zur Bearbeitung freigeben"
+
+#: entrywidget.cpp:353
+msgid "Refetch"
+msgstr "Erneut abrufen"
+
+#: entrywidget.cpp:361
+msgid "Message"
+msgstr "Nachricht"
+
+#: entrywidget.cpp:385 entrywidgettitle.cpp:116 entrywidgettitle.cpp:118
+#: idsuggestions.cpp:345 idsuggestionswidget.cpp:201
+#: idsuggestionswidget.cpp:485 settings.cpp:681 webquery.cpp:450
+msgid "Title"
+msgstr "Titel"
+
+#: entrywidget.cpp:386
+msgid "Author/Editor"
+msgstr "Autor/Herausgeber"
+
+#: entrywidget.cpp:387
+msgid "Publication"
+msgstr "Veröffentlichung"
+
+#: entrywidget.cpp:388 kbibtex_part.cpp:500 settings.cpp:720
+msgid "Misc"
+msgstr "Verschiedenes"
+
+#: entrywidget.cpp:389 settings.cpp:659 settingskeyword.cpp:161
+msgid "Keywords"
+msgstr "Schlüsselwörter"
+
+#: entrywidget.cpp:390
+msgid "External"
+msgstr "Externe"
+
+#: entrywidget.cpp:391
+msgid "User Defined"
+msgstr "Benutzerdefiniert"
+
+#: entrywidget.cpp:392
+msgid "Other Fields"
+msgstr "Weitere Felder"
+
+#: entrywidget.cpp:395
+msgid "Source"
+msgstr "Quelltext"
+
+#: entrywidget.cpp:438
+msgid "Please supply more fields to use the default id"
+msgstr ""
+"Bitte mehr Felder ausfüllen, damit ein Bezeichner automatisch erstellt "
+"werden kann"
+
+#: entrywidget.cpp:441
+msgid "Using '%1' as entry id"
+msgstr "\"%1\" wird als Bezeichner für diesen Eintrag verwendet"
+
+#: entrywidget.cpp:446
+msgid "An entry has to have an identifier"
+msgstr "Ein Eintrag muss einen Bezeichner haben"
+
+#: entrywidget.cpp:448
+#, c-format
+msgid "The identifier contains invalid characters at position %1"
+msgstr "Der Bezeichner enthält unzulässige Zeichen ab Position %1"
+
+#: entrywidget.cpp:458
+msgid "The identifier contains non-ascii characters, first one is '%1'"
+msgstr "Der Bezeichner enthält unzulässige Zeichen ab Position %1"
+
+#: entrywidget.cpp:474
+msgid "This BibTeX file already contains an entry with id '%1'."
+msgstr "Diese BibTeX-Datei enthält bereits einen Eintrag mit der Id \"%1\"."
+
+#: entrywidget.cpp:491
+msgid "Require either 'Editor', 'Organization', or 'Key'"
+msgstr ""
+"Es wird entweder \"Herausgeber\", \"Organisation\" oder \"Schlüssel\" "
+"benötigt"
+
+#: entrywidget.cpp:500
+msgid ""
+"Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Book "
+"Title'"
+msgstr ""
+"Der querverwiesene Eintrag \"%1\" muss entweder \"Herausgeber\", "
+"\"Schlüssel\" oder \"Buchtitel\" enthalten"
+
+#: entrywidget.cpp:510
+msgid "Cross referenced entry '%1' must contain 'Volume'"
+msgstr "Der querverwiesene Eintrag \"%1\" muss \"Band\" enthalten"
+
+#: entrywidget.cpp:513
+msgid ""
+"Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Series'"
+msgstr ""
+"Der querverwiesene Eintrag \"%1\" muss entweder \"Herausgeber\", "
+"\"Schlüssel\" oder \"Reihe\" enthalten"
+
+#: entrywidget.cpp:537
+msgid "No suggestions available"
+msgstr "Kein Vorschlag verfügbar "
+
+#: entrywidget.cpp:641
+msgid ""
+"Currently only refetching from ArXiv sources is supported.\n"
+"\n"
+"This requires that the URL field points to an \"abstract\" page (i.e. the "
+"URL contains \"arxiv.org/abs/\")."
+msgstr ""
+"Nur das erneute Abrufen von ArXiv-Einträgen wird unterstützt.\n"
+"\n"
+"Dazu ist es notwendig, daß das URL-Feld auf eine \"Abstract\"-Seite zeigt, "
+"d.h. die URL enthält \"arxiv.org/abs/\"."
+
+#: entrywidget.cpp:641 entrywidget.cpp:668
+msgid "Refetching entry"
+msgstr "Erneutes Abrufen"
+
+#: entrywidget.cpp:668
+msgid "Fetching updated bibliographic data failed."
+msgstr "Das erneute Abrufen der bibliographischen Daten ist fehlgeschlagen."
+
+#: entrywidgetauthor.cpp:83
+msgid "The fields 'Author' or 'Editor' are required, but both are missing"
+msgstr ""
+"Die Felder \"Autor und \"Herausgeber\" sind erforderlich, aber beide fehlen"
+
+#: entrywidgetauthor.cpp:98 entrywidgetauthor.cpp:100
+#: idsuggestionswidget.cpp:112 idsuggestionswidget.cpp:483 settings.cpp:633
+#: settingssearchurl.cpp:134 webquery.cpp:449
+msgid "Author"
+msgstr "Autor"
+
+#: entrywidgetauthor.cpp:100
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewAuthor"
+msgstr "NeuerAutor"
+
+#: entrywidgetauthor.cpp:105 entrywidgetauthor.cpp:107 settings.cpp:645
+msgid "Editor"
+msgstr "Herausgeber"
+
+#: entrywidgetauthor.cpp:107
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewEditor"
+msgstr "NeuerEditor"
+
+#: entrywidgetexternal.cpp:197 entrywidgetexternal.cpp:285
+msgid "Previously used directory"
+msgstr "Zuvor genutzer Ordner"
+
+#: entrywidgetexternal.cpp:223 entrywidgetexternal.cpp:225
+#: entrywidgetexternal.cpp:235 settings.cpp:685 settingssearchurl.cpp:135
+msgid "URL"
+msgstr "URL"
+
+#: entrywidgetexternal.cpp:235 entrywidgetexternal.cpp:268
+#, c-format
+msgid "Open %1"
+msgstr "%1 öffnen"
+
+#: entrywidgetexternal.cpp:238 entrywidgetexternal.cpp:242 settings.cpp:641
+msgid "DOI"
+msgstr "DOI"
+
+#: entrywidgetexternal.cpp:239
+msgid "Digital Object Identifier"
+msgstr "Digitale Objekt-Identifizierung"
+
+#: entrywidgetexternal.cpp:253
+msgid "Open DOI"
+msgstr "DOI öffnen"
+
+#: entrywidgetexternal.cpp:256 entrywidgetexternal.cpp:258
+#: entrywidgetexternal.cpp:268 settings.cpp:661
+msgid "Local File"
+msgstr "Lokale Datei"
+
+#: entrywidgetexternal.cpp:274
+msgid "&Browse..."
+msgstr "&Durchsuchen..."
+
+#: entrywidgetexternal.cpp:275
+msgid "Browse for a local file"
+msgstr "Nach einer lokalen Datei suchen"
+
+#: entrywidgetexternal.cpp:282
+msgid "Select base directory"
+msgstr "Anfangsordner wählen"
+
+#: entrywidgetexternal.cpp:283
+msgid "Current directory"
+msgstr "Aktueller Ordner"
+
+#: entrywidgetkeyword.cpp:56
+msgid "Global"
+msgstr "Global"
+
+#: entrywidgetkeyword.cpp:61
+msgid "In this file only"
+msgstr "Nur in dieser Datei"
+
+#: entrywidgetkeyword.cpp:168
+msgid ""
+"The keyword '%1' does already exist in the list of keywords.\n"
+"The old name has been restored."
+msgstr ""
+"Das Schlüsselwort \"%1\" existiert bereits in der Liste der "
+"Schlüsselwörter.\n"
+"Der alte Name wurde wiederhergestellt."
+
+#: entrywidgetkeyword.cpp:168
+msgid "Renaming keyword failed"
+msgstr "Umbennen des Schlüsselworts fehlgeschlagen"
+
+#: entrywidgetkeyword.cpp:193
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewKeyword%1"
+msgstr "NeuesSchluesselwort%1"
+
+#: entrywidgetkeyword.cpp:230
+msgid "Keyword"
+msgstr "Schlüsselwort"
+
+#: entrywidgetkeyword.cpp:231
+msgid "Origin"
+msgstr "Ursprung"
+
+#: entrywidgetkeyword.cpp:238 settingskeyword.cpp:166
+msgid ""
+"_: keyword\n"
+"New"
+msgstr "Neu"
+
+#: entrywidgetkeyword.cpp:241
+msgid "Add a new keyword to the list"
+msgstr "Neues Schlüsselwort zu Liste hinzufügen"
+
+#: entrywidgetkeyword.cpp:245 settingskeyword.cpp:169
+msgid ""
+"_: keyword\n"
+"Edit"
+msgstr "Bearbeiten"
+
+#: entrywidgetkeyword.cpp:247
+msgid "Edit the selected keyword"
+msgstr "Ausgewähltes Schlüsselwort bearbeiten"
+
+#: entrywidgetkeyword.cpp:252
+msgid ""
+"_: keyword\n"
+"Toggle &global"
+msgstr "\"&Global\" umschalten"
+
+#: entrywidgetkeyword.cpp:254
+msgid "Add or remove the selected keyword to or from the global list"
+msgstr ""
+"Hinzufügen oder Entfernen des ausgewählten Schlüsselworts zu oder von der "
+"globalen Liste"
+
+#: entrywidgetkeyword.cpp:259
+msgid ""
+"There is no need to delete keywords. Simply uncheck unwanted keywords and "
+"make them non-global.\n"
+"Global keywords can also be edited in the settings dialog."
+msgstr ""
+"Es besteht kein Bedarf, Schlüsselwörter zu löschen. Es genügt, bei "
+"ungewünschten Schüsselwörtern das Häckchen zu entfernen und sie als "
+"nicht-global zu markieren. Globale Schlüsselwörter können auch im "
+"Einstellungsfenster bearbeitet werden."
+
+#: entrywidgetmisc.cpp:135 entrywidgetmisc.cpp:137 mergeelements.cpp:581
+#: settings.cpp:683 settingsuserdefinedinput.cpp:172
+msgid "Type"
+msgstr "Typ"
+
+#: entrywidgetmisc.cpp:142 entrywidgetmisc.cpp:144 entrywidgetother.cpp:153
+#: mergeelements.cpp:72 settings.cpp:657
+msgid "Key"
+msgstr "Schlüssel"
+
+#: entrywidgetmisc.cpp:149 entrywidgetmisc.cpp:151 settings.cpp:667
+msgid "Note"
+msgstr "Notiz"
+
+#: entrywidgetmisc.cpp:156 entrywidgetmisc.cpp:158 settings.cpp:631
+msgid "Annote"
+msgstr "Anmerkung"
+
+#: entrywidgetmisc.cpp:163 entrywidgetmisc.cpp:165 settings.cpp:627
+msgid "Abstract"
+msgstr "Zusammenfassung"
+
+#: entrywidgetother.cpp:131
+msgid "Name of the user-defined field"
+msgstr "Name es benutzerdefinierten Feldes"
+
+#: entrywidgetother.cpp:132
+msgid ""
+"The name of the user-defined field. Should only contain letters and numbers."
+msgstr ""
+"Der Name des benutzerdefinierten Feldes. Sollte nur Buchstaben und Zahlen "
+"enthalten."
+
+#: entrywidgetother.cpp:133
+msgid "&Name:"
+msgstr "&Name:"
+
+#: entrywidgetother.cpp:137 entrywidgetother.cpp:201
+msgid "&Add"
+msgstr "&Hinzufügen"
+
+#: entrywidgetother.cpp:141 entrywidgetother.cpp:154 mergeelements.cpp:72
+msgid "Value"
+msgstr "Wert"
+
+#: entrywidgetother.cpp:143
+msgid "Content of the user-defined field"
+msgstr "Inhalt des benutzerdefinierten Feldes"
+
+#: entrywidgetother.cpp:144
+msgid "The content of the user-defined field. May contain any text."
+msgstr ""
+"Der Inhalte des benutzerdefinierten Feldes. Kann beliebigen Text enthalten."
+
+#: entrywidgetother.cpp:145
+msgid "&Content:"
+msgstr "Inhalt:"
+
+#: entrywidgetother.cpp:159
+msgid "&List:"
+msgstr "Liste:"
+
+#: entrywidgetother.cpp:168
+msgid "Op&en"
+msgstr "Öffnen"
+
+#: entrywidgetpublication.cpp:308
+msgid "The fields 'Chapter' or 'Pages' are required, but both are missing"
+msgstr ""
+"Die Felder \"Chapter\" oder \"Pages\" sind erforderlich, aber beide fehlen"
+
+#: entrywidgetpublication.cpp:325
+msgid "The field 'Journal' refers to a not existing entry"
+msgstr ""
+"Das Feld \"Journal\" bezieht sich auf einen nicht-existierenden Eintrag"
+
+#: entrywidgetpublication.cpp:392
+#, c-format
+msgid "http://en.wikipedia.org/w/index.php?title=Special:Booksources&isbn=%1"
+msgstr "http://de.wikipedia.org/w/index.php?title=Spezial:ISBN-Suche&isbn=%1"
+
+#: entrywidgetpublication.cpp:405 entrywidgetpublication.cpp:407
+#: settings.cpp:655
+msgid "Journal"
+msgstr "Zeitschrift"
+
+#: entrywidgetpublication.cpp:412 entrywidgetpublication.cpp:414
+#: settings.cpp:687
+msgid "Volume"
+msgstr "Band"
+
+#: entrywidgetpublication.cpp:419 entrywidgetpublication.cpp:421
+#: settings.cpp:669
+msgid "Number"
+msgstr "Nummer"
+
+#: entrywidgetpublication.cpp:426 entrywidgetpublication.cpp:435
+#: settings.cpp:665
+msgid "Month"
+msgstr "Monat"
+
+#: entrywidgetpublication.cpp:440 entrywidgetpublication.cpp:442
+#: idsuggestionswidget.cpp:276 idsuggestionswidget.cpp:484 settings.cpp:689
+#: webquery.cpp:448
+msgid "Year"
+msgstr "Jahr"
+
+#: entrywidgetpublication.cpp:447 entrywidgetpublication.cpp:449
+#: settings.cpp:673
+msgid "Pages"
+msgstr "Seiten"
+
+#: entrywidgetpublication.cpp:454 entrywidgetpublication.cpp:456
+#: settings.cpp:643
+msgid "Edition"
+msgstr "Ausgabe"
+
+#: entrywidgetpublication.cpp:461 entrywidgetpublication.cpp:463
+#: settings.cpp:637
+msgid "Chapter"
+msgstr "Kapitel"
+
+#: entrywidgetpublication.cpp:468 entrywidgetpublication.cpp:470
+msgid "Cross Reference"
+msgstr "Querverweis"
+
+#: entrywidgetpublication.cpp:476 entrywidgetpublication.cpp:478
+#: settings.cpp:671
+msgid "Organization"
+msgstr "Organisation"
+
+#: entrywidgetpublication.cpp:483 entrywidgetpublication.cpp:485
+#: settings.cpp:675
+msgid "Publisher"
+msgstr "Verlag"
+
+#: entrywidgetpublication.cpp:490 entrywidgetpublication.cpp:492
+#: settings.cpp:679
+msgid "School"
+msgstr "Universität"
+
+#: entrywidgetpublication.cpp:497 entrywidgetpublication.cpp:499
+#: settings.cpp:649
+msgid "Institution"
+msgstr "Institution"
+
+#: entrywidgetpublication.cpp:504 entrywidgetpublication.cpp:506
+#: settings.cpp:663
+msgid "Location"
+msgstr "Ort"
+
+#: entrywidgetpublication.cpp:511 entrywidgetpublication.cpp:513
+#: settings.cpp:629
+msgid "Address"
+msgstr "Adresse"
+
+#: entrywidgetpublication.cpp:518 entrywidgetpublication.cpp:527
+#: settings.cpp:651
+msgid "ISBN"
+msgstr "ISBN"
+
+#: entrywidgetpublication.cpp:525
+msgid "Lookup ISBN number in Wikipedia"
+msgstr "ISBN-Nummer in Wikipedia nachschlagen"
+
+#: entrywidgetpublication.cpp:533 entrywidgetpublication.cpp:535
+#: settings.cpp:653
+msgid "ISSN"
+msgstr "ISSN"
+
+#: entrywidgetpublication.cpp:540 entrywidgetpublication.cpp:542
+#: settings.cpp:647
+msgid "How Published"
+msgstr "Wie veröffentlicht"
+
+#: entrywidgettab.cpp:65
+msgid "The field '%1' is required, but missing"
+msgstr "Das Feld \"%1\" ist erforderlich, fehlt aber"
+
+#: entrywidgettab.cpp:71
+msgid "Using cross referenced entry '%1' for field '%2'"
+msgstr "Der querverwiesene Eintrag \"%1\" wird für Feld \"%2\" benutzt"
+
+#: entrywidgettab.cpp:79
+msgid "The field '%1' contains string keys with invalid characters"
+msgstr "Das Feld \"%1\" enthält Schlüssel mit ungültigen Zeichen"
+
+#: entrywidgettab.cpp:87
+msgid "The field '%1' contains some unknown error"
+msgstr "Das Feld \"%1\" enthält einen unbekannten Fehler"
+
+#: entrywidgettitle.cpp:122 entrywidgettitle.cpp:124 settings.cpp:635
+msgid "Book Title"
+msgstr "Buchtitel"
+
+#: entrywidgettitle.cpp:128 entrywidgettitle.cpp:130 settings.cpp:677
+msgid "Series"
+msgstr "Reihe"
+
+#: entrywidgetuserdefined.cpp:137
+msgid "Please use the settings dialog to add user-defined fields here."
+msgstr ""
+"Im Einstellungsdialog können benutzerdefinierte Felder eingefügt werden"
+
+#: fieldlineedit.cpp:91 fieldlineedit.cpp:92 fieldlineedit.cpp:96
+#: fieldlineedit.cpp:97 fieldlistview.cpp:100 fieldlistview.cpp:101
+msgid "BibTeX field '%1'"
+msgstr "Entspricht BibTeX-Feld \"%1\""
+
+#: fieldlineedit.cpp:228
+msgid "Set '%1' to be a string key"
+msgstr "Eintrag \"%1\" zu einem Schlüssel machen"
+
+#: fieldlineedit.cpp:240
+msgid "Edit '%1' as a concatenated value"
+msgstr "Eintrag \"%1\" als zusammengesetzen Eintrag bearbeiten"
+
+#: fieldlineedit.cpp:325 fieldlineedit.cpp:328
+msgid "Concatenated value"
+msgstr "Zusammengesetzter Wert"
+
+#: fieldlistview.cpp:321
+msgid "Add new '%1' item (Ctrl+A)"
+msgstr "Neuen \"%1\"-Eintrag hinzufügen (Strg+A)"
+
+#: fieldlistview.cpp:327
+msgid "Edit current '%1' item (F2)"
+msgstr "Aktuellen \"%1\"-Eintrag bearbeiten (F2)"
+
+#: fieldlistview.cpp:333
+msgid "Delete current '%1' item (Del)"
+msgstr "Aktuellen \"%1\"-Eintrag löschen (Entf)"
+
+#: fieldlistview.cpp:335 idsuggestionswidget.cpp:59 valuewidget.cpp:242
+msgid "Up"
+msgstr "Nach oben"
+
+#: fieldlistview.cpp:339
+msgid "Move current '%1' item up (Ctrl+Up)"
+msgstr "Aktuelles \"%1\"-Element nach oben verschieben (Strg+Pfeil hoch)"
+
+#: fieldlistview.cpp:341 idsuggestionswidget.cpp:60 valuewidget.cpp:247
+msgid "Down"
+msgstr "Nach unten"
+
+#: fieldlistview.cpp:345
+msgid "Move current '%1' item down (Ctrl+Down)"
+msgstr "Aktuelles \"%1\"-Element nach unten verschieben (Strg+Pfeil runter)"
+
+#: fieldlistview.cpp:347
+msgid "Complex..."
+msgstr "Erweitert..."
+
+#: fieldlistview.cpp:351
+msgid "Edit current '%1' item as a concatenated string (Ctrl+Alt+C)"
+msgstr ""
+"Aktuelles \"%1\"-Element als zusammengesetzten Wert bearbeiten (Strg+Alt+C)"
+
+#: fieldlistview.cpp:353
+msgid "... and others (et al.)"
+msgstr "... und weitere (et al.)"
+
+#: findduplicates.cpp:58
+msgid "Searching for duplicates..."
+msgstr "Duplikate werden gesucht..."
+
+#: idsuggestions.cpp:330 idsuggestionswidget.cpp:128
+msgid "First author only"
+msgstr "Nur der erste Autor"
+
+#: idsuggestions.cpp:331 idsuggestionswidget.cpp:129
+msgid "All but first author"
+msgstr "Alle Autoren außer erstem"
+
+#: idsuggestions.cpp:332 idsuggestionswidget.cpp:127
+msgid "All authors"
+msgstr "Alle Autoren"
+
+#: idsuggestions.cpp:335
+#, c-format
+msgid ""
+"_n: , but only first letter of each last name\n"
+", but only first %n letters of each last name"
+msgstr ""
+", aber nur der erste Buchstabe im Nachnamen\n"
+", aber nur die ersten %n Buchstaben im Nachnamen"
+
+#: idsuggestions.cpp:336 idsuggestions.cpp:348
+msgid ", in upper case"
+msgstr ", in Großbuchstaben"
+
+#: idsuggestions.cpp:337 idsuggestions.cpp:349
+msgid ", in lower case"
+msgstr ", in Kleinbuchstaben"
+
+#: idsuggestions.cpp:338 idsuggestions.cpp:350
+msgid ", with '%1' in between"
+msgstr ", mit \"%1\" dazwischen"
+
+#: idsuggestions.cpp:340
+msgid "Year (2 digits)"
+msgstr "Jahr (2 Ziffern)"
+
+#: idsuggestions.cpp:341
+msgid "Year (4 digits)"
+msgstr "Jahr (4 Ziffern)"
+
+#: idsuggestions.cpp:347
+#, c-format
+msgid ""
+"_n: , but only first letter of each word\n"
+", but only first %n letters of each word"
+msgstr ""
+", aber nur der erste Buchstabe im Wort\n"
+", aber nur die ersten %n Buchstaben im Wort"
+
+#: idsuggestions.cpp:351
+msgid ", small words removed"
+msgstr ", kleine Wörter entfernt"
+
+#: idsuggestions.cpp:353
+msgid "Text: '%1'"
+msgstr "Text: \"%1\""
+
+#: idsuggestionswidget.cpp:140 idsuggestionswidget.cpp:221
+msgid "Casing:"
+msgstr "Groß-/Kleinschreibung:"
+
+#: idsuggestionswidget.cpp:145 idsuggestionswidget.cpp:226
+msgid "No change"
+msgstr "Keine Änderung"
+
+#: idsuggestionswidget.cpp:146 idsuggestionswidget.cpp:227
+msgid "Lower case"
+msgstr "Kleinbuchstaben"
+
+#: idsuggestionswidget.cpp:147 idsuggestionswidget.cpp:228
+msgid "Upper case"
+msgstr "Großbuchstaben"
+
+#: idsuggestionswidget.cpp:156 idsuggestionswidget.cpp:237
+msgid "Only first letters:"
+msgstr "Nur die ersten Buchstaben:"
+
+#: idsuggestionswidget.cpp:163 idsuggestionswidget.cpp:165
+msgid "Complete name"
+msgstr "Vollständige Namen"
+
+#: idsuggestionswidget.cpp:168
+msgid "Text between authors:"
+msgstr "Text zwischen Autoren:"
+
+#: idsuggestionswidget.cpp:214
+msgid "Remove small words"
+msgstr "Alle kleinen Wörter entfernen"
+
+#: idsuggestionswidget.cpp:244 idsuggestionswidget.cpp:246
+msgid "Complete title"
+msgstr "Vollständiger Titel"
+
+#: idsuggestionswidget.cpp:249
+msgid "Text between words:"
+msgstr "Text zwischen Wörtern:"
+
+#: idsuggestionswidget.cpp:289
+msgid "Year:"
+msgstr "Jahr:"
+
+#: idsuggestionswidget.cpp:294
+msgid "2 digits"
+msgstr "2 Ziffern"
+
+#: idsuggestionswidget.cpp:295
+msgid "4 digits"
+msgstr "4 Ziffern"
+
+#: idsuggestionswidget.cpp:311 idsuggestionswidget.cpp:486 valuewidget.cpp:211
+msgid "Text"
+msgstr "Text"
+
+#: idsuggestionswidget.cpp:324
+msgid "Text in between:"
+msgstr "Text dazwischen:"
+
+#: idsuggestionswidget.cpp:388
+msgid "Edit Id Suggestions"
+msgstr "Id-Vorschläge bearbeiten"
+
+#: idsuggestionswidget.cpp:563
+msgid "<qt>Example:<br/><b>%1</b></qt>"
+msgstr "<qt>Beispiel:<br/><b>%1</b></qt>"
+
+#: kbibtex_part.cpp:158
+msgid ""
+"The document '%1' has been modified.\n"
+"Do you want to save your changes or discard them?"
+msgstr ""
+"Das Dokument \"%1\" wurde bearbeitet.\n"
+"Sollen die lokalen Änderungen gesichert oder verworfen werden?"
+
+#: kbibtex_part.cpp:160
+msgid "Close Document"
+msgstr "Dokument schließen"
+
+#: kbibtex_part.cpp:251 kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "BibTeX (*.bib)"
+msgstr "BibTeX (*.bib)"
+
+#: kbibtex_part.cpp:251 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "Reference Manager (*.ris)"
+msgstr "Reference Manager (*.ris)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)"
+msgstr "EndNote (Refer-Format) (*.ref *.refer *.rfr *.txt)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "ISI Web of Knowledge (*.isi *.cgi)"
+msgstr "ISI Web of Knowledge (*.isi *.cgi)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273
+msgid "DocBook 5 or MODS (*.xml)"
+msgstr "DocBook 5 oder MODS (*.xml)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273
+msgid "DocBook 5 (*.xml)"
+msgstr "DocBook 5 (*.xml)"
+
+#: kbibtex_part.cpp:256 kbibtex_part.cpp:279
+msgid ""
+"A file named '%1' already exists. Are you sure you want to overwrite it?"
+msgstr ""
+"Eine Datei mit dem Namen \"%1\" existiert bereits. Soll diese Datei "
+"überschrieben werden?"
+
+#: kbibtex_part.cpp:256 kbibtex_part.cpp:279
+msgid "Overwrite"
+msgstr "Überschreiben"
+
+#: kbibtex_part.cpp:273
+msgid "Portable Document File (*.pdf)"
+msgstr "PDF-Dokument (*.pdf)"
+
+#: kbibtex_part.cpp:273
+msgid "PostScript (*.ps)"
+msgstr "PostScript (*.ps)"
+
+#: kbibtex_part.cpp:273
+msgid "Hypertext Markup Langage (*.html)"
+msgstr "HTML-Dokument (*.html)"
+
+#: kbibtex_part.cpp:273
+msgid "Rich Text Format (*.rtf)"
+msgstr "RTF-Dokument (*.rtf)"
+
+#: kbibtex_part.cpp:333
+msgid "Exporting"
+msgstr "Exportieren"
+
+#: kbibtex_part.cpp:344
+msgid "File could not be exported in '%1'."
+msgstr "Die Datei konnte nicht nach \"%1\" exportiert werden."
+
+#: kbibtex_part.cpp:344
+msgid ""
+"\n"
+"\n"
+"See the following error log for details."
+msgstr ""
+"\n"
+"\n"
+"Der folgende Fehlerbericht enthält weitere Details."
+
+#: kbibtex_part.cpp:344 kbibtex_part.cpp:347
+msgid "Exporting failed"
+msgstr "Exportvorgang ist fehlgeschlagen"
+
+#: kbibtex_part.cpp:347
+msgid "File could not be exported to '%1'."
+msgstr "Die Datei konnte nicht nach \"%1\" exportiert werden."
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "Supported Bibliographies"
+msgstr "Unterstützte Bibliographien"
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "MODS or EndNote XML (*.xml)"
+msgstr "MODS oder EndNote XML (*.xml)"
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "All files (*.*)"
+msgstr "Alle Datei (*.*)"
+
+#: kbibtex_part.cpp:383 kbibtexshell.cpp:332
+msgid ""
+"The given file could not be read, check if it exists or if it is readable "
+"for the current user."
+msgstr ""
+"Die angegebene Datei konnte nicht gelesen werden. Bitte überprüfen, ob die "
+"Datei existiert und lesbar für den Benutzer ist."
+
+#: kbibtex_part.cpp:398
+msgid "The given file could not be merged."
+msgstr "Die angegebene Datei konnte nicht zusammengeführt werden."
+
+#: kbibtex_part.cpp:427
+msgid "Save the current file"
+msgstr "Aktuelle Datei speichern"
+
+#: kbibtex_part.cpp:428
+msgid "Save the current file under a new filename"
+msgstr "Aktuelle Datei unter neuem Dateinamen speichern"
+
+#: kbibtex_part.cpp:430
+msgid "Statistics..."
+msgstr "Statistik..."
+
+#: kbibtex_part.cpp:431
+msgid "Find Duplicates..."
+msgstr "Duplikate suchen..."
+
+#: kbibtex_part.cpp:432
+msgid "Export..."
+msgstr "Exportieren..."
+
+#: kbibtex_part.cpp:433
+msgid "Export to a different file format"
+msgstr "Exportieren in ein anderes Dateiformat"
+
+#: kbibtex_part.cpp:434
+msgid "Merge..."
+msgstr "Zusammenführen..."
+
+#: kbibtex_part.cpp:435
+msgid "Merge BibTeX entries from another file"
+msgstr "BibTeX-Einträge aus anderer Datei zusammenführen"
+
+#: kbibtex_part.cpp:438
+msgid "Cut the selected BibTeX elements to the clipboard"
+msgstr "Ausgewählte BibTeX-Element ausschneiden in die Zwischenablage"
+
+#: kbibtex_part.cpp:441
+msgid "Copy the selected BibTeX elements to the clipboard"
+msgstr "Ausgewählte BibTeX-Element kopieren in die Zwischenablage"
+
+#: kbibtex_part.cpp:445
+msgid "Copy &Reference"
+msgstr "&Referenz kopieren"
+
+#: kbibtex_part.cpp:446
+msgid "Copy a reference of the selected BibTeX elements to the clipboard"
+msgstr ""
+"Referenzen auf ausgewählte BibTeX-Element kopieren in die Zwischenablage"
+
+#: kbibtex_part.cpp:449
+msgid "Paste BibTeX elements from the clipboard"
+msgstr "BibTeX-Element aus der Zwischenablage einfügen"
+
+#: kbibtex_part.cpp:451
+msgid "Select all BibTeX elements"
+msgstr "Alle BibTeX-Elemente auswählen"
+
+#: kbibtex_part.cpp:452
+msgid "Send Reference to &LyX"
+msgstr "Referenz an &LyX senden"
+
+#: kbibtex_part.cpp:453
+msgid "Send a reference of the selected BibTeX elements to LyX"
+msgstr "Eine Referenz für die ausgewählten BibTeX-Element an LyX senden"
+
+#: kbibtex_part.cpp:456
+msgid "Find text"
+msgstr "Text suchen"
+
+#: kbibtex_part.cpp:458
+msgid "Find next occurrence"
+msgstr "Nächstes Vorkommen suchen"
+
+#: kbibtex_part.cpp:462
+msgid "Search Online Databases"
+msgstr "Online-Datenbanken durchsuchen"
+
+#: kbibtex_part.cpp:463
+msgid "Search online databases to import bibliography data"
+msgstr ""
+"Online-Datenbanken durchsuchen, um bibliographische Daten zu importieren"
+
+#: kbibtex_part.cpp:465
+msgid "Search Document Online"
+msgstr "Dokument online suchen"
+
+#: kbibtex_part.cpp:466
+msgid "Search websites for the selected BibTeX element"
+msgstr "Webseiten nach den ausgewählten BibTeX-Elementen durchsuchen"
+
+#: kbibtex_part.cpp:470
+msgid "&Show Columns"
+msgstr "&Spalten zeigen"
+
+#: kbibtex_part.cpp:471
+msgid "Select columns to show in the main list"
+msgstr "Spalten auswählen, die in der Hauptliste angezeigt werden"
+
+#: kbibtex_part.cpp:472
+msgid "View Document"
+msgstr "Dokument ansehen"
+
+#: kbibtex_part.cpp:473
+msgid "View the documents associated with this BibTeX entry"
+msgstr "Die mit diesem BibTeX-Eintrag verknüpften Dokumente betrachten"
+
+#: kbibtex_part.cpp:475
+msgid "View Primary Document"
+msgstr "Primäres Dokument ansehen"
+
+#: kbibtex_part.cpp:477
+msgid "View Primary Online Reference"
+msgstr "Primäre Online-Referenz ansehen"
+
+#: kbibtex_part.cpp:479
+msgid "Assign Keywords"
+msgstr "Schlüsselwort zuweisen"
+
+#: kbibtex_part.cpp:480
+msgid "Assign keywords to this entry"
+msgstr "Schlüsselwörter zu diesem Eintrag hinzufügen"
+
+#: kbibtex_part.cpp:483
+msgid "Set entry ids as specified in the id suggestion settings"
+msgstr ""
+"Eintragsbezeichner setzen wie im entsprechenden Einstellungsdialog "
+"festgesetzt"
+
+#: kbibtex_part.cpp:487
+msgid "Configure KBibTeX"
+msgstr "KBibTeX einrichten"
+
+#: kbibtex_part.cpp:488
+msgid "Configure Source View..."
+msgstr "Quelltextansicht einrichten..."
+
+#: kbibtex_part.cpp:489
+msgid "Configure the Source Editor"
+msgstr "Quelltextansicht einrichten"
+
+#: kbibtex_part.cpp:491 settings.cpp:700
+msgid "Article"
+msgstr "Artikel"
+
+#: kbibtex_part.cpp:491
+msgid "Add an article to the BibTeX file"
+msgstr "Einen Artikel zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:492 settings.cpp:702
+msgid "Book"
+msgstr "Buch"
+
+#: kbibtex_part.cpp:492
+msgid "Add a book to the BibTeX file"
+msgstr "Ein Buch zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:493 settings.cpp:704
+msgid "Booklet"
+msgstr "Broschüre"
+
+#: kbibtex_part.cpp:493
+msgid "Add a booklet to the BibTeX file"
+msgstr "Eine Broschüre zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:494
+msgid "Electronic (IEEE)"
+msgstr "Elektronischer Verweis (IEEE)"
+
+#: kbibtex_part.cpp:494
+msgid "Add an electronic reference (IEEE) to the BibTeX file"
+msgstr "Einen elektronischen Verweis (IEEE) zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:495 settings.cpp:710
+msgid "InBook"
+msgstr "In Buch"
+
+#: kbibtex_part.cpp:495
+msgid "Add a part of a book to the BibTeX file"
+msgstr "Einen Teil eines Buches zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:496 settings.cpp:712
+msgid "InCollection"
+msgstr "In Sammlung"
+
+#: kbibtex_part.cpp:496
+msgid "Add a publication which is part of some collection to the BibTeX file"
+msgstr ""
+"Ein Veröffentlichung, die Teil einer Sammlung ist, zur BibTeX-Datei "
+"hinzufügen"
+
+#: kbibtex_part.cpp:497 settings.cpp:714
+msgid "InProceedings"
+msgstr "In Tagungsband"
+
+#: kbibtex_part.cpp:497
+msgid "Add a publication which is part of some proceedings to the BibTeX file"
+msgstr ""
+"Ein Veröffentlichung, die Teil eines Tagungsbandes ist, zur BibTeX-Datei "
+"hinzufügen"
+
+#: kbibtex_part.cpp:498 settings.cpp:716
+msgid "Manual"
+msgstr "Handbuch"
+
+#: kbibtex_part.cpp:498
+msgid "Add a manual to the BibTeX file"
+msgstr "Ein Handbuch zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:499 settings.cpp:718
+msgid "MastersThesis"
+msgstr "Diplomarbeit"
+
+#: kbibtex_part.cpp:499
+msgid "Add a master or diploma thesis to the BibTeX file"
+msgstr "Eine Master- oder Diplomarbeit zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:500
+msgid "Add a not specified document or reference to the BibTeX file"
+msgstr "Ein unspezifiziertes Dokument zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:501 settings.cpp:722
+msgid "PhDThesis"
+msgstr "Doktorarbeit"
+
+#: kbibtex_part.cpp:501
+msgid "Add a PhD thesis to the BibTeX file"
+msgstr "Eine Doktorarbeit zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:502 settings.cpp:724
+msgid "Proceedings"
+msgstr "Tagungsband"
+
+#: kbibtex_part.cpp:502
+msgid "Add some proceedings to the BibTeX file"
+msgstr "Ein Tagungsband zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:503 settings.cpp:726
+msgid "TechReport"
+msgstr "Technischer Bericht"
+
+#: kbibtex_part.cpp:503
+msgid "Add a technical report to the BibTeX file"
+msgstr "Einen technischen Bericht zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:504 settings.cpp:728
+msgid "Unpublished"
+msgstr "Unveröffentlicht"
+
+#: kbibtex_part.cpp:504
+msgid "Add an unpublished document to the BibTeX file"
+msgstr "Ein unveröffentlichtes Dokument zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:505
+msgid "Add a preamble to the BibTeX file"
+msgstr "Eine BibTeX-Einleitung zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:506
+msgid "Add a comment to the BibTeX file"
+msgstr "Einen Kommentar zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:507
+msgid "Add a macro to the BibTeX file"
+msgstr "Ein Makro zur BibTeX-Datei hinzufügen"
+
+#: kbibtex_part.cpp:510
+msgid "Edit the selected BibTeX element"
+msgstr "Das ausgewählte BibTeX-Element bearbeiten"
+
+#: kbibtex_part.cpp:513
+msgid "Delete the selected BibTeX elements"
+msgstr "Das ausgewählte BibTeX-Element löschen"
+
+#: kbibtex_part.cpp:516
+msgid "Show &Comments"
+msgstr "&Kommentare anzeigen"
+
+#: kbibtex_part.cpp:517
+msgid "Show the comments of a BibTeX document"
+msgstr "Kommentare im BibTeX-Dokument anzeigen"
+
+#: kbibtex_part.cpp:518
+msgid "Show &Macros"
+msgstr "&Makros anzeigen"
+
+#: kbibtex_part.cpp:519
+msgid "Show the macros of a BibTeX document"
+msgstr "Makros im BibTeX-Dokument anzeigen"
+
+#: kbibtex_part.cpp:521
+msgid "Accept input from other programs"
+msgstr "Eingaben von anderen Programmen annehmen"
+
+#: kbibtex_part.cpp:537 rc.cpp:9 rc.cpp:18 rc.cpp:21 rc.cpp:39 rc.cpp:48
+#: rc.cpp:51
+msgid "&New"
+msgstr "&Neu"
+
+#: kbibtex_part.cpp:538
+msgid "Add a new element to this BibTeX document"
+msgstr "Neues Element in dieses BibTeX-Dokument einfügen"
+
+#: kbibtex_part.cpp:622
+msgid ""
+"Some other KBibTeX instance is using the pipe.\n"
+"If this assumption is wrong, please delete '%1'."
+msgstr ""
+"Eine andere KBibTeX-Instanz benutzt die Pipe.\n"
+"Falls diese Annahme falsch ist, muss die Datei \"%1\" gelöscht werden."
+
+#: kbibtex_part.cpp:622
+msgid "Pipe already in use"
+msgstr "Pipe wird bereits benutzt"
+
+#: kbibtex_part.cpp:651
+msgid "Could not create pipe at '%1'."
+msgstr "Pipe \"%1\" konnte nicht angelegt werden."
+
+#: kbibtex_part.cpp:651
+msgid "Error creating pipe"
+msgstr "Fehler bei Pipe-Erstellung"
+
+#: kbibtex_part.cpp:695
+msgid ""
+"The KBibTeX part has problems to initialize itself. Only limited "
+"functionality will be available."
+msgstr ""
+"Das KBibTeX-Part konnte sich selber nicht initialisieren. Nur "
+"eingeschränkte Funktionalität steht zur Verfügung."
+
+#: kbibtex_part.cpp:695
+msgid "KBibTeX Part"
+msgstr "KBibTeX-Part"
+
+#: kbibtex_part.cpp:742
+msgid "KBibTeXPart"
+msgstr "KBibTeXPart"
+
+#: kbibtexshell.cpp:76
+msgid "Could not find our part!"
+msgstr "Konnte den KBibTeX-Part nicht finden!"
+
+#: kbibtexshell.cpp:145
+msgid ""
+"Click to open a file\n"
+"Click and hold to open a recent file"
+msgstr ""
+"Drücken um eine Datei zu öffnen\n"
+"Drücken und halten um eine vorherige Datei zu öffnen"
+
+#: kbibtexshell.cpp:182
+msgid "Create a new window for a new BibTeX file"
+msgstr "Neues Fenster für eine neue BibTeX-Datei erstellen"
+
+#: kbibtexshell.cpp:184
+msgid "Open an existing BibTeX file"
+msgstr "Eine bestehende BibTeX-Datei öffnen"
+
+#: kbibtexshell.cpp:187
+msgid ""
+"This lists files which you have opened recently, and allows you to easily "
+"open them again."
+msgstr ""
+"Hier werden früher geöffnete Dateien angezeigt, die einfach geöffnet "
+"werden können."
+
+#: kbibtexshell.cpp:191
+msgid "Close this KBibTeX window"
+msgstr "Dieses KBibTeX-Fenster schließen"
+
+#: kbibtexshell.cpp:196
+msgid "Show or hide the window's status bar"
+msgstr "Statusleiste anzeigen oder verbergen"
+
+#: kbibtexshell.cpp:198
+msgid "Configure key bindings for KBibTeX"
+msgstr "Kurzbefehle für KBibTeX konfigurieren"
+
+#: kbibtexshell.cpp:199
+msgid "Configure the tool bar for KBibTeX"
+msgstr "Werkzeugleiste für KBibTeX konfigurieren"
+
+#: kbibtexshell.cpp:350 main.cpp:95
+msgid "Could not open file '%1'."
+msgstr "Konnte Datei \"%1\" nicht öffnen."
+
+#: macrowidget.cpp:39
+msgid "Edit BibTeX Macro"
+msgstr "BibTeX-Makro bearbeiten"
+
+#: macrowidget.cpp:84
+msgid "Macro &id:"
+msgstr "Makro-&Id:"
+
+#: macrowidget.cpp:91
+msgid "Macro &value:"
+msgstr "Makro-&Text:"
+
+#: main.cpp:40
+msgid "A BibTeX editor for KDE"
+msgstr "Ein BibTeX-Editor für KDE"
+
+#: main.cpp:46
+msgid "Document to open."
+msgstr "Zu öffnendes Dokument"
+
+#: main.cpp:111
+msgid "KBibTeX"
+msgstr "KBibTeX"
+
+#: main.cpp:114
+msgid "NAME OF TRANSLATORS"
+msgstr "Thomas Fischer"
+
+#: main.cpp:114
+msgid "EMAIL OF TRANSLATORS"
+msgstr "fischer@unix-ag.uni-kl.de"
+
+#: mergeelements.cpp:112
+msgid "Preamble text"
+msgstr "Präambel-Text"
+
+#: mergeelements.cpp:124
+msgid "Next"
+msgstr "Weiter"
+
+#: mergeelements.cpp:124
+msgid "Previous"
+msgstr "Zurück"
+
+#: mergeelements.cpp:143
+msgid ""
+"Select elements to merge. At least two elements must be checked to perform a "
+"merge operation. Checked entries will be replaced by the merged element, "
+"unchecked elements will be kept."
+msgstr ""
+"Einträge zum Verschmelzen auswählen. Mindestens zwei Einträge mussen "
+"angekreuzt sein um eine Verschmelzung durchzuführen. Angekreuzte Einträge "
+"werden durch den verschmolzenen Eintrag ersetzt, die übrigen Einträge "
+"werden nicht verändert."
+
+#: mergeelements.cpp:147
+msgid "Entry/Macro Id"
+msgstr "Eintrags-/Makro-Bezeichner"
+
+#: mergeelements.cpp:159
+msgid ""
+"Choose from this list which alternatives you want to keep in the merged "
+"element."
+msgstr ""
+"In dieser Liste können die Alternativen gewählt werden, die im "
+"verschmolzenen Eintrag beibehalten werden."
+
+#: mergeelements.cpp:163
+msgid "Field/Key"
+msgstr "Feld/Schlüssel"
+
+#: mergeelements.cpp:492
+msgid "No duplicates found."
+msgstr "Keine Duplikate gefunden."
+
+#: mergeelements.cpp:557
+msgid "Id"
+msgstr "Bezeichner"
+
+#: preamblewidget.cpp:33
+msgid "Edit BibTeX Preamble"
+msgstr "BibTeX-Präambel bearbeiten"
+
+#: preamblewidget.cpp:76
+msgid "&Preamble:"
+msgstr "&Präambel:"
+
+#: rc.cpp:6 rc.cpp:36
+msgid "E&lement"
+msgstr "E&lement"
+
+#: rc.cpp:15 rc.cpp:27 rc.cpp:45 rc.cpp:57
+msgid "Se&ttings"
+msgstr "Eins&tellungen"
+
+#: searchbar.cpp:92
+msgid "Add a new BibTeX entry, comment or macro to this file"
+msgstr "Neuen BibTeX-Eintrag, -Kommentar oder Makro zur Datei hinzufügen"
+
+#: searchbar.cpp:97
+msgid "Add a new BibTeX entry from an online database"
+msgstr "Neuen BibTeX-Eintrag aus einer Online-Datenbank hinzufügen"
+
+#: searchbar.cpp:105
+msgid "Erase current search pattern"
+msgstr "Aktuelle Suchanfrage löschen"
+
+#: searchbar.cpp:108
+msgid "&Search:"
+msgstr "&Suchen:"
+
+#: searchbar.cpp:121
+msgid "Exact"
+msgstr "Exakt"
+
+#: searchbar.cpp:122
+msgid "Every word"
+msgstr "Jedes Wort"
+
+#: searchbar.cpp:123
+msgid "Any word"
+msgstr "Beliebiges Wort"
+
+#: searchbar.cpp:126
+msgid "Restrict to:"
+msgstr "Beschränken auf:"
+
+#: searchbar.cpp:133
+msgid "All fields"
+msgstr "Alle Felder"
+
+#: settings.cpp:57
+msgid "Could not determine filename for XSLT file"
+msgstr "Der Dateiname der XSLT-Datei konnte nicht bestimmt werden"
+
+#: settings.cpp:57
+msgid "Initialization failed"
+msgstr "Initialisierung fehlgeschlagen"
+
+#: settings.cpp:639
+msgid "Crossref"
+msgstr "Querverweis"
+
+#: settings.cpp:691 settings.cpp:730
+msgid "Unknown"
+msgstr "Unbekannt"
+
+#: settings.cpp:706
+msgid "Collection"
+msgstr "Sammlung"
+
+#: settings.cpp:708
+msgid "Electronic"
+msgstr "Elektronischer Verweis (IEEE)"
+
+#: settingsdlg.cpp:42
+msgid "&Editing"
+msgstr "&Bearbeiten"
+
+#: settingsdlg.cpp:48
+msgid "&File Open&&Save"
+msgstr "&Datei öffnen und speichern"
+
+#: settingsdlg.cpp:54
+msgid "&Search URLs"
+msgstr "&Such-URLs"
+
+#: settingsdlg.cpp:60
+msgid "Global &Keywords"
+msgstr "Globale Schlüsselworter"
+
+#: settingsdlg.cpp:66 settingsidsuggestions.cpp:337
+msgid "Id Suggestions"
+msgstr "Id-Vorschläge"
+
+#: settingsdlg.cpp:72
+msgid "User Defined Fields"
+msgstr "Benutzerdefinierte Felder"
+
+#: settingsdlg.cpp:79 webqueryz3950.cpp:188 webqueryz3950.cpp:193
+msgid "Z39.50"
+msgstr "Z39.50"
+
+#: settingsediting.cpp:56
+msgid "Path to add:"
+msgstr "Pfad zum Hinzufügen:"
+
+#: settingsediting.cpp:63
+msgid "Select a path to add"
+msgstr "Einen Pfad zum Hinzufügen aussuchen"
+
+#: settingsediting.cpp:67
+msgid "Add chosen path to list"
+msgstr "Ausgewählten Pfad zur Liste hinzufügen"
+
+#: settingsediting.cpp:70
+msgid "List of paths:"
+msgstr "Pfadliste:"
+
+#: settingsediting.cpp:73
+msgid "Path"
+msgstr "Pfad"
+
+#: settingsediting.cpp:82
+msgid "Remove selected path from list"
+msgstr "Ausgewählten Pfad aus Liste entfernen"
+
+#: settingsediting.cpp:99
+msgid "Edit Document Search Paths"
+msgstr "Suchpfade für Dokumente"
+
+#: settingsediting.cpp:140
+msgid "Folder '%1' does not exist or is not readable."
+msgstr "Ordner \"%1\" existiert nicht oder ist nicht lesbar"
+
+#: settingsediting.cpp:160
+msgid "Main List"
+msgstr "Hauptliste"
+
+#: settingsediting.cpp:162
+msgid "&Sorting:"
+msgstr "&Sortierung:"
+
+#: settingsediting.cpp:174
+msgid "So&rting order:"
+msgstr "Sortier&reihenfolge:"
+
+#: settingsediting.cpp:176
+msgid "Ascending"
+msgstr "Aufsteigend"
+
+#: settingsediting.cpp:177
+msgid "Descending"
+msgstr "Absteigend"
+
+#: settingsediting.cpp:180
+msgid "&Double click action:"
+msgstr "Aktion bei &Doppelklick:"
+
+#: settingsediting.cpp:182
+msgid "Edit element"
+msgstr "Element bearbeiten"
+
+#: settingsediting.cpp:183
+msgid "Open document"
+msgstr "Dokument öffnen"
+
+#: settingsediting.cpp:186
+msgid "On dragging with mouse:"
+msgstr "Beim Ziehen mit der Maus:"
+
+#: settingsediting.cpp:188
+msgid "Copy reference (\\cite{...})"
+msgstr "Referenz kopieren (\\cite{...})"
+
+#: settingsediting.cpp:189
+msgid "Copy BibTeX text (@article{...})"
+msgstr "BibTeX-Text kopieren (@article{...})"
+
+#: settingsediting.cpp:192
+msgid "Entry Editing"
+msgstr "Eintrag bearbeiten"
+
+#: settingsediting.cpp:196
+msgid "Search Bar"
+msgstr "Suchleiste"
+
+#: settingsediting.cpp:198
+msgid "Reset field filter when changing filter text"
+msgstr "Filter für Felder zurücksetzen wenn der Suchtext geändert wird"
+
+#: settingsediting.cpp:200
+msgid "Presentation"
+msgstr "Darstellung"
+
+#: settingsediting.cpp:202
+msgid "Use special &font"
+msgstr "Besondere Schrift"
+
+#: settingsediting.cpp:204
+msgid "Author and editor names:"
+msgstr "Autoren- und Herausgebernamen:"
+
+#: settingsediting.cpp:207
+msgid "John Doe"
+msgstr "Max Mustermann"
+
+#: settingsediting.cpp:208
+msgid "Doe, John"
+msgstr "Mustermann, Max"
+
+#: settingsediting.cpp:209
+msgid "Show names as 'John Doe' instead of 'Doe, John'"
+msgstr "Namen zeigen als \"Max Mustermann\" anstatt \"Mustermann, Max\""
+
+#: settingsediting.cpp:210
+msgid ""
+"Show names as 'John Doe' instead of 'Doe, John'.\n"
+"\n"
+"Takes only effect after the next start of KBibTeX."
+msgstr ""
+"Namen zeigen als \"Max Mustermann\" anstatt \"Mustermann, Max\".\n"
+"Tritt erst nach einem Neustart von KBibTeX in Kraft."
+
+#: settingsediting.cpp:212
+msgid "Document Search Paths"
+msgstr "Suchpfade für Dokumente"
+
+#: settingsediting.cpp:214
+msgid "Edit Search Paths"
+msgstr "Suchpfade für Dokumente bearbeiten"
+
+#: settingsediting.cpp:218
+msgid "Sensitivity:"
+msgstr "Empfindlichkeit:"
+
+#: settingsediting.cpp:221
+msgid "Low"
+msgstr "Niedrig"
+
+#: settingsediting.cpp:228
+msgid "High"
+msgstr "Hoch"
+
+#: settingsfileio.cpp:53
+msgid "English|German|French|Spanish|Swedish"
+msgstr "Englisch|Deutsch|Französisch|Spanisch|Schwedisch"
+
+#: settingsfileio.cpp:58
+msgid ""
+"plain|achemso (American Chemical Society)|alpha|unsrt|abbrv|acm (Association "
+"of Computing Machinery)|apacite|apalike|authordate|ieeetr|natbib|siam"
+msgstr ""
+"plain|achemso (American Chemical Society)|alpha|unsrt|abbrv|acm (Association "
+"of Computing Machinery)|apacite|apalike|authordate|ieeetr|natbib|siam"
+
+#: settingsfileio.cpp:177
+msgid "XSLT Stylesheet"
+msgstr "XSLT-Stylesheet"
+
+#: settingsfileio.cpp:201
+msgid "No exporter available"
+msgstr "Kein Export-Modul verfügbar"
+
+#: settingsfileio.cpp:223
+msgid "Path to the jar files for bib2db5"
+msgstr "Pfad zu .jar-Dateien für bib2db5"
+
+#: settingsfileio.cpp:236
+msgid ""
+"To export DocBook5 bibliographies, the path to the jar file for bib2db5 has "
+"to be set first."
+msgstr ""
+"Um DocBook 5 (Bibliographie) exportieren zu können, muss der Pfad zu "
+"bib2db5 zuerst gesetzt werden."
+
+#: settingsfileio.cpp:236
+msgid "Invalid path for bib2db5"
+msgstr "Ungültiger Pfad für bib2db5"
+
+#: settingsfileio.cpp:244
+msgid "BibTeX Import and Export"
+msgstr "Import und Export von BibTeX"
+
+#: settingsfileio.cpp:246
+msgid "&Encoding:"
+msgstr "Kodierung:"
+
+#: settingsfileio.cpp:249
+msgid "Text &delimiters:"
+msgstr "Textbegrenzungen:"
+
+#: settingsfileio.cpp:252
+msgid "Keyword casing:"
+msgstr "Groß-/Kleinschreibung von Schlüsselwörtern:"
+
+#: settingsfileio.cpp:255
+msgid "Protect title's casing:"
+msgstr "Groß-/Kleinschreibung schützen:"
+
+#: settingsfileio.cpp:256
+msgid "Put curly brackets around"
+msgstr "Mit geschweiften Klammern einfassen"
+
+#: settingsfileio.cpp:257
+msgid "Put curly brackets around title and other selected fields."
+msgstr "Geschweifte Klammern um Titel und weitere Felder setzen"
+
+#: settingsfileio.cpp:258
+msgid ""
+"Put curly brackets around title and other selected fields to protect them "
+"from case changes in certain BibTeX styles."
+msgstr ""
+"Geschweifte Klammern um Titel und weitere Felder setzen um sie vor "
+"Änderungen in der Groß-/Kleinschreibung bei bestimmten BibTeX-Styles zu "
+"schützen."
+
+#: settingsfileio.cpp:260
+msgid "PDF, PostScript and Rich Text Format Export"
+msgstr "PDF-, PostScript- und RTF-Export"
+
+#: settingsfileio.cpp:262
+msgid ""
+"Select the layout of the resulting PDF, PostScript or Rich Text Format "
+"document when exporting a BibTeX file."
+msgstr ""
+"Das Aussehen des endgültigen PDF-, PostScript- oder RTF-Dokuments beim "
+"BibTeX-Export auswählen."
+
+#: settingsfileio.cpp:263
+msgid "&Language:"
+msgstr "Sprache:"
+
+#: settingsfileio.cpp:266
+msgid "&Biblography style:"
+msgstr "&Bibliographiestil:"
+
+#: settingsfileio.cpp:270
+msgid "PDF Export"
+msgstr "PDF-Export"
+
+#: settingsfileio.cpp:272
+msgid "Embed local files into PDF if possible"
+msgstr "Lokale Dateien in das PDF einbinden falls möglich"
+
+#: settingsfileio.cpp:273
+msgid ""
+"<qt>If checked, KBibTeX tries to embed all referenced files for the BibTeX "
+"entries into the exported PDF file.<br/>This requires that you have "
+"installed <tt>embedfile.sty</tt>.</qt>"
+msgstr ""
+"<qt>Wenn ausgewählt, versucht KBibTeX alle in diesem BibTeX-Dokument "
+"referenzierten Dateien in die PDF-Datei zu exportieren.<br/> Das erfordert, "
+"daß die Datei <tt>embedfile.sty</tt> installiert ist.</qt>"
+
+#: settingsfileio.cpp:275
+msgid "XML Export"
+msgstr "XML-Export"
+
+#: settingsfileio.cpp:278
+msgid "Path to the jar files for bib2db5:"
+msgstr "Pfad zur .jar-Datei für bib2db5:"
+
+#: settingsfileio.cpp:293
+msgid "Export Systems"
+msgstr "Export-Module"
+
+#: settingsfileio.cpp:295
+msgid "HTML:"
+msgstr "HTML:"
+
+#: settingsfileio.cpp:299
+msgid "BibUtils"
+msgstr "BibUtils"
+
+#: settingsfileio.cpp:301
+msgid "Always use BibUtils"
+msgstr "Immer BibUtils verwenden"
+
+#: settingsfileio.cpp:302
+msgid "If possible, use BibUtils to import and export alien bibliography."
+msgstr ""
+"Falls möglich, BibUtils benutzen zum Importieren und Exportieren von "
+"fremden Bibliographieformaten."
+
+#: settingsfileio.cpp:303
+msgid ""
+"If possible, use BibUtils to import and export alien bibliography such as "
+"RIS.\n"
+"If unchecked, prefer internal import and export library."
+msgstr ""
+"Falls möglich, BibUtils benutzen zum Importieren und Exportieren von "
+"fremden Bibliographieformaten (z.B. RIS).\n"
+"Falls nicht angekreuzt, wird die interne Import- und Export-Bibliothek "
+"bevorzugt."
+
+#: settingsfileio.cpp:307
+msgid "Backups"
+msgstr "Sicherheitskopien"
+
+#: settingsfileio.cpp:309
+msgid "Number of Backups:"
+msgstr "Anzahl Sicherheitskopien:"
+
+#: settingsidsuggestions.cpp:90
+#, c-format
+msgid ""
+"\n"
+"Example: %1"
+msgstr ""
+"\n"
+"Beispiel: %1"
+
+#: settingsidsuggestions.cpp:345
+msgid ""
+"_: id suggestion\n"
+"New"
+msgstr "Neu"
+
+#: settingsidsuggestions.cpp:349
+msgid ""
+"_: id suggestion\n"
+"Edit"
+msgstr "Bearbeiten"
+
+#: settingsidsuggestions.cpp:353
+msgid ""
+"_: id suggestion\n"
+"Delete"
+msgstr "Löschen"
+
+#: settingsidsuggestions.cpp:357
+msgid ""
+"_: id suggestion\n"
+"Up"
+msgstr "Nach oben"
+
+#: settingsidsuggestions.cpp:361
+msgid ""
+"_: id suggestion\n"
+"Down"
+msgstr "Nach oben"
+
+#: settingsidsuggestions.cpp:365
+msgid "Toogle default"
+msgstr "Standard umschalten"
+
+#: settingsidsuggestions.cpp:370
+msgid "Use default id suggestion when editing new entries"
+msgstr ""
+"Standard für Eintragsbezeichner verwenden, wenn neue Einträge angelegt "
+"werden"
+
+#: settingsidsuggestions.cpp:373
+msgid "Small Words:"
+msgstr "Kleine Wörter:"
+
+#: settingsidsuggestions.cpp:386
+msgid "Small Words"
+msgstr "Kleine Wörter"
+
+#: settingskeyword.cpp:83
+msgid "New Keyword"
+msgstr "Neues Schlüsselwort"
+
+#: settingskeyword.cpp:131
+#, c-format
+msgid ""
+"_n: 1 keyword has been imported.\n"
+"%n keywords have been imported."
+msgstr ""
+"1 Schlüsselwort wurde importiert.\n"
+"%n Schlüsselwörter wurden importiert."
+
+#: settingskeyword.cpp:131
+msgid "Keywords imported"
+msgstr "Schlüsselwörter importiert"
+
+#: settingskeyword.cpp:172
+msgid ""
+"_: keyword\n"
+"Delete"
+msgstr "Löschen"
+
+#: settingskeyword.cpp:176
+msgid ""
+"_: keyword\n"
+"Import"
+msgstr "Importieren"
+
+#: settingssearchurl.cpp:108
+msgid ""
+"The list of URLs will be checked and known entries will be replaced by the "
+"program standards. Search entries you have defined by yourself will be kept "
+"most likely."
+msgstr ""
+"Die URL-Liste wird überprüft und bekannte Einträge werden durch bekannte "
+"Vorlagen ersetzt. Benutzerdefinierte Sucheinträge werden im Normalfall "
+"beibehalten."
+
+#: settingssearchurl.cpp:108
+msgid "Reset list of URLs"
+msgstr "Liste der URLs zurücksetzen"
+
+#: settingssearchurl.cpp:108 settingsz3950.cpp:297
+msgid "Reset"
+msgstr "Zurücksetzen"
+
+#: settingssearchurl.cpp:133
+msgid "Description"
+msgstr "Beschreibung"
+
+#: settingssearchurl.cpp:140
+msgid ""
+"_: search url\n"
+"New"
+msgstr "Neu"
+
+#: settingssearchurl.cpp:144
+msgid ""
+"_: search url\n"
+"Edit"
+msgstr "Bearbeiten"
+
+#: settingssearchurl.cpp:148
+msgid ""
+"_: search url\n"
+"Delete"
+msgstr "Löschen"
+
+#: settingssearchurl.cpp:152
+msgid ""
+"_: search url\n"
+"Reset"
+msgstr "Zurücksetzen"
+
+#: settingssearchurl.cpp:170
+msgid "New URL"
+msgstr "Neue URL"
+
+#: settingssearchurl.cpp:170
+msgid "Edit URL"
+msgstr "URL bearbeitne"
+
+#: settingssearchurl.cpp:173
+msgid "Description:"
+msgstr "Beschreibung:"
+
+#: settingssearchurl.cpp:178
+msgid "URL:"
+msgstr "URL:"
+
+#: settingssearchurl.cpp:184
+msgid "Within the URL, '%1' will be replaced by the search term."
+msgstr "Innerhalb der URL wird \"%1\" durch den Suchausdruck ersetzt."
+
+#: settingssearchurl.cpp:185
+msgid "Include Author:"
+msgstr "Autor einbeziehen:"
+
+#: settingsuserdefinedinput.cpp:62 settingsuserdefinedinput.cpp:74
+#: settingsuserdefinedinput.cpp:229 settingsuserdefinedinput.cpp:238
+#: settingsuserdefinedinput.cpp:251 settingsuserdefinedinput.cpp:257
+msgid "Single line"
+msgstr "Einfache Zeile"
+
+#: settingsuserdefinedinput.cpp:74 settingsuserdefinedinput.cpp:230
+#: settingsuserdefinedinput.cpp:251 settingsuserdefinedinput.cpp:257
+msgid "Multiple lines"
+msgstr "Mehrere Zeilen"
+
+#: settingsuserdefinedinput.cpp:168
+msgid "Name"
+msgstr "Name"
+
+#: settingsuserdefinedinput.cpp:170
+msgid "Label"
+msgstr "Beschriftung"
+
+#: settingsuserdefinedinput.cpp:180
+msgid ""
+"_: user-defined input\n"
+"New"
+msgstr "Neu"
+
+#: settingsuserdefinedinput.cpp:183
+msgid ""
+"_: user-defined input\n"
+"Edit"
+msgstr "Bearbeiten"
+
+#: settingsuserdefinedinput.cpp:186
+msgid ""
+"_: user-defined input\n"
+"Delete"
+msgstr "Löschen"
+
+#: settingsuserdefinedinput.cpp:189
+msgid ""
+"_: user-defined input\n"
+"Up"
+msgstr "Nach oben"
+
+#: settingsuserdefinedinput.cpp:193
+msgid ""
+"_: user-defined input\n"
+"Down"
+msgstr "Nach unten"
+
+#: settingsuserdefinedinput.cpp:210
+msgid "New Field"
+msgstr "Neues Feld"
+
+#: settingsuserdefinedinput.cpp:210
+msgid "Edit Field"
+msgstr "Feld bearbeiten"
+
+#: settingsuserdefinedinput.cpp:213 settingsz3950.cpp:71
+msgid "Name:"
+msgstr "Name:"
+
+#: settingsuserdefinedinput.cpp:218
+msgid "Label:"
+msgstr "Beschriftung:"
+
+#: settingsuserdefinedinput.cpp:224
+msgid "Input Type:"
+msgstr "Datentyp:"
+
+#: settingsz3950.cpp:77
+msgid "Database:"
+msgstr "Datenbank:"
+
+#: settingsz3950.cpp:83
+msgid "Host:"
+msgstr "Host:"
+
+#: settingsz3950.cpp:89
+msgid "Port:"
+msgstr "Port:"
+
+#: settingsz3950.cpp:98
+msgid "User:"
+msgstr "Benutzer:"
+
+#: settingsz3950.cpp:104
+msgid "Password:"
+msgstr "Passwort:"
+
+#: settingsz3950.cpp:110
+msgid "Syntax:"
+msgstr "Syntax:"
+
+#: settingsz3950.cpp:122
+msgid "Locale:"
+msgstr "Sprachkürzel:"
+
+#: settingsz3950.cpp:149
+msgid "Edit Z39.50 Server"
+msgstr "Z39.50-Server bearbeiten"
+
+#: settingsz3950.cpp:297
+msgid "All Z39.50 server configurations will be reset to defaults."
+msgstr ""
+"Alle Z39.50-Serverkonfigurationen werden auf Standardwerte zurückgesetzt."
+
+#: settingsz3950.cpp:297
+msgid "Reset to Default"
+msgstr "Auf Standard zurücksetzen"
+
+#: settingsz3950.cpp:324
+msgid ""
+"_: z3950 server\n"
+"Name"
+msgstr "Name"
+
+#: settingsz3950.cpp:325
+msgid ""
+"_: z3950 server\n"
+"Database"
+msgstr "Datenbank"
+
+#: settingsz3950.cpp:334
+msgid ""
+"_: z3950 server\n"
+"New"
+msgstr "Neu"
+
+#: settingsz3950.cpp:338
+msgid ""
+"_: z3950 server\n"
+"Edit"
+msgstr "Bearbeiten"
+
+#: settingsz3950.cpp:342
+msgid ""
+"_: z3950 server\n"
+"Delete"
+msgstr "Löschen"
+
+#: settingsz3950.cpp:346
+msgid ""
+"_: z3950 server\n"
+"Up"
+msgstr "Nach oben"
+
+#: settingsz3950.cpp:350
+msgid ""
+"_: z3950 server\n"
+"Down"
+msgstr "Nach unten"
+
+#: settingsz3950.cpp:355
+msgid ""
+"_: z3950 server\n"
+"Reset"
+msgstr "Zurücksetzen"
+
+#: sidebar.cpp:113
+msgid "Toggle between showing all fields or only important fields"
+msgstr ""
+"Wechseln zwischen der Ansicht aller Felder oder nur der wichtigesten Felder"
+
+#: sidebar.cpp:117
+msgid "Filter this sidebar for a given field"
+msgstr "Die Seitenleiste nach einem bestimmten Feld filtern"
+
+#: sidebar.cpp:124
+msgid ""
+"Toggle between selecting only one item or multiple items (AND-connected in "
+"search)"
+msgstr ""
+"Umschalten zwischen der Auswahl eines Elements und mehrerer Elemente, die "
+"UND-verknüpft werden"
+
+#: sidebar.cpp:127
+msgid "#"
+msgstr "#"
+
+#: sidebar.cpp:128
+msgid "Items"
+msgstr "Einträge"
+
+#: sidebar.cpp:135
+msgid "Rename all occurrences"
+msgstr "Alle Vorkommen umbenennen"
+
+#: valuewidget.cpp:39
+msgid "Edit field '%1'"
+msgstr "Feld \"%1\" bearbeiten"
+
+#: valuewidget.cpp:137
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewValue%1"
+msgstr "NeuerWert%1"
+
+#: valuewidget.cpp:205
+msgid "Checked entries are string keys, unchecked entries are quoted text."
+msgstr ""
+"Abgeharkte Einträge sind Makro-Schlüssel, nicht abgeharkte Einträge sind "
+"fertiger Text."
+
+#: valuewidget.cpp:232
+msgid "Toggle"
+msgstr "Umschalten"
+
+#: webquery.cpp:94 webquerycsb.cpp:83 webquerydblp.cpp:68
+#: webquerymathscinet.cpp:61 webqueryspireshep.cpp:99
+msgid "Search &term:"
+msgstr "Such&begriff:"
+
+#: webquery.cpp:105 webquerycsb.cpp:103 webquerydblp.cpp:79
+#: webquerysciencedirect.cpp:165 webqueryz3950.cpp:102
+msgid "&Number of results:"
+msgstr "Anzahl Treffer:"
+
+#: webquery.cpp:153
+msgid "Searching"
+msgstr "Suchen"
+
+#: webquery.cpp:153
+#, c-format
+msgid "Searching %1"
+msgstr "Suche in %1"
+
+#: webquery.cpp:315
+msgid "&Import"
+msgstr "&Importieren"
+
+#: webquery.cpp:315
+msgid "Import selected items"
+msgstr "Ausgewählte Einträge importieren"
+
+#: webquery.cpp:363
+#, c-format
+msgid "Search %1"
+msgstr "Suche in %1"
+
+#: webquery.cpp:402
+msgid ""
+"You do not have the necessary permissions to query data from this service."
+msgstr ""
+"Sie verfügen nicht über die notwendigen Rechte, Daten von diesem Dienst "
+"abzufragen."
+
+#: webquery.cpp:431
+msgid "&Engine:"
+msgstr "S&uchmaschine:"
+
+#: webquery.cpp:442
+msgid "&Search"
+msgstr "&Suchen"
+
+#: webquery.cpp:468
+msgid "Import all hits"
+msgstr "Alle Treffer importieren"
+
+#: webqueryamatex.cpp:55
+msgid "Amatex"
+msgstr "Amatex"
+
+#: webqueryamatex.cpp:60
+msgid "About Amatex"
+msgstr "Über Amatex"
+
+#: webqueryamatex.cpp:111 webquerybibsonomy.cpp:116 webquerycitebase.cpp:118
+#: webquerycsb.cpp:280 webquerydblp.cpp:204 webqueryieeexplore.cpp:156
+#: webquerymathscinet.cpp:176 webquerypubmed.cpp:159 webquerypubmed.cpp:171
+#: webqueryspireshep.cpp:206 webqueryzmath.cpp:113
+msgid "Querying database '%1' failed."
+msgstr "Suche in Datenbank \"%1\" ist fehlgeschlagen."
+
+#: webqueryarxiv.cpp:78
+msgid "arXiv"
+msgstr "arXiv"
+
+#: webqueryarxiv.cpp:83
+msgid "arXiv is an archive for preprints"
+msgstr "arXiv ist ein Archiv für Vorabveröffentlichungen"
+
+#: webquerybibsonomy.cpp:63
+msgid "BibSonomy"
+msgstr "BibSonomy"
+
+#: webquerybibsonomy.cpp:68
+msgid "BibSonomy bookmark sharing system"
+msgstr "BibSonomy: Ein Lesezeichen- und Veröffentlichungstauschsystem"
+
+#: webquerycitebase.cpp:62
+msgid "Citebase"
+msgstr "Citebase"
+
+#: webquerycitebase.cpp:67
+msgid "Citebase citation index"
+msgstr "Citebase Zitierungsverzeichnis"
+
+#: webqueryciteseerx.cpp:83
+msgid "CiteSeerX"
+msgstr "CiteSeerX"
+
+#: webqueryciteseerx.cpp:92
+msgid "About CiteSeerX"
+msgstr "Über CiteSeerX"
+
+#: webquerycsb.cpp:90
+msgid ""
+"_: Here, \"Field\" refers to a parameter for the CSB search (author, title, "
+"any)\n"
+"&Field:"
+msgstr "&Feld:"
+
+#: webquerycsb.cpp:111
+msgid "&Year:"
+msgstr "&Jahr:"
+
+#: webquerycsb.cpp:125
+msgid "Sort &by:"
+msgstr "Sortieren &nach:"
+
+#: webquerycsb.cpp:134
+msgid "Online papers only"
+msgstr "Nur online-verfügbare Veröffentlichungen"
+
+#: webquerycsb.cpp:137 webqueryz3950.cpp:59
+msgid "any"
+msgstr "beliebig"
+
+#: webquerycsb.cpp:138 webqueryspireshep.cpp:86 webqueryz3950.cpp:59
+msgid "author"
+msgstr "Autor"
+
+#: webquerycsb.cpp:139 webqueryspireshep.cpp:87 webqueryz3950.cpp:59
+msgid "title"
+msgstr "Titel"
+
+#: webquerycsb.cpp:140
+msgid "exact"
+msgstr "exact"
+
+#: webquerycsb.cpp:141
+msgid "until"
+msgstr "bis"
+
+#: webquerycsb.cpp:142
+msgid "from"
+msgstr "ab"
+
+#: webquerycsb.cpp:144
+msgid "none"
+msgstr "keine"
+
+#: webquerycsb.cpp:145
+msgid "score"
+msgstr "Punkte"
+
+#: webquerycsb.cpp:146
+msgid "year"
+msgstr "Jahr"
+
+#: webquerycsb.cpp:171
+msgid "Computer Science Bibliographies"
+msgstr "Computer Science Bibliographies"
+
+#: webquerycsb.cpp:176
+msgid "Copyright for the Bibliography Collection"
+msgstr "Urheberinformationen zur Bibliographiesammlung"
+
+#: webquerydblp.cpp:89
+msgid "Do not merge corresponding entries"
+msgstr "Zusammengehörige Einträge nicht verschmelzen"
+
+#: webquerydblp.cpp:110
+msgid "DBLP"
+msgstr "DBLP"
+
+#: webquerydblp.cpp:115
+msgid "DBLP - Copyright"
+msgstr "DBLP - Copyright"
+
+#: webquerygooglescholar.cpp:69
+msgid "Google Scholar"
+msgstr "Google Scholar"
+
+#: webquerygooglescholar.cpp:74
+msgid "About Google Scholar"
+msgstr "Über Google Scholar"
+
+#: webqueryieeexplore.cpp:67
+msgid "IEEExplore"
+msgstr "IEEExplore"
+
+#: webqueryieeexplore.cpp:72
+msgid "What is IEEE Xplore?"
+msgstr "What is IEEE Xplore?"
+
+#: webqueryieeexplore.cpp:109
+msgid "You have entered an invalid search."
+msgstr "Eine ungültige Suchanfrage wurde eingegeben."
+
+#: webqueryieeexplore.cpp:109
+msgid "Search Error"
+msgstr "Suchfehler"
+
+#: webquerymathscinet.cpp:81
+msgid ""
+"<qt>Use the same synatx as for <a "
+"href=\"http://www.math.tamu.edu/~comech/tools/bibget/\">BIBGET</a>. For "
+"spaces within a search element, use \"<tt>+</tt>\".<br/>Example: "
+"<tt>a=gilkey t=invariance book 1984</tt></qt>"
+msgstr ""
+
+#: webquerymathscinet.cpp:102
+msgid "MathSciNet"
+msgstr ""
+
+#: webquerymathscinet.cpp:107
+msgid "American Mathematical Society"
+msgstr ""
+
+#: webquerypubmed.cpp:67
+msgid "NCBI (PubMed)"
+msgstr "NCBI (PubMed)"
+
+#: webquerypubmed.cpp:72
+msgid "NCBI's Disclaimer and Copyright"
+msgstr "NCBI-Impressung und Urheberrechte"
+
+#: webquerysciencedirect.cpp:84
+msgid "Title, abstract, keywords:"
+msgstr "Titel, Zusammenfassung, Schlüsselwörter:"
+
+#: webquerysciencedirect.cpp:103
+msgid "Author:"
+msgstr "Autor:"
+
+#: webquerysciencedirect.cpp:120
+msgid "Journal/book title:"
+msgstr "Zeitschrift/Buchtitel:"
+
+#: webquerysciencedirect.cpp:135
+msgid "Volume:"
+msgstr "Band:"
+
+#: webquerysciencedirect.cpp:145
+msgid "Issue:"
+msgstr "Ausgabe:"
+
+#: webquerysciencedirect.cpp:155
+msgid "Page:"
+msgstr "Seite:"
+
+#: webquerysciencedirect.cpp:196
+msgid "ScienceDirect"
+msgstr "ScienceDirect"
+
+#: webquerysciencedirect.cpp:201
+msgid "About ScienceDirect"
+msgstr "Über ScienceDirect"
+
+#: webqueryspireshep.cpp:42
+msgid "DESY (Germany)"
+msgstr "DESY (Deutschland)"
+
+#: webqueryspireshep.cpp:42
+msgid "FNAL (U.S.A.)"
+msgstr "FNAL (U.S.A.)"
+
+#: webqueryspireshep.cpp:42
+msgid "IHEP (Russia)"
+msgstr "IHEP (Russland)"
+
+#: webqueryspireshep.cpp:42
+msgid "Durham U (U.K.)"
+msgstr "Universität von Durham (G.B.)"
+
+#: webqueryspireshep.cpp:42
+msgid "SLAC (U.S.A.)"
+msgstr "SLAC (U.S.A.)"
+
+#: webqueryspireshep.cpp:42
+msgid "YITP (Japan)"
+msgstr "YITP (Japan)"
+
+#: webqueryspireshep.cpp:42
+msgid "LIPI (Indonesia)"
+msgstr "LIPI (Indonesien)"
+
+#: webqueryspireshep.cpp:78
+msgid "Type:"
+msgstr "Typ:"
+
+#: webqueryspireshep.cpp:85
+msgid "raw query"
+msgstr "direkte Anfrage"
+
+#: webqueryspireshep.cpp:88
+msgid "journal"
+msgstr "Zeitschrift"
+
+#: webqueryspireshep.cpp:89
+msgid "EPrint number"
+msgstr "EPrint-Nummer"
+
+#: webqueryspireshep.cpp:90
+msgid "report number"
+msgstr "Berichtnummer"
+
+#: webqueryspireshep.cpp:91
+msgid "keywords"
+msgstr "Schlüsselwörter"
+
+#: webqueryspireshep.cpp:109
+msgid "Include abstracts from arxiv.org if available"
+msgstr "Zusammenfassungen von arxiv.org einbinden falls verfügbar"
+
+#: webqueryspireshep.cpp:130
+msgid "SPIRES-HEP"
+msgstr "SPIRES-HEP"
+
+#: webqueryspireshep.cpp:135
+msgid "SPIRES-HEP Search"
+msgstr "SPIRES-HEP-Suche"
+
+#: webqueryz3950.cpp:59
+msgid "publisher"
+msgstr "Verlag"
+
+#: webqueryz3950.cpp:94
+msgid "Server:"
+msgstr "Server:"
+
+#: webqueryz3950.cpp:116
+msgid "Search term 1:"
+msgstr "Suchbegriff 1:"
+
+#: webqueryz3950.cpp:126 webqueryz3950.cpp:147
+msgid "Search in:"
+msgstr "Suchen in:"
+
+#: webqueryz3950.cpp:138
+msgid "Search term 2:"
+msgstr "Suchbegriff 2:"
+
+#: webqueryz3950.cpp:163
+msgid "and"
+msgstr "und"
+
+#: webqueryz3950.cpp:164
+msgid "or"
+msgstr "oder"
+
+#: webqueryz3950.cpp:330
+#, c-format
+msgid ""
+"The server returned the following message:\n"
+"\n"
+"%1"
+msgstr ""
+"Der Server gab folgende Fehlermeldung zurück:\n"
+"\n"
+"%1"
+
+#: webqueryz3950.cpp:330
+msgid "Error querying Z39.50 server"
+msgstr "Fehler beim Abfragen des Z39.50-Servers"
+
+#: webqueryzmath.cpp:61
+msgid "Zentralblatt MATH"
+msgstr "Zentralblatt MATH"
+
+#: webqueryzmath.cpp:66
+msgid "About Zentralblatt MATH"
+msgstr "Über Zentralblatt MATH"
+
+#: z3950connection.cpp:158
+msgid "Query error!"
+msgstr "Abfragefehler!"
+
+#: z3950connection.cpp:205
+msgid "Connection search error %1: %2"
+msgstr "Verbindungssuchfehler %1: %2"
+
+#: z3950connection.cpp:294
+msgid "Record syntax error"
+msgstr "Datensatz-Syntaxfehler"
+
+#: z3950connection.cpp:405
+msgid "Connection error %1: %2"
+msgstr "Verbindungsfehler %1: %2"
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..5c59403
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,2906 @@
+# translation of fr.po to
+# translation of fr.po_[rJMK1a].po to
+#
+# Julien Richard-Foy <julien.rf@no-log.org>, 2008, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: fr\n"
+"POT-Creation-Date: 2010-07-01 13:55+0200\n"
+"PO-Revision-Date: 2009-01-04 22:15+0100\n"
+"Last-Translator: Julien Richard-Foy <julien.rf@no-log.org>\n"
+"Language-Team: fr <kde-francophone@kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Report-Msgid-Bugs-To: \n"
+"X-Generator: Lokalize 0.2\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: _translatorinfo.cpp:1
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Julien Richard-Foy"
+
+#: _translatorinfo.cpp:3
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "julien.rf@no-log.org"
+
+#: commentwidget.cpp:55
+msgid "Co&mment:"
+msgstr "Commentaire :"
+
+#: commentwidget.cpp:64
+msgid "&Use @Comment for comment instead of plain text"
+msgstr "Utiliser @Comment plutôt que du texte brut"
+
+#: commentwidget.cpp:82
+msgid "Edit BibTeX Comment"
+msgstr "Éditer le commentaire BibTeX"
+
+#: documentlistview.cpp:120
+msgid "List View"
+msgstr "Liste"
+
+#: documentlistview.cpp:120
+msgid "Updating main view ..."
+msgstr "Mise à jour de la vue principale…"
+
+#: documentlistview.cpp:253
+msgid "Show Columns"
+msgstr "Afficher les colonnes"
+
+#: documentlistview.cpp:259 documentlistview.cpp:756 settingsediting.cpp:164
+msgid "Element Type"
+msgstr "Type"
+
+#: documentlistview.cpp:450
+msgid "Paste text as..."
+msgstr "Coller du texte..."
+
+#: documentlistview.cpp:757 settingsediting.cpp:165
+msgid "Entry Id"
+msgstr "Id de l'élément"
+
+#: documentlistviewitem.cpp:114 kbibtex_part.cpp:506
+msgid "Comment"
+msgstr "Commentaire"
+
+#: documentlistviewitem.cpp:124 kbibtex_part.cpp:507 macrowidget.cpp:93
+msgid "Macro"
+msgstr "Macro"
+
+#: documentlistviewitem.cpp:138 kbibtex_part.cpp:505 preamblewidget.cpp:78
+msgid "Preamble"
+msgstr "Préambule"
+
+#: documentsourceview.cpp:214
+msgid "Source View"
+msgstr "Source"
+
+#: documentsourceview.cpp:214
+msgid "Converting BibTeX document to plain text ..."
+msgstr "Conversion du document BibTeX en texte brut…"
+
+#: documentsourceview.cpp:369
+msgid ""
+"Could not find text '%1' in the document.\n"
+"Start from the beginning?"
+msgstr ""
+"Impossible de trouver le texte « %1 » dans le document.\n"
+"Recommencer depuis le début ?"
+
+#: documentsourceview.cpp:369
+msgid "Find text in source view"
+msgstr "Chercher du texte dans la source"
+
+#: documentsourceview.cpp:369
+msgid "Restart search"
+msgstr "Recommencer la recherche"
+
+#: documentwidget.cpp:120
+msgid "L&ist view"
+msgstr "Liste"
+
+#: documentwidget.cpp:142
+msgid "So&urce view"
+msgstr "Source"
+
+#: documentwidget.cpp:174
+msgid "<qt>Loading file <b>%1</b></qt>"
+msgstr "<qt>Chargement du fichier <b>%1</b></qt>"
+
+#: documentwidget.cpp:221
+msgid "Do you want to search for duplicates in the merged document?"
+msgstr ""
+
+#: documentwidget.cpp:221
+#, fuzzy
+msgid "Find duplicates?"
+msgstr "Trouver des doublons"
+
+#: documentwidget.cpp:221 findduplicates.cpp:58 mergeelements.cpp:484
+#: mergeelements.cpp:492 settingsediting.cpp:216
+msgid "Find Duplicates"
+msgstr "Trouver des doublons"
+
+#: documentwidget.cpp:281 documentwidget.cpp:1345 documentwidget.cpp:1359
+#: kbibtex_part.cpp:306 kbibtex_part.cpp:320
+msgid "Choose file format"
+msgstr "Choisir un format de fichier"
+
+#: documentwidget.cpp:281 documentwidget.cpp:1345 documentwidget.cpp:1359
+#: kbibtex_part.cpp:306 kbibtex_part.cpp:320
+msgid "Choose file format of file '%1':"
+msgstr "Choisir un format de fichier pour le fichier « %1 » :"
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid ""
+"The selected filename \"%1\" is a symbolic link pointing to \"%2\".\n"
+"Replace the link with a new file or overwrite the existing file the link "
+"points to?"
+msgstr ""
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Symbolic Link"
+msgstr ""
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+#, fuzzy
+msgid "Replace link"
+msgstr "Id de l'élément"
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Overwrite file the link points to"
+msgstr ""
+
+#: documentwidget.cpp:301
+msgid "<qt>Writing file <b>%1</b></qt>"
+msgstr "<qt>Enregistrement du fichier <b>%1</b></qt>"
+
+#: documentwidget.cpp:388
+msgid ""
+"To export a BibTeX document to the Rich Text Format (RTF) KBibTeX requires "
+"the program 'latex2rtf'."
+msgstr ""
+"Pour exporter un document BibTeX vers le format Rich Text Format (RTF) vous "
+"devez avoir installé le programme « latex2rtf »."
+
+#: documentwidget.cpp:405
+msgid ""
+"To export a BibTeX document to the DocBook5 format KBibTeX requires the "
+"program 'bib2db5'."
+msgstr ""
+"Pour exporter un document BibTeX vers le format DocBook5 vous devez avoir "
+"installé le programme « latex2rtf »."
+
+#: documentwidget.cpp:420
+msgid ""
+"Embedding files into the PDF file is enabled, but the required file "
+"'embedfile.sty' was not found. Embedding files will be disabled."
+msgstr ""
+"L'inclusion de fichiers dans les fichiers PDF est activée, mais il a été "
+"impossible de trouver le fichier requis « embedfile.sty ». L'inclusion "
+"de fichier sera désactivée."
+
+#: documentwidget.cpp:420
+msgid "Embedding files disabled"
+msgstr "Inclusion de fichiers désactivée"
+
+#: documentwidget.cpp:471
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewMacro%1"
+msgstr "NouvelleMacro%1"
+
+#: documentwidget.cpp:489
+msgid "Put your comment here..."
+msgstr "Saisissez votre commentaire ici..."
+
+#: documentwidget.cpp:543
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewString%1"
+msgstr "NouvelleChaine%1"
+
+#: documentwidget.cpp:544
+msgid "No text yet"
+msgstr "Pas encore de texte"
+
+#: documentwidget.cpp:548
+msgid "@comment{ Put your comment here... }"
+msgstr "@comment{ Saisissez votre commentaire ici... }"
+
+#: documentwidget.cpp:552
+msgid "@preamble{\"Put your preamble here using double quotes...\"}"
+msgstr ""
+"@preamble{\"Saisissez votre préambule ici en utilisant les guillemets "
+"doubles\"}"
+
+#: documentwidget.cpp:568
+msgid "REQUIRED"
+msgstr "REQUIS"
+
+#: documentwidget.cpp:568
+msgid "optional"
+msgstr "facultatif"
+
+#: documentwidget.cpp:610
+#, c-format
+msgid ""
+"_n: This BibTeX file contains 1 element.\n"
+"This BibTeX file contains %n elements."
+msgstr ""
+"_n: Ce fichier BibTeX contient 1 élément.\n"
+"Ce fichier BibTeX contient %n éléments."
+
+#: documentwidget.cpp:610
+msgid "File Statistics"
+msgstr "Statistiques du fichier"
+
+#: documentwidget.cpp:806 documentwidget.cpp:815
+msgid "%1 ... %2"
+msgstr "%1 ... %2"
+
+#: documentwidget.cpp:827
+msgid "New keyword:"
+msgstr "Nouveau mot clé :"
+
+#: documentwidget.cpp:999
+msgid ""
+"\n"
+"\n"
+"Either LyX is not running or has not been correctly configured to send "
+"references to."
+msgstr ""
+"\n"
+"\n"
+"Soit LyX n'est pas en fonctionnement soit il n'a pas correctement été "
+"configuré pour qu'on puisse lui envoyer des références."
+
+#: documentwidget.cpp:1000
+msgid "Error communicating with LyX"
+msgstr "Impossible de communiquer avec LyX"
+
+#: documentwidget.cpp:1007
+msgid "Cannot determine how to send references to LyX."
+msgstr "Impossible de trouver comment envoyer les références vers LyX."
+
+#: documentwidget.cpp:1012
+msgid "The inpipe as configured in LyX does not exist."
+msgstr "Le canal de communication tel que configuré dans LyX n'existe pas."
+
+#: documentwidget.cpp:1016
+msgid "Cannot open the inpipe as configured in LyX."
+msgstr ""
+"Impossible d'ouvrir le canal de communication tel que configuré dans LyX."
+
+#: documentwidget.cpp:1288 documentwidget.cpp:1293
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewEntry%1"
+msgstr "NouvelElement%1"
+
+#: documentwidget.cpp:1398
+msgid "The file '%1' does not contain a known type of bibliography."
+msgstr ""
+"Le fichier « %1 » ne correspond pas à un type connu de bibliographie."
+
+#: documentwidget.cpp:1398
+msgid "Unknown file format"
+msgstr "Format de fichier inconnu"
+
+#: documentwidget.cpp:1453
+msgid "No preview available"
+msgstr "Aperçu indisponible"
+
+#: documentwidget.cpp:1554
+msgid ""
+"File '%1' has been modified. Reload file to import changes or ignore changes?"
+msgstr ""
+"Le fichier « %1 » a été modifié. Recharger le fichier ou ignorer les "
+"modifications ?"
+
+#: documentwidget.cpp:1554
+msgid "Reload file?"
+msgstr "Recharger le fichier ?"
+
+#: documentwidget.cpp:1554
+msgid "Ignore"
+msgstr "Ignorer"
+
+#: documentwidget.cpp:1691
+#, fuzzy
+msgid "You must set a default id suggestion in the settings dialog."
+msgstr "Utiliser l'id suggéré par défaut comme id de l'élément"
+
+#: documentwidget.cpp:1713
+msgid "No entries were selected."
+msgstr ""
+
+#: documentwidget.cpp:1714
+msgid ""
+"The following changes will be applied to the currently selected elements.\n"
+"Conflicts with duplicate entry ids will be resolved when applying the new "
+"ids."
+msgstr ""
+
+#: documentwidget.cpp:1714 kbibtex_part.cpp:482
+msgid "Normalize Entry Ids"
+msgstr ""
+
+#: documentwidget.cpp:1714
+#, fuzzy
+msgid "Replace Entry Ids"
+msgstr "Id de l'élément"
+
+#: entrywidget.cpp:65
+msgid "Edit BibTeX Entry"
+msgstr "Éditer l'élément BibTeX"
+
+#: entrywidget.cpp:142
+msgid ""
+"The current entry has been modified. Do you want do discard your changes?"
+msgstr ""
+"L'élément actuel a été modifié. Voulez-vous abandonner vos "
+"modifications ?"
+
+#: entrywidget.cpp:142
+msgid "Discard changes"
+msgstr "Abandonner"
+
+#: entrywidget.cpp:256
+msgid ""
+"The source code does not contain valid BibTeX code.\n"
+"\n"
+"Restore previous version or continue editing?"
+msgstr ""
+"Le code source ne contient pas de code BibTeX valable.\n"
+"\n"
+"Voulez-vous restaurer la version précédente ou continuer l'édition ?"
+
+#: entrywidget.cpp:256
+msgid "Invalid BibTeX code"
+msgstr "Code BibTeX non valable"
+
+#: entrywidget.cpp:314
+msgid "E&ntry Type:"
+msgstr "Type d'élément :"
+
+#: entrywidget.cpp:324
+msgid "&Identifier"
+msgstr "Identifiant"
+
+#: entrywidget.cpp:341
+msgid "Use the default id suggestion to set the entry id"
+msgstr "Utiliser l'id suggéré par défaut comme id de l'élément"
+
+#: entrywidget.cpp:342
+msgid ""
+"Use the default id suggestion to set the entry id.\n"
+"You can edit and select the default id suggestion in the configuration "
+"dialog."
+msgstr ""
+"Utiliser l'id suggéré par défaut comme id de l'élément.\n"
+"Vous pouvez modifier la suggestion par défaut de l'id dans la boîte de "
+"dialogue de configuration."
+
+#: entrywidget.cpp:350 settingsediting.cpp:194
+msgid "Enable all &fields for editing"
+msgstr "Activer tous les champs pour l'édition"
+
+#: entrywidget.cpp:353
+#, fuzzy
+msgid "Refetch"
+msgstr "Réinitialiser"
+
+#: entrywidget.cpp:361
+msgid "Message"
+msgstr "Message"
+
+#: entrywidget.cpp:385 entrywidgettitle.cpp:116 entrywidgettitle.cpp:118
+#: idsuggestions.cpp:345 idsuggestionswidget.cpp:201
+#: idsuggestionswidget.cpp:485 settings.cpp:681 webquery.cpp:450
+msgid "Title"
+msgstr "Titre"
+
+#: entrywidget.cpp:386
+msgid "Author/Editor"
+msgstr "Auteur/Rédacteur"
+
+#: entrywidget.cpp:387
+msgid "Publication"
+msgstr "Publication"
+
+#: entrywidget.cpp:388 kbibtex_part.cpp:500 settings.cpp:720
+msgid "Misc"
+msgstr "Divers"
+
+#: entrywidget.cpp:389 settings.cpp:659 settingskeyword.cpp:161
+msgid "Keywords"
+msgstr "Mots-clés"
+
+#: entrywidget.cpp:390
+msgid "External"
+msgstr "Ressources externes"
+
+#: entrywidget.cpp:391
+msgid "User Defined"
+msgstr "Champs définis par l'utilisateur"
+
+#: entrywidget.cpp:392
+msgid "Other Fields"
+msgstr "Autres champs"
+
+#: entrywidget.cpp:395
+msgid "Source"
+msgstr "Source"
+
+#: entrywidget.cpp:438
+msgid "Please supply more fields to use the default id"
+msgstr "Veuillez renseigner plus de champs pour utiliser l'id par défaut"
+
+#: entrywidget.cpp:441
+msgid "Using '%1' as entry id"
+msgstr "Utilisation de « %1 » comme id"
+
+#: entrywidget.cpp:446
+msgid "An entry has to have an identifier"
+msgstr "Un élément doit avoir un identifiant"
+
+#: entrywidget.cpp:448
+#, c-format
+msgid "The identifier contains invalid characters at position %1"
+msgstr "L'identifiant contient des caractères non valables à la position %1"
+
+#: entrywidget.cpp:458
+msgid "The identifier contains non-ascii characters, first one is '%1'"
+msgstr ""
+"L'identifiant contient des caractères non-ascii à partir de « %1 »"
+
+#: entrywidget.cpp:474
+msgid "This BibTeX file already contains an entry with id '%1'."
+msgstr ""
+
+#: entrywidget.cpp:491
+msgid "Require either 'Editor', 'Organization', or 'Key'"
+msgstr "Champ « Rédacteur », « Organisation » ou « Clé » requis"
+
+#: entrywidget.cpp:500
+msgid ""
+"Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Book "
+"Title'"
+msgstr ""
+"L'élément référencé « %1 » doit renseigner le champ "
+"« Éditeur », « Clé » ou « Titre de livre »"
+
+#: entrywidget.cpp:510
+msgid "Cross referenced entry '%1' must contain 'Volume'"
+msgstr ""
+"L'élément référencé « %1 » doit renseigner le champ « Volume »"
+
+#: entrywidget.cpp:513
+msgid ""
+"Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Series'"
+msgstr ""
+"L'élément référencé « %1 » doit renseigner le champ "
+"« Éditeur », « Clé » ou « Séries »"
+
+#: entrywidget.cpp:537
+msgid "No suggestions available"
+msgstr "Pas de suggestion disponible"
+
+#: entrywidget.cpp:641
+msgid ""
+"Currently only refetching from ArXiv sources is supported.\n"
+"\n"
+"This requires that the URL field points to an \"abstract\" page (i.e. the "
+"URL contains \"arxiv.org/abs/\")."
+msgstr ""
+
+#: entrywidget.cpp:641 entrywidget.cpp:668
+msgid "Refetching entry"
+msgstr ""
+
+#: entrywidget.cpp:668
+msgid "Fetching updated bibliographic data failed."
+msgstr ""
+
+#: entrywidgetauthor.cpp:83
+msgid "The fields 'Author' or 'Editor' are required, but both are missing"
+msgstr ""
+"Les champs « Auteur » ou « Rédacteur » sont requis, mais aucun "
+"n'est renseigné"
+
+#: entrywidgetauthor.cpp:98 entrywidgetauthor.cpp:100
+#: idsuggestionswidget.cpp:112 idsuggestionswidget.cpp:483 settings.cpp:633
+#: settingssearchurl.cpp:134 webquery.cpp:449
+msgid "Author"
+msgstr "Auteur"
+
+#: entrywidgetauthor.cpp:100
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewAuthor"
+msgstr "NouvelAuteur%1"
+
+#: entrywidgetauthor.cpp:105 entrywidgetauthor.cpp:107 settings.cpp:645
+msgid "Editor"
+msgstr "Rédacteur"
+
+#: entrywidgetauthor.cpp:107
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewEditor"
+msgstr "NouveauRedacteur%1"
+
+#: entrywidgetexternal.cpp:197 entrywidgetexternal.cpp:285
+#, fuzzy
+msgid "Previously used directory"
+msgstr "Sélectionner le dossier racine"
+
+#: entrywidgetexternal.cpp:223 entrywidgetexternal.cpp:225
+#: entrywidgetexternal.cpp:235 settings.cpp:685 settingssearchurl.cpp:135
+msgid "URL"
+msgstr "URL"
+
+#: entrywidgetexternal.cpp:235 entrywidgetexternal.cpp:268
+#, c-format
+msgid "Open %1"
+msgstr "Ouvrir %1"
+
+#: entrywidgetexternal.cpp:238 entrywidgetexternal.cpp:242 settings.cpp:641
+msgid "DOI"
+msgstr "DOI"
+
+#: entrywidgetexternal.cpp:239
+msgid "Digital Object Identifier"
+msgstr "Digital Object Identifier"
+
+#: entrywidgetexternal.cpp:253
+msgid "Open DOI"
+msgstr "Ouvrir le DOI"
+
+#: entrywidgetexternal.cpp:256 entrywidgetexternal.cpp:258
+#: entrywidgetexternal.cpp:268 settings.cpp:661
+msgid "Local File"
+msgstr "Fichier local"
+
+#: entrywidgetexternal.cpp:274
+msgid "&Browse..."
+msgstr "Parcourir..."
+
+#: entrywidgetexternal.cpp:275
+msgid "Browse for a local file"
+msgstr "Parcourir le système de fichiers local"
+
+#: entrywidgetexternal.cpp:282
+msgid "Select base directory"
+msgstr "Sélectionner le dossier racine"
+
+#: entrywidgetexternal.cpp:283
+msgid "Current directory"
+msgstr "Dossier courant"
+
+#: entrywidgetkeyword.cpp:56
+msgid "Global"
+msgstr "Global"
+
+#: entrywidgetkeyword.cpp:61
+msgid "In this file only"
+msgstr "Uniquement dans ce fichier"
+
+#: entrywidgetkeyword.cpp:168
+msgid ""
+"The keyword '%1' does already exist in the list of keywords.\n"
+"The old name has been restored."
+msgstr ""
+"Le mot clé « %1 » est déjà dans la liste des mots clés.\n"
+"L'ancien nom a été restauré."
+
+#: entrywidgetkeyword.cpp:168
+msgid "Renaming keyword failed"
+msgstr "Le renommage du mot clé a échoué"
+
+#: entrywidgetkeyword.cpp:193
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewKeyword%1"
+msgstr "NouveauMotCle%1"
+
+#: entrywidgetkeyword.cpp:230
+msgid "Keyword"
+msgstr "Mot-clé"
+
+#: entrywidgetkeyword.cpp:231
+msgid "Origin"
+msgstr "Origine"
+
+#: entrywidgetkeyword.cpp:238 settingskeyword.cpp:166
+msgid ""
+"_: keyword\n"
+"New"
+msgstr "Nouveau"
+
+#: entrywidgetkeyword.cpp:241
+msgid "Add a new keyword to the list"
+msgstr "Ajouter un nouveau mot clé à la liste"
+
+#: entrywidgetkeyword.cpp:245 settingskeyword.cpp:169
+msgid ""
+"_: keyword\n"
+"Edit"
+msgstr "Modifier"
+
+#: entrywidgetkeyword.cpp:247
+msgid "Edit the selected keyword"
+msgstr "Modifier le mot clé sélectionné"
+
+#: entrywidgetkeyword.cpp:252
+msgid ""
+"_: keyword\n"
+"Toggle &global"
+msgstr "Basculer en &global"
+
+#: entrywidgetkeyword.cpp:254
+msgid "Add or remove the selected keyword to or from the global list"
+msgstr "Ajouter ou supprimer le mot clé sélectionné à la liste globale"
+
+#: entrywidgetkeyword.cpp:259
+msgid ""
+"There is no need to delete keywords. Simply uncheck unwanted keywords and "
+"make them non-global.\n"
+"Global keywords can also be edited in the settings dialog."
+msgstr ""
+"Il n'est pas nécessaire de supprimer les mots clés. Désélectionnez "
+"simplement ceux que vous ne voulez pas et rendez-les non globaux.\n"
+"Les mots clés globaux peuvent aussi être édités dans le dialogue de "
+"configuration."
+
+#: entrywidgetmisc.cpp:135 entrywidgetmisc.cpp:137 mergeelements.cpp:581
+#: settings.cpp:683 settingsuserdefinedinput.cpp:172
+msgid "Type"
+msgstr "Type"
+
+#: entrywidgetmisc.cpp:142 entrywidgetmisc.cpp:144 entrywidgetother.cpp:153
+#: mergeelements.cpp:72 settings.cpp:657
+msgid "Key"
+msgstr "Clé"
+
+#: entrywidgetmisc.cpp:149 entrywidgetmisc.cpp:151 settings.cpp:667
+msgid "Note"
+msgstr "Note"
+
+#: entrywidgetmisc.cpp:156 entrywidgetmisc.cpp:158 settings.cpp:631
+msgid "Annote"
+msgstr "Annotation"
+
+#: entrywidgetmisc.cpp:163 entrywidgetmisc.cpp:165 settings.cpp:627
+msgid "Abstract"
+msgstr "Résumé"
+
+#: entrywidgetother.cpp:131
+msgid "Name of the user-defined field"
+msgstr "Nom du champ défini par l'utilisateur"
+
+#: entrywidgetother.cpp:132
+msgid ""
+"The name of the user-defined field. Should only contain letters and numbers."
+msgstr ""
+"Le nom du champ défini par l'utilisateur. Il ne devrait contenir que des "
+"lettres et nombres."
+
+#: entrywidgetother.cpp:133
+msgid "&Name:"
+msgstr "Nom :"
+
+#: entrywidgetother.cpp:137 entrywidgetother.cpp:201
+msgid "&Add"
+msgstr "Ajouter"
+
+#: entrywidgetother.cpp:141 entrywidgetother.cpp:154 mergeelements.cpp:72
+msgid "Value"
+msgstr "Valeur"
+
+#: entrywidgetother.cpp:143
+msgid "Content of the user-defined field"
+msgstr "Contenu du champ défini par l'utilisateur"
+
+#: entrywidgetother.cpp:144
+msgid "The content of the user-defined field. May contain any text."
+msgstr ""
+"Le contenu du champ défini par l'utilisateur. Il peut contenir n'importe "
+"quels caractères."
+
+#: entrywidgetother.cpp:145
+msgid "&Content:"
+msgstr "Contenu :"
+
+#: entrywidgetother.cpp:159
+msgid "&List:"
+msgstr "Liste :"
+
+#: entrywidgetother.cpp:168
+msgid "Op&en"
+msgstr "Ouvrir"
+
+#: entrywidgetpublication.cpp:308
+msgid "The fields 'Chapter' or 'Pages' are required, but both are missing"
+msgstr ""
+"Les champs « Chapitre » ou « Pages » sont requis, mais aucun n'est "
+"renseigné"
+
+#: entrywidgetpublication.cpp:325
+msgid "The field 'Journal' refers to a not existing entry"
+msgstr "Le champ « Journal » ne correspond pas à un élément existant"
+
+#: entrywidgetpublication.cpp:392
+#, c-format
+msgid "http://en.wikipedia.org/w/index.php?title=Special:Booksources&isbn=%1"
+msgstr ""
+"http://fr.wikipedia.org/w/index.php?title=Special%3AOuvrages+de+r%C3%A9f%C3%A"
+"9rence&isbn=%1"
+
+#: entrywidgetpublication.cpp:405 entrywidgetpublication.cpp:407
+#: settings.cpp:655
+msgid "Journal"
+msgstr "Magazine"
+
+#: entrywidgetpublication.cpp:412 entrywidgetpublication.cpp:414
+#: settings.cpp:687
+msgid "Volume"
+msgstr "Volume"
+
+#: entrywidgetpublication.cpp:419 entrywidgetpublication.cpp:421
+#: settings.cpp:669
+msgid "Number"
+msgstr "Numéro"
+
+#: entrywidgetpublication.cpp:426 entrywidgetpublication.cpp:435
+#: settings.cpp:665
+msgid "Month"
+msgstr "Mois"
+
+#: entrywidgetpublication.cpp:440 entrywidgetpublication.cpp:442
+#: idsuggestionswidget.cpp:276 idsuggestionswidget.cpp:484 settings.cpp:689
+#: webquery.cpp:448
+msgid "Year"
+msgstr "Année"
+
+#: entrywidgetpublication.cpp:447 entrywidgetpublication.cpp:449
+#: settings.cpp:673
+msgid "Pages"
+msgstr "Pages"
+
+#: entrywidgetpublication.cpp:454 entrywidgetpublication.cpp:456
+#: settings.cpp:643
+msgid "Edition"
+msgstr "Édition"
+
+#: entrywidgetpublication.cpp:461 entrywidgetpublication.cpp:463
+#: settings.cpp:637
+msgid "Chapter"
+msgstr "Chapitre"
+
+#: entrywidgetpublication.cpp:468 entrywidgetpublication.cpp:470
+msgid "Cross Reference"
+msgstr "Référence croisée"
+
+#: entrywidgetpublication.cpp:476 entrywidgetpublication.cpp:478
+#: settings.cpp:671
+msgid "Organization"
+msgstr "Organisation"
+
+#: entrywidgetpublication.cpp:483 entrywidgetpublication.cpp:485
+#: settings.cpp:675
+msgid "Publisher"
+msgstr "Éditeur"
+
+#: entrywidgetpublication.cpp:490 entrywidgetpublication.cpp:492
+#: settings.cpp:679
+msgid "School"
+msgstr "École"
+
+#: entrywidgetpublication.cpp:497 entrywidgetpublication.cpp:499
+#: settings.cpp:649
+msgid "Institution"
+msgstr "Institution"
+
+#: entrywidgetpublication.cpp:504 entrywidgetpublication.cpp:506
+#: settings.cpp:663
+msgid "Location"
+msgstr "Emplacement"
+
+#: entrywidgetpublication.cpp:511 entrywidgetpublication.cpp:513
+#: settings.cpp:629
+msgid "Address"
+msgstr "Adresse"
+
+#: entrywidgetpublication.cpp:518 entrywidgetpublication.cpp:527
+#: settings.cpp:651
+msgid "ISBN"
+msgstr "ISBN"
+
+#: entrywidgetpublication.cpp:525
+msgid "Lookup ISBN number in Wikipedia"
+msgstr "Rechercher le numéro ISBN sur Wikipédia"
+
+#: entrywidgetpublication.cpp:533 entrywidgetpublication.cpp:535
+#: settings.cpp:653
+msgid "ISSN"
+msgstr "ISSN"
+
+#: entrywidgetpublication.cpp:540 entrywidgetpublication.cpp:542
+#: settings.cpp:647
+msgid "How Published"
+msgstr "Méthode de publication"
+
+#: entrywidgettab.cpp:65
+msgid "The field '%1' is required, but missing"
+msgstr "Le champ « %1 » est requis, mais non renseigné"
+
+#: entrywidgettab.cpp:71
+msgid "Using cross referenced entry '%1' for field '%2'"
+msgstr ""
+"Utilisation de l'élément référencé « %1 » pour le champ « %2 »"
+
+#: entrywidgettab.cpp:79
+msgid "The field '%1' contains string keys with invalid characters"
+msgstr ""
+"Le champ « %1 » contient des clés avec des caractères non valables"
+
+#: entrywidgettab.cpp:87
+msgid "The field '%1' contains some unknown error"
+msgstr "Le champ « %1 » contient des erreurs inconnues"
+
+#: entrywidgettitle.cpp:122 entrywidgettitle.cpp:124 settings.cpp:635
+msgid "Book Title"
+msgstr "Titre de livre"
+
+#: entrywidgettitle.cpp:128 entrywidgettitle.cpp:130 settings.cpp:677
+msgid "Series"
+msgstr "Séries"
+
+#: entrywidgetuserdefined.cpp:137
+msgid "Please use the settings dialog to add user-defined fields here."
+msgstr ""
+"Veuillez utiliser le dialogue de configuration pour ajouter des champs "
+"définis par l'utilisateur ici."
+
+#: fieldlineedit.cpp:91 fieldlineedit.cpp:92 fieldlineedit.cpp:96
+#: fieldlineedit.cpp:97 fieldlistview.cpp:100 fieldlistview.cpp:101
+msgid "BibTeX field '%1'"
+msgstr "Champ BibTeX « %1 »"
+
+#: fieldlineedit.cpp:228
+msgid "Set '%1' to be a string key"
+msgstr "Définir « %1 » comme une seule clé"
+
+#: fieldlineedit.cpp:240
+msgid "Edit '%1' as a concatenated value"
+msgstr ""
+"Définir « %1 » comme le résultat de la concaténation de plusieurs "
+"valeurs"
+
+#: fieldlineedit.cpp:325 fieldlineedit.cpp:328
+msgid "Concatenated value"
+msgstr "Concaténation de valeurs"
+
+#: fieldlistview.cpp:321
+msgid "Add new '%1' item (Ctrl+A)"
+msgstr "Ajouter un nouvel élément « %1 » (Ctrl+A)"
+
+#: fieldlistview.cpp:327
+msgid "Edit current '%1' item (F2)"
+msgstr "Modifier l'élément « %1 » actuel (F2)"
+
+#: fieldlistview.cpp:333
+msgid "Delete current '%1' item (Del)"
+msgstr "Supprimer l'élément « %1 » actuel (Suppr)"
+
+#: fieldlistview.cpp:335 idsuggestionswidget.cpp:59 valuewidget.cpp:242
+msgid "Up"
+msgstr "Haut"
+
+#: fieldlistview.cpp:339
+msgid "Move current '%1' item up (Ctrl+Up)"
+msgstr "Déplacer l'élément « %1 » actuel vers le haut (Ctrl+Haut)"
+
+#: fieldlistview.cpp:341 idsuggestionswidget.cpp:60 valuewidget.cpp:247
+msgid "Down"
+msgstr "Bas"
+
+#: fieldlistview.cpp:345
+msgid "Move current '%1' item down (Ctrl+Down)"
+msgstr "Déplacer l'élément « %1 » actuel vers le bas (Ctrl+Bas)"
+
+#: fieldlistview.cpp:347
+msgid "Complex..."
+msgstr "Complexe..."
+
+#: fieldlistview.cpp:351
+msgid "Edit current '%1' item as a concatenated string (Ctrl+Alt+C)"
+msgstr ""
+"Définir l'élément « %1 » courant comme le résultat de la "
+"concaténation de plusieurs valeurs (Ctrl+Alt+C)"
+
+#: fieldlistview.cpp:353
+msgid "... and others (et al.)"
+msgstr "... et col. (et al.)"
+
+#: findduplicates.cpp:58
+msgid "Searching for duplicates..."
+msgstr "Recherche de doublons…"
+
+#: idsuggestions.cpp:330 idsuggestionswidget.cpp:128
+msgid "First author only"
+msgstr "Uniquement le premier auteur"
+
+#: idsuggestions.cpp:331 idsuggestionswidget.cpp:129
+msgid "All but first author"
+msgstr "Tous les auteurs sauf le premier"
+
+#: idsuggestions.cpp:332 idsuggestionswidget.cpp:127
+msgid "All authors"
+msgstr "Tous les auteurs"
+
+#: idsuggestions.cpp:335
+#, c-format
+msgid ""
+"_n: , but only first letter of each last name\n"
+", but only first %n letters of each last name"
+msgstr ""
+"_n: , mais seulement la première lettre du nom de famille\n"
+", mais seulement les %n premières lettres du nom de famille"
+
+#: idsuggestions.cpp:336 idsuggestions.cpp:348
+msgid ", in upper case"
+msgstr ", en majuscules"
+
+#: idsuggestions.cpp:337 idsuggestions.cpp:349
+msgid ", in lower case"
+msgstr ", en minuscules"
+
+#: idsuggestions.cpp:338 idsuggestions.cpp:350
+msgid ", with '%1' in between"
+msgstr ", avec « %1 » entre les deux"
+
+#: idsuggestions.cpp:340
+msgid "Year (2 digits)"
+msgstr "Année (2 chiffres)"
+
+#: idsuggestions.cpp:341
+msgid "Year (4 digits)"
+msgstr "Année (4 chiffres)"
+
+#: idsuggestions.cpp:347
+#, c-format
+msgid ""
+"_n: , but only first letter of each word\n"
+", but only first %n letters of each word"
+msgstr ""
+"_n: , mais seulement la première lettre de chaque mot\n"
+", mais seulement les %n premières lettres de chaque mot"
+
+#: idsuggestions.cpp:351
+msgid ", small words removed"
+msgstr ", petits mots supprimés"
+
+#: idsuggestions.cpp:353
+msgid "Text: '%1'"
+msgstr "Texte : « %1 »"
+
+#: idsuggestionswidget.cpp:140 idsuggestionswidget.cpp:221
+msgid "Casing:"
+msgstr "Casse :"
+
+#: idsuggestionswidget.cpp:145 idsuggestionswidget.cpp:226
+msgid "No change"
+msgstr "Pas de modification"
+
+#: idsuggestionswidget.cpp:146 idsuggestionswidget.cpp:227
+msgid "Lower case"
+msgstr "Minuscules"
+
+#: idsuggestionswidget.cpp:147 idsuggestionswidget.cpp:228
+msgid "Upper case"
+msgstr "Majuscules"
+
+#: idsuggestionswidget.cpp:156 idsuggestionswidget.cpp:237
+msgid "Only first letters:"
+msgstr "Seulement les premières lettres :"
+
+#: idsuggestionswidget.cpp:163 idsuggestionswidget.cpp:165
+msgid "Complete name"
+msgstr "Nom complet"
+
+#: idsuggestionswidget.cpp:168
+msgid "Text between authors:"
+msgstr "Texte entre chaque auteur :"
+
+#: idsuggestionswidget.cpp:214
+msgid "Remove small words"
+msgstr "Supprimer les petits mots"
+
+#: idsuggestionswidget.cpp:244 idsuggestionswidget.cpp:246
+msgid "Complete title"
+msgstr "Titre complet"
+
+#: idsuggestionswidget.cpp:249
+msgid "Text between words:"
+msgstr "Texte entre chaque mot :"
+
+#: idsuggestionswidget.cpp:289
+msgid "Year:"
+msgstr "Année :"
+
+#: idsuggestionswidget.cpp:294
+msgid "2 digits"
+msgstr "2 chiffres"
+
+#: idsuggestionswidget.cpp:295
+msgid "4 digits"
+msgstr "4 chiffres"
+
+#: idsuggestionswidget.cpp:311 idsuggestionswidget.cpp:486 valuewidget.cpp:211
+msgid "Text"
+msgstr "Texte"
+
+#: idsuggestionswidget.cpp:324
+msgid "Text in between:"
+msgstr "Texte entre les deux :"
+
+#: idsuggestionswidget.cpp:388
+msgid "Edit Id Suggestions"
+msgstr "Modifier les suggestion d'id"
+
+#: idsuggestionswidget.cpp:563
+msgid "<qt>Example:<br/><b>%1</b></qt>"
+msgstr "<qt>Exemple :<br/><b>%1</b></qt>"
+
+#: kbibtex_part.cpp:158
+msgid ""
+"The document '%1' has been modified.\n"
+"Do you want to save your changes or discard them?"
+msgstr ""
+"Le document « %1 » a été modifié.\n"
+"Voulez-vous enregistrer vos modifications ou les abandonner ?"
+
+#: kbibtex_part.cpp:160
+msgid "Close Document"
+msgstr "Fermer le document"
+
+#: kbibtex_part.cpp:251 kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "BibTeX (*.bib)"
+msgstr "BibTeX (*.bib)"
+
+#: kbibtex_part.cpp:251 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "Reference Manager (*.ris)"
+msgstr "Reference Manager (*.ris)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)"
+msgstr "EndNote (format Refer) (*.ref *.refer *.rfr *.txt)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "ISI Web of Knowledge (*.isi *.cgi)"
+msgstr "ISI Web of Knowledge (*.isi *.cgi)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273
+msgid "DocBook 5 or MODS (*.xml)"
+msgstr "DocBook 5 ou MODS (*.xml)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273
+msgid "DocBook 5 (*.xml)"
+msgstr "DocBook 5 (*.xml)"
+
+#: kbibtex_part.cpp:256 kbibtex_part.cpp:279
+msgid ""
+"A file named '%1' already exists. Are you sure you want to overwrite it?"
+msgstr ""
+"Un fichier nommé « %1 » existe déjà. Voulez-vous vraiment "
+"l'écraser ?"
+
+#: kbibtex_part.cpp:256 kbibtex_part.cpp:279
+msgid "Overwrite"
+msgstr "Écraser"
+
+#: kbibtex_part.cpp:273
+msgid "Portable Document File (*.pdf)"
+msgstr "Portable Document File (*.pdf)"
+
+#: kbibtex_part.cpp:273
+msgid "PostScript (*.ps)"
+msgstr "PostScript (*.ps)"
+
+#: kbibtex_part.cpp:273
+msgid "Hypertext Markup Langage (*.html)"
+msgstr "Hypertext Markup Language (*.html)"
+
+#: kbibtex_part.cpp:273
+msgid "Rich Text Format (*.rtf)"
+msgstr "Rich Text Format (*.rtf)"
+
+#: kbibtex_part.cpp:333
+msgid "Exporting"
+msgstr "Exportation"
+
+#: kbibtex_part.cpp:344
+msgid "File could not be exported in '%1'."
+msgstr "Le fichier n'a pas pu être exporté dans « %1 »."
+
+#: kbibtex_part.cpp:344
+msgid ""
+"\n"
+"\n"
+"See the following error log for details."
+msgstr ""
+"\n"
+"\n"
+"Consultez le journal des erreurs suivant pour plus de détails."
+
+#: kbibtex_part.cpp:344 kbibtex_part.cpp:347
+msgid "Exporting failed"
+msgstr "Échec de l'exportation"
+
+#: kbibtex_part.cpp:347
+msgid "File could not be exported to '%1'."
+msgstr "Le fichier n'a pas pu être exporté dans « %1 »."
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "Supported Bibliographies"
+msgstr "Bibliographies prises en charges"
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "MODS or EndNote XML (*.xml)"
+msgstr "MODS ou EndNote XML (*.xml)"
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "All files (*.*)"
+msgstr "Tous les fichiers (*.*)"
+
+#: kbibtex_part.cpp:383 kbibtexshell.cpp:332
+msgid ""
+"The given file could not be read, check if it exists or if it is readable "
+"for the current user."
+msgstr ""
+"Impossible de lire le fichier indiqué, veuillez vérifier qu'il existe bien "
+"et qu'il est accessible en lecture pour l'utilisateur actuel."
+
+#: kbibtex_part.cpp:398
+msgid "The given file could not be merged."
+msgstr "Impossible de fusionner le fichier indiqué."
+
+#: kbibtex_part.cpp:427
+msgid "Save the current file"
+msgstr "Enregistrer le fichier actuel"
+
+#: kbibtex_part.cpp:428
+msgid "Save the current file under a new filename"
+msgstr "Enregistrer le fichier actuel sous un nouveau nom"
+
+#: kbibtex_part.cpp:430
+msgid "Statistics..."
+msgstr "Statistiques..."
+
+#: kbibtex_part.cpp:431
+msgid "Find Duplicates..."
+msgstr "Trouver des doublons…"
+
+#: kbibtex_part.cpp:432
+msgid "Export..."
+msgstr "Exporter..."
+
+#: kbibtex_part.cpp:433
+msgid "Export to a different file format"
+msgstr "Exporter vers un format de fichier différent"
+
+#: kbibtex_part.cpp:434
+msgid "Merge..."
+msgstr "Fusionner..."
+
+#: kbibtex_part.cpp:435
+msgid "Merge BibTeX entries from another file"
+msgstr "Fusionner les éléments BibTeX d'un autre fichier"
+
+#: kbibtex_part.cpp:438
+msgid "Cut the selected BibTeX elements to the clipboard"
+msgstr "Couper les élément BibTeX sélectionnés vers le presse-papier"
+
+#: kbibtex_part.cpp:441
+msgid "Copy the selected BibTeX elements to the clipboard"
+msgstr "Copier les éléments BibTeX sélectionnés vers le presse-papier"
+
+#: kbibtex_part.cpp:445
+msgid "Copy &Reference"
+msgstr "Copier une référence"
+
+#: kbibtex_part.cpp:446
+msgid "Copy a reference of the selected BibTeX elements to the clipboard"
+msgstr ""
+"Copier une référence des éléments BibTeX sélectionnés vers le "
+"presse-papier"
+
+#: kbibtex_part.cpp:449
+msgid "Paste BibTeX elements from the clipboard"
+msgstr "Coller les éléments BibTeX depuis le presse-papier"
+
+#: kbibtex_part.cpp:451
+msgid "Select all BibTeX elements"
+msgstr "Sélectionner tous les éléments BibTeX"
+
+#: kbibtex_part.cpp:452
+msgid "Send Reference to &LyX"
+msgstr "Envoyer une référence à LyX"
+
+#: kbibtex_part.cpp:453
+msgid "Send a reference of the selected BibTeX elements to LyX"
+msgstr "Envoyer une référence des éléments BibTeX sélectionnés à LyX"
+
+#: kbibtex_part.cpp:456
+msgid "Find text"
+msgstr "Chercher du texte"
+
+#: kbibtex_part.cpp:458
+msgid "Find next occurrence"
+msgstr "Chercher la prochaine occurrence"
+
+#: kbibtex_part.cpp:462
+msgid "Search Online Databases"
+msgstr "Chercher des bases de données en ligne"
+
+#: kbibtex_part.cpp:463
+msgid "Search online databases to import bibliography data"
+msgstr ""
+"Chercher des bases de données en ligne pour importer des données "
+"bibliographiques"
+
+#: kbibtex_part.cpp:465
+msgid "Search Document Online"
+msgstr "Chercher un document en ligne"
+
+#: kbibtex_part.cpp:466
+msgid "Search websites for the selected BibTeX element"
+msgstr "Rechercher des sites Web sur l'élément BibTeX sélectionné"
+
+#: kbibtex_part.cpp:470
+msgid "&Show Columns"
+msgstr "Afficher les colonnes"
+
+#: kbibtex_part.cpp:471
+msgid "Select columns to show in the main list"
+msgstr "Sélectionner les colonnes à afficher dans la liste principale"
+
+#: kbibtex_part.cpp:472
+msgid "View Document"
+msgstr "Voir le document"
+
+#: kbibtex_part.cpp:473
+msgid "View the documents associated with this BibTeX entry"
+msgstr "Voir les documents associés avec cet élément BibTeX"
+
+#: kbibtex_part.cpp:475
+#, fuzzy
+msgid "View Primary Document"
+msgstr "Voir le document"
+
+#: kbibtex_part.cpp:477
+#, fuzzy
+msgid "View Primary Online Reference"
+msgstr "Chercher un document en ligne"
+
+#: kbibtex_part.cpp:479
+msgid "Assign Keywords"
+msgstr "Associer des mots clés"
+
+#: kbibtex_part.cpp:480
+msgid "Assign keywords to this entry"
+msgstr "Associer des mots clés à cet élément"
+
+#: kbibtex_part.cpp:483
+msgid "Set entry ids as specified in the id suggestion settings"
+msgstr ""
+
+#: kbibtex_part.cpp:487
+msgid "Configure KBibTeX"
+msgstr "Configurer KBibTeX"
+
+#: kbibtex_part.cpp:488
+msgid "Configure Source View..."
+msgstr "Configurer la vue de la source"
+
+#: kbibtex_part.cpp:489
+msgid "Configure the Source Editor"
+msgstr "Configurer l'éditeur de source"
+
+#: kbibtex_part.cpp:491 settings.cpp:700
+msgid "Article"
+msgstr "Article"
+
+#: kbibtex_part.cpp:491
+msgid "Add an article to the BibTeX file"
+msgstr "Ajouter un article au fichier BibTeX"
+
+#: kbibtex_part.cpp:492 settings.cpp:702
+msgid "Book"
+msgstr "Livre"
+
+#: kbibtex_part.cpp:492
+msgid "Add a book to the BibTeX file"
+msgstr "Ajouter un livre au fichier BibTeX"
+
+#: kbibtex_part.cpp:493 settings.cpp:704
+msgid "Booklet"
+msgstr "Livret"
+
+#: kbibtex_part.cpp:493
+msgid "Add a booklet to the BibTeX file"
+msgstr "Ajouter un livret au fichier BibTeX"
+
+#: kbibtex_part.cpp:494
+msgid "Electronic (IEEE)"
+msgstr "Électronique (IEEE)"
+
+#: kbibtex_part.cpp:494
+msgid "Add an electronic reference (IEEE) to the BibTeX file"
+msgstr "Ajouter une référence électronique (IEEE) au fichier BibTeX"
+
+#: kbibtex_part.cpp:495 settings.cpp:710
+msgid "InBook"
+msgstr "Partie d'un livre"
+
+#: kbibtex_part.cpp:495
+msgid "Add a part of a book to the BibTeX file"
+msgstr "Ajouter une partie d'un livre au fichier BibTeX"
+
+#: kbibtex_part.cpp:496 settings.cpp:712
+msgid "InCollection"
+msgstr "Partie d'une collection"
+
+#: kbibtex_part.cpp:496
+msgid "Add a publication which is part of some collection to the BibTeX file"
+msgstr ""
+"Ajouter une publication faisant partie d'une collection au fichier BibTeX"
+
+#: kbibtex_part.cpp:497 settings.cpp:714
+msgid "InProceedings"
+msgstr "Partie d'une conférence"
+
+#: kbibtex_part.cpp:497
+msgid "Add a publication which is part of some proceedings to the BibTeX file"
+msgstr ""
+"Ajouter une publication faisant partie d'une conférence au fichier BibTeX"
+
+#: kbibtex_part.cpp:498 settings.cpp:716
+msgid "Manual"
+msgstr "Documentation technique"
+
+#: kbibtex_part.cpp:498
+msgid "Add a manual to the BibTeX file"
+msgstr "Ajouter une documentation au fichier BibTeX"
+
+#: kbibtex_part.cpp:499 settings.cpp:718
+msgid "MastersThesis"
+msgstr "Thèse de Master"
+
+#: kbibtex_part.cpp:499
+msgid "Add a master or diploma thesis to the BibTeX file"
+msgstr "Ajouter une thèse de Master au fichier BibTeX"
+
+#: kbibtex_part.cpp:500
+msgid "Add a not specified document or reference to the BibTeX file"
+msgstr "Ajouter un document non spécifié au fichier BibTeX"
+
+#: kbibtex_part.cpp:501 settings.cpp:722
+msgid "PhDThesis"
+msgstr "Thèse de Doctorat"
+
+#: kbibtex_part.cpp:501
+msgid "Add a PhD thesis to the BibTeX file"
+msgstr "Ajouter une thèse de Doctorat au fichier BibTeX"
+
+#: kbibtex_part.cpp:502 settings.cpp:724
+msgid "Proceedings"
+msgstr "Conférence"
+
+#: kbibtex_part.cpp:502
+msgid "Add some proceedings to the BibTeX file"
+msgstr "Ajouter des conférences au fichier BibTeX"
+
+#: kbibtex_part.cpp:503 settings.cpp:726
+msgid "TechReport"
+msgstr "Rapport technique"
+
+#: kbibtex_part.cpp:503
+msgid "Add a technical report to the BibTeX file"
+msgstr "Ajouter un rapport technique au fichier BibTeX"
+
+#: kbibtex_part.cpp:504 settings.cpp:728
+msgid "Unpublished"
+msgstr "Non publié"
+
+#: kbibtex_part.cpp:504
+msgid "Add an unpublished document to the BibTeX file"
+msgstr "Ajouter un document non publié au fichier BibTeX"
+
+#: kbibtex_part.cpp:505
+msgid "Add a preamble to the BibTeX file"
+msgstr "Ajouter un préambule au fichier BibTeX"
+
+#: kbibtex_part.cpp:506
+msgid "Add a comment to the BibTeX file"
+msgstr "Ajouter un commentaire au fichier BibTeX"
+
+#: kbibtex_part.cpp:507
+msgid "Add a macro to the BibTeX file"
+msgstr "Ajouter une macro au fichier BibTeX"
+
+#: kbibtex_part.cpp:510
+msgid "Edit the selected BibTeX element"
+msgstr "Modifier l'élément BibTeX sélectionné"
+
+#: kbibtex_part.cpp:513
+msgid "Delete the selected BibTeX elements"
+msgstr "Supprimer les éléments BibTeX sélectionnés"
+
+#: kbibtex_part.cpp:516
+msgid "Show &Comments"
+msgstr "Afficher les commentaires"
+
+#: kbibtex_part.cpp:517
+msgid "Show the comments of a BibTeX document"
+msgstr "Afficher les commentaires d'un document BibTeX"
+
+#: kbibtex_part.cpp:518
+msgid "Show &Macros"
+msgstr "Afficher les macros"
+
+#: kbibtex_part.cpp:519
+msgid "Show the macros of a BibTeX document"
+msgstr "Afficher les macros d'un document BibTeX"
+
+#: kbibtex_part.cpp:521
+msgid "Accept input from other programs"
+msgstr "Accepter l'entrée depuis d'autres programmes"
+
+#: kbibtex_part.cpp:537 rc.cpp:9 rc.cpp:18 rc.cpp:21 rc.cpp:39 rc.cpp:48
+#: rc.cpp:51
+msgid "&New"
+msgstr "Nouveau"
+
+#: kbibtex_part.cpp:538
+msgid "Add a new element to this BibTeX document"
+msgstr "Ajouter un nouvel élément à ce document BibTeX"
+
+#: kbibtex_part.cpp:622
+msgid ""
+"Some other KBibTeX instance is using the pipe.\n"
+"If this assumption is wrong, please delete '%1'."
+msgstr ""
+"Une autre instance de KBibTeX utilise le tube de communication.\n"
+"Si cette affirmation est fausse, veuillez supprimer « %1 »"
+
+#: kbibtex_part.cpp:622
+msgid "Pipe already in use"
+msgstr "Tube de communication déjà utilisé"
+
+#: kbibtex_part.cpp:651
+msgid "Could not create pipe at '%1'."
+msgstr "Impossible de créer un tube de communication en « %1 »"
+
+#: kbibtex_part.cpp:651
+msgid "Error creating pipe"
+msgstr "Impossible de créer un tube de communication"
+
+#: kbibtex_part.cpp:695
+msgid ""
+"The KBibTeX part has problems to initialize itself. Only limited "
+"functionality will be available."
+msgstr ""
+"Les éléments de KBibTeX n'ont pas pu s'initialiser correctement. Seules "
+"quelques fonctionnalités limitées seront disponibles."
+
+#: kbibtex_part.cpp:695
+msgid "KBibTeX Part"
+msgstr "Éléments KBibTeX"
+
+#: kbibtex_part.cpp:742
+msgid "KBibTeXPart"
+msgstr "KBibTeXPart"
+
+#: kbibtexshell.cpp:76
+msgid "Could not find our part!"
+msgstr "Impossible de trouver nos éléments !"
+
+#: kbibtexshell.cpp:145
+msgid ""
+"Click to open a file\n"
+"Click and hold to open a recent file"
+msgstr ""
+"Cliquez pour ouvrir un fichier\n"
+"Cliquez et maintenez enfoncé pour ouvrir un fichier récent"
+
+#: kbibtexshell.cpp:182
+msgid "Create a new window for a new BibTeX file"
+msgstr "Créer une nouvelle fenêtre pour un nouveau fichier BibTeX"
+
+#: kbibtexshell.cpp:184
+msgid "Open an existing BibTeX file"
+msgstr "Ouvrir un fichier BibTeX existant"
+
+#: kbibtexshell.cpp:187
+msgid ""
+"This lists files which you have opened recently, and allows you to easily "
+"open them again."
+msgstr ""
+"La liste des fichiers que vous avez ouverts récemment et qui vous permet de "
+"les ré-ouvrir facilement."
+
+#: kbibtexshell.cpp:191
+msgid "Close this KBibTeX window"
+msgstr "Fermer cette fenêtre KBibTeX"
+
+#: kbibtexshell.cpp:196
+msgid "Show or hide the window's status bar"
+msgstr "Afficher ou cacher la barre d'état de la fenêtre"
+
+#: kbibtexshell.cpp:198
+msgid "Configure key bindings for KBibTeX"
+msgstr "Configurer les raccourcis claviers de KBibTeX"
+
+#: kbibtexshell.cpp:199
+msgid "Configure the tool bar for KBibTeX"
+msgstr "Configurer la barre principale de KBibTeX"
+
+#: kbibtexshell.cpp:350 main.cpp:95
+msgid "Could not open file '%1'."
+msgstr "Impossible d'ouvrir le fichier « %1 »"
+
+#: macrowidget.cpp:39
+msgid "Edit BibTeX Macro"
+msgstr "Modifier la macro BibTeX"
+
+#: macrowidget.cpp:84
+msgid "Macro &id:"
+msgstr "id de la macro :"
+
+#: macrowidget.cpp:91
+msgid "Macro &value:"
+msgstr "Valeur de la macro :"
+
+#: main.cpp:40
+msgid "A BibTeX editor for KDE"
+msgstr "Un éditeur de fichiers BibTeX pour KDE"
+
+#: main.cpp:46
+msgid "Document to open."
+msgstr "Document à ouvrir."
+
+#: main.cpp:111
+msgid "KBibTeX"
+msgstr "KBibTeX"
+
+#: main.cpp:114
+msgid "NAME OF TRANSLATORS"
+msgstr "Julien Richard-Foy"
+
+#: main.cpp:114
+msgid "EMAIL OF TRANSLATORS"
+msgstr "julien.rf@no-log.org"
+
+#: mergeelements.cpp:112
+#, fuzzy
+msgid "Preamble text"
+msgstr "Préambule"
+
+#: mergeelements.cpp:124
+msgid "Next"
+msgstr "Suivant"
+
+#: mergeelements.cpp:124
+msgid "Previous"
+msgstr "Précédent"
+
+#: mergeelements.cpp:143
+msgid ""
+"Select elements to merge. At least two elements must be checked to perform a "
+"merge operation. Checked entries will be replaced by the merged element, "
+"unchecked elements will be kept."
+msgstr ""
+"Sélectionner les éléments à fusionner. Au moins deux éléments doivent "
+"être sélectionnés pour réaliser une fusion. Les éléments cochés "
+"seront remplacés par l'élément fusionné, les éléments non cochés "
+"seront conservés."
+
+#: mergeelements.cpp:147
+msgid "Entry/Macro Id"
+msgstr "Id de l'élément ou de la macro"
+
+#: mergeelements.cpp:159
+msgid ""
+"Choose from this list which alternatives you want to keep in the merged "
+"element."
+msgstr ""
+"Sélectionnez dans cette liste quelles alternatives vous souhaitez conserver "
+"dans l'élément conservé."
+
+#: mergeelements.cpp:163
+msgid "Field/Key"
+msgstr "Champ/Clé"
+
+#: mergeelements.cpp:492
+msgid "No duplicates found."
+msgstr "Aucun doublon trouvé."
+
+#: mergeelements.cpp:557
+msgid "Id"
+msgstr "Id"
+
+#: preamblewidget.cpp:33
+msgid "Edit BibTeX Preamble"
+msgstr "Modifier le préambule BibTeX"
+
+#: preamblewidget.cpp:76
+msgid "&Preamble:"
+msgstr "Préambule :"
+
+#: rc.cpp:6 rc.cpp:36
+msgid "E&lement"
+msgstr "Élément"
+
+#: rc.cpp:15 rc.cpp:27 rc.cpp:45 rc.cpp:57
+msgid "Se&ttings"
+msgstr "Configuration"
+
+#: searchbar.cpp:92
+msgid "Add a new BibTeX entry, comment or macro to this file"
+msgstr ""
+"Ajouter un nouvel élément BibTeX, un commentaire ou une macro à ce fichier"
+
+#: searchbar.cpp:97
+msgid "Add a new BibTeX entry from an online database"
+msgstr ""
+"Ajouter un nouvel élément BibTeX depuis une base de données en ligne"
+
+#: searchbar.cpp:105
+msgid "Erase current search pattern"
+msgstr "Effacer le motif de recherche actuel"
+
+#: searchbar.cpp:108
+msgid "&Search:"
+msgstr "Rechercher :"
+
+#: searchbar.cpp:121
+msgid "Exact"
+msgstr "Exact"
+
+#: searchbar.cpp:122
+msgid "Every word"
+msgstr "Tous les mots"
+
+#: searchbar.cpp:123
+msgid "Any word"
+msgstr "N'importe quel mot"
+
+#: searchbar.cpp:126
+msgid "Restrict to:"
+msgstr "Restreindre à :"
+
+#: searchbar.cpp:133
+msgid "All fields"
+msgstr "Tous les champs"
+
+#: settings.cpp:57
+msgid "Could not determine filename for XSLT file"
+msgstr "Impossible de déterminer le nom du fichier XSLT"
+
+#: settings.cpp:57
+msgid "Initialization failed"
+msgstr "Échec de l'initialisation"
+
+#: settings.cpp:639
+msgid "Crossref"
+msgstr "Référence croisée"
+
+#: settings.cpp:691 settings.cpp:730
+msgid "Unknown"
+msgstr "Inconnu"
+
+#: settings.cpp:706
+msgid "Collection"
+msgstr "Collection"
+
+#: settings.cpp:708
+msgid "Electronic"
+msgstr "Électronique"
+
+#: settingsdlg.cpp:42
+msgid "&Editing"
+msgstr "Édition"
+
+#: settingsdlg.cpp:48
+msgid "&File Open&&Save"
+msgstr "Fichier Ouvrir et Enregistrer"
+
+#: settingsdlg.cpp:54
+msgid "&Search URLs"
+msgstr "URL de recherche"
+
+#: settingsdlg.cpp:60
+msgid "Global &Keywords"
+msgstr "Mots-clés globaux"
+
+#: settingsdlg.cpp:66 settingsidsuggestions.cpp:337
+msgid "Id Suggestions"
+msgstr "Suggestions d'id"
+
+#: settingsdlg.cpp:72
+msgid "User Defined Fields"
+msgstr "Champs définis par l'utilisateur"
+
+#: settingsdlg.cpp:79 webqueryz3950.cpp:188 webqueryz3950.cpp:193
+msgid "Z39.50"
+msgstr "Z39.50"
+
+#: settingsediting.cpp:56
+msgid "Path to add:"
+msgstr "Emplacemet à ajouter :"
+
+#: settingsediting.cpp:63
+msgid "Select a path to add"
+msgstr "Sélectionner un emplacement à ajouter"
+
+#: settingsediting.cpp:67
+msgid "Add chosen path to list"
+msgstr "Ajouter l'emplacement choisi à la liste"
+
+#: settingsediting.cpp:70
+msgid "List of paths:"
+msgstr "Liste des emplacements :"
+
+#: settingsediting.cpp:73
+msgid "Path"
+msgstr "Emplacement"
+
+#: settingsediting.cpp:82
+msgid "Remove selected path from list"
+msgstr "Supprimer l'emplacement sélectionné de la liste"
+
+#: settingsediting.cpp:99
+msgid "Edit Document Search Paths"
+msgstr "Modifier les emplacements de recherche de documents"
+
+#: settingsediting.cpp:140
+msgid "Folder '%1' does not exist or is not readable."
+msgstr ""
+
+#: settingsediting.cpp:160
+msgid "Main List"
+msgstr "Liste principale"
+
+#: settingsediting.cpp:162
+msgid "&Sorting:"
+msgstr "Trier :"
+
+#: settingsediting.cpp:174
+msgid "So&rting order:"
+msgstr "Sens du tri :"
+
+#: settingsediting.cpp:176
+msgid "Ascending"
+msgstr "Ascendant"
+
+#: settingsediting.cpp:177
+msgid "Descending"
+msgstr "Descendant"
+
+#: settingsediting.cpp:180
+msgid "&Double click action:"
+msgstr "Action du double-clic :"
+
+#: settingsediting.cpp:182
+msgid "Edit element"
+msgstr "Éditer l'élément"
+
+#: settingsediting.cpp:183
+msgid "Open document"
+msgstr "Ouvrir le document"
+
+#: settingsediting.cpp:186
+msgid "On dragging with mouse:"
+msgstr "Lors d'un glisser-déposer avec la souris :"
+
+#: settingsediting.cpp:188
+msgid "Copy reference (\\cite{...})"
+msgstr "Copier une référence (\\cite{...})"
+
+#: settingsediting.cpp:189
+msgid "Copy BibTeX text (@article{...})"
+msgstr "Copier le texte de l'élément BibTeX (@article{...})"
+
+#: settingsediting.cpp:192
+msgid "Entry Editing"
+msgstr "Édition d'éléments"
+
+#: settingsediting.cpp:196
+msgid "Search Bar"
+msgstr "Barre de recherche"
+
+#: settingsediting.cpp:198
+msgid "Reset field filter when changing filter text"
+msgstr ""
+"Réinitialiser les filtres des champs lorsque le texte du filtre est modifié"
+
+#: settingsediting.cpp:200
+msgid "Presentation"
+msgstr "Présentation"
+
+#: settingsediting.cpp:202
+msgid "Use special &font"
+msgstr "Utiliser une police spéciale"
+
+#: settingsediting.cpp:204
+msgid "Author and editor names:"
+msgstr "Noms des auteurs et directeurs de publication"
+
+#: settingsediting.cpp:207
+msgid "John Doe"
+msgstr "Patrick Dupont"
+
+#: settingsediting.cpp:208
+msgid "Doe, John"
+msgstr "Dupont, Patrick"
+
+#: settingsediting.cpp:209
+msgid "Show names as 'John Doe' instead of 'Doe, John'"
+msgstr ""
+"Afficher les noms comme « Patrick Dupont » plutôt que « Dupont, "
+"Patrick »"
+
+#: settingsediting.cpp:210
+msgid ""
+"Show names as 'John Doe' instead of 'Doe, John'.\n"
+"\n"
+"Takes only effect after the next start of KBibTeX."
+msgstr ""
+"Afficher les noms comme « Patrick Dupont » plutôt que « Dupont, "
+"Patrick ».\n"
+"\n"
+"Ne prendra effet qu'après le prochain lancement de KBibTeX."
+
+#: settingsediting.cpp:212
+msgid "Document Search Paths"
+msgstr "Emplacements de recherche de document"
+
+#: settingsediting.cpp:214
+msgid "Edit Search Paths"
+msgstr "Modifier les emplacements de recherche"
+
+#: settingsediting.cpp:218
+msgid "Sensitivity:"
+msgstr ""
+
+#: settingsediting.cpp:221
+msgid "Low"
+msgstr ""
+
+#: settingsediting.cpp:228
+msgid "High"
+msgstr ""
+
+#: settingsfileio.cpp:53
+msgid "English|German|French|Spanish|Swedish"
+msgstr "Anglais|Allemand|Français|Espagnol|Suédois"
+
+#: settingsfileio.cpp:58
+msgid ""
+"plain|achemso (American Chemical Society)|alpha|unsrt|abbrv|acm (Association "
+"of Computing Machinery)|apacite|apalike|authordate|ieeetr|natbib|siam"
+msgstr ""
+"plain|achemso (American Chemical Society)|alpha|unsrt|abbrv|acm (Association "
+"of Computing Machinery)|apacite|apalike|authordate|ieeetr|natbib|siam"
+
+#: settingsfileio.cpp:177
+msgid "XSLT Stylesheet"
+msgstr "Feuille de style XSLT"
+
+#: settingsfileio.cpp:201
+msgid "No exporter available"
+msgstr "Pas de format d'exportation disponible"
+
+#: settingsfileio.cpp:223
+msgid "Path to the jar files for bib2db5"
+msgstr "Emplacement des fichiers jar pour bib2db5"
+
+#: settingsfileio.cpp:236
+msgid ""
+"To export DocBook5 bibliographies, the path to the jar file for bib2db5 has "
+"to be set first."
+msgstr ""
+"Pour exporter des bibliographies au format DocBook5 l'emplacement du fichier "
+"jar pour bib2db5 doit être préalablement renseigné."
+
+#: settingsfileio.cpp:236
+msgid "Invalid path for bib2db5"
+msgstr "Emplacement non valable pour bib2db5"
+
+#: settingsfileio.cpp:244
+msgid "BibTeX Import and Export"
+msgstr "Import et export BibTeX"
+
+#: settingsfileio.cpp:246
+msgid "&Encoding:"
+msgstr "Encodage :"
+
+#: settingsfileio.cpp:249
+msgid "Text &delimiters:"
+msgstr "Délimiteurs de texte :"
+
+#: settingsfileio.cpp:252
+msgid "Keyword casing:"
+msgstr "Casse des mots clés :"
+
+#: settingsfileio.cpp:255
+msgid "Protect title's casing:"
+msgstr "Protéger la casse des titres :"
+
+#: settingsfileio.cpp:256
+msgid "Put curly brackets around"
+msgstr "Ajouter des accolades autour"
+
+#: settingsfileio.cpp:257
+msgid "Put curly brackets around title and other selected fields."
+msgstr ""
+"Ajouter des accolades autour du titre et des autres champs sélectionnés."
+
+#: settingsfileio.cpp:258
+msgid ""
+"Put curly brackets around title and other selected fields to protect them "
+"from case changes in certain BibTeX styles."
+msgstr ""
+"Ajouter des accolades autour du titre et des autres champs sélectionnés "
+"pour les protéger contre les changements de casse de certains styles BibTeX"
+
+#: settingsfileio.cpp:260
+msgid "PDF, PostScript and Rich Text Format Export"
+msgstr "Exportation au format PDF, PostScript ou Rich Text Format"
+
+#: settingsfileio.cpp:262
+msgid ""
+"Select the layout of the resulting PDF, PostScript or Rich Text Format "
+"document when exporting a BibTeX file."
+msgstr ""
+"Sélectionner la disposition du fichier PDF, PostScript ou Rich Text Format "
+"résultant lors de l'exportation d'un fichier BibTeX"
+
+#: settingsfileio.cpp:263
+msgid "&Language:"
+msgstr "Langue :"
+
+#: settingsfileio.cpp:266
+msgid "&Biblography style:"
+msgstr "Style de bibliographie :"
+
+#: settingsfileio.cpp:270
+msgid "PDF Export"
+msgstr "Exportation PDF"
+
+#: settingsfileio.cpp:272
+msgid "Embed local files into PDF if possible"
+msgstr "Inclure des fichiers locaux dans les fichiers PDF si possible"
+
+#: settingsfileio.cpp:273
+msgid ""
+"<qt>If checked, KBibTeX tries to embed all referenced files for the BibTeX "
+"entries into the exported PDF file.<br/>This requires that you have "
+"installed <tt>embedfile.sty</tt>.</qt>"
+msgstr ""
+"<qt>Si cette option est sélectionnée, KBibTeX essaiera d'inclure tous les "
+"fichiers référencés par les éléments BibTeX dans le fichier PDF "
+"d'exportation.<br/>Cette option nécessite que le fichier "
+"<tt>embedfile.sty</tt> soit installé.</qt>"
+
+#: settingsfileio.cpp:275
+msgid "XML Export"
+msgstr "Exportation XML"
+
+#: settingsfileio.cpp:278
+msgid "Path to the jar files for bib2db5:"
+msgstr "Emplacement des fichiers jar pour bib2db5 :"
+
+#: settingsfileio.cpp:293
+msgid "Export Systems"
+msgstr "Systèmes d'exportation"
+
+#: settingsfileio.cpp:295
+msgid "HTML:"
+msgstr "HTML :"
+
+#: settingsfileio.cpp:299
+msgid "BibUtils"
+msgstr "BibUtils"
+
+#: settingsfileio.cpp:301
+msgid "Always use BibUtils"
+msgstr "Toujours utiliser BibUtils"
+
+#: settingsfileio.cpp:302
+msgid "If possible, use BibUtils to import and export alien bibliography."
+msgstr ""
+"Si possible, utiliser BibUtils pour importer et exporter des bibliographies."
+
+#: settingsfileio.cpp:303
+msgid ""
+"If possible, use BibUtils to import and export alien bibliography such as "
+"RIS.\n"
+"If unchecked, prefer internal import and export library."
+msgstr ""
+"Si possible utiliser BibUtils pour importer et exporter des bibliographiques "
+"telles que RIS.\n"
+"Si cette option n'est pas sélectionnée, la bibliothèque d'importation et "
+"d'exportation interne sera utilisée."
+
+#: settingsfileio.cpp:307
+msgid "Backups"
+msgstr ""
+
+#: settingsfileio.cpp:309
+#, fuzzy
+msgid "Number of Backups:"
+msgstr "Nombre de résultats :"
+
+#: settingsidsuggestions.cpp:90
+#, c-format
+msgid ""
+"\n"
+"Example: %1"
+msgstr ""
+"\n"
+"Exemple : %1"
+
+#: settingsidsuggestions.cpp:345
+msgid ""
+"_: id suggestion\n"
+"New"
+msgstr "Nouveau"
+
+#: settingsidsuggestions.cpp:349
+msgid ""
+"_: id suggestion\n"
+"Edit"
+msgstr "Modifier"
+
+#: settingsidsuggestions.cpp:353
+msgid ""
+"_: id suggestion\n"
+"Delete"
+msgstr "Supprimer"
+
+#: settingsidsuggestions.cpp:357
+msgid ""
+"_: id suggestion\n"
+"Up"
+msgstr "Haut"
+
+#: settingsidsuggestions.cpp:361
+msgid ""
+"_: id suggestion\n"
+"Down"
+msgstr "Bas"
+
+#: settingsidsuggestions.cpp:365
+msgid "Toogle default"
+msgstr "Définir par défaut"
+
+#: settingsidsuggestions.cpp:370
+msgid "Use default id suggestion when editing new entries"
+msgstr ""
+"Utiliser la suggestion d'id par défaut lors de l'édition de nouveaux "
+"éléments"
+
+#: settingsidsuggestions.cpp:373
+#, fuzzy
+msgid "Small Words:"
+msgstr "Supprimer les petits mots"
+
+#: settingsidsuggestions.cpp:386
+#, fuzzy
+msgid "Small Words"
+msgstr "Supprimer les petits mots"
+
+#: settingskeyword.cpp:83
+msgid "New Keyword"
+msgstr "Nouveau mot clé"
+
+#: settingskeyword.cpp:131
+#, c-format
+msgid ""
+"_n: 1 keyword has been imported.\n"
+"%n keywords have been imported."
+msgstr ""
+"1 mot clé a été importé.\n"
+"%n mots clés ont été importés."
+
+#: settingskeyword.cpp:131
+msgid "Keywords imported"
+msgstr "Mots-clés importés"
+
+#: settingskeyword.cpp:172
+msgid ""
+"_: keyword\n"
+"Delete"
+msgstr "Supprimer"
+
+#: settingskeyword.cpp:176
+msgid ""
+"_: keyword\n"
+"Import"
+msgstr "Importer"
+
+#: settingssearchurl.cpp:108
+msgid ""
+"The list of URLs will be checked and known entries will be replaced by the "
+"program standards. Search entries you have defined by yourself will be kept "
+"most likely."
+msgstr ""
+"La liste des URL sera examinée et celles qui seront reconnues seront "
+"remplacées par leur version initiale. Les URL que vous avez définies "
+"vous-même seront très probablement conservées telles quelles."
+
+#: settingssearchurl.cpp:108
+msgid "Reset list of URLs"
+msgstr "Réinitialiser la liste des URL"
+
+#: settingssearchurl.cpp:108 settingsz3950.cpp:297
+msgid "Reset"
+msgstr "Réinitialiser"
+
+#: settingssearchurl.cpp:133
+msgid "Description"
+msgstr "Description"
+
+#: settingssearchurl.cpp:140
+#, fuzzy
+msgid ""
+"_: search url\n"
+"New"
+msgstr "Réinitialiser"
+
+#: settingssearchurl.cpp:144
+msgid ""
+"_: search url\n"
+"Edit"
+msgstr "Modifier"
+
+#: settingssearchurl.cpp:148
+msgid ""
+"_: search url\n"
+"Delete"
+msgstr "Supprimer"
+
+#: settingssearchurl.cpp:152
+msgid ""
+"_: search url\n"
+"Reset"
+msgstr "Réinitialiser"
+
+#: settingssearchurl.cpp:170
+msgid "New URL"
+msgstr "Nouvelle URL"
+
+#: settingssearchurl.cpp:170
+msgid "Edit URL"
+msgstr "Modifier l'URL"
+
+#: settingssearchurl.cpp:173
+msgid "Description:"
+msgstr "Description :"
+
+#: settingssearchurl.cpp:178
+msgid "URL:"
+msgstr "URL :"
+
+#: settingssearchurl.cpp:184
+msgid "Within the URL, '%1' will be replaced by the search term."
+msgstr "Dans l'URL, « %1 » sera remplacé par l'expression recherchée."
+
+#: settingssearchurl.cpp:185
+msgid "Include Author:"
+msgstr "Inclure l'auteur :"
+
+#: settingsuserdefinedinput.cpp:62 settingsuserdefinedinput.cpp:74
+#: settingsuserdefinedinput.cpp:229 settingsuserdefinedinput.cpp:238
+#: settingsuserdefinedinput.cpp:251 settingsuserdefinedinput.cpp:257
+msgid "Single line"
+msgstr "Une ligne"
+
+#: settingsuserdefinedinput.cpp:74 settingsuserdefinedinput.cpp:230
+#: settingsuserdefinedinput.cpp:251 settingsuserdefinedinput.cpp:257
+msgid "Multiple lines"
+msgstr "Plusieurs lignes"
+
+#: settingsuserdefinedinput.cpp:168
+msgid "Name"
+msgstr "Nom"
+
+#: settingsuserdefinedinput.cpp:170
+msgid "Label"
+msgstr "Étiquette"
+
+#: settingsuserdefinedinput.cpp:180
+msgid ""
+"_: user-defined input\n"
+"New"
+msgstr "Ajouter"
+
+#: settingsuserdefinedinput.cpp:183
+msgid ""
+"_: user-defined input\n"
+"Edit"
+msgstr "Modifier"
+
+#: settingsuserdefinedinput.cpp:186
+msgid ""
+"_: user-defined input\n"
+"Delete"
+msgstr "Supprimer"
+
+#: settingsuserdefinedinput.cpp:189
+msgid ""
+"_: user-defined input\n"
+"Up"
+msgstr "Monter"
+
+#: settingsuserdefinedinput.cpp:193
+msgid ""
+"_: user-defined input\n"
+"Down"
+msgstr "Descendre"
+
+#: settingsuserdefinedinput.cpp:210
+msgid "New Field"
+msgstr "Nouveau champ"
+
+#: settingsuserdefinedinput.cpp:210
+msgid "Edit Field"
+msgstr "Modifier le champ"
+
+#: settingsuserdefinedinput.cpp:213 settingsz3950.cpp:71
+msgid "Name:"
+msgstr "Nom :"
+
+#: settingsuserdefinedinput.cpp:218
+msgid "Label:"
+msgstr "Étiquette :"
+
+#: settingsuserdefinedinput.cpp:224
+msgid "Input Type:"
+msgstr "Type d'élément :"
+
+#: settingsz3950.cpp:77
+msgid "Database:"
+msgstr "Base de données :"
+
+#: settingsz3950.cpp:83
+msgid "Host:"
+msgstr "Hôte :"
+
+#: settingsz3950.cpp:89
+msgid "Port:"
+msgstr "Port :"
+
+#: settingsz3950.cpp:98
+msgid "User:"
+msgstr "Identifiant :"
+
+#: settingsz3950.cpp:104
+msgid "Password:"
+msgstr "Mot de passe :"
+
+#: settingsz3950.cpp:110
+msgid "Syntax:"
+msgstr "Syntaxe :"
+
+#: settingsz3950.cpp:122
+msgid "Locale:"
+msgstr "Localisation :"
+
+#: settingsz3950.cpp:149
+msgid "Edit Z39.50 Server"
+msgstr "Modifier le serveur Z39.50"
+
+#: settingsz3950.cpp:297
+msgid "All Z39.50 server configurations will be reset to defaults."
+msgstr ""
+"Tous les paramètres de configuration du serveur Z39.50 seront "
+"réinitialisés à leur valeurs par défaut."
+
+#: settingsz3950.cpp:297
+msgid "Reset to Default"
+msgstr "Réglages par défaut"
+
+#: settingsz3950.cpp:324
+msgid ""
+"_: z3950 server\n"
+"Name"
+msgstr "Nom"
+
+#: settingsz3950.cpp:325
+msgid ""
+"_: z3950 server\n"
+"Database"
+msgstr "Base de données"
+
+#: settingsz3950.cpp:334
+msgid ""
+"_: z3950 server\n"
+"New"
+msgstr "Ajouter"
+
+#: settingsz3950.cpp:338
+msgid ""
+"_: z3950 server\n"
+"Edit"
+msgstr "Modifier"
+
+#: settingsz3950.cpp:342
+msgid ""
+"_: z3950 server\n"
+"Delete"
+msgstr "Supprimer"
+
+#: settingsz3950.cpp:346
+msgid ""
+"_: z3950 server\n"
+"Up"
+msgstr "Monter"
+
+#: settingsz3950.cpp:350
+msgid ""
+"_: z3950 server\n"
+"Down"
+msgstr "Descendre"
+
+#: settingsz3950.cpp:355
+msgid ""
+"_: z3950 server\n"
+"Reset"
+msgstr "Réinitialiser"
+
+#: sidebar.cpp:113
+msgid "Toggle between showing all fields or only important fields"
+msgstr ""
+"Bascule entre l'affichage de tous les champs ou l'affichage des champs "
+"importants seulement"
+
+#: sidebar.cpp:117
+msgid "Filter this sidebar for a given field"
+msgstr "Filtrer l'affichage de cette barre latérale sur le champ indiqué"
+
+#: sidebar.cpp:124
+msgid ""
+"Toggle between selecting only one item or multiple items (AND-connected in "
+"search)"
+msgstr ""
+"Basculer entre la sélection unique ou multiple (opération ET dans la "
+"recherche)"
+
+#: sidebar.cpp:127
+msgid "#"
+msgstr "#"
+
+#: sidebar.cpp:128
+msgid "Items"
+msgstr "Éléments"
+
+#: sidebar.cpp:135
+msgid "Rename all occurrences"
+msgstr "Renommer toutes les occurrences"
+
+#: valuewidget.cpp:39
+msgid "Edit field '%1'"
+msgstr "Modifier le champ « %1 »"
+
+#: valuewidget.cpp:137
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewValue%1"
+msgstr "NouvelleValeur%1"
+
+#: valuewidget.cpp:205
+msgid "Checked entries are string keys, unchecked entries are quoted text."
+msgstr ""
+"Les éléments cochés sont des clés, les éléments non-cochés sont du "
+"texte cité"
+
+#: valuewidget.cpp:232
+msgid "Toggle"
+msgstr "Basculer"
+
+#: webquery.cpp:94 webquerycsb.cpp:83 webquerydblp.cpp:68
+#: webquerymathscinet.cpp:61 webqueryspireshep.cpp:99
+msgid "Search &term:"
+msgstr "Requête :"
+
+#: webquery.cpp:105 webquerycsb.cpp:103 webquerydblp.cpp:79
+#: webquerysciencedirect.cpp:165 webqueryz3950.cpp:102
+msgid "&Number of results:"
+msgstr "Nombre de résultats :"
+
+#: webquery.cpp:153
+msgid "Searching"
+msgstr "Recherche"
+
+#: webquery.cpp:153
+#, c-format
+msgid "Searching %1"
+msgstr "Recherche %1"
+
+#: webquery.cpp:315
+msgid "&Import"
+msgstr "Importer"
+
+#: webquery.cpp:315
+msgid "Import selected items"
+msgstr "Importer les éléments sélectionnés"
+
+#: webquery.cpp:363
+#, c-format
+msgid "Search %1"
+msgstr "Rechercher %1"
+
+#: webquery.cpp:402
+msgid ""
+"You do not have the necessary permissions to query data from this service."
+msgstr ""
+
+#: webquery.cpp:431
+msgid "&Engine:"
+msgstr "Moteur :"
+
+#: webquery.cpp:442
+msgid "&Search"
+msgstr "Recherche"
+
+#: webquery.cpp:468
+msgid "Import all hits"
+msgstr "Importer tous les résultats"
+
+#: webqueryamatex.cpp:55
+msgid "Amatex"
+msgstr "Amatex"
+
+#: webqueryamatex.cpp:60
+msgid "About Amatex"
+msgstr "À propos d'Amatex"
+
+#: webqueryamatex.cpp:111 webquerybibsonomy.cpp:116 webquerycitebase.cpp:118
+#: webquerycsb.cpp:280 webquerydblp.cpp:204 webqueryieeexplore.cpp:156
+#: webquerymathscinet.cpp:176 webquerypubmed.cpp:159 webquerypubmed.cpp:171
+#: webqueryspireshep.cpp:206 webqueryzmath.cpp:113
+msgid "Querying database '%1' failed."
+msgstr "Échec lors de la requête vers la base de données « %1 »"
+
+#: webqueryarxiv.cpp:78
+msgid "arXiv"
+msgstr "arXiv"
+
+#: webqueryarxiv.cpp:83
+msgid "arXiv is an archive for preprints"
+msgstr "arXiv est une archive de pré-publications électroniques"
+
+#: webquerybibsonomy.cpp:63
+msgid "BibSonomy"
+msgstr "BibSonomy"
+
+#: webquerybibsonomy.cpp:68
+msgid "BibSonomy bookmark sharing system"
+msgstr "Système de partage de signets BibSonomy"
+
+#: webquerycitebase.cpp:62
+msgid "Citebase"
+msgstr "Citebase"
+
+#: webquerycitebase.cpp:67
+#, fuzzy
+msgid "Citebase citation index"
+msgstr "Citebase Search is a semi-autonomous citation index"
+
+#: webqueryciteseerx.cpp:83
+msgid "CiteSeerX"
+msgstr "CiteSeerX"
+
+#: webqueryciteseerx.cpp:92
+msgid "About CiteSeerX"
+msgstr "À propos de CiteSeerX"
+
+#: webquerycsb.cpp:90
+msgid ""
+"_: Here, \"Field\" refers to a parameter for the CSB search (author, title, "
+"any)\n"
+"&Field:"
+msgstr "Champ :"
+
+#: webquerycsb.cpp:111
+msgid "&Year:"
+msgstr "Année :"
+
+#: webquerycsb.cpp:125
+msgid "Sort &by:"
+msgstr "Trier par :"
+
+#: webquerycsb.cpp:134
+msgid "Online papers only"
+msgstr "Publications en ligne seulement"
+
+#: webquerycsb.cpp:137 webqueryz3950.cpp:59
+msgid "any"
+msgstr "n'importe"
+
+#: webquerycsb.cpp:138 webqueryspireshep.cpp:86 webqueryz3950.cpp:59
+msgid "author"
+msgstr "auteur"
+
+#: webquerycsb.cpp:139 webqueryspireshep.cpp:87 webqueryz3950.cpp:59
+msgid "title"
+msgstr "titre"
+
+#: webquerycsb.cpp:140
+msgid "exact"
+msgstr "exactitude"
+
+#: webquerycsb.cpp:141
+msgid "until"
+msgstr "until"
+
+#: webquerycsb.cpp:142
+msgid "from"
+msgstr "from"
+
+#: webquerycsb.cpp:144
+msgid "none"
+msgstr "none"
+
+#: webquerycsb.cpp:145
+msgid "score"
+msgstr "score"
+
+#: webquerycsb.cpp:146
+msgid "year"
+msgstr "année"
+
+#: webquerycsb.cpp:171
+msgid "Computer Science Bibliographies"
+msgstr "Computer Science Bibliographies"
+
+#: webquerycsb.cpp:176
+msgid "Copyright for the Bibliography Collection"
+msgstr "Copyright de la Bibliography Collection"
+
+#: webquerydblp.cpp:89
+msgid "Do not merge corresponding entries"
+msgstr "Ne pas fusionner les entrées correspondantes"
+
+#: webquerydblp.cpp:110
+msgid "DBLP"
+msgstr "DBLP"
+
+#: webquerydblp.cpp:115
+msgid "DBLP - Copyright"
+msgstr "DBLP - Copyright"
+
+#: webquerygooglescholar.cpp:69
+msgid "Google Scholar"
+msgstr "Google Scholar"
+
+#: webquerygooglescholar.cpp:74
+msgid "About Google Scholar"
+msgstr "À propos de Google Scholar"
+
+#: webqueryieeexplore.cpp:67
+msgid "IEEExplore"
+msgstr "IEEExplore"
+
+#: webqueryieeexplore.cpp:72
+msgid "What is IEEE Xplore?"
+msgstr "Qu'est-ce que IEEE Xplore ?"
+
+#: webqueryieeexplore.cpp:109
+msgid "You have entered an invalid search."
+msgstr "Vous avez saisi une requête non valable."
+
+#: webqueryieeexplore.cpp:109
+#, fuzzy
+msgid "Search Error"
+msgstr "Barre de recherche"
+
+#: webquerymathscinet.cpp:81
+msgid ""
+"<qt>Use the same synatx as for <a "
+"href=\"http://www.math.tamu.edu/~comech/tools/bibget/\">BIBGET</a>. For "
+"spaces within a search element, use \"<tt>+</tt>\".<br/>Example: "
+"<tt>a=gilkey t=invariance book 1984</tt></qt>"
+msgstr ""
+
+#: webquerymathscinet.cpp:102
+msgid "MathSciNet"
+msgstr ""
+
+#: webquerymathscinet.cpp:107
+msgid "American Mathematical Society"
+msgstr ""
+
+#: webquerypubmed.cpp:67
+msgid "NCBI (PubMed)"
+msgstr "NCBI (PubMed)"
+
+#: webquerypubmed.cpp:72
+msgid "NCBI's Disclaimer and Copyright"
+msgstr "NCBI's Disclaimer and Copyright"
+
+#: webquerysciencedirect.cpp:84
+msgid "Title, abstract, keywords:"
+msgstr "Titre, résumé, mots clés :"
+
+#: webquerysciencedirect.cpp:103
+msgid "Author:"
+msgstr "Auteur :"
+
+#: webquerysciencedirect.cpp:120
+msgid "Journal/book title:"
+msgstr "Titre du magazine/livre :"
+
+#: webquerysciencedirect.cpp:135
+msgid "Volume:"
+msgstr "Volume :"
+
+#: webquerysciencedirect.cpp:145
+msgid "Issue:"
+msgstr "Numéro :"
+
+#: webquerysciencedirect.cpp:155
+msgid "Page:"
+msgstr "Page :"
+
+#: webquerysciencedirect.cpp:196
+msgid "ScienceDirect"
+msgstr "ScienceDirect"
+
+#: webquerysciencedirect.cpp:201
+msgid "About ScienceDirect"
+msgstr "À propos de ScienceDirect"
+
+#: webqueryspireshep.cpp:42
+msgid "DESY (Germany)"
+msgstr "DESY (Allemagne)"
+
+#: webqueryspireshep.cpp:42
+msgid "FNAL (U.S.A.)"
+msgstr "FNAL (États-Unis)"
+
+#: webqueryspireshep.cpp:42
+msgid "IHEP (Russia)"
+msgstr "IHEP (Russie)"
+
+#: webqueryspireshep.cpp:42
+msgid "Durham U (U.K.)"
+msgstr "Durham U (Royaume-Uni)"
+
+#: webqueryspireshep.cpp:42
+msgid "SLAC (U.S.A.)"
+msgstr "SLAC (États-Unis)"
+
+#: webqueryspireshep.cpp:42
+msgid "YITP (Japan)"
+msgstr "YITP (Japon)"
+
+#: webqueryspireshep.cpp:42
+msgid "LIPI (Indonesia)"
+msgstr "LIPI (Indonésie)"
+
+#: webqueryspireshep.cpp:78
+msgid "Type:"
+msgstr "Type :"
+
+#: webqueryspireshep.cpp:85
+msgid "raw query"
+msgstr "requête brute"
+
+#: webqueryspireshep.cpp:88
+msgid "journal"
+msgstr "Magazine"
+
+#: webqueryspireshep.cpp:89
+msgid "EPrint number"
+msgstr "Numéro EPrint"
+
+#: webqueryspireshep.cpp:90
+msgid "report number"
+msgstr "Numéro de rapport"
+
+#: webqueryspireshep.cpp:91
+msgid "keywords"
+msgstr "mots clés"
+
+#: webqueryspireshep.cpp:109
+msgid "Include abstracts from arxiv.org if available"
+msgstr ""
+
+#: webqueryspireshep.cpp:130
+msgid "SPIRES-HEP"
+msgstr "SPIRES-HEP"
+
+#: webqueryspireshep.cpp:135
+msgid "SPIRES-HEP Search"
+msgstr "Recherche SPIRES-HEP"
+
+#: webqueryz3950.cpp:59
+msgid "publisher"
+msgstr "éditeur"
+
+#: webqueryz3950.cpp:94
+msgid "Server:"
+msgstr "Serveur :"
+
+#: webqueryz3950.cpp:116
+msgid "Search term 1:"
+msgstr "Requête 1 :"
+
+#: webqueryz3950.cpp:126 webqueryz3950.cpp:147
+msgid "Search in:"
+msgstr "Rechercher dans :"
+
+#: webqueryz3950.cpp:138
+msgid "Search term 2:"
+msgstr "Requête 2 :"
+
+#: webqueryz3950.cpp:163
+msgid "and"
+msgstr "et"
+
+#: webqueryz3950.cpp:164
+msgid "or"
+msgstr "ou"
+
+#: webqueryz3950.cpp:330
+#, c-format
+msgid ""
+"The server returned the following message:\n"
+"\n"
+"%1"
+msgstr ""
+"Le serveur a renvoyé le message suivant :\n"
+"\n"
+"%1"
+
+#: webqueryz3950.cpp:330
+msgid "Error querying Z39.50 server"
+msgstr "Requête non valable vers le serveur Z39.50"
+
+#: webqueryzmath.cpp:61
+msgid "Zentralblatt MATH"
+msgstr "Zentralblatt MATH"
+
+#: webqueryzmath.cpp:66
+msgid "About Zentralblatt MATH"
+msgstr "À propos de Zentralblatt MATH"
+
+#: z3950connection.cpp:158
+msgid "Query error!"
+msgstr "Requête non valable !"
+
+#: z3950connection.cpp:205
+msgid "Connection search error %1: %2"
+msgstr "Opérateurs de recherche non valables %1 : %2"
+
+#: z3950connection.cpp:294
+msgid "Record syntax error"
+msgstr "Syntaxe de l'enregistrement non valable"
+
+#: z3950connection.cpp:405
+msgid "Connection error %1: %2"
+msgstr "Opérateur non valable %1 : %2"
+
+#~ msgid "Merge Entries"
+#~ msgstr "Fusionner les éléments"
+
+#~ msgid "Cannot establish a link to LyX"
+#~ msgstr "Impossible d'établir un lien avec LyX"
+
+#~ msgid "Cannot establish a link to LyX using the pipe '%1'"
+#~ msgstr ""
+#~ "Impossible de communiquer avec LyX avec le tube de communication « %1 »"
+
+#~ msgid ""
+#~ "\n"
+#~ "Maybe LyX is not running?"
+#~ msgstr ""
+#~ "\n"
+#~ "LyX n'est peut-être pas en fonctionnement ?"
+
+#, fuzzy
+#~ msgid "keyword"
+#~ msgstr "Mots-clés"
+
+#, fuzzy
+#~ msgid ", but only first letter of each last name"
+#~ msgstr ""
+#~ ", mais seulement la première lettre de chaque mot\n"
+#~ ", mais seulement les %n premières lettres de chaque mot"
+
+#, fuzzy
+#~ msgid ", but only first letter of each word"
+#~ msgstr ""
+#~ ", mais seulement la première lettre de chaque mot\n"
+#~ ", mais seulement les %n premières lettres de chaque mot"
+
+#, fuzzy
+#~ msgid "id suggestion"
+#~ msgstr "Suggestions d'id"
+
+#, fuzzy
+#~ msgid "1 keyword has been imported."
+#~ msgstr "Mots-clés importés"
+
+#, fuzzy
+#~ msgid "search url"
+#~ msgstr "Ajouter"
+
+#, fuzzy
+#~ msgid "user-defined input"
+#~ msgstr "Monter"
+
+#, fuzzy
+#~ msgid "z3950 server"
+#~ msgstr "Ajouter"
+
+#~ msgid "Updating"
+#~ msgstr "Mise à jour"
+
+#~ msgid "eXtended Markup Language (*.xml)"
+#~ msgstr "eXtended Markup Language (*.xml)"
+
+#~ msgid "Use first author only"
+#~ msgstr "Utiliser le premier auteur seulement"
+
+#, fuzzy
+#~ msgid "Merge BibTeX Elements"
+#~ msgstr "Fusionner des éléments BibTeX"
+
+#~ msgid "Original element:"
+#~ msgstr "Élément initial :"
+
+#~ msgid "Inserted element:"
+#~ msgstr "Élément inséré :"
+
+#~ msgid "Keep Original"
+#~ msgstr "Garder l'original"
+
+#~ msgid "Use Inserted"
+#~ msgstr "Utiliser l'élément inséré"
+
+#~ msgid "Rename Inserted"
+#~ msgstr "Renommer l'élément inséré"
+
+#~ msgid "Merge"
+#~ msgstr "Fusionner"
+
+#~ msgid "LaTeX|UTF-8"
+#~ msgstr "LaTeX|UTF-8"
+
+#~ msgid ""
+#~ "To find a document (e.g. a PDF file) associated to a BibTeX entry, KBibTeX "
+#~ "can search a set of default search paths."
+#~ msgstr ""
+#~ "Pour trouver un document (ex. : un fichier PDF) associé à un élément "
+#~ "BibTeX, KBibTeX peut chercher dans un ensemble de chemins par défaut."
diff --git a/po/it.po b/po/it.po
new file mode 100644
index 0000000..1819e42
--- /dev/null
+++ b/po/it.po
@@ -0,0 +1,2864 @@
+# translation of it.po to Italian
+# translation of it.po to
+#
+# Berto <bertolini@tlc.unipr.it>, 2008, 2009.
+# Angelo Compagnucci <angelo.compagnucci@gmail.com>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: it\n"
+"POT-Creation-Date: 2010-07-01 13:55+0200\n"
+"PO-Revision-Date: 2009-01-04 19:45+0100\n"
+"Last-Translator: Berto\n"
+"Language-Team: American English <kde-i18n-doc@lists.kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Report-Msgid-Bugs-To: \n"
+"X-Generator: Lokalize 0.2\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: _translatorinfo.cpp:1
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Marco Bertolini, Angelo Compagnucci"
+
+#: _translatorinfo.cpp:3
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "bertolini@tlc.unipr.it, angelo.compagnucci@gmail.com"
+
+#: commentwidget.cpp:55
+msgid "Co&mment:"
+msgstr "Co&mmento:"
+
+#: commentwidget.cpp:64
+msgid "&Use @Comment for comment instead of plain text"
+msgstr "&Usa @Comment per i commenti invece del testo semplice"
+
+#: commentwidget.cpp:82
+msgid "Edit BibTeX Comment"
+msgstr "Modifica Commento BibTeX"
+
+#: documentlistview.cpp:120
+msgid "List View"
+msgstr "Modalità L&ista"
+
+#: documentlistview.cpp:120
+msgid "Updating main view ..."
+msgstr "Aggiornamento del pannello principale ..."
+
+#: documentlistview.cpp:253
+msgid "Show Columns"
+msgstr "Mostra Colonne"
+
+#: documentlistview.cpp:259 documentlistview.cpp:756 settingsediting.cpp:164
+msgid "Element Type"
+msgstr "Tipo di Elemento"
+
+#: documentlistview.cpp:450
+msgid "Paste text as..."
+msgstr "Copia testo come..."
+
+#: documentlistview.cpp:757 settingsediting.cpp:165
+msgid "Entry Id"
+msgstr "Id Elemento"
+
+#: documentlistviewitem.cpp:114 kbibtex_part.cpp:506
+msgid "Comment"
+msgstr "Commento"
+
+#: documentlistviewitem.cpp:124 kbibtex_part.cpp:507 macrowidget.cpp:93
+msgid "Macro"
+msgstr "Macro"
+
+#: documentlistviewitem.cpp:138 kbibtex_part.cpp:505 preamblewidget.cpp:78
+msgid "Preamble"
+msgstr "Preambolo"
+
+#: documentsourceview.cpp:214
+msgid "Source View"
+msgstr "Modalità so&rgente"
+
+#: documentsourceview.cpp:214
+msgid "Converting BibTeX document to plain text ..."
+msgstr "Conversione del documento BibTeX in formato testo ..."
+
+#: documentsourceview.cpp:369
+msgid ""
+"Could not find text '%1' in the document.\n"
+"Start from the beginning?"
+msgstr ""
+"Impossibile trovare testo '%1' nel documento.\n"
+"Ricominciare dall'inizio?"
+
+#: documentsourceview.cpp:369
+msgid "Find text in source view"
+msgstr "Trova testo in modalità sorgente"
+
+#: documentsourceview.cpp:369
+msgid "Restart search"
+msgstr "Ricominciare la ricerca"
+
+#: documentwidget.cpp:120
+msgid "L&ist view"
+msgstr "Modalità L&ista"
+
+#: documentwidget.cpp:142
+msgid "So&urce view"
+msgstr "Modalità so&rgente"
+
+#: documentwidget.cpp:174
+msgid "<qt>Loading file <b>%1</b></qt>"
+msgstr "<qt>Caricamento file <b>%1</b></qt>"
+
+#: documentwidget.cpp:221
+msgid "Do you want to search for duplicates in the merged document?"
+msgstr ""
+
+#: documentwidget.cpp:221
+#, fuzzy
+msgid "Find duplicates?"
+msgstr "Trova duplicati"
+
+#: documentwidget.cpp:221 findduplicates.cpp:58 mergeelements.cpp:484
+#: mergeelements.cpp:492 settingsediting.cpp:216
+msgid "Find Duplicates"
+msgstr "Trova duplicati"
+
+#: documentwidget.cpp:281 documentwidget.cpp:1345 documentwidget.cpp:1359
+#: kbibtex_part.cpp:306 kbibtex_part.cpp:320
+msgid "Choose file format"
+msgstr "Scegli formato del file"
+
+#: documentwidget.cpp:281 documentwidget.cpp:1345 documentwidget.cpp:1359
+#: kbibtex_part.cpp:306 kbibtex_part.cpp:320
+msgid "Choose file format of file '%1':"
+msgstr "Scegli formato del file '%1'."
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid ""
+"The selected filename \"%1\" is a symbolic link pointing to \"%2\".\n"
+"Replace the link with a new file or overwrite the existing file the link "
+"points to?"
+msgstr ""
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Symbolic Link"
+msgstr ""
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+#, fuzzy
+msgid "Replace link"
+msgstr "Id Elemento"
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Overwrite file the link points to"
+msgstr ""
+
+#: documentwidget.cpp:301
+msgid "<qt>Writing file <b>%1</b></qt>"
+msgstr "<qt>Scrittura file <b>%1</b></qt>"
+
+#: documentwidget.cpp:388
+msgid ""
+"To export a BibTeX document to the Rich Text Format (RTF) KBibTeX requires "
+"the program 'latex2rtf'."
+msgstr ""
+"Per esportare un documento BibTeX nel formato Rich Text Format (RTF),è "
+"necessario installare il programma latex2rtf."
+
+#: documentwidget.cpp:405
+msgid ""
+"To export a BibTeX document to the DocBook5 format KBibTeX requires the "
+"program 'bib2db5'."
+msgstr ""
+"Per esportare un documento BibTeX nel formato DocBook5, è necessario "
+"installare il programma bib2db5."
+
+#: documentwidget.cpp:420
+msgid ""
+"Embedding files into the PDF file is enabled, but the required file "
+"'embedfile.sty' was not found. Embedding files will be disabled."
+msgstr ""
+"L'inserimento di file nel file PDF è abilitato, ma il file richiesto "
+"'embedfile.sty' non è stato trovato. L'inserimento di file verrà "
+"disabilitato."
+
+#: documentwidget.cpp:420
+msgid "Embedding files disabled"
+msgstr "Inserimento file disabilitato"
+
+#: documentwidget.cpp:471
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewMacro%1"
+msgstr "NuovaMacro%1"
+
+#: documentwidget.cpp:489
+msgid "Put your comment here..."
+msgstr "Inserisci qui il tuo commento..."
+
+#: documentwidget.cpp:543
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewString%1"
+msgstr "NuovaStringa%1"
+
+#: documentwidget.cpp:544
+msgid "No text yet"
+msgstr "Nessun testo"
+
+#: documentwidget.cpp:548
+msgid "@comment{ Put your comment here... }"
+msgstr "@comment{ Inserire qui il commento... }"
+
+#: documentwidget.cpp:552
+msgid "@preamble{\"Put your preamble here using double quotes...\"}"
+msgstr "@preamble{\"Inserire qui il commento usando le virgolette...\"}"
+
+#: documentwidget.cpp:568
+msgid "REQUIRED"
+msgstr "OBBLIGATORIO"
+
+#: documentwidget.cpp:568
+msgid "optional"
+msgstr "opzionale"
+
+#: documentwidget.cpp:610
+#, c-format
+msgid ""
+"_n: This BibTeX file contains 1 element.\n"
+"This BibTeX file contains %n elements."
+msgstr ""
+"Questo file BibTeX contiene 1 elemento.\n"
+"Questo file BibTeX contiene %n elementi."
+
+#: documentwidget.cpp:610
+msgid "File Statistics"
+msgstr "Statistiche dei File"
+
+#: documentwidget.cpp:806 documentwidget.cpp:815
+msgid "%1 ... %2"
+msgstr "%1 ... %2"
+
+#: documentwidget.cpp:827
+msgid "New keyword:"
+msgstr "Nuova parola chiave:"
+
+#: documentwidget.cpp:999
+msgid ""
+"\n"
+"\n"
+"Either LyX is not running or has not been correctly configured to send "
+"references to."
+msgstr ""
+"\n"
+"\n"
+"O Lyx non è in esecuzione p non è stato configurato correttamente per "
+"inviare i riferimenti"
+
+#: documentwidget.cpp:1000
+msgid "Error communicating with LyX"
+msgstr "Errore nella comunicazione con LyX"
+
+#: documentwidget.cpp:1007
+msgid "Cannot determine how to send references to LyX."
+msgstr "Impossibile determinare come spedire il riferimento a Lyx"
+
+#: documentwidget.cpp:1012
+msgid "The inpipe as configured in LyX does not exist."
+msgstr "Questa inpipe come è configurata in Lyx, non esiste."
+
+#: documentwidget.cpp:1016
+msgid "Cannot open the inpipe as configured in LyX."
+msgstr "Impossibile aprire la inpipe come configurata in Lyx"
+
+#: documentwidget.cpp:1288 documentwidget.cpp:1293
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewEntry%1"
+msgstr "NuovoElemento%1"
+
+#: documentwidget.cpp:1398
+msgid "The file '%1' does not contain a known type of bibliography."
+msgstr "Il file '%1' non contiene un tipo bibliografia riconosciuto."
+
+#: documentwidget.cpp:1398
+msgid "Unknown file format"
+msgstr "Formato di file sconosciuto"
+
+#: documentwidget.cpp:1453
+msgid "No preview available"
+msgstr "Anteprima non disponibile"
+
+#: documentwidget.cpp:1554
+msgid ""
+"File '%1' has been modified. Reload file to import changes or ignore changes?"
+msgstr ""
+"Il file '%1' è stato modificato. Ricaricare il file per importare le "
+"modifiche o ignorare le modifiche?"
+
+#: documentwidget.cpp:1554
+msgid "Reload file?"
+msgstr "Ricaricare il file?"
+
+#: documentwidget.cpp:1554
+msgid "Ignore"
+msgstr "Ignorare"
+
+#: documentwidget.cpp:1691
+#, fuzzy
+msgid "You must set a default id suggestion in the settings dialog."
+msgstr "Usa il suggerimento predefinito per impostare l'id dell'elemento"
+
+#: documentwidget.cpp:1713
+msgid "No entries were selected."
+msgstr ""
+
+#: documentwidget.cpp:1714
+msgid ""
+"The following changes will be applied to the currently selected elements.\n"
+"Conflicts with duplicate entry ids will be resolved when applying the new "
+"ids."
+msgstr ""
+
+#: documentwidget.cpp:1714 kbibtex_part.cpp:482
+msgid "Normalize Entry Ids"
+msgstr ""
+
+#: documentwidget.cpp:1714
+#, fuzzy
+msgid "Replace Entry Ids"
+msgstr "Id Elemento"
+
+#: entrywidget.cpp:65
+msgid "Edit BibTeX Entry"
+msgstr "Modifica Elemento BibTeX"
+
+#: entrywidget.cpp:142
+msgid ""
+"The current entry has been modified. Do you want do discard your changes?"
+msgstr "L'elemento corrente è stato modificato. Annullare le modifiche?"
+
+#: entrywidget.cpp:142
+msgid "Discard changes"
+msgstr "Annullare le modifiche"
+
+#: entrywidget.cpp:256
+msgid ""
+"The source code does not contain valid BibTeX code.\n"
+"\n"
+"Restore previous version or continue editing?"
+msgstr ""
+"Il codice sorgente non contiene codice BibTex valido.\n"
+"\n"
+"Ritornare alla versione precedente o continuare le modifiche?"
+
+#: entrywidget.cpp:256
+msgid "Invalid BibTeX code"
+msgstr "Codice BibTeX non valido"
+
+#: entrywidget.cpp:314
+msgid "E&ntry Type:"
+msgstr "Tipo di Eleme&nto:"
+
+#: entrywidget.cpp:324
+msgid "&Identifier"
+msgstr "&Identificativo"
+
+#: entrywidget.cpp:341
+msgid "Use the default id suggestion to set the entry id"
+msgstr "Usa il suggerimento predefinito per impostare l'id dell'elemento"
+
+#: entrywidget.cpp:342
+msgid ""
+"Use the default id suggestion to set the entry id.\n"
+"You can edit and select the default id suggestion in the configuration "
+"dialog."
+msgstr ""
+"Usa il suggerimento predefinito per impostare l'id dell'elemento.\n"
+"E` possibile scegliere e modificare il suggerimento predefinito nel pannello "
+"di configurazione."
+
+#: entrywidget.cpp:350 settingsediting.cpp:194
+msgid "Enable all &fields for editing"
+msgstr "Abilita la modi&fica di tutti i campi"
+
+#: entrywidget.cpp:353
+#, fuzzy
+msgid "Refetch"
+msgstr "Reset"
+
+#: entrywidget.cpp:361
+msgid "Message"
+msgstr "Messaggio"
+
+#: entrywidget.cpp:385 entrywidgettitle.cpp:116 entrywidgettitle.cpp:118
+#: idsuggestions.cpp:345 idsuggestionswidget.cpp:201
+#: idsuggestionswidget.cpp:485 settings.cpp:681 webquery.cpp:450
+msgid "Title"
+msgstr "Titolo"
+
+#: entrywidget.cpp:386
+msgid "Author/Editor"
+msgstr "Autore/Editore"
+
+#: entrywidget.cpp:387
+msgid "Publication"
+msgstr "Pubblicazione"
+
+#: entrywidget.cpp:388 kbibtex_part.cpp:500 settings.cpp:720
+msgid "Misc"
+msgstr "Misc"
+
+#: entrywidget.cpp:389 settings.cpp:659 settingskeyword.cpp:161
+msgid "Keywords"
+msgstr "Parole Chiave"
+
+#: entrywidget.cpp:390
+msgid "External"
+msgstr "Campi esterni"
+
+#: entrywidget.cpp:391
+msgid "User Defined"
+msgstr "Campi definiti dall'utente"
+
+#: entrywidget.cpp:392
+msgid "Other Fields"
+msgstr "Altri campi"
+
+#: entrywidget.cpp:395
+msgid "Source"
+msgstr "Sorgente"
+
+#: entrywidget.cpp:438
+msgid "Please supply more fields to use the default id"
+msgstr "Fornire più campi per usare l'id predefinito"
+
+#: entrywidget.cpp:441
+msgid "Using '%1' as entry id"
+msgstr "Utilizzo '%1' come id dell'elemento"
+
+#: entrywidget.cpp:446
+msgid "An entry has to have an identifier"
+msgstr "Un elemento deve avere un identificativo"
+
+#: entrywidget.cpp:448
+#, c-format
+msgid "The identifier contains invalid characters at position %1"
+msgstr "L'identificativo contiene caratteri non validi in posizione %1"
+
+#: entrywidget.cpp:458
+msgid "The identifier contains non-ascii characters, first one is '%1'"
+msgstr ""
+"L'identificativo contiene caratteri non-ascii, il primo dei quali è '%1'"
+
+#: entrywidget.cpp:474
+msgid "This BibTeX file already contains an entry with id '%1'."
+msgstr ""
+
+#: entrywidget.cpp:491
+msgid "Require either 'Editor', 'Organization', or 'Key'"
+msgstr "Sono necessari 'Editore', 'Organizzazione' o 'Chiave'"
+
+#: entrywidget.cpp:500
+msgid ""
+"Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Book "
+"Title'"
+msgstr ""
+"Il riferimento '%1' deve contenere i campi 'Editore', Chiave' o 'Titolo del "
+"libro'"
+
+#: entrywidget.cpp:510
+msgid "Cross referenced entry '%1' must contain 'Volume'"
+msgstr "Il riferimento '%1' deve contenere il campo 'Volume'"
+
+#: entrywidget.cpp:513
+msgid ""
+"Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Series'"
+msgstr ""
+"Il riferimento '%1' deve contenere o il campo 'Eiditore', o 'Chiave' o "
+"'Serie'"
+
+#: entrywidget.cpp:537
+msgid "No suggestions available"
+msgstr "Nessun suggerimento disponibile"
+
+#: entrywidget.cpp:641
+msgid ""
+"Currently only refetching from ArXiv sources is supported.\n"
+"\n"
+"This requires that the URL field points to an \"abstract\" page (i.e. the "
+"URL contains \"arxiv.org/abs/\")."
+msgstr ""
+
+#: entrywidget.cpp:641 entrywidget.cpp:668
+msgid "Refetching entry"
+msgstr ""
+
+#: entrywidget.cpp:668
+msgid "Fetching updated bibliographic data failed."
+msgstr ""
+
+#: entrywidgetauthor.cpp:83
+msgid "The fields 'Author' or 'Editor' are required, but both are missing"
+msgstr ""
+"Il campo 'Autore' o quello 'Editore' sono obbligatori, ma entrambi sono "
+"assenti"
+
+#: entrywidgetauthor.cpp:98 entrywidgetauthor.cpp:100
+#: idsuggestionswidget.cpp:112 idsuggestionswidget.cpp:483 settings.cpp:633
+#: settingssearchurl.cpp:134 webquery.cpp:449
+msgid "Author"
+msgstr "Autore"
+
+#: entrywidgetauthor.cpp:100
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewAuthor"
+msgstr "NuovoAutore"
+
+#: entrywidgetauthor.cpp:105 entrywidgetauthor.cpp:107 settings.cpp:645
+msgid "Editor"
+msgstr "Editore"
+
+#: entrywidgetauthor.cpp:107
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewEditor"
+msgstr "NuovoEditore"
+
+#: entrywidgetexternal.cpp:197 entrywidgetexternal.cpp:285
+#, fuzzy
+msgid "Previously used directory"
+msgstr "Seleziona cartella base"
+
+#: entrywidgetexternal.cpp:223 entrywidgetexternal.cpp:225
+#: entrywidgetexternal.cpp:235 settings.cpp:685 settingssearchurl.cpp:135
+msgid "URL"
+msgstr "URL"
+
+#: entrywidgetexternal.cpp:235 entrywidgetexternal.cpp:268
+#, c-format
+msgid "Open %1"
+msgstr "Apri %1"
+
+#: entrywidgetexternal.cpp:238 entrywidgetexternal.cpp:242 settings.cpp:641
+msgid "DOI"
+msgstr "DOI"
+
+#: entrywidgetexternal.cpp:239
+msgid "Digital Object Identifier"
+msgstr "Digital Object Identifier"
+
+#: entrywidgetexternal.cpp:253
+msgid "Open DOI"
+msgstr "Apri DOI"
+
+#: entrywidgetexternal.cpp:256 entrywidgetexternal.cpp:258
+#: entrywidgetexternal.cpp:268 settings.cpp:661
+msgid "Local File"
+msgstr "File Locale"
+
+#: entrywidgetexternal.cpp:274
+msgid "&Browse..."
+msgstr "&Sfoglia..."
+
+#: entrywidgetexternal.cpp:275
+msgid "Browse for a local file"
+msgstr "Cerca file locale"
+
+#: entrywidgetexternal.cpp:282
+msgid "Select base directory"
+msgstr "Seleziona cartella base"
+
+#: entrywidgetexternal.cpp:283
+msgid "Current directory"
+msgstr "Cartella corrente"
+
+#: entrywidgetkeyword.cpp:56
+msgid "Global"
+msgstr "Globale"
+
+#: entrywidgetkeyword.cpp:61
+msgid "In this file only"
+msgstr "Solo in questo file"
+
+#: entrywidgetkeyword.cpp:168
+msgid ""
+"The keyword '%1' does already exist in the list of keywords.\n"
+"The old name has been restored."
+msgstr ""
+"La parola chiave'%1' esiste già nella lista delle parole chiave.\n"
+"Il nome precedente è stato ripristinato."
+
+#: entrywidgetkeyword.cpp:168
+msgid "Renaming keyword failed"
+msgstr "Impossibile rinominare parola chiave"
+
+#: entrywidgetkeyword.cpp:193
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewKeyword%1"
+msgstr "NuovaParolaChiave%1"
+
+#: entrywidgetkeyword.cpp:230
+msgid "Keyword"
+msgstr "Parola Chiave"
+
+#: entrywidgetkeyword.cpp:231
+msgid "Origin"
+msgstr "Origine"
+
+#: entrywidgetkeyword.cpp:238 settingskeyword.cpp:166
+msgid ""
+"_: keyword\n"
+"New"
+msgstr "Nuovo"
+
+#: entrywidgetkeyword.cpp:241
+msgid "Add a new keyword to the list"
+msgstr "Aggiungi una nuova parola chiave alla lista"
+
+#: entrywidgetkeyword.cpp:245 settingskeyword.cpp:169
+msgid ""
+"_: keyword\n"
+"Edit"
+msgstr "Modifica"
+
+#: entrywidgetkeyword.cpp:247
+msgid "Edit the selected keyword"
+msgstr "Modifica la parola chiave selezionata"
+
+#: entrywidgetkeyword.cpp:252
+msgid ""
+"_: keyword\n"
+"Toggle &global"
+msgstr "Abilita &globale"
+
+#: entrywidgetkeyword.cpp:254
+msgid "Add or remove the selected keyword to or from the global list"
+msgstr ""
+"Aggioungi o togli la parola chiave selezionata dalla lista delle globali"
+
+#: entrywidgetkeyword.cpp:259
+msgid ""
+"There is no need to delete keywords. Simply uncheck unwanted keywords and "
+"make them non-global.\n"
+"Global keywords can also be edited in the settings dialog."
+msgstr ""
+"Non è necessario rimuovere le parole chiave. Semplicemente deselezionare "
+"quelle non desiderate e renderle non globali.\n"
+"Le parole chiave globali possono anche essere modificate nel pannello delle "
+"impostazioni.."
+
+#: entrywidgetmisc.cpp:135 entrywidgetmisc.cpp:137 mergeelements.cpp:581
+#: settings.cpp:683 settingsuserdefinedinput.cpp:172
+msgid "Type"
+msgstr "Tipo"
+
+#: entrywidgetmisc.cpp:142 entrywidgetmisc.cpp:144 entrywidgetother.cpp:153
+#: mergeelements.cpp:72 settings.cpp:657
+msgid "Key"
+msgstr "Chiave"
+
+#: entrywidgetmisc.cpp:149 entrywidgetmisc.cpp:151 settings.cpp:667
+msgid "Note"
+msgstr "Nota"
+
+#: entrywidgetmisc.cpp:156 entrywidgetmisc.cpp:158 settings.cpp:631
+msgid "Annote"
+msgstr "Annotazione"
+
+#: entrywidgetmisc.cpp:163 entrywidgetmisc.cpp:165 settings.cpp:627
+msgid "Abstract"
+msgstr "Riassunto"
+
+#: entrywidgetother.cpp:131
+msgid "Name of the user-defined field"
+msgstr "Nome del campo definito dall'utente"
+
+#: entrywidgetother.cpp:132
+msgid ""
+"The name of the user-defined field. Should only contain letters and numbers."
+msgstr ""
+"Il nome del campo definito dall'utente. Dovrebbe contenere solo lettere e "
+"numeri."
+
+#: entrywidgetother.cpp:133
+msgid "&Name:"
+msgstr "&Nome:"
+
+#: entrywidgetother.cpp:137 entrywidgetother.cpp:201
+msgid "&Add"
+msgstr "&Aggiungi"
+
+#: entrywidgetother.cpp:141 entrywidgetother.cpp:154 mergeelements.cpp:72
+msgid "Value"
+msgstr "Valore"
+
+#: entrywidgetother.cpp:143
+msgid "Content of the user-defined field"
+msgstr "Contenuto del campo definito dall'utente"
+
+#: entrywidgetother.cpp:144
+msgid "The content of the user-defined field. May contain any text."
+msgstr ""
+"Il contenuto del campo definito dall'utente. Può contenere qualunque testo."
+
+#: entrywidgetother.cpp:145
+msgid "&Content:"
+msgstr "&Contenuto:"
+
+#: entrywidgetother.cpp:159
+msgid "&List:"
+msgstr "&Lista:"
+
+#: entrywidgetother.cpp:168
+msgid "Op&en"
+msgstr "A&pri"
+
+#: entrywidgetpublication.cpp:308
+msgid "The fields 'Chapter' or 'Pages' are required, but both are missing"
+msgstr "I campi 'Capitolo' o 'Pagine sono obbligatori, ma mancano entrambi "
+
+#: entrywidgetpublication.cpp:325
+msgid "The field 'Journal' refers to a not existing entry"
+msgstr "Il campo 'Rivista' si riferisce ad un elemento inesistente"
+
+#: entrywidgetpublication.cpp:392
+#, c-format
+msgid "http://en.wikipedia.org/w/index.php?title=Special:Booksources&isbn=%1"
+msgstr "http://it.wikipedia.org/wiki/Wikipedia:Fonti_librarie"
+
+#: entrywidgetpublication.cpp:405 entrywidgetpublication.cpp:407
+#: settings.cpp:655
+msgid "Journal"
+msgstr "Rivista"
+
+#: entrywidgetpublication.cpp:412 entrywidgetpublication.cpp:414
+#: settings.cpp:687
+msgid "Volume"
+msgstr "Volume"
+
+#: entrywidgetpublication.cpp:419 entrywidgetpublication.cpp:421
+#: settings.cpp:669
+msgid "Number"
+msgstr "Numero"
+
+#: entrywidgetpublication.cpp:426 entrywidgetpublication.cpp:435
+#: settings.cpp:665
+msgid "Month"
+msgstr "Mese"
+
+#: entrywidgetpublication.cpp:440 entrywidgetpublication.cpp:442
+#: idsuggestionswidget.cpp:276 idsuggestionswidget.cpp:484 settings.cpp:689
+#: webquery.cpp:448
+msgid "Year"
+msgstr "Anno"
+
+#: entrywidgetpublication.cpp:447 entrywidgetpublication.cpp:449
+#: settings.cpp:673
+msgid "Pages"
+msgstr "Pagine"
+
+#: entrywidgetpublication.cpp:454 entrywidgetpublication.cpp:456
+#: settings.cpp:643
+msgid "Edition"
+msgstr "Edizione"
+
+#: entrywidgetpublication.cpp:461 entrywidgetpublication.cpp:463
+#: settings.cpp:637
+msgid "Chapter"
+msgstr "Capitolo"
+
+#: entrywidgetpublication.cpp:468 entrywidgetpublication.cpp:470
+msgid "Cross Reference"
+msgstr "Riferimento"
+
+#: entrywidgetpublication.cpp:476 entrywidgetpublication.cpp:478
+#: settings.cpp:671
+msgid "Organization"
+msgstr "Organizzazione"
+
+#: entrywidgetpublication.cpp:483 entrywidgetpublication.cpp:485
+#: settings.cpp:675
+msgid "Publisher"
+msgstr "Casa editrice"
+
+#: entrywidgetpublication.cpp:490 entrywidgetpublication.cpp:492
+#: settings.cpp:679
+msgid "School"
+msgstr "Scuola"
+
+#: entrywidgetpublication.cpp:497 entrywidgetpublication.cpp:499
+#: settings.cpp:649
+msgid "Institution"
+msgstr "Istituzione"
+
+#: entrywidgetpublication.cpp:504 entrywidgetpublication.cpp:506
+#: settings.cpp:663
+msgid "Location"
+msgstr "Ubicazione"
+
+#: entrywidgetpublication.cpp:511 entrywidgetpublication.cpp:513
+#: settings.cpp:629
+msgid "Address"
+msgstr "Indirizzo"
+
+#: entrywidgetpublication.cpp:518 entrywidgetpublication.cpp:527
+#: settings.cpp:651
+msgid "ISBN"
+msgstr "ISBN"
+
+#: entrywidgetpublication.cpp:525
+msgid "Lookup ISBN number in Wikipedia"
+msgstr "Ricerca numero ISBN in Wikipedia"
+
+#: entrywidgetpublication.cpp:533 entrywidgetpublication.cpp:535
+#: settings.cpp:653
+msgid "ISSN"
+msgstr "ISSN"
+
+#: entrywidgetpublication.cpp:540 entrywidgetpublication.cpp:542
+#: settings.cpp:647
+msgid "How Published"
+msgstr "Pubblicato come"
+
+#: entrywidgettab.cpp:65
+msgid "The field '%1' is required, but missing"
+msgstr "Il campo '%1' è obbligatorio, ma è mancante"
+
+#: entrywidgettab.cpp:71
+msgid "Using cross referenced entry '%1' for field '%2'"
+msgstr "Utilizzo del riferimento '%1' per il campo '%2'"
+
+#: entrywidgettab.cpp:79
+msgid "The field '%1' contains string keys with invalid characters"
+msgstr "Il campo '%1' contiene stringa chiave con caratteri non validi"
+
+#: entrywidgettab.cpp:87
+msgid "The field '%1' contains some unknown error"
+msgstr "Il campo '%1' contiene alcuni errori sconosciuti"
+
+#: entrywidgettitle.cpp:122 entrywidgettitle.cpp:124 settings.cpp:635
+msgid "Book Title"
+msgstr "Titolo del libro"
+
+#: entrywidgettitle.cpp:128 entrywidgettitle.cpp:130 settings.cpp:677
+msgid "Series"
+msgstr "Serie"
+
+#: entrywidgetuserdefined.cpp:137
+msgid "Please use the settings dialog to add user-defined fields here."
+msgstr ""
+"Utilizzare il pannello delle impostazioni per aggiungere campi definiti "
+"dall'utente."
+
+#: fieldlineedit.cpp:91 fieldlineedit.cpp:92 fieldlineedit.cpp:96
+#: fieldlineedit.cpp:97 fieldlistview.cpp:100 fieldlistview.cpp:101
+msgid "BibTeX field '%1'"
+msgstr "Campo BibTeX '%1'"
+
+#: fieldlineedit.cpp:228
+msgid "Set '%1' to be a string key"
+msgstr "Imposta '%1' come stringa chiave"
+
+#: fieldlineedit.cpp:240
+msgid "Edit '%1' as a concatenated value"
+msgstr "Modifica '%1' come un valore concatenato"
+
+#: fieldlineedit.cpp:325 fieldlineedit.cpp:328
+msgid "Concatenated value"
+msgstr "Valore concatenato"
+
+#: fieldlistview.cpp:321
+msgid "Add new '%1' item (Ctrl+A)"
+msgstr "Aggiungi nuovo '%1' elemento (Ctrl+A)"
+
+#: fieldlistview.cpp:327
+msgid "Edit current '%1' item (F2)"
+msgstr "Modifica l'elemento '%1' corrente (F2)"
+
+#: fieldlistview.cpp:333
+msgid "Delete current '%1' item (Del)"
+msgstr "Elimina l'elemento '%1' corrente (Del)"
+
+#: fieldlistview.cpp:335 idsuggestionswidget.cpp:59 valuewidget.cpp:242
+msgid "Up"
+msgstr "Su"
+
+#: fieldlistview.cpp:339
+msgid "Move current '%1' item up (Ctrl+Up)"
+msgstr "Muovi verso l'alto l'elemento corrente '%1' (Ctrl+Su)"
+
+#: fieldlistview.cpp:341 idsuggestionswidget.cpp:60 valuewidget.cpp:247
+msgid "Down"
+msgstr "Giù"
+
+#: fieldlistview.cpp:345
+msgid "Move current '%1' item down (Ctrl+Down)"
+msgstr "Muovi in basso l'elemento corrente '%1' (Ctrl+Giù)"
+
+#: fieldlistview.cpp:347
+msgid "Complex..."
+msgstr "Complesso..."
+
+#: fieldlistview.cpp:351
+msgid "Edit current '%1' item as a concatenated string (Ctrl+Alt+C)"
+msgstr ""
+"Modifica l'elemento corrente '%1' come una stringa concatenata (Ctrl+Alt+C)"
+
+#: fieldlistview.cpp:353
+msgid "... and others (et al.)"
+msgstr "... ed altri (et al.)"
+
+#: findduplicates.cpp:58
+msgid "Searching for duplicates..."
+msgstr "Ricerca duplicati..."
+
+#: idsuggestions.cpp:330 idsuggestionswidget.cpp:128
+msgid "First author only"
+msgstr "Solo il primo autore"
+
+#: idsuggestions.cpp:331 idsuggestionswidget.cpp:129
+msgid "All but first author"
+msgstr "Tutti gli autori tranne il primo"
+
+#: idsuggestions.cpp:332 idsuggestionswidget.cpp:127
+msgid "All authors"
+msgstr "Tutti gli autori"
+
+#: idsuggestions.cpp:335
+#, c-format
+msgid ""
+"_n: , but only first letter of each last name\n"
+", but only first %n letters of each last name"
+msgstr ""
+", ma solo la prima lettera di ogni cognome\n"
+", ma solo le %n iniziali di ogni cognome"
+
+#: idsuggestions.cpp:336 idsuggestions.cpp:348
+msgid ", in upper case"
+msgstr ", in lettere maiuscole"
+
+#: idsuggestions.cpp:337 idsuggestions.cpp:349
+msgid ", in lower case"
+msgstr ", in lettere minuscole"
+
+#: idsuggestions.cpp:338 idsuggestions.cpp:350
+msgid ", with '%1' in between"
+msgstr ", con '%1' in mezzo"
+
+#: idsuggestions.cpp:340
+msgid "Year (2 digits)"
+msgstr "Anno (2 cifre)"
+
+#: idsuggestions.cpp:341
+msgid "Year (4 digits)"
+msgstr "Anno (4 cifre)"
+
+#: idsuggestions.cpp:347
+#, c-format
+msgid ""
+"_n: , but only first letter of each word\n"
+", but only first %n letters of each word"
+msgstr ""
+", ma solo la prima lettera di ogni parola\n"
+", ma solo le %n iniziali di ogni parola"
+
+#: idsuggestions.cpp:351
+msgid ", small words removed"
+msgstr ", articoli/preposizioni rimossi"
+
+#: idsuggestions.cpp:353
+msgid "Text: '%1'"
+msgstr "Testo: '%1'"
+
+#: idsuggestionswidget.cpp:140 idsuggestionswidget.cpp:221
+msgid "Casing:"
+msgstr "Maiuscole/Minuscole:"
+
+#: idsuggestionswidget.cpp:145 idsuggestionswidget.cpp:226
+msgid "No change"
+msgstr "Nessun cambiamento"
+
+#: idsuggestionswidget.cpp:146 idsuggestionswidget.cpp:227
+msgid "Lower case"
+msgstr "Minuscole"
+
+#: idsuggestionswidget.cpp:147 idsuggestionswidget.cpp:228
+msgid "Upper case"
+msgstr "Maiuscole"
+
+#: idsuggestionswidget.cpp:156 idsuggestionswidget.cpp:237
+msgid "Only first letters:"
+msgstr "Solo le iniziali:"
+
+#: idsuggestionswidget.cpp:163 idsuggestionswidget.cpp:165
+msgid "Complete name"
+msgstr "Nome completo"
+
+#: idsuggestionswidget.cpp:168
+msgid "Text between authors:"
+msgstr "Testo tra gli autori:"
+
+#: idsuggestionswidget.cpp:214
+msgid "Remove small words"
+msgstr "Rimuovere articoli/preposizioni"
+
+#: idsuggestionswidget.cpp:244 idsuggestionswidget.cpp:246
+msgid "Complete title"
+msgstr "Titolo completo"
+
+#: idsuggestionswidget.cpp:249
+msgid "Text between words:"
+msgstr "Testo tra le parole:"
+
+#: idsuggestionswidget.cpp:289
+msgid "Year:"
+msgstr "Anno:"
+
+#: idsuggestionswidget.cpp:294
+msgid "2 digits"
+msgstr "2 cifre"
+
+#: idsuggestionswidget.cpp:295
+msgid "4 digits"
+msgstr "4 cifre"
+
+#: idsuggestionswidget.cpp:311 idsuggestionswidget.cpp:486 valuewidget.cpp:211
+msgid "Text"
+msgstr "Testo"
+
+#: idsuggestionswidget.cpp:324
+msgid "Text in between:"
+msgstr "Testo compreso:"
+
+#: idsuggestionswidget.cpp:388
+msgid "Edit Id Suggestions"
+msgstr "Modifica i suggerimenti per l'Id"
+
+#: idsuggestionswidget.cpp:563
+msgid "<qt>Example:<br/><b>%1</b></qt>"
+msgstr "<qt>Esempio:<br/><b>%1</b></qt>"
+
+#: kbibtex_part.cpp:158
+msgid ""
+"The document '%1' has been modified.\n"
+"Do you want to save your changes or discard them?"
+msgstr ""
+"Il documento '%1' è stato modificato.\n"
+"Vuoi salvare le modifiche o ignorarle?"
+
+#: kbibtex_part.cpp:160
+msgid "Close Document"
+msgstr "Chiudi Documento"
+
+#: kbibtex_part.cpp:251 kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "BibTeX (*.bib)"
+msgstr "BibTeX (*.bib)"
+
+#: kbibtex_part.cpp:251 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "Reference Manager (*.ris)"
+msgstr "Reference Manager (*.ris)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)"
+msgstr "EndNote (formato Refer) (*.ref *.refer *.rfr *.txt)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "ISI Web of Knowledge (*.isi *.cgi)"
+msgstr "ISI Web of Knowledge (*.isi *.cgi)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273
+msgid "DocBook 5 or MODS (*.xml)"
+msgstr "DocBook 5 o MODS (*.xml)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273
+msgid "DocBook 5 (*.xml)"
+msgstr "DocBook 5 (*.xml)"
+
+#: kbibtex_part.cpp:256 kbibtex_part.cpp:279
+msgid ""
+"A file named '%1' already exists. Are you sure you want to overwrite it?"
+msgstr ""
+"Un file chiamato '%1' esiste già. Sei sicuro di volerlo sovrascrivere?"
+
+#: kbibtex_part.cpp:256 kbibtex_part.cpp:279
+msgid "Overwrite"
+msgstr "Sovrascrivi"
+
+#: kbibtex_part.cpp:273
+msgid "Portable Document File (*.pdf)"
+msgstr "Portable Document File (*.pdf)"
+
+#: kbibtex_part.cpp:273
+msgid "PostScript (*.ps)"
+msgstr "PostScript (*.ps)"
+
+#: kbibtex_part.cpp:273
+msgid "Hypertext Markup Langage (*.html)"
+msgstr "Hypertext Markup Langage (*.html)"
+
+#: kbibtex_part.cpp:273
+msgid "Rich Text Format (*.rtf)"
+msgstr "Rich Text Format (*.rtf)"
+
+#: kbibtex_part.cpp:333
+msgid "Exporting"
+msgstr "Esportazione"
+
+#: kbibtex_part.cpp:344
+msgid "File could not be exported in '%1'."
+msgstr "Non è stato possibile esportare il file in '%1'."
+
+#: kbibtex_part.cpp:344
+msgid ""
+"\n"
+"\n"
+"See the following error log for details."
+msgstr ""
+"\n"
+"\n"
+"Per dettagli consultare il seguente log degli errori."
+
+#: kbibtex_part.cpp:344 kbibtex_part.cpp:347
+msgid "Exporting failed"
+msgstr "Esportazione fallita"
+
+#: kbibtex_part.cpp:347
+msgid "File could not be exported to '%1'."
+msgstr "Non è stato possibile esportare il file in '%1'."
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "Supported Bibliographies"
+msgstr "Bibligrafie supportate"
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "MODS or EndNote XML (*.xml)"
+msgstr "MODS o EndNote XML (*.xml)"
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "All files (*.*)"
+msgstr "Tutti i campi (*.*)"
+
+#: kbibtex_part.cpp:383 kbibtexshell.cpp:332
+msgid ""
+"The given file could not be read, check if it exists or if it is readable "
+"for the current user."
+msgstr ""
+"Non è stato possibile leggere il file dato, controllare che esista e sia "
+"leggibile per l'utente corrente."
+
+#: kbibtex_part.cpp:398
+msgid "The given file could not be merged."
+msgstr "Il file letto non può essere unito."
+
+#: kbibtex_part.cpp:427
+msgid "Save the current file"
+msgstr "Savare il file corrente"
+
+#: kbibtex_part.cpp:428
+msgid "Save the current file under a new filename"
+msgstr "Salvare il file corrente con un nuovo nome"
+
+#: kbibtex_part.cpp:430
+msgid "Statistics..."
+msgstr "Statistiche..."
+
+#: kbibtex_part.cpp:431
+msgid "Find Duplicates..."
+msgstr "Trova duplicati..."
+
+#: kbibtex_part.cpp:432
+msgid "Export..."
+msgstr "Esporta..."
+
+#: kbibtex_part.cpp:433
+msgid "Export to a different file format"
+msgstr "Esporta verso un formato di file differente"
+
+#: kbibtex_part.cpp:434
+msgid "Merge..."
+msgstr "Unisci..."
+
+#: kbibtex_part.cpp:435
+msgid "Merge BibTeX entries from another file"
+msgstr "Unisci voci BibTeX provenienti da un altro file"
+
+#: kbibtex_part.cpp:438
+msgid "Cut the selected BibTeX elements to the clipboard"
+msgstr "Tagliare l'elemento BibTeX selezionato nella clipboard"
+
+#: kbibtex_part.cpp:441
+msgid "Copy the selected BibTeX elements to the clipboard"
+msgstr "Copiare l'elemento BibTeX selezionato nella clipboard"
+
+#: kbibtex_part.cpp:445
+msgid "Copy &Reference"
+msgstr "Copiare il &riferimento"
+
+#: kbibtex_part.cpp:446
+msgid "Copy a reference of the selected BibTeX elements to the clipboard"
+msgstr ""
+"Copiare il riferimento dell'elemento BibTeX selezionato nella clipboard"
+
+#: kbibtex_part.cpp:449
+msgid "Paste BibTeX elements from the clipboard"
+msgstr "Incolla gli elementi BibTeX dalla clipboard"
+
+#: kbibtex_part.cpp:451
+msgid "Select all BibTeX elements"
+msgstr "Seleziona tutte le voci BibTeX"
+
+#: kbibtex_part.cpp:452
+msgid "Send Reference to &LyX"
+msgstr "Invia il riferimento a &LyX"
+
+#: kbibtex_part.cpp:453
+msgid "Send a reference of the selected BibTeX elements to LyX"
+msgstr "Invia il riferimento dell'elemento BibTeX selezionato a LyX"
+
+#: kbibtex_part.cpp:456
+msgid "Find text"
+msgstr "Trova Testo"
+
+#: kbibtex_part.cpp:458
+msgid "Find next occurrence"
+msgstr "Trova occorrenza successiva"
+
+#: kbibtex_part.cpp:462
+msgid "Search Online Databases"
+msgstr "Cerca nei database online"
+
+#: kbibtex_part.cpp:463
+msgid "Search online databases to import bibliography data"
+msgstr "Cerca nei database online per importare dati bibliografici"
+
+#: kbibtex_part.cpp:465
+msgid "Search Document Online"
+msgstr "Cerca il documento Online"
+
+#: kbibtex_part.cpp:466
+msgid "Search websites for the selected BibTeX element"
+msgstr "Cerca nei siti web l'elemento BibTeX selezionato"
+
+#: kbibtex_part.cpp:470
+msgid "&Show Columns"
+msgstr "Mo&stra Colonne"
+
+#: kbibtex_part.cpp:471
+msgid "Select columns to show in the main list"
+msgstr "Scegli le colonne da mostrare nella modalità principale"
+
+#: kbibtex_part.cpp:472
+msgid "View Document"
+msgstr "Mostra Documento"
+
+#: kbibtex_part.cpp:473
+msgid "View the documents associated with this BibTeX entry"
+msgstr "Mostra i documenti associati a questa voce BibTeX"
+
+#: kbibtex_part.cpp:475
+#, fuzzy
+msgid "View Primary Document"
+msgstr "Mostra Documento"
+
+#: kbibtex_part.cpp:477
+#, fuzzy
+msgid "View Primary Online Reference"
+msgstr "Cerca il documento Online"
+
+#: kbibtex_part.cpp:479
+msgid "Assign Keywords"
+msgstr "Assegnare parole chiave"
+
+#: kbibtex_part.cpp:480
+msgid "Assign keywords to this entry"
+msgstr "Assegnare parole chiave a questo elemento"
+
+#: kbibtex_part.cpp:483
+msgid "Set entry ids as specified in the id suggestion settings"
+msgstr ""
+
+#: kbibtex_part.cpp:487
+msgid "Configure KBibTeX"
+msgstr "Configurare BibTeX"
+
+#: kbibtex_part.cpp:488
+msgid "Configure Source View..."
+msgstr "Configurare la modalità sorgente..."
+
+#: kbibtex_part.cpp:489
+msgid "Configure the Source Editor"
+msgstr "Configurare l'editor del sorgente"
+
+#: kbibtex_part.cpp:491 settings.cpp:700
+msgid "Article"
+msgstr "Article"
+
+#: kbibtex_part.cpp:491
+msgid "Add an article to the BibTeX file"
+msgstr "Aggiungi un articolo al file BibTeX"
+
+#: kbibtex_part.cpp:492 settings.cpp:702
+msgid "Book"
+msgstr "Book"
+
+#: kbibtex_part.cpp:492
+msgid "Add a book to the BibTeX file"
+msgstr "Aggiungi un libro al file BibTeX"
+
+#: kbibtex_part.cpp:493 settings.cpp:704
+msgid "Booklet"
+msgstr "Booklet"
+
+#: kbibtex_part.cpp:493
+msgid "Add a booklet to the BibTeX file"
+msgstr "Aggiungi un opuscolo al file BibTeX"
+
+#: kbibtex_part.cpp:494
+msgid "Electronic (IEEE)"
+msgstr "Elettronica (IEEE)"
+
+#: kbibtex_part.cpp:494
+msgid "Add an electronic reference (IEEE) to the BibTeX file"
+msgstr "Aggiungi un riferimento elettronico (IEEE) al file BibTeX"
+
+#: kbibtex_part.cpp:495 settings.cpp:710
+msgid "InBook"
+msgstr "InBook"
+
+#: kbibtex_part.cpp:495
+msgid "Add a part of a book to the BibTeX file"
+msgstr "Aggiungi una parte di un libro al file BibTeX"
+
+#: kbibtex_part.cpp:496 settings.cpp:712
+msgid "InCollection"
+msgstr "InCollection"
+
+#: kbibtex_part.cpp:496
+msgid "Add a publication which is part of some collection to the BibTeX file"
+msgstr ""
+"Aggiungi una pubblicazione che è parte di una collezione al file BibTeX"
+
+#: kbibtex_part.cpp:497 settings.cpp:714
+msgid "InProceedings"
+msgstr "InProceedings"
+
+#: kbibtex_part.cpp:497
+msgid "Add a publication which is part of some proceedings to the BibTeX file"
+msgstr ""
+"Aggiungi una pubblicazione che è parte di un proceeding al file BibTeX"
+
+#: kbibtex_part.cpp:498 settings.cpp:716
+msgid "Manual"
+msgstr "Manuale"
+
+#: kbibtex_part.cpp:498
+msgid "Add a manual to the BibTeX file"
+msgstr "Aggiungi un manuale al file BibTeX"
+
+#: kbibtex_part.cpp:499 settings.cpp:718
+msgid "MastersThesis"
+msgstr "MastersThesis"
+
+#: kbibtex_part.cpp:499
+msgid "Add a master or diploma thesis to the BibTeX file"
+msgstr "Aggiungi una tesi di laurea o laurea magistrale al file BibTeX"
+
+#: kbibtex_part.cpp:500
+msgid "Add a not specified document or reference to the BibTeX file"
+msgstr "Aggiungi un documento o riferimento non specificato al file BibTeX"
+
+#: kbibtex_part.cpp:501 settings.cpp:722
+msgid "PhDThesis"
+msgstr "PhDThesis"
+
+#: kbibtex_part.cpp:501
+msgid "Add a PhD thesis to the BibTeX file"
+msgstr "Aggiungi una tesi di dottorato al file BibTeX"
+
+#: kbibtex_part.cpp:502 settings.cpp:724
+msgid "Proceedings"
+msgstr "Proceedings"
+
+#: kbibtex_part.cpp:502
+msgid "Add some proceedings to the BibTeX file"
+msgstr "Aggiungi dei proceedings al file BibTeX"
+
+#: kbibtex_part.cpp:503 settings.cpp:726
+msgid "TechReport"
+msgstr "TechReport"
+
+#: kbibtex_part.cpp:503
+msgid "Add a technical report to the BibTeX file"
+msgstr "Aggiungi un report tecnico al file BibTeX"
+
+#: kbibtex_part.cpp:504 settings.cpp:728
+msgid "Unpublished"
+msgstr "Unpublished"
+
+#: kbibtex_part.cpp:504
+msgid "Add an unpublished document to the BibTeX file"
+msgstr "Aggiungi un documento non pubblicato al file BibTeX"
+
+#: kbibtex_part.cpp:505
+msgid "Add a preamble to the BibTeX file"
+msgstr "Aggiungi un preambolo al file BibTeX"
+
+#: kbibtex_part.cpp:506
+msgid "Add a comment to the BibTeX file"
+msgstr "Aggiungi un commento al file BibTeX"
+
+#: kbibtex_part.cpp:507
+msgid "Add a macro to the BibTeX file"
+msgstr "Aggiungi una macro al file BibTeX"
+
+#: kbibtex_part.cpp:510
+msgid "Edit the selected BibTeX element"
+msgstr "Modifica gli elementi BibTeX selezionati"
+
+#: kbibtex_part.cpp:513
+msgid "Delete the selected BibTeX elements"
+msgstr "Cancella gli elementi BibTeX selezionati"
+
+#: kbibtex_part.cpp:516
+msgid "Show &Comments"
+msgstr "Mostra &Commenti"
+
+#: kbibtex_part.cpp:517
+msgid "Show the comments of a BibTeX document"
+msgstr "Mostra commenti di un file BibTeX"
+
+#: kbibtex_part.cpp:518
+msgid "Show &Macros"
+msgstr "Mostra &Macro"
+
+#: kbibtex_part.cpp:519
+msgid "Show the macros of a BibTeX document"
+msgstr "Mostra macro di un documento BibTeX"
+
+#: kbibtex_part.cpp:521
+msgid "Accept input from other programs"
+msgstr "Accetta input da altri programmi"
+
+#: kbibtex_part.cpp:537 rc.cpp:9 rc.cpp:18 rc.cpp:21 rc.cpp:39 rc.cpp:48
+#: rc.cpp:51
+msgid "&New"
+msgstr "&Nuovo"
+
+#: kbibtex_part.cpp:538
+msgid "Add a new element to this BibTeX document"
+msgstr "Aggiungi un nuovo elemento a questo documento BibTeX"
+
+#: kbibtex_part.cpp:622
+msgid ""
+"Some other KBibTeX instance is using the pipe.\n"
+"If this assumption is wrong, please delete '%1'."
+msgstr ""
+"Un'altra istanza di BibTeX sta usando questa pipe.\n"
+"Se questo non è vero, si prega di cancellare '%1'."
+
+#: kbibtex_part.cpp:622
+msgid "Pipe already in use"
+msgstr "Pipe già in uso"
+
+#: kbibtex_part.cpp:651
+msgid "Could not create pipe at '%1'."
+msgstr "Impossibile creare la pipe in '%1'."
+
+#: kbibtex_part.cpp:651
+msgid "Error creating pipe"
+msgstr "Errore nella creazione della pipe"
+
+#: kbibtex_part.cpp:695
+msgid ""
+"The KBibTeX part has problems to initialize itself. Only limited "
+"functionality will be available."
+msgstr ""
+"KbibTeX part ha dei problemi nell'inizializzazione.Saranno disponibili solo "
+"funzionalità limitate."
+
+#: kbibtex_part.cpp:695
+msgid "KBibTeX Part"
+msgstr "KBibTeX Part"
+
+#: kbibtex_part.cpp:742
+msgid "KBibTeXPart"
+msgstr "KBibTeXPart"
+
+#: kbibtexshell.cpp:76
+msgid "Could not find our part!"
+msgstr "Could not find our part!"
+
+#: kbibtexshell.cpp:145
+msgid ""
+"Click to open a file\n"
+"Click and hold to open a recent file"
+msgstr ""
+"Cliccare per aprire un file.\n"
+"Tenere premuto per aprire un file recente"
+
+#: kbibtexshell.cpp:182
+msgid "Create a new window for a new BibTeX file"
+msgstr "Crea una nuova finestra per un nuovo file BibTeX"
+
+#: kbibtexshell.cpp:184
+msgid "Open an existing BibTeX file"
+msgstr "Apre un file BibTeX esistente"
+
+#: kbibtexshell.cpp:187
+msgid ""
+"This lists files which you have opened recently, and allows you to easily "
+"open them again."
+msgstr ""
+"Questa lista contiene l'elenco dei file aperti di recente,consente di "
+"riaprirli semplicemente."
+
+#: kbibtexshell.cpp:191
+msgid "Close this KBibTeX window"
+msgstr "Chiude questa finestra KBibTeX"
+
+#: kbibtexshell.cpp:196
+msgid "Show or hide the window's status bar"
+msgstr "Mostra o Nasconde la barra di stato della finestra"
+
+#: kbibtexshell.cpp:198
+msgid "Configure key bindings for KBibTeX"
+msgstr "Configura scorciatoie di tastiera per KBibTeX"
+
+#: kbibtexshell.cpp:199
+msgid "Configure the tool bar for KBibTeX"
+msgstr "Configura la barra degli strumenti per KBibTeX"
+
+#: kbibtexshell.cpp:350 main.cpp:95
+msgid "Could not open file '%1'."
+msgstr "Impossibile aprire il file '%1'."
+
+#: macrowidget.cpp:39
+msgid "Edit BibTeX Macro"
+msgstr "Modificare la Macro BibTeX"
+
+#: macrowidget.cpp:84
+msgid "Macro &id:"
+msgstr "&Id Macro:"
+
+#: macrowidget.cpp:91
+msgid "Macro &value:"
+msgstr "&Valore Macro:"
+
+#: main.cpp:40
+msgid "A BibTeX editor for KDE"
+msgstr "Un editor KBibTeX per KDE"
+
+#: main.cpp:46
+msgid "Document to open."
+msgstr "Documento da aprire."
+
+#: main.cpp:111
+msgid "KBibTeX"
+msgstr "KBibTeX"
+
+#: main.cpp:114
+msgid "NAME OF TRANSLATORS"
+msgstr "Marco Bertolini, Angelo Compagnucci"
+
+#: main.cpp:114
+msgid "EMAIL OF TRANSLATORS"
+msgstr "bertolini@tlc.unipr.it, angelo.compagnucci@gmail.com"
+
+#: mergeelements.cpp:112
+#, fuzzy
+msgid "Preamble text"
+msgstr "Preambolo"
+
+#: mergeelements.cpp:124
+msgid "Next"
+msgstr "Successivo"
+
+#: mergeelements.cpp:124
+msgid "Previous"
+msgstr "Precedente"
+
+#: mergeelements.cpp:143
+msgid ""
+"Select elements to merge. At least two elements must be checked to perform a "
+"merge operation. Checked entries will be replaced by the merged element, "
+"unchecked elements will be kept."
+msgstr ""
+"Seelzionare gli elementi da unire. Almeno due elementi devono essere "
+"selezionati per effettuare l'operazione di unione. Gli elementi selezionati "
+"saranno sostituiti dall'elemento unito, gli elementi non selezionati saranno "
+"mantenuti"
+
+#: mergeelements.cpp:147
+msgid "Entry/Macro Id"
+msgstr "Id Elemento/Macro"
+
+#: mergeelements.cpp:159
+msgid ""
+"Choose from this list which alternatives you want to keep in the merged "
+"element."
+msgstr ""
+"Scegliere dalla lista quale alternativa si desidera mantenere nell'elemento "
+"unito"
+
+#: mergeelements.cpp:163
+msgid "Field/Key"
+msgstr "Campo/Chiave"
+
+#: mergeelements.cpp:492
+msgid "No duplicates found."
+msgstr "Nessun duplicato trovato"
+
+#: mergeelements.cpp:557
+msgid "Id"
+msgstr "Id"
+
+#: preamblewidget.cpp:33
+msgid "Edit BibTeX Preamble"
+msgstr "Modfificare il preambolo BibTeX"
+
+#: preamblewidget.cpp:76
+msgid "&Preamble:"
+msgstr "&Preambolo:"
+
+#: rc.cpp:6 rc.cpp:36
+msgid "E&lement"
+msgstr "E&lemento"
+
+#: rc.cpp:15 rc.cpp:27 rc.cpp:45 rc.cpp:57
+msgid "Se&ttings"
+msgstr "Impos&tazioni"
+
+#: searchbar.cpp:92
+msgid "Add a new BibTeX entry, comment or macro to this file"
+msgstr "Aggiungi una nuova voce BibTeX, commento o macro a questo file"
+
+#: searchbar.cpp:97
+msgid "Add a new BibTeX entry from an online database"
+msgstr "Aggiungi una nuova voce BibTeX da un database online"
+
+#: searchbar.cpp:105
+msgid "Erase current search pattern"
+msgstr "Cancellare il criterio di ricerca corrente"
+
+#: searchbar.cpp:108
+msgid "&Search:"
+msgstr "&Cerca:"
+
+#: searchbar.cpp:121
+msgid "Exact"
+msgstr "Esatto"
+
+#: searchbar.cpp:122
+msgid "Every word"
+msgstr "Ogni parola"
+
+#: searchbar.cpp:123
+msgid "Any word"
+msgstr "Almeno una parola"
+
+#: searchbar.cpp:126
+msgid "Restrict to:"
+msgstr "Restringi a:"
+
+#: searchbar.cpp:133
+msgid "All fields"
+msgstr "Tutti i campi"
+
+#: settings.cpp:57
+msgid "Could not determine filename for XSLT file"
+msgstr "Impossibile determinare il nome del file XSLT"
+
+#: settings.cpp:57
+msgid "Initialization failed"
+msgstr "Inizializzazione fallita"
+
+#: settings.cpp:639
+msgid "Crossref"
+msgstr "Riferimento"
+
+#: settings.cpp:691 settings.cpp:730
+msgid "Unknown"
+msgstr "Sconosciuto"
+
+#: settings.cpp:706
+msgid "Collection"
+msgstr "Collection"
+
+#: settings.cpp:708
+msgid "Electronic"
+msgstr "Electronic"
+
+#: settingsdlg.cpp:42
+msgid "&Editing"
+msgstr "Modificar&e"
+
+#: settingsdlg.cpp:48
+msgid "&File Open&&Save"
+msgstr "Apri e Salva file"
+
+#: settingsdlg.cpp:54
+msgid "&Search URLs"
+msgstr "&Cerca URL"
+
+#: settingsdlg.cpp:60
+msgid "Global &Keywords"
+msgstr "Parole &chiave globali"
+
+#: settingsdlg.cpp:66 settingsidsuggestions.cpp:337
+msgid "Id Suggestions"
+msgstr "Suggerimenti Id"
+
+#: settingsdlg.cpp:72
+msgid "User Defined Fields"
+msgstr "Campi definiti dall'utente"
+
+#: settingsdlg.cpp:79 webqueryz3950.cpp:188 webqueryz3950.cpp:193
+msgid "Z39.50"
+msgstr "Z39.50"
+
+#: settingsediting.cpp:56
+msgid "Path to add:"
+msgstr "Percorso da aggiungere:"
+
+#: settingsediting.cpp:63
+msgid "Select a path to add"
+msgstr "Scegliere percorso da aggiungere"
+
+#: settingsediting.cpp:67
+msgid "Add chosen path to list"
+msgstr "Aggiungere il percorso scelto alla lista"
+
+#: settingsediting.cpp:70
+msgid "List of paths:"
+msgstr "Lista dei percorsi:"
+
+#: settingsediting.cpp:73
+msgid "Path"
+msgstr "Percorso"
+
+#: settingsediting.cpp:82
+msgid "Remove selected path from list"
+msgstr "Rimuovi i percorsi selezionati dalla lista"
+
+#: settingsediting.cpp:99
+msgid "Edit Document Search Paths"
+msgstr "Modifica i percorsi di ricerca dei documenti"
+
+#: settingsediting.cpp:140
+msgid "Folder '%1' does not exist or is not readable."
+msgstr ""
+
+#: settingsediting.cpp:160
+msgid "Main List"
+msgstr "Lista principale"
+
+#: settingsediting.cpp:162
+msgid "&Sorting:"
+msgstr "&Ordinamento:"
+
+#: settingsediting.cpp:174
+msgid "So&rting order:"
+msgstr "C&riterio di ordinamento:"
+
+#: settingsediting.cpp:176
+msgid "Ascending"
+msgstr "Ascendente"
+
+#: settingsediting.cpp:177
+msgid "Descending"
+msgstr "Discendente"
+
+#: settingsediting.cpp:180
+msgid "&Double click action:"
+msgstr "Azione associata al &doppio click:"
+
+#: settingsediting.cpp:182
+msgid "Edit element"
+msgstr "Modifica Elemento"
+
+#: settingsediting.cpp:183
+msgid "Open document"
+msgstr "Apri documento"
+
+#: settingsediting.cpp:186
+msgid "On dragging with mouse:"
+msgstr "Trascinamento con il mouse:"
+
+#: settingsediting.cpp:188
+msgid "Copy reference (\\cite{...})"
+msgstr "Copia il riferimento (\\cite{...})"
+
+#: settingsediting.cpp:189
+msgid "Copy BibTeX text (@article{...})"
+msgstr "Copia il testo BibTeX (@article{...})"
+
+#: settingsediting.cpp:192
+msgid "Entry Editing"
+msgstr "Modifica elemento"
+
+#: settingsediting.cpp:196
+msgid "Search Bar"
+msgstr "Barra di ricerca"
+
+#: settingsediting.cpp:198
+msgid "Reset field filter when changing filter text"
+msgstr "Annula il filtro sul campo quando si modifica il testo del filtro"
+
+#: settingsediting.cpp:200
+msgid "Presentation"
+msgstr "Presentazione"
+
+#: settingsediting.cpp:202
+msgid "Use special &font"
+msgstr "Usa &font speciale"
+
+#: settingsediting.cpp:204
+msgid "Author and editor names:"
+msgstr "Nome dell'autore e del editore:"
+
+#: settingsediting.cpp:207
+msgid "John Doe"
+msgstr "Mario Rossi"
+
+#: settingsediting.cpp:208
+msgid "Doe, John"
+msgstr "Rossi, Mario"
+
+#: settingsediting.cpp:209
+msgid "Show names as 'John Doe' instead of 'Doe, John'"
+msgstr "Mostra nomi come 'Mario Rossi' invece di 'Rossi, Mario'"
+
+#: settingsediting.cpp:210
+msgid ""
+"Show names as 'John Doe' instead of 'Doe, John'.\n"
+"\n"
+"Takes only effect after the next start of KBibTeX."
+msgstr ""
+"Mostra nomi come 'Mario Rossi' invece di 'Rossi, Mario'.\n"
+"\n"
+"Questa modifica sarà effettiva solo dopo il prossimo riavvio di KBibTeX."
+
+#: settingsediting.cpp:212
+msgid "Document Search Paths"
+msgstr "Percorsi di ricerca dei documenti"
+
+#: settingsediting.cpp:214
+msgid "Edit Search Paths"
+msgstr "Modifica percorsi di ricerca"
+
+#: settingsediting.cpp:218
+msgid "Sensitivity:"
+msgstr ""
+
+#: settingsediting.cpp:221
+msgid "Low"
+msgstr ""
+
+#: settingsediting.cpp:228
+msgid "High"
+msgstr ""
+
+#: settingsfileio.cpp:53
+msgid "English|German|French|Spanish|Swedish"
+msgstr "Inglese|Tedesco|Francese|Spagnolo|Svedese"
+
+#: settingsfileio.cpp:58
+msgid ""
+"plain|achemso (American Chemical Society)|alpha|unsrt|abbrv|acm (Association "
+"of Computing Machinery)|apacite|apalike|authordate|ieeetr|natbib|siam"
+msgstr ""
+"plain|achemso (American Chemical Society)|alpha|unsrt|abbrv|acm (Association "
+"of Computing Machinery)|apacite|apalike|authordate|ieeetr|natbib|siam"
+
+#: settingsfileio.cpp:177
+msgid "XSLT Stylesheet"
+msgstr "Foglio di stile XSLT"
+
+#: settingsfileio.cpp:201
+msgid "No exporter available"
+msgstr "Nessun esportatore disponibile"
+
+#: settingsfileio.cpp:223
+msgid "Path to the jar files for bib2db5"
+msgstr "ercorso del file jar per bib2db5"
+
+#: settingsfileio.cpp:236
+msgid ""
+"To export DocBook5 bibliographies, the path to the jar file for bib2db5 has "
+"to be set first."
+msgstr ""
+"Per esportare bibliografie DocBook5, è necessario prima impostare il "
+"percorso del file jar per bib2db5"
+
+#: settingsfileio.cpp:236
+msgid "Invalid path for bib2db5"
+msgstr "Percorso invalido per bib2db5"
+
+#: settingsfileio.cpp:244
+msgid "BibTeX Import and Export"
+msgstr "Importa ed esporta BibTeX"
+
+#: settingsfileio.cpp:246
+msgid "&Encoding:"
+msgstr "&Codifica:"
+
+#: settingsfileio.cpp:249
+msgid "Text &delimiters:"
+msgstr "&Delimitatori di testo:"
+
+#: settingsfileio.cpp:252
+msgid "Keyword casing:"
+msgstr "Maiuscole nelle parole chiave:"
+
+#: settingsfileio.cpp:255
+msgid "Protect title's casing:"
+msgstr "Proteggere le maiuscole del titolo:"
+
+#: settingsfileio.cpp:256
+msgid "Put curly brackets around"
+msgstr "Inserire parentesi graffe attorno"
+
+#: settingsfileio.cpp:257
+msgid "Put curly brackets around title and other selected fields."
+msgstr ""
+"Inserire parentesi graffe attorno il titolo e gli altri campi selezionati."
+
+#: settingsfileio.cpp:258
+msgid ""
+"Put curly brackets around title and other selected fields to protect them "
+"from case changes in certain BibTeX styles."
+msgstr ""
+"Inserire parentesi graffe attorno il titolo e gli altri campi selezionati "
+"per proteggerli dalla rimozione delle maiuscole in acluni stili BibTeX."
+
+#: settingsfileio.cpp:260
+msgid "PDF, PostScript and Rich Text Format Export"
+msgstr "Esportare PDF, PostScript e Rich Text Format "
+
+#: settingsfileio.cpp:262
+msgid ""
+"Select the layout of the resulting PDF, PostScript or Rich Text Format "
+"document when exporting a BibTeX file."
+msgstr ""
+"Seleziona il layout del documento PDF, PostScript or Rich Text Format "
+"risultante quando si esporta un file BibTeX."
+
+#: settingsfileio.cpp:263
+msgid "&Language:"
+msgstr "&Lingua:"
+
+#: settingsfileio.cpp:266
+msgid "&Biblography style:"
+msgstr "Stile della &bibliografia:"
+
+#: settingsfileio.cpp:270
+msgid "PDF Export"
+msgstr "Esporta in PDF"
+
+#: settingsfileio.cpp:272
+msgid "Embed local files into PDF if possible"
+msgstr "Inserisci i file locali nel PDF se possibile"
+
+#: settingsfileio.cpp:273
+msgid ""
+"<qt>If checked, KBibTeX tries to embed all referenced files for the BibTeX "
+"entries into the exported PDF file.<br/>This requires that you have "
+"installed <tt>embedfile.sty</tt>.</qt>"
+msgstr ""
+"<qt>Se marcato, KBibTeX proverà ad inserire tutti i file referenziati per "
+"gli elementi BibTeX nel file PDF esportato.<br/>Ciò richiede che sia "
+"installato<tt>embedfile.sty</tt>.</qt>"
+
+#: settingsfileio.cpp:275
+msgid "XML Export"
+msgstr "Esporta in XML"
+
+#: settingsfileio.cpp:278
+msgid "Path to the jar files for bib2db5:"
+msgstr "Percorso dei file jar per bib2db5:"
+
+#: settingsfileio.cpp:293
+msgid "Export Systems"
+msgstr "Sistemi di esportazione"
+
+#: settingsfileio.cpp:295
+msgid "HTML:"
+msgstr "HTML:"
+
+#: settingsfileio.cpp:299
+msgid "BibUtils"
+msgstr "BibUtils"
+
+#: settingsfileio.cpp:301
+msgid "Always use BibUtils"
+msgstr "Usa sempre BibUtils"
+
+#: settingsfileio.cpp:302
+msgid "If possible, use BibUtils to import and export alien bibliography."
+msgstr ""
+"Se possibile usa BibUtils per importare o esportare bibliografie aliene."
+
+#: settingsfileio.cpp:303
+msgid ""
+"If possible, use BibUtils to import and export alien bibliography such as "
+"RIS.\n"
+"If unchecked, prefer internal import and export library."
+msgstr ""
+"Se possibile usa BibUtils per importare o esportare bibliografie aliene come "
+"RIS.\n"
+"Se non marcata, preferire le librerie interne di importazione/esportazione."
+
+#: settingsfileio.cpp:307
+msgid "Backups"
+msgstr ""
+
+#: settingsfileio.cpp:309
+#, fuzzy
+msgid "Number of Backups:"
+msgstr "&Numero di risultati:"
+
+#: settingsidsuggestions.cpp:90
+#, c-format
+msgid ""
+"\n"
+"Example: %1"
+msgstr ""
+"\n"
+"Esempio: %1"
+
+#: settingsidsuggestions.cpp:345
+msgid ""
+"_: id suggestion\n"
+"New"
+msgstr "Nuovo"
+
+#: settingsidsuggestions.cpp:349
+msgid ""
+"_: id suggestion\n"
+"Edit"
+msgstr "Modifica"
+
+#: settingsidsuggestions.cpp:353
+msgid ""
+"_: id suggestion\n"
+"Delete"
+msgstr "Elimina"
+
+#: settingsidsuggestions.cpp:357
+msgid ""
+"_: id suggestion\n"
+"Up"
+msgstr "Su"
+
+#: settingsidsuggestions.cpp:361
+msgid ""
+"_: id suggestion\n"
+"Down"
+msgstr "Giù"
+
+#: settingsidsuggestions.cpp:365
+msgid "Toogle default"
+msgstr "Inverti predefinito"
+
+#: settingsidsuggestions.cpp:370
+msgid "Use default id suggestion when editing new entries"
+msgstr ""
+"Usa i suggerimenti per l'id predefiniti quando si modificano nuovi elementi"
+
+#: settingsidsuggestions.cpp:373
+#, fuzzy
+msgid "Small Words:"
+msgstr "Rimuovere articoli/preposizioni"
+
+#: settingsidsuggestions.cpp:386
+#, fuzzy
+msgid "Small Words"
+msgstr "Rimuovere articoli/preposizioni"
+
+#: settingskeyword.cpp:83
+msgid "New Keyword"
+msgstr "Nuova parola chiave"
+
+#: settingskeyword.cpp:131
+#, c-format
+msgid ""
+"_n: 1 keyword has been imported.\n"
+"%n keywords have been imported."
+msgstr ""
+"_n: 1 parola chiave è stata importata.\n"
+"%n parole chiave sono state importate."
+
+#: settingskeyword.cpp:131
+msgid "Keywords imported"
+msgstr "Parole chiave importate"
+
+#: settingskeyword.cpp:172
+msgid ""
+"_: keyword\n"
+"Delete"
+msgstr "Elimina"
+
+#: settingskeyword.cpp:176
+msgid ""
+"_: keyword\n"
+"Import"
+msgstr "Importare"
+
+#: settingssearchurl.cpp:108
+msgid ""
+"The list of URLs will be checked and known entries will be replaced by the "
+"program standards. Search entries you have defined by yourself will be kept "
+"most likely."
+msgstr ""
+"La lista degli URL verrà controllata e gli elementi noti saranno sostituiti "
+"da quelli standard del programma. Le voci di ricerca precedentemente "
+"definite sarannomantenute possibilmente simili."
+
+#: settingssearchurl.cpp:108
+msgid "Reset list of URLs"
+msgstr "Reset della lista degli URL"
+
+#: settingssearchurl.cpp:108 settingsz3950.cpp:297
+msgid "Reset"
+msgstr "Reset"
+
+#: settingssearchurl.cpp:133
+msgid "Description"
+msgstr "Descrizione"
+
+#: settingssearchurl.cpp:140
+msgid ""
+"_: search url\n"
+"New"
+msgstr "Nuovo"
+
+#: settingssearchurl.cpp:144
+msgid ""
+"_: search url\n"
+"Edit"
+msgstr "Modifica"
+
+#: settingssearchurl.cpp:148
+msgid ""
+"_: search url\n"
+"Delete"
+msgstr "Elimina"
+
+#: settingssearchurl.cpp:152
+msgid ""
+"_: search url\n"
+"Reset"
+msgstr "Reset"
+
+#: settingssearchurl.cpp:170
+msgid "New URL"
+msgstr "Nuovo URL"
+
+#: settingssearchurl.cpp:170
+msgid "Edit URL"
+msgstr "Modifica URL"
+
+#: settingssearchurl.cpp:173
+msgid "Description:"
+msgstr "Descrizione:"
+
+#: settingssearchurl.cpp:178
+msgid "URL:"
+msgstr "URL:"
+
+#: settingssearchurl.cpp:184
+msgid "Within the URL, '%1' will be replaced by the search term."
+msgstr "Nello URL, '%1'sarà sostituito dal termine di ricerca."
+
+#: settingssearchurl.cpp:185
+msgid "Include Author:"
+msgstr "Includi Autore:"
+
+#: settingsuserdefinedinput.cpp:62 settingsuserdefinedinput.cpp:74
+#: settingsuserdefinedinput.cpp:229 settingsuserdefinedinput.cpp:238
+#: settingsuserdefinedinput.cpp:251 settingsuserdefinedinput.cpp:257
+msgid "Single line"
+msgstr "Linea singola"
+
+#: settingsuserdefinedinput.cpp:74 settingsuserdefinedinput.cpp:230
+#: settingsuserdefinedinput.cpp:251 settingsuserdefinedinput.cpp:257
+msgid "Multiple lines"
+msgstr "Linee multiple"
+
+#: settingsuserdefinedinput.cpp:168
+msgid "Name"
+msgstr "Nome"
+
+#: settingsuserdefinedinput.cpp:170
+msgid "Label"
+msgstr "Etichetta"
+
+#: settingsuserdefinedinput.cpp:180
+msgid ""
+"_: user-defined input\n"
+"New"
+msgstr "Nuovo"
+
+#: settingsuserdefinedinput.cpp:183
+msgid ""
+"_: user-defined input\n"
+"Edit"
+msgstr "Modifica"
+
+#: settingsuserdefinedinput.cpp:186
+msgid ""
+"_: user-defined input\n"
+"Delete"
+msgstr "Cancella"
+
+#: settingsuserdefinedinput.cpp:189
+msgid ""
+"_: user-defined input\n"
+"Up"
+msgstr "Su"
+
+#: settingsuserdefinedinput.cpp:193
+msgid ""
+"_: user-defined input\n"
+"Down"
+msgstr "Giù"
+
+#: settingsuserdefinedinput.cpp:210
+msgid "New Field"
+msgstr "Nuovo campo"
+
+#: settingsuserdefinedinput.cpp:210
+msgid "Edit Field"
+msgstr "Modifica campo"
+
+#: settingsuserdefinedinput.cpp:213 settingsz3950.cpp:71
+msgid "Name:"
+msgstr "Nome:"
+
+#: settingsuserdefinedinput.cpp:218
+msgid "Label:"
+msgstr "Etichetta:"
+
+#: settingsuserdefinedinput.cpp:224
+msgid "Input Type:"
+msgstr "Tipo di input:"
+
+#: settingsz3950.cpp:77
+msgid "Database:"
+msgstr "Database:"
+
+#: settingsz3950.cpp:83
+msgid "Host:"
+msgstr "Host:"
+
+#: settingsz3950.cpp:89
+msgid "Port:"
+msgstr "Porta:"
+
+#: settingsz3950.cpp:98
+msgid "User:"
+msgstr "Utente:"
+
+#: settingsz3950.cpp:104
+msgid "Password:"
+msgstr "Password:"
+
+#: settingsz3950.cpp:110
+msgid "Syntax:"
+msgstr "Sintassi:"
+
+#: settingsz3950.cpp:122
+msgid "Locale:"
+msgstr "Locale:"
+
+#: settingsz3950.cpp:149
+msgid "Edit Z39.50 Server"
+msgstr "Modifica server Z39.50"
+
+#: settingsz3950.cpp:297
+msgid "All Z39.50 server configurations will be reset to defaults."
+msgstr ""
+"Tutte le configurazioni del server Z39.50 saranno reimpostate ai valori "
+"predefiniti"
+
+#: settingsz3950.cpp:297
+msgid "Reset to Default"
+msgstr "reimposta al valore predefinito"
+
+#: settingsz3950.cpp:324
+msgid ""
+"_: z3950 server\n"
+"Name"
+msgstr "Nome"
+
+#: settingsz3950.cpp:325
+msgid ""
+"_: z3950 server\n"
+"Database"
+msgstr "Database"
+
+#: settingsz3950.cpp:334
+msgid ""
+"_: z3950 server\n"
+"New"
+msgstr "Nuovo"
+
+#: settingsz3950.cpp:338
+msgid ""
+"_: z3950 server\n"
+"Edit"
+msgstr "Modifica"
+
+#: settingsz3950.cpp:342
+msgid ""
+"_: z3950 server\n"
+"Delete"
+msgstr "Elimina"
+
+#: settingsz3950.cpp:346
+msgid ""
+"_: z3950 server\n"
+"Up"
+msgstr "Su"
+
+#: settingsz3950.cpp:350
+msgid ""
+"_: z3950 server\n"
+"Down"
+msgstr "Giù"
+
+#: settingsz3950.cpp:355
+msgid ""
+"_: z3950 server\n"
+"Reset"
+msgstr "Resetta"
+
+#: sidebar.cpp:113
+msgid "Toggle between showing all fields or only important fields"
+msgstr "Mostra tutti i campi o solo quelli importanti"
+
+#: sidebar.cpp:117
+msgid "Filter this sidebar for a given field"
+msgstr "Filtra questa barra laterale per un campo selezionato"
+
+#: sidebar.cpp:124
+msgid ""
+"Toggle between selecting only one item or multiple items (AND-connected in "
+"search)"
+msgstr ""
+"Scegli se selzionare uno o più elementi (collegati da AND nella ricerca)"
+
+#: sidebar.cpp:127
+msgid "#"
+msgstr "#"
+
+#: sidebar.cpp:128
+msgid "Items"
+msgstr "Oggetti"
+
+#: sidebar.cpp:135
+msgid "Rename all occurrences"
+msgstr "Rinomina tutte le ricorrenze"
+
+#: valuewidget.cpp:39
+msgid "Edit field '%1'"
+msgstr "Modifica campo '%1'"
+
+#: valuewidget.cpp:137
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewValue%1"
+msgstr "NuovoValore%1"
+
+#: valuewidget.cpp:205
+msgid "Checked entries are string keys, unchecked entries are quoted text."
+msgstr ""
+"Gli elementi marcati sono stringhe chiave, quelli non marcati sono testo "
+"quotato."
+
+#: valuewidget.cpp:232
+msgid "Toggle"
+msgstr "Inverti"
+
+#: webquery.cpp:94 webquerycsb.cpp:83 webquerydblp.cpp:68
+#: webquerymathscinet.cpp:61 webqueryspireshep.cpp:99
+msgid "Search &term:"
+msgstr "Ricerca &termine:"
+
+#: webquery.cpp:105 webquerycsb.cpp:103 webquerydblp.cpp:79
+#: webquerysciencedirect.cpp:165 webqueryz3950.cpp:102
+msgid "&Number of results:"
+msgstr "&Numero di risultati:"
+
+#: webquery.cpp:153
+msgid "Searching"
+msgstr "Ricerca"
+
+#: webquery.cpp:153
+#, c-format
+msgid "Searching %1"
+msgstr "Ricerca di %1"
+
+#: webquery.cpp:315
+msgid "&Import"
+msgstr "&Importa"
+
+#: webquery.cpp:315
+msgid "Import selected items"
+msgstr "Importa elementi selezionati"
+
+#: webquery.cpp:363
+#, c-format
+msgid "Search %1"
+msgstr "Ricerca %1"
+
+#: webquery.cpp:402
+msgid ""
+"You do not have the necessary permissions to query data from this service."
+msgstr ""
+
+#: webquery.cpp:431
+msgid "&Engine:"
+msgstr "Motor&e:"
+
+#: webquery.cpp:442
+msgid "&Search"
+msgstr "&Ricerca"
+
+#: webquery.cpp:468
+msgid "Import all hits"
+msgstr "Importa tutti i risultati"
+
+#: webqueryamatex.cpp:55
+msgid "Amatex"
+msgstr "Amatex"
+
+#: webqueryamatex.cpp:60
+msgid "About Amatex"
+msgstr "Informazioni su Amatex"
+
+#: webqueryamatex.cpp:111 webquerybibsonomy.cpp:116 webquerycitebase.cpp:118
+#: webquerycsb.cpp:280 webquerydblp.cpp:204 webqueryieeexplore.cpp:156
+#: webquerymathscinet.cpp:176 webquerypubmed.cpp:159 webquerypubmed.cpp:171
+#: webqueryspireshep.cpp:206 webqueryzmath.cpp:113
+msgid "Querying database '%1' failed."
+msgstr "La ricerca sul database '%1' è fallita."
+
+#: webqueryarxiv.cpp:78
+msgid "arXiv"
+msgstr "arXiv"
+
+#: webqueryarxiv.cpp:83
+msgid "arXiv is an archive for preprints"
+msgstr "arXiv è un archivio per prestampe elettroniche"
+
+#: webquerybibsonomy.cpp:63
+msgid "BibSonomy"
+msgstr "BibSonomy"
+
+#: webquerybibsonomy.cpp:68
+msgid "BibSonomy bookmark sharing system"
+msgstr ""
+"BibSonomy - Un sistema di social bookmark e condivisione di pubblicazioni"
+
+#: webquerycitebase.cpp:62
+msgid "Citebase"
+msgstr "Citebase"
+
+#: webquerycitebase.cpp:67
+msgid "Citebase citation index"
+msgstr "Citebase Search è un indice di citazioni semi autonomo"
+
+#: webqueryciteseerx.cpp:83
+msgid "CiteSeerX"
+msgstr "CiteSeerX"
+
+#: webqueryciteseerx.cpp:92
+msgid "About CiteSeerX"
+msgstr "Informazioni su CiteSeerX"
+
+#: webquerycsb.cpp:90
+msgid ""
+"_: Here, \"Field\" refers to a parameter for the CSB search (author, title, "
+"any)\n"
+"&Field:"
+msgstr "&Campo:"
+
+#: webquerycsb.cpp:111
+msgid "&Year:"
+msgstr "&Anno:"
+
+#: webquerycsb.cpp:125
+msgid "Sort &by:"
+msgstr "Ordina &per:"
+
+#: webquerycsb.cpp:134
+msgid "Online papers only"
+msgstr "Solo articoli online"
+
+#: webquerycsb.cpp:137 webqueryz3950.cpp:59
+msgid "any"
+msgstr "qualsiasi"
+
+#: webquerycsb.cpp:138 webqueryspireshep.cpp:86 webqueryz3950.cpp:59
+msgid "author"
+msgstr "autore"
+
+#: webquerycsb.cpp:139 webqueryspireshep.cpp:87 webqueryz3950.cpp:59
+msgid "title"
+msgstr "titolo"
+
+#: webquerycsb.cpp:140
+msgid "exact"
+msgstr "esatto"
+
+#: webquerycsb.cpp:141
+msgid "until"
+msgstr "fino a"
+
+#: webquerycsb.cpp:142
+msgid "from"
+msgstr "da"
+
+#: webquerycsb.cpp:144
+msgid "none"
+msgstr "nessuno"
+
+#: webquerycsb.cpp:145
+msgid "score"
+msgstr "punteggio"
+
+#: webquerycsb.cpp:146
+msgid "year"
+msgstr "anno"
+
+#: webquerycsb.cpp:171
+msgid "Computer Science Bibliographies"
+msgstr "Bibliografie di Informatica"
+
+#: webquerycsb.cpp:176
+msgid "Copyright for the Bibliography Collection"
+msgstr "Copiright per la collezione di bibliografie"
+
+#: webquerydblp.cpp:89
+msgid "Do not merge corresponding entries"
+msgstr "Non unire gli elementi corrispondenti"
+
+#: webquerydblp.cpp:110
+msgid "DBLP"
+msgstr "DBLP"
+
+#: webquerydblp.cpp:115
+msgid "DBLP - Copyright"
+msgstr "DBLP - Copyright"
+
+#: webquerygooglescholar.cpp:69
+msgid "Google Scholar"
+msgstr "Google Scholar"
+
+#: webquerygooglescholar.cpp:74
+msgid "About Google Scholar"
+msgstr "Informazioni su Google Scholar"
+
+#: webqueryieeexplore.cpp:67
+msgid "IEEExplore"
+msgstr "IEEExplore"
+
+#: webqueryieeexplore.cpp:72
+msgid "What is IEEE Xplore?"
+msgstr "Cos'è IEEE Xplore?"
+
+#: webqueryieeexplore.cpp:109
+msgid "You have entered an invalid search."
+msgstr "Hai inserito una ricerca non valida."
+
+#: webqueryieeexplore.cpp:109
+msgid "Search Error"
+msgstr "Errore nella ricerca"
+
+#: webquerymathscinet.cpp:81
+msgid ""
+"<qt>Use the same synatx as for <a "
+"href=\"http://www.math.tamu.edu/~comech/tools/bibget/\">BIBGET</a>. For "
+"spaces within a search element, use \"<tt>+</tt>\".<br/>Example: "
+"<tt>a=gilkey t=invariance book 1984</tt></qt>"
+msgstr ""
+
+#: webquerymathscinet.cpp:102
+msgid "MathSciNet"
+msgstr ""
+
+#: webquerymathscinet.cpp:107
+msgid "American Mathematical Society"
+msgstr ""
+
+#: webquerypubmed.cpp:67
+msgid "NCBI (PubMed)"
+msgstr "NCBI (PubMed)"
+
+#: webquerypubmed.cpp:72
+msgid "NCBI's Disclaimer and Copyright"
+msgstr "Avvertenze e Copyright di NCBI"
+
+#: webquerysciencedirect.cpp:84
+msgid "Title, abstract, keywords:"
+msgstr "Titolo, abstract, parole chiave:"
+
+#: webquerysciencedirect.cpp:103
+msgid "Author:"
+msgstr "Autore:"
+
+#: webquerysciencedirect.cpp:120
+msgid "Journal/book title:"
+msgstr "Rivista/titolo del libro:"
+
+#: webquerysciencedirect.cpp:135
+msgid "Volume:"
+msgstr "Volume:"
+
+#: webquerysciencedirect.cpp:145
+msgid "Issue:"
+msgstr "Numero:"
+
+#: webquerysciencedirect.cpp:155
+msgid "Page:"
+msgstr "Pagina:"
+
+#: webquerysciencedirect.cpp:196
+msgid "ScienceDirect"
+msgstr "ScienceDirect"
+
+#: webquerysciencedirect.cpp:201
+msgid "About ScienceDirect"
+msgstr "Informazioni su ScienceDirect"
+
+#: webqueryspireshep.cpp:42
+msgid "DESY (Germany)"
+msgstr "DESY (Germania)"
+
+#: webqueryspireshep.cpp:42
+msgid "FNAL (U.S.A.)"
+msgstr "FNAL (U.S.A.)"
+
+#: webqueryspireshep.cpp:42
+msgid "IHEP (Russia)"
+msgstr "IHEP (Russia)"
+
+#: webqueryspireshep.cpp:42
+msgid "Durham U (U.K.)"
+msgstr "Durham U (U.K.)"
+
+#: webqueryspireshep.cpp:42
+msgid "SLAC (U.S.A.)"
+msgstr "SLAC (U.S.A.)"
+
+#: webqueryspireshep.cpp:42
+msgid "YITP (Japan)"
+msgstr "YITP (Giappone)"
+
+#: webqueryspireshep.cpp:42
+msgid "LIPI (Indonesia)"
+msgstr "LIPI (Indonesia)"
+
+#: webqueryspireshep.cpp:78
+msgid "Type:"
+msgstr "Tipo:"
+
+#: webqueryspireshep.cpp:85
+msgid "raw query"
+msgstr " Richiesta semplice"
+
+#: webqueryspireshep.cpp:88
+msgid "journal"
+msgstr "Rivista"
+
+#: webqueryspireshep.cpp:89
+msgid "EPrint number"
+msgstr "numero di EPrint"
+
+#: webqueryspireshep.cpp:90
+msgid "report number"
+msgstr "numero di report"
+
+#: webqueryspireshep.cpp:91
+msgid "keywords"
+msgstr "Parole Chiave"
+
+#: webqueryspireshep.cpp:109
+msgid "Include abstracts from arxiv.org if available"
+msgstr ""
+
+#: webqueryspireshep.cpp:130
+msgid "SPIRES-HEP"
+msgstr "SPIRES-HEP"
+
+#: webqueryspireshep.cpp:135
+msgid "SPIRES-HEP Search"
+msgstr "Ricerca SPIRES-HEP"
+
+#: webqueryz3950.cpp:59
+msgid "publisher"
+msgstr "Casa editrice"
+
+#: webqueryz3950.cpp:94
+msgid "Server:"
+msgstr "Server:"
+
+#: webqueryz3950.cpp:116
+msgid "Search term 1:"
+msgstr "Ricerca &termine:"
+
+#: webqueryz3950.cpp:126 webqueryz3950.cpp:147
+msgid "Search in:"
+msgstr "Ricerca:"
+
+#: webqueryz3950.cpp:138
+msgid "Search term 2:"
+msgstr "Ricerca &termine 2:"
+
+#: webqueryz3950.cpp:163
+msgid "and"
+msgstr "e"
+
+#: webqueryz3950.cpp:164
+msgid "or"
+msgstr "o"
+
+#: webqueryz3950.cpp:330
+#, c-format
+msgid ""
+"The server returned the following message:\n"
+"\n"
+"%1"
+msgstr ""
+"Il server ha risposto con il seguente messaggio:\n"
+"\n"
+"%1"
+
+#: webqueryz3950.cpp:330
+msgid "Error querying Z39.50 server"
+msgstr "Errore nell'interrogare il server Z39.50"
+
+#: webqueryzmath.cpp:61
+msgid "Zentralblatt MATH"
+msgstr "Zentralblatt MATH"
+
+#: webqueryzmath.cpp:66
+msgid "About Zentralblatt MATH"
+msgstr "Informazioni su Zentralblatt MATH"
+
+#: z3950connection.cpp:158
+msgid "Query error!"
+msgstr "Errore nella richiesta!"
+
+#: z3950connection.cpp:205
+msgid "Connection search error %1: %2"
+msgstr "Errore ricerca connessione %1: %2"
+
+#: z3950connection.cpp:294
+msgid "Record syntax error"
+msgstr "Errore nella sintassi dell'elemento"
+
+#: z3950connection.cpp:405
+msgid "Connection error %1: %2"
+msgstr "Errore di connessione %1: %2"
+
+#~ msgid "Merge Entries"
+#~ msgstr "Unisci elementi"
+
+#~ msgid "Cannot establish a link to LyX"
+#~ msgstr "Impossibile stabilire collegamento con LyX"
+
+#~ msgid "Cannot establish a link to LyX using the pipe '%1'"
+#~ msgstr "Impossibile stabilire collegamento a Lyx attraverso la pipe '%1'"
+
+#~ msgid ""
+#~ "\n"
+#~ "Maybe LyX is not running?"
+#~ msgstr ""
+#~ "\n"
+#~ "Forse LyX non è in esecuzione?"
+
+#, fuzzy
+#~ msgid "keyword"
+#~ msgstr "Parole Chiave"
+
+#, fuzzy
+#~ msgid ", but only first letter of each last name"
+#~ msgstr ""
+#~ ", ma solo la prima lettera di ogni parola\n"
+#~ ", ma solo le prime %n lettere di ogni parola"
+
+#, fuzzy
+#~ msgid ", but only first letter of each word"
+#~ msgstr ""
+#~ ", ma solo la prima lettera di ogni parola\n"
+#~ ", ma solo le prime %n lettere di ogni parola"
+
+#, fuzzy
+#~ msgid "id suggestion"
+#~ msgstr "Suggerimenti Id"
+
+#, fuzzy
+#~ msgid "search url"
+#~ msgstr "Nuovo"
+
+#, fuzzy
+#~ msgid "user-defined input"
+#~ msgstr "Su"
+
+#, fuzzy
+#~ msgid "z3950 server"
+#~ msgstr "Nuovo"
+
+#~ msgid "Updating"
+#~ msgstr "Aggiornamento"
+
+#~ msgid "eXtended Markup Language (*.xml)"
+#~ msgstr "eXtended Markup Language (*.xml)"
+
+#~ msgid "Use first author only"
+#~ msgstr "Usa solo il primo autore"
+
+#~ msgid "Z3950"
+#~ msgstr "Z3950"
+
+#, fuzzy
+#~ msgid "Merge BibTeX Elements"
+#~ msgstr "Unisci elementi BibTeX"
+
+#~ msgid "Original element:"
+#~ msgstr "Elemento originale:"
+
+#~ msgid "Inserted element:"
+#~ msgstr "Elemento inserito:"
+
+#~ msgid "Keep Original"
+#~ msgstr "Mantieni Originale"
+
+#~ msgid "Use Inserted"
+#~ msgstr "Usa elemento inserito"
+
+#~ msgid "Rename Inserted"
+#~ msgstr "Rinomina elemento inserito"
+
+#~ msgid "Merge"
+#~ msgstr "Unisci"
+
+#~ msgid "LaTeX|UTF-8"
+#~ msgstr "LaTeX|UTF-8"
diff --git a/po/kbibtex.pot b/po/kbibtex.pot
new file mode 100644
index 0000000..c67d097
--- /dev/null
+++ b/po/kbibtex.pot
@@ -0,0 +1,2655 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2010-07-01 13:55+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: ENCODING\n"
+
+#: _translatorinfo.cpp:1
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr ""
+
+#: _translatorinfo.cpp:3
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr ""
+
+#: commentwidget.cpp:55
+msgid "Co&mment:"
+msgstr ""
+
+#: commentwidget.cpp:64
+msgid "&Use @Comment for comment instead of plain text"
+msgstr ""
+
+#: commentwidget.cpp:82
+msgid "Edit BibTeX Comment"
+msgstr ""
+
+#: documentlistview.cpp:120
+msgid "List View"
+msgstr ""
+
+#: documentlistview.cpp:120
+msgid "Updating main view ..."
+msgstr ""
+
+#: documentlistview.cpp:253
+msgid "Show Columns"
+msgstr ""
+
+#: documentlistview.cpp:259 documentlistview.cpp:756 settingsediting.cpp:164
+msgid "Element Type"
+msgstr ""
+
+#: documentlistview.cpp:450
+msgid "Paste text as..."
+msgstr ""
+
+#: documentlistview.cpp:757 settingsediting.cpp:165
+msgid "Entry Id"
+msgstr ""
+
+#: documentlistviewitem.cpp:114 kbibtex_part.cpp:506
+msgid "Comment"
+msgstr ""
+
+#: documentlistviewitem.cpp:124 kbibtex_part.cpp:507 macrowidget.cpp:93
+msgid "Macro"
+msgstr ""
+
+#: documentlistviewitem.cpp:138 kbibtex_part.cpp:505 preamblewidget.cpp:78
+msgid "Preamble"
+msgstr ""
+
+#: documentsourceview.cpp:214
+msgid "Source View"
+msgstr ""
+
+#: documentsourceview.cpp:214
+msgid "Converting BibTeX document to plain text ..."
+msgstr ""
+
+#: documentsourceview.cpp:369
+msgid ""
+"Could not find text '%1' in the document.\n"
+"Start from the beginning?"
+msgstr ""
+
+#: documentsourceview.cpp:369
+msgid "Find text in source view"
+msgstr ""
+
+#: documentsourceview.cpp:369
+msgid "Restart search"
+msgstr ""
+
+#: documentwidget.cpp:120
+msgid "L&ist view"
+msgstr ""
+
+#: documentwidget.cpp:142
+msgid "So&urce view"
+msgstr ""
+
+#: documentwidget.cpp:174
+msgid "<qt>Loading file <b>%1</b></qt>"
+msgstr ""
+
+#: documentwidget.cpp:221
+msgid "Do you want to search for duplicates in the merged document?"
+msgstr ""
+
+#: documentwidget.cpp:221
+msgid "Find duplicates?"
+msgstr ""
+
+#: documentwidget.cpp:221 findduplicates.cpp:58 mergeelements.cpp:484
+#: mergeelements.cpp:492 settingsediting.cpp:216
+msgid "Find Duplicates"
+msgstr ""
+
+#: documentwidget.cpp:281 documentwidget.cpp:1345 documentwidget.cpp:1359
+#: kbibtex_part.cpp:306 kbibtex_part.cpp:320
+msgid "Choose file format"
+msgstr ""
+
+#: documentwidget.cpp:281 documentwidget.cpp:1345 documentwidget.cpp:1359
+#: kbibtex_part.cpp:306 kbibtex_part.cpp:320
+msgid "Choose file format of file '%1':"
+msgstr ""
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid ""
+"The selected filename \"%1\" is a symbolic link pointing to \"%2\".\n"
+"Replace the link with a new file or overwrite the existing file the link "
+"points to?"
+msgstr ""
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Symbolic Link"
+msgstr ""
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Replace link"
+msgstr ""
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Overwrite file the link points to"
+msgstr ""
+
+#: documentwidget.cpp:301
+msgid "<qt>Writing file <b>%1</b></qt>"
+msgstr ""
+
+#: documentwidget.cpp:388
+msgid ""
+"To export a BibTeX document to the Rich Text Format (RTF) KBibTeX requires "
+"the program 'latex2rtf'."
+msgstr ""
+
+#: documentwidget.cpp:405
+msgid ""
+"To export a BibTeX document to the DocBook5 format KBibTeX requires the "
+"program 'bib2db5'."
+msgstr ""
+
+#: documentwidget.cpp:420
+msgid ""
+"Embedding files into the PDF file is enabled, but the required file "
+"'embedfile.sty' was not found. Embedding files will be disabled."
+msgstr ""
+
+#: documentwidget.cpp:420
+msgid "Embedding files disabled"
+msgstr ""
+
+#: documentwidget.cpp:471
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewMacro%1"
+msgstr ""
+
+#: documentwidget.cpp:489
+msgid "Put your comment here..."
+msgstr ""
+
+#: documentwidget.cpp:543
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewString%1"
+msgstr ""
+
+#: documentwidget.cpp:544
+msgid "No text yet"
+msgstr ""
+
+#: documentwidget.cpp:548
+msgid "@comment{ Put your comment here... }"
+msgstr ""
+
+#: documentwidget.cpp:552
+msgid "@preamble{\"Put your preamble here using double quotes...\"}"
+msgstr ""
+
+#: documentwidget.cpp:568
+msgid "REQUIRED"
+msgstr ""
+
+#: documentwidget.cpp:568
+msgid "optional"
+msgstr ""
+
+#: documentwidget.cpp:610
+#, c-format
+msgid ""
+"_n: This BibTeX file contains 1 element.\n"
+"This BibTeX file contains %n elements."
+msgstr ""
+
+#: documentwidget.cpp:610
+msgid "File Statistics"
+msgstr ""
+
+#: documentwidget.cpp:806 documentwidget.cpp:815
+msgid "%1 ... %2"
+msgstr ""
+
+#: documentwidget.cpp:827
+msgid "New keyword:"
+msgstr ""
+
+#: documentwidget.cpp:999
+msgid ""
+"\n"
+"\n"
+"Either LyX is not running or has not been correctly configured to send "
+"references to."
+msgstr ""
+
+#: documentwidget.cpp:1000
+msgid "Error communicating with LyX"
+msgstr ""
+
+#: documentwidget.cpp:1007
+msgid "Cannot determine how to send references to LyX."
+msgstr ""
+
+#: documentwidget.cpp:1012
+msgid "The inpipe as configured in LyX does not exist."
+msgstr ""
+
+#: documentwidget.cpp:1016
+msgid "Cannot open the inpipe as configured in LyX."
+msgstr ""
+
+#: documentwidget.cpp:1288 documentwidget.cpp:1293
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewEntry%1"
+msgstr ""
+
+#: documentwidget.cpp:1398
+msgid "The file '%1' does not contain a known type of bibliography."
+msgstr ""
+
+#: documentwidget.cpp:1398
+msgid "Unknown file format"
+msgstr ""
+
+#: documentwidget.cpp:1453
+msgid "No preview available"
+msgstr ""
+
+#: documentwidget.cpp:1554
+msgid ""
+"File '%1' has been modified. Reload file to import changes or ignore changes?"
+msgstr ""
+
+#: documentwidget.cpp:1554
+msgid "Reload file?"
+msgstr ""
+
+#: documentwidget.cpp:1554
+msgid "Ignore"
+msgstr ""
+
+#: documentwidget.cpp:1691
+msgid "You must set a default id suggestion in the settings dialog."
+msgstr ""
+
+#: documentwidget.cpp:1713
+msgid "No entries were selected."
+msgstr ""
+
+#: documentwidget.cpp:1714
+msgid ""
+"The following changes will be applied to the currently selected elements.\n"
+"Conflicts with duplicate entry ids will be resolved when applying the new "
+"ids."
+msgstr ""
+
+#: documentwidget.cpp:1714 kbibtex_part.cpp:482
+msgid "Normalize Entry Ids"
+msgstr ""
+
+#: documentwidget.cpp:1714
+msgid "Replace Entry Ids"
+msgstr ""
+
+#: entrywidget.cpp:65
+msgid "Edit BibTeX Entry"
+msgstr ""
+
+#: entrywidget.cpp:142
+msgid ""
+"The current entry has been modified. Do you want do discard your changes?"
+msgstr ""
+
+#: entrywidget.cpp:142
+msgid "Discard changes"
+msgstr ""
+
+#: entrywidget.cpp:256
+msgid ""
+"The source code does not contain valid BibTeX code.\n"
+"\n"
+"Restore previous version or continue editing?"
+msgstr ""
+
+#: entrywidget.cpp:256
+msgid "Invalid BibTeX code"
+msgstr ""
+
+#: entrywidget.cpp:314
+msgid "E&ntry Type:"
+msgstr ""
+
+#: entrywidget.cpp:324
+msgid "&Identifier"
+msgstr ""
+
+#: entrywidget.cpp:341
+msgid "Use the default id suggestion to set the entry id"
+msgstr ""
+
+#: entrywidget.cpp:342
+msgid ""
+"Use the default id suggestion to set the entry id.\n"
+"You can edit and select the default id suggestion in the configuration "
+"dialog."
+msgstr ""
+
+#: entrywidget.cpp:350 settingsediting.cpp:194
+msgid "Enable all &fields for editing"
+msgstr ""
+
+#: entrywidget.cpp:353
+msgid "Refetch"
+msgstr ""
+
+#: entrywidget.cpp:361
+msgid "Message"
+msgstr ""
+
+#: entrywidget.cpp:385 entrywidgettitle.cpp:116 entrywidgettitle.cpp:118
+#: idsuggestions.cpp:345 idsuggestionswidget.cpp:201
+#: idsuggestionswidget.cpp:485 settings.cpp:681 webquery.cpp:450
+msgid "Title"
+msgstr ""
+
+#: entrywidget.cpp:386
+msgid "Author/Editor"
+msgstr ""
+
+#: entrywidget.cpp:387
+msgid "Publication"
+msgstr ""
+
+#: entrywidget.cpp:388 kbibtex_part.cpp:500 settings.cpp:720
+msgid "Misc"
+msgstr ""
+
+#: entrywidget.cpp:389 settings.cpp:659 settingskeyword.cpp:161
+msgid "Keywords"
+msgstr ""
+
+#: entrywidget.cpp:390
+msgid "External"
+msgstr ""
+
+#: entrywidget.cpp:391
+msgid "User Defined"
+msgstr ""
+
+#: entrywidget.cpp:392
+msgid "Other Fields"
+msgstr ""
+
+#: entrywidget.cpp:395
+msgid "Source"
+msgstr ""
+
+#: entrywidget.cpp:438
+msgid "Please supply more fields to use the default id"
+msgstr ""
+
+#: entrywidget.cpp:441
+msgid "Using '%1' as entry id"
+msgstr ""
+
+#: entrywidget.cpp:446
+msgid "An entry has to have an identifier"
+msgstr ""
+
+#: entrywidget.cpp:448
+#, c-format
+msgid "The identifier contains invalid characters at position %1"
+msgstr ""
+
+#: entrywidget.cpp:458
+msgid "The identifier contains non-ascii characters, first one is '%1'"
+msgstr ""
+
+#: entrywidget.cpp:474
+msgid "This BibTeX file already contains an entry with id '%1'."
+msgstr ""
+
+#: entrywidget.cpp:491
+msgid "Require either 'Editor', 'Organization', or 'Key'"
+msgstr ""
+
+#: entrywidget.cpp:500
+msgid ""
+"Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Book "
+"Title'"
+msgstr ""
+
+#: entrywidget.cpp:510
+msgid "Cross referenced entry '%1' must contain 'Volume'"
+msgstr ""
+
+#: entrywidget.cpp:513
+msgid ""
+"Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Series'"
+msgstr ""
+
+#: entrywidget.cpp:537
+msgid "No suggestions available"
+msgstr ""
+
+#: entrywidget.cpp:641
+msgid ""
+"Currently only refetching from ArXiv sources is supported.\n"
+"\n"
+"This requires that the URL field points to an \"abstract\" page (i.e. the "
+"URL contains \"arxiv.org/abs/\")."
+msgstr ""
+
+#: entrywidget.cpp:641 entrywidget.cpp:668
+msgid "Refetching entry"
+msgstr ""
+
+#: entrywidget.cpp:668
+msgid "Fetching updated bibliographic data failed."
+msgstr ""
+
+#: entrywidgetauthor.cpp:83
+msgid "The fields 'Author' or 'Editor' are required, but both are missing"
+msgstr ""
+
+#: entrywidgetauthor.cpp:98 entrywidgetauthor.cpp:100
+#: idsuggestionswidget.cpp:112 idsuggestionswidget.cpp:483 settings.cpp:633
+#: settingssearchurl.cpp:134 webquery.cpp:449
+msgid "Author"
+msgstr ""
+
+#: entrywidgetauthor.cpp:100
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewAuthor"
+msgstr ""
+
+#: entrywidgetauthor.cpp:105 entrywidgetauthor.cpp:107 settings.cpp:645
+msgid "Editor"
+msgstr ""
+
+#: entrywidgetauthor.cpp:107
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewEditor"
+msgstr ""
+
+#: entrywidgetexternal.cpp:197 entrywidgetexternal.cpp:285
+msgid "Previously used directory"
+msgstr ""
+
+#: entrywidgetexternal.cpp:223 entrywidgetexternal.cpp:225
+#: entrywidgetexternal.cpp:235 settings.cpp:685 settingssearchurl.cpp:135
+msgid "URL"
+msgstr ""
+
+#: entrywidgetexternal.cpp:235 entrywidgetexternal.cpp:268
+#, c-format
+msgid "Open %1"
+msgstr ""
+
+#: entrywidgetexternal.cpp:238 entrywidgetexternal.cpp:242 settings.cpp:641
+msgid "DOI"
+msgstr ""
+
+#: entrywidgetexternal.cpp:239
+msgid "Digital Object Identifier"
+msgstr ""
+
+#: entrywidgetexternal.cpp:253
+msgid "Open DOI"
+msgstr ""
+
+#: entrywidgetexternal.cpp:256 entrywidgetexternal.cpp:258
+#: entrywidgetexternal.cpp:268 settings.cpp:661
+msgid "Local File"
+msgstr ""
+
+#: entrywidgetexternal.cpp:274
+msgid "&Browse..."
+msgstr ""
+
+#: entrywidgetexternal.cpp:275
+msgid "Browse for a local file"
+msgstr ""
+
+#: entrywidgetexternal.cpp:282
+msgid "Select base directory"
+msgstr ""
+
+#: entrywidgetexternal.cpp:283
+msgid "Current directory"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:56
+msgid "Global"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:61
+msgid "In this file only"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:168
+msgid ""
+"The keyword '%1' does already exist in the list of keywords.\n"
+"The old name has been restored."
+msgstr ""
+
+#: entrywidgetkeyword.cpp:168
+msgid "Renaming keyword failed"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:193
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewKeyword%1"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:230
+msgid "Keyword"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:231
+msgid "Origin"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:238 settingskeyword.cpp:166
+msgid ""
+"_: keyword\n"
+"New"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:241
+msgid "Add a new keyword to the list"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:245 settingskeyword.cpp:169
+msgid ""
+"_: keyword\n"
+"Edit"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:247
+msgid "Edit the selected keyword"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:252
+msgid ""
+"_: keyword\n"
+"Toggle &global"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:254
+msgid "Add or remove the selected keyword to or from the global list"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:259
+msgid ""
+"There is no need to delete keywords. Simply uncheck unwanted keywords and "
+"make them non-global.\n"
+"Global keywords can also be edited in the settings dialog."
+msgstr ""
+
+#: entrywidgetmisc.cpp:135 entrywidgetmisc.cpp:137 mergeelements.cpp:581
+#: settings.cpp:683 settingsuserdefinedinput.cpp:172
+msgid "Type"
+msgstr ""
+
+#: entrywidgetmisc.cpp:142 entrywidgetmisc.cpp:144 entrywidgetother.cpp:153
+#: mergeelements.cpp:72 settings.cpp:657
+msgid "Key"
+msgstr ""
+
+#: entrywidgetmisc.cpp:149 entrywidgetmisc.cpp:151 settings.cpp:667
+msgid "Note"
+msgstr ""
+
+#: entrywidgetmisc.cpp:156 entrywidgetmisc.cpp:158 settings.cpp:631
+msgid "Annote"
+msgstr ""
+
+#: entrywidgetmisc.cpp:163 entrywidgetmisc.cpp:165 settings.cpp:627
+msgid "Abstract"
+msgstr ""
+
+#: entrywidgetother.cpp:131
+msgid "Name of the user-defined field"
+msgstr ""
+
+#: entrywidgetother.cpp:132
+msgid ""
+"The name of the user-defined field. Should only contain letters and numbers."
+msgstr ""
+
+#: entrywidgetother.cpp:133
+msgid "&Name:"
+msgstr ""
+
+#: entrywidgetother.cpp:137 entrywidgetother.cpp:201
+msgid "&Add"
+msgstr ""
+
+#: entrywidgetother.cpp:141 entrywidgetother.cpp:154 mergeelements.cpp:72
+msgid "Value"
+msgstr ""
+
+#: entrywidgetother.cpp:143
+msgid "Content of the user-defined field"
+msgstr ""
+
+#: entrywidgetother.cpp:144
+msgid "The content of the user-defined field. May contain any text."
+msgstr ""
+
+#: entrywidgetother.cpp:145
+msgid "&Content:"
+msgstr ""
+
+#: entrywidgetother.cpp:159
+msgid "&List:"
+msgstr ""
+
+#: entrywidgetother.cpp:168
+msgid "Op&en"
+msgstr ""
+
+#: entrywidgetpublication.cpp:308
+msgid "The fields 'Chapter' or 'Pages' are required, but both are missing"
+msgstr ""
+
+#: entrywidgetpublication.cpp:325
+msgid "The field 'Journal' refers to a not existing entry"
+msgstr ""
+
+#: entrywidgetpublication.cpp:392
+#, c-format
+msgid "http://en.wikipedia.org/w/index.php?title=Special:Booksources&isbn=%1"
+msgstr ""
+
+#: entrywidgetpublication.cpp:405 entrywidgetpublication.cpp:407
+#: settings.cpp:655
+msgid "Journal"
+msgstr ""
+
+#: entrywidgetpublication.cpp:412 entrywidgetpublication.cpp:414
+#: settings.cpp:687
+msgid "Volume"
+msgstr ""
+
+#: entrywidgetpublication.cpp:419 entrywidgetpublication.cpp:421
+#: settings.cpp:669
+msgid "Number"
+msgstr ""
+
+#: entrywidgetpublication.cpp:426 entrywidgetpublication.cpp:435
+#: settings.cpp:665
+msgid "Month"
+msgstr ""
+
+#: entrywidgetpublication.cpp:440 entrywidgetpublication.cpp:442
+#: idsuggestionswidget.cpp:276 idsuggestionswidget.cpp:484 settings.cpp:689
+#: webquery.cpp:448
+msgid "Year"
+msgstr ""
+
+#: entrywidgetpublication.cpp:447 entrywidgetpublication.cpp:449
+#: settings.cpp:673
+msgid "Pages"
+msgstr ""
+
+#: entrywidgetpublication.cpp:454 entrywidgetpublication.cpp:456
+#: settings.cpp:643
+msgid "Edition"
+msgstr ""
+
+#: entrywidgetpublication.cpp:461 entrywidgetpublication.cpp:463
+#: settings.cpp:637
+msgid "Chapter"
+msgstr ""
+
+#: entrywidgetpublication.cpp:468 entrywidgetpublication.cpp:470
+msgid "Cross Reference"
+msgstr ""
+
+#: entrywidgetpublication.cpp:476 entrywidgetpublication.cpp:478
+#: settings.cpp:671
+msgid "Organization"
+msgstr ""
+
+#: entrywidgetpublication.cpp:483 entrywidgetpublication.cpp:485
+#: settings.cpp:675
+msgid "Publisher"
+msgstr ""
+
+#: entrywidgetpublication.cpp:490 entrywidgetpublication.cpp:492
+#: settings.cpp:679
+msgid "School"
+msgstr ""
+
+#: entrywidgetpublication.cpp:497 entrywidgetpublication.cpp:499
+#: settings.cpp:649
+msgid "Institution"
+msgstr ""
+
+#: entrywidgetpublication.cpp:504 entrywidgetpublication.cpp:506
+#: settings.cpp:663
+msgid "Location"
+msgstr ""
+
+#: entrywidgetpublication.cpp:511 entrywidgetpublication.cpp:513
+#: settings.cpp:629
+msgid "Address"
+msgstr ""
+
+#: entrywidgetpublication.cpp:518 entrywidgetpublication.cpp:527
+#: settings.cpp:651
+msgid "ISBN"
+msgstr ""
+
+#: entrywidgetpublication.cpp:525
+msgid "Lookup ISBN number in Wikipedia"
+msgstr ""
+
+#: entrywidgetpublication.cpp:533 entrywidgetpublication.cpp:535
+#: settings.cpp:653
+msgid "ISSN"
+msgstr ""
+
+#: entrywidgetpublication.cpp:540 entrywidgetpublication.cpp:542
+#: settings.cpp:647
+msgid "How Published"
+msgstr ""
+
+#: entrywidgettab.cpp:65
+msgid "The field '%1' is required, but missing"
+msgstr ""
+
+#: entrywidgettab.cpp:71
+msgid "Using cross referenced entry '%1' for field '%2'"
+msgstr ""
+
+#: entrywidgettab.cpp:79
+msgid "The field '%1' contains string keys with invalid characters"
+msgstr ""
+
+#: entrywidgettab.cpp:87
+msgid "The field '%1' contains some unknown error"
+msgstr ""
+
+#: entrywidgettitle.cpp:122 entrywidgettitle.cpp:124 settings.cpp:635
+msgid "Book Title"
+msgstr ""
+
+#: entrywidgettitle.cpp:128 entrywidgettitle.cpp:130 settings.cpp:677
+msgid "Series"
+msgstr ""
+
+#: entrywidgetuserdefined.cpp:137
+msgid "Please use the settings dialog to add user-defined fields here."
+msgstr ""
+
+#: fieldlineedit.cpp:91 fieldlineedit.cpp:92 fieldlineedit.cpp:96
+#: fieldlineedit.cpp:97 fieldlistview.cpp:100 fieldlistview.cpp:101
+msgid "BibTeX field '%1'"
+msgstr ""
+
+#: fieldlineedit.cpp:228
+msgid "Set '%1' to be a string key"
+msgstr ""
+
+#: fieldlineedit.cpp:240
+msgid "Edit '%1' as a concatenated value"
+msgstr ""
+
+#: fieldlineedit.cpp:325 fieldlineedit.cpp:328
+msgid "Concatenated value"
+msgstr ""
+
+#: fieldlistview.cpp:321
+msgid "Add new '%1' item (Ctrl+A)"
+msgstr ""
+
+#: fieldlistview.cpp:327
+msgid "Edit current '%1' item (F2)"
+msgstr ""
+
+#: fieldlistview.cpp:333
+msgid "Delete current '%1' item (Del)"
+msgstr ""
+
+#: fieldlistview.cpp:335 idsuggestionswidget.cpp:59 valuewidget.cpp:242
+msgid "Up"
+msgstr ""
+
+#: fieldlistview.cpp:339
+msgid "Move current '%1' item up (Ctrl+Up)"
+msgstr ""
+
+#: fieldlistview.cpp:341 idsuggestionswidget.cpp:60 valuewidget.cpp:247
+msgid "Down"
+msgstr ""
+
+#: fieldlistview.cpp:345
+msgid "Move current '%1' item down (Ctrl+Down)"
+msgstr ""
+
+#: fieldlistview.cpp:347
+msgid "Complex..."
+msgstr ""
+
+#: fieldlistview.cpp:351
+msgid "Edit current '%1' item as a concatenated string (Ctrl+Alt+C)"
+msgstr ""
+
+#: fieldlistview.cpp:353
+msgid "... and others (et al.)"
+msgstr ""
+
+#: findduplicates.cpp:58
+msgid "Searching for duplicates..."
+msgstr ""
+
+#: idsuggestions.cpp:330 idsuggestionswidget.cpp:128
+msgid "First author only"
+msgstr ""
+
+#: idsuggestions.cpp:331 idsuggestionswidget.cpp:129
+msgid "All but first author"
+msgstr ""
+
+#: idsuggestions.cpp:332 idsuggestionswidget.cpp:127
+msgid "All authors"
+msgstr ""
+
+#: idsuggestions.cpp:335
+#, c-format
+msgid ""
+"_n: , but only first letter of each last name\n"
+", but only first %n letters of each last name"
+msgstr ""
+
+#: idsuggestions.cpp:336 idsuggestions.cpp:348
+msgid ", in upper case"
+msgstr ""
+
+#: idsuggestions.cpp:337 idsuggestions.cpp:349
+msgid ", in lower case"
+msgstr ""
+
+#: idsuggestions.cpp:338 idsuggestions.cpp:350
+msgid ", with '%1' in between"
+msgstr ""
+
+#: idsuggestions.cpp:340
+msgid "Year (2 digits)"
+msgstr ""
+
+#: idsuggestions.cpp:341
+msgid "Year (4 digits)"
+msgstr ""
+
+#: idsuggestions.cpp:347
+#, c-format
+msgid ""
+"_n: , but only first letter of each word\n"
+", but only first %n letters of each word"
+msgstr ""
+
+#: idsuggestions.cpp:351
+msgid ", small words removed"
+msgstr ""
+
+#: idsuggestions.cpp:353
+msgid "Text: '%1'"
+msgstr ""
+
+#: idsuggestionswidget.cpp:140 idsuggestionswidget.cpp:221
+msgid "Casing:"
+msgstr ""
+
+#: idsuggestionswidget.cpp:145 idsuggestionswidget.cpp:226
+msgid "No change"
+msgstr ""
+
+#: idsuggestionswidget.cpp:146 idsuggestionswidget.cpp:227
+msgid "Lower case"
+msgstr ""
+
+#: idsuggestionswidget.cpp:147 idsuggestionswidget.cpp:228
+msgid "Upper case"
+msgstr ""
+
+#: idsuggestionswidget.cpp:156 idsuggestionswidget.cpp:237
+msgid "Only first letters:"
+msgstr ""
+
+#: idsuggestionswidget.cpp:163 idsuggestionswidget.cpp:165
+msgid "Complete name"
+msgstr ""
+
+#: idsuggestionswidget.cpp:168
+msgid "Text between authors:"
+msgstr ""
+
+#: idsuggestionswidget.cpp:214
+msgid "Remove small words"
+msgstr ""
+
+#: idsuggestionswidget.cpp:244 idsuggestionswidget.cpp:246
+msgid "Complete title"
+msgstr ""
+
+#: idsuggestionswidget.cpp:249
+msgid "Text between words:"
+msgstr ""
+
+#: idsuggestionswidget.cpp:289
+msgid "Year:"
+msgstr ""
+
+#: idsuggestionswidget.cpp:294
+msgid "2 digits"
+msgstr ""
+
+#: idsuggestionswidget.cpp:295
+msgid "4 digits"
+msgstr ""
+
+#: idsuggestionswidget.cpp:311 idsuggestionswidget.cpp:486 valuewidget.cpp:211
+msgid "Text"
+msgstr ""
+
+#: idsuggestionswidget.cpp:324
+msgid "Text in between:"
+msgstr ""
+
+#: idsuggestionswidget.cpp:388
+msgid "Edit Id Suggestions"
+msgstr ""
+
+#: idsuggestionswidget.cpp:563
+msgid "<qt>Example:<br/><b>%1</b></qt>"
+msgstr ""
+
+#: kbibtex_part.cpp:158
+msgid ""
+"The document '%1' has been modified.\n"
+"Do you want to save your changes or discard them?"
+msgstr ""
+
+#: kbibtex_part.cpp:160
+msgid "Close Document"
+msgstr ""
+
+#: kbibtex_part.cpp:251 kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "BibTeX (*.bib)"
+msgstr ""
+
+#: kbibtex_part.cpp:251 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "Reference Manager (*.ris)"
+msgstr ""
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)"
+msgstr ""
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "ISI Web of Knowledge (*.isi *.cgi)"
+msgstr ""
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273
+msgid "DocBook 5 or MODS (*.xml)"
+msgstr ""
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273
+msgid "DocBook 5 (*.xml)"
+msgstr ""
+
+#: kbibtex_part.cpp:256 kbibtex_part.cpp:279
+msgid ""
+"A file named '%1' already exists. Are you sure you want to overwrite it?"
+msgstr ""
+
+#: kbibtex_part.cpp:256 kbibtex_part.cpp:279
+msgid "Overwrite"
+msgstr ""
+
+#: kbibtex_part.cpp:273
+msgid "Portable Document File (*.pdf)"
+msgstr ""
+
+#: kbibtex_part.cpp:273
+msgid "PostScript (*.ps)"
+msgstr ""
+
+#: kbibtex_part.cpp:273
+msgid "Hypertext Markup Langage (*.html)"
+msgstr ""
+
+#: kbibtex_part.cpp:273
+msgid "Rich Text Format (*.rtf)"
+msgstr ""
+
+#: kbibtex_part.cpp:333
+msgid "Exporting"
+msgstr ""
+
+#: kbibtex_part.cpp:344
+msgid "File could not be exported in '%1'."
+msgstr ""
+
+#: kbibtex_part.cpp:344
+msgid ""
+"\n"
+"\n"
+"See the following error log for details."
+msgstr ""
+
+#: kbibtex_part.cpp:344 kbibtex_part.cpp:347
+msgid "Exporting failed"
+msgstr ""
+
+#: kbibtex_part.cpp:347
+msgid "File could not be exported to '%1'."
+msgstr ""
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "Supported Bibliographies"
+msgstr ""
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "MODS or EndNote XML (*.xml)"
+msgstr ""
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "All files (*.*)"
+msgstr ""
+
+#: kbibtex_part.cpp:383 kbibtexshell.cpp:332
+msgid ""
+"The given file could not be read, check if it exists or if it is readable "
+"for the current user."
+msgstr ""
+
+#: kbibtex_part.cpp:398
+msgid "The given file could not be merged."
+msgstr ""
+
+#: kbibtex_part.cpp:427
+msgid "Save the current file"
+msgstr ""
+
+#: kbibtex_part.cpp:428
+msgid "Save the current file under a new filename"
+msgstr ""
+
+#: kbibtex_part.cpp:430
+msgid "Statistics..."
+msgstr ""
+
+#: kbibtex_part.cpp:431
+msgid "Find Duplicates..."
+msgstr ""
+
+#: kbibtex_part.cpp:432
+msgid "Export..."
+msgstr ""
+
+#: kbibtex_part.cpp:433
+msgid "Export to a different file format"
+msgstr ""
+
+#: kbibtex_part.cpp:434
+msgid "Merge..."
+msgstr ""
+
+#: kbibtex_part.cpp:435
+msgid "Merge BibTeX entries from another file"
+msgstr ""
+
+#: kbibtex_part.cpp:438
+msgid "Cut the selected BibTeX elements to the clipboard"
+msgstr ""
+
+#: kbibtex_part.cpp:441
+msgid "Copy the selected BibTeX elements to the clipboard"
+msgstr ""
+
+#: kbibtex_part.cpp:445
+msgid "Copy &Reference"
+msgstr ""
+
+#: kbibtex_part.cpp:446
+msgid "Copy a reference of the selected BibTeX elements to the clipboard"
+msgstr ""
+
+#: kbibtex_part.cpp:449
+msgid "Paste BibTeX elements from the clipboard"
+msgstr ""
+
+#: kbibtex_part.cpp:451
+msgid "Select all BibTeX elements"
+msgstr ""
+
+#: kbibtex_part.cpp:452
+msgid "Send Reference to &LyX"
+msgstr ""
+
+#: kbibtex_part.cpp:453
+msgid "Send a reference of the selected BibTeX elements to LyX"
+msgstr ""
+
+#: kbibtex_part.cpp:456
+msgid "Find text"
+msgstr ""
+
+#: kbibtex_part.cpp:458
+msgid "Find next occurrence"
+msgstr ""
+
+#: kbibtex_part.cpp:462
+msgid "Search Online Databases"
+msgstr ""
+
+#: kbibtex_part.cpp:463
+msgid "Search online databases to import bibliography data"
+msgstr ""
+
+#: kbibtex_part.cpp:465
+msgid "Search Document Online"
+msgstr ""
+
+#: kbibtex_part.cpp:466
+msgid "Search websites for the selected BibTeX element"
+msgstr ""
+
+#: kbibtex_part.cpp:470
+msgid "&Show Columns"
+msgstr ""
+
+#: kbibtex_part.cpp:471
+msgid "Select columns to show in the main list"
+msgstr ""
+
+#: kbibtex_part.cpp:472
+msgid "View Document"
+msgstr ""
+
+#: kbibtex_part.cpp:473
+msgid "View the documents associated with this BibTeX entry"
+msgstr ""
+
+#: kbibtex_part.cpp:475
+msgid "View Primary Document"
+msgstr ""
+
+#: kbibtex_part.cpp:477
+msgid "View Primary Online Reference"
+msgstr ""
+
+#: kbibtex_part.cpp:479
+msgid "Assign Keywords"
+msgstr ""
+
+#: kbibtex_part.cpp:480
+msgid "Assign keywords to this entry"
+msgstr ""
+
+#: kbibtex_part.cpp:483
+msgid "Set entry ids as specified in the id suggestion settings"
+msgstr ""
+
+#: kbibtex_part.cpp:487
+msgid "Configure KBibTeX"
+msgstr ""
+
+#: kbibtex_part.cpp:488
+msgid "Configure Source View..."
+msgstr ""
+
+#: kbibtex_part.cpp:489
+msgid "Configure the Source Editor"
+msgstr ""
+
+#: kbibtex_part.cpp:491 settings.cpp:700
+msgid "Article"
+msgstr ""
+
+#: kbibtex_part.cpp:491
+msgid "Add an article to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:492 settings.cpp:702
+msgid "Book"
+msgstr ""
+
+#: kbibtex_part.cpp:492
+msgid "Add a book to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:493 settings.cpp:704
+msgid "Booklet"
+msgstr ""
+
+#: kbibtex_part.cpp:493
+msgid "Add a booklet to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:494
+msgid "Electronic (IEEE)"
+msgstr ""
+
+#: kbibtex_part.cpp:494
+msgid "Add an electronic reference (IEEE) to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:495 settings.cpp:710
+msgid "InBook"
+msgstr ""
+
+#: kbibtex_part.cpp:495
+msgid "Add a part of a book to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:496 settings.cpp:712
+msgid "InCollection"
+msgstr ""
+
+#: kbibtex_part.cpp:496
+msgid "Add a publication which is part of some collection to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:497 settings.cpp:714
+msgid "InProceedings"
+msgstr ""
+
+#: kbibtex_part.cpp:497
+msgid "Add a publication which is part of some proceedings to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:498 settings.cpp:716
+msgid "Manual"
+msgstr ""
+
+#: kbibtex_part.cpp:498
+msgid "Add a manual to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:499 settings.cpp:718
+msgid "MastersThesis"
+msgstr ""
+
+#: kbibtex_part.cpp:499
+msgid "Add a master or diploma thesis to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:500
+msgid "Add a not specified document or reference to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:501 settings.cpp:722
+msgid "PhDThesis"
+msgstr ""
+
+#: kbibtex_part.cpp:501
+msgid "Add a PhD thesis to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:502 settings.cpp:724
+msgid "Proceedings"
+msgstr ""
+
+#: kbibtex_part.cpp:502
+msgid "Add some proceedings to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:503 settings.cpp:726
+msgid "TechReport"
+msgstr ""
+
+#: kbibtex_part.cpp:503
+msgid "Add a technical report to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:504 settings.cpp:728
+msgid "Unpublished"
+msgstr ""
+
+#: kbibtex_part.cpp:504
+msgid "Add an unpublished document to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:505
+msgid "Add a preamble to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:506
+msgid "Add a comment to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:507
+msgid "Add a macro to the BibTeX file"
+msgstr ""
+
+#: kbibtex_part.cpp:510
+msgid "Edit the selected BibTeX element"
+msgstr ""
+
+#: kbibtex_part.cpp:513
+msgid "Delete the selected BibTeX elements"
+msgstr ""
+
+#: kbibtex_part.cpp:516
+msgid "Show &Comments"
+msgstr ""
+
+#: kbibtex_part.cpp:517
+msgid "Show the comments of a BibTeX document"
+msgstr ""
+
+#: kbibtex_part.cpp:518
+msgid "Show &Macros"
+msgstr ""
+
+#: kbibtex_part.cpp:519
+msgid "Show the macros of a BibTeX document"
+msgstr ""
+
+#: kbibtex_part.cpp:521
+msgid "Accept input from other programs"
+msgstr ""
+
+#: kbibtex_part.cpp:537 rc.cpp:9 rc.cpp:18 rc.cpp:21 rc.cpp:39 rc.cpp:48
+#: rc.cpp:51
+msgid "&New"
+msgstr ""
+
+#: kbibtex_part.cpp:538
+msgid "Add a new element to this BibTeX document"
+msgstr ""
+
+#: kbibtex_part.cpp:622
+msgid ""
+"Some other KBibTeX instance is using the pipe.\n"
+"If this assumption is wrong, please delete '%1'."
+msgstr ""
+
+#: kbibtex_part.cpp:622
+msgid "Pipe already in use"
+msgstr ""
+
+#: kbibtex_part.cpp:651
+msgid "Could not create pipe at '%1'."
+msgstr ""
+
+#: kbibtex_part.cpp:651
+msgid "Error creating pipe"
+msgstr ""
+
+#: kbibtex_part.cpp:695
+msgid ""
+"The KBibTeX part has problems to initialize itself. Only limited "
+"functionality will be available."
+msgstr ""
+
+#: kbibtex_part.cpp:695
+msgid "KBibTeX Part"
+msgstr ""
+
+#: kbibtex_part.cpp:742
+msgid "KBibTeXPart"
+msgstr ""
+
+#: kbibtexshell.cpp:76
+msgid "Could not find our part!"
+msgstr ""
+
+#: kbibtexshell.cpp:145
+msgid ""
+"Click to open a file\n"
+"Click and hold to open a recent file"
+msgstr ""
+
+#: kbibtexshell.cpp:182
+msgid "Create a new window for a new BibTeX file"
+msgstr ""
+
+#: kbibtexshell.cpp:184
+msgid "Open an existing BibTeX file"
+msgstr ""
+
+#: kbibtexshell.cpp:187
+msgid ""
+"This lists files which you have opened recently, and allows you to easily "
+"open them again."
+msgstr ""
+
+#: kbibtexshell.cpp:191
+msgid "Close this KBibTeX window"
+msgstr ""
+
+#: kbibtexshell.cpp:196
+msgid "Show or hide the window's status bar"
+msgstr ""
+
+#: kbibtexshell.cpp:198
+msgid "Configure key bindings for KBibTeX"
+msgstr ""
+
+#: kbibtexshell.cpp:199
+msgid "Configure the tool bar for KBibTeX"
+msgstr ""
+
+#: kbibtexshell.cpp:350 main.cpp:95
+msgid "Could not open file '%1'."
+msgstr ""
+
+#: macrowidget.cpp:39
+msgid "Edit BibTeX Macro"
+msgstr ""
+
+#: macrowidget.cpp:84
+msgid "Macro &id:"
+msgstr ""
+
+#: macrowidget.cpp:91
+msgid "Macro &value:"
+msgstr ""
+
+#: main.cpp:40
+msgid "A BibTeX editor for KDE"
+msgstr ""
+
+#: main.cpp:46
+msgid "Document to open."
+msgstr ""
+
+#: main.cpp:111
+msgid "KBibTeX"
+msgstr ""
+
+#: main.cpp:114
+msgid "NAME OF TRANSLATORS"
+msgstr ""
+
+#: main.cpp:114
+msgid "EMAIL OF TRANSLATORS"
+msgstr ""
+
+#: mergeelements.cpp:112
+msgid "Preamble text"
+msgstr ""
+
+#: mergeelements.cpp:124
+msgid "Next"
+msgstr ""
+
+#: mergeelements.cpp:124
+msgid "Previous"
+msgstr ""
+
+#: mergeelements.cpp:143
+msgid ""
+"Select elements to merge. At least two elements must be checked to perform a "
+"merge operation. Checked entries will be replaced by the merged element, "
+"unchecked elements will be kept."
+msgstr ""
+
+#: mergeelements.cpp:147
+msgid "Entry/Macro Id"
+msgstr ""
+
+#: mergeelements.cpp:159
+msgid ""
+"Choose from this list which alternatives you want to keep in the merged "
+"element."
+msgstr ""
+
+#: mergeelements.cpp:163
+msgid "Field/Key"
+msgstr ""
+
+#: mergeelements.cpp:492
+msgid "No duplicates found."
+msgstr ""
+
+#: mergeelements.cpp:557
+msgid "Id"
+msgstr ""
+
+#: preamblewidget.cpp:33
+msgid "Edit BibTeX Preamble"
+msgstr ""
+
+#: preamblewidget.cpp:76
+msgid "&Preamble:"
+msgstr ""
+
+#: rc.cpp:6 rc.cpp:36
+msgid "E&lement"
+msgstr ""
+
+#: rc.cpp:15 rc.cpp:27 rc.cpp:45 rc.cpp:57
+msgid "Se&ttings"
+msgstr ""
+
+#: searchbar.cpp:92
+msgid "Add a new BibTeX entry, comment or macro to this file"
+msgstr ""
+
+#: searchbar.cpp:97
+msgid "Add a new BibTeX entry from an online database"
+msgstr ""
+
+#: searchbar.cpp:105
+msgid "Erase current search pattern"
+msgstr ""
+
+#: searchbar.cpp:108
+msgid "&Search:"
+msgstr ""
+
+#: searchbar.cpp:121
+msgid "Exact"
+msgstr ""
+
+#: searchbar.cpp:122
+msgid "Every word"
+msgstr ""
+
+#: searchbar.cpp:123
+msgid "Any word"
+msgstr ""
+
+#: searchbar.cpp:126
+msgid "Restrict to:"
+msgstr ""
+
+#: searchbar.cpp:133
+msgid "All fields"
+msgstr ""
+
+#: settings.cpp:57
+msgid "Could not determine filename for XSLT file"
+msgstr ""
+
+#: settings.cpp:57
+msgid "Initialization failed"
+msgstr ""
+
+#: settings.cpp:639
+msgid "Crossref"
+msgstr ""
+
+#: settings.cpp:691 settings.cpp:730
+msgid "Unknown"
+msgstr ""
+
+#: settings.cpp:706
+msgid "Collection"
+msgstr ""
+
+#: settings.cpp:708
+msgid "Electronic"
+msgstr ""
+
+#: settingsdlg.cpp:42
+msgid "&Editing"
+msgstr ""
+
+#: settingsdlg.cpp:48
+msgid "&File Open&&Save"
+msgstr ""
+
+#: settingsdlg.cpp:54
+msgid "&Search URLs"
+msgstr ""
+
+#: settingsdlg.cpp:60
+msgid "Global &Keywords"
+msgstr ""
+
+#: settingsdlg.cpp:66 settingsidsuggestions.cpp:337
+msgid "Id Suggestions"
+msgstr ""
+
+#: settingsdlg.cpp:72
+msgid "User Defined Fields"
+msgstr ""
+
+#: settingsdlg.cpp:79 webqueryz3950.cpp:188 webqueryz3950.cpp:193
+msgid "Z39.50"
+msgstr ""
+
+#: settingsediting.cpp:56
+msgid "Path to add:"
+msgstr ""
+
+#: settingsediting.cpp:63
+msgid "Select a path to add"
+msgstr ""
+
+#: settingsediting.cpp:67
+msgid "Add chosen path to list"
+msgstr ""
+
+#: settingsediting.cpp:70
+msgid "List of paths:"
+msgstr ""
+
+#: settingsediting.cpp:73
+msgid "Path"
+msgstr ""
+
+#: settingsediting.cpp:82
+msgid "Remove selected path from list"
+msgstr ""
+
+#: settingsediting.cpp:99
+msgid "Edit Document Search Paths"
+msgstr ""
+
+#: settingsediting.cpp:140
+msgid "Folder '%1' does not exist or is not readable."
+msgstr ""
+
+#: settingsediting.cpp:160
+msgid "Main List"
+msgstr ""
+
+#: settingsediting.cpp:162
+msgid "&Sorting:"
+msgstr ""
+
+#: settingsediting.cpp:174
+msgid "So&rting order:"
+msgstr ""
+
+#: settingsediting.cpp:176
+msgid "Ascending"
+msgstr ""
+
+#: settingsediting.cpp:177
+msgid "Descending"
+msgstr ""
+
+#: settingsediting.cpp:180
+msgid "&Double click action:"
+msgstr ""
+
+#: settingsediting.cpp:182
+msgid "Edit element"
+msgstr ""
+
+#: settingsediting.cpp:183
+msgid "Open document"
+msgstr ""
+
+#: settingsediting.cpp:186
+msgid "On dragging with mouse:"
+msgstr ""
+
+#: settingsediting.cpp:188
+msgid "Copy reference (\\cite{...})"
+msgstr ""
+
+#: settingsediting.cpp:189
+msgid "Copy BibTeX text (@article{...})"
+msgstr ""
+
+#: settingsediting.cpp:192
+msgid "Entry Editing"
+msgstr ""
+
+#: settingsediting.cpp:196
+msgid "Search Bar"
+msgstr ""
+
+#: settingsediting.cpp:198
+msgid "Reset field filter when changing filter text"
+msgstr ""
+
+#: settingsediting.cpp:200
+msgid "Presentation"
+msgstr ""
+
+#: settingsediting.cpp:202
+msgid "Use special &font"
+msgstr ""
+
+#: settingsediting.cpp:204
+msgid "Author and editor names:"
+msgstr ""
+
+#: settingsediting.cpp:207
+msgid "John Doe"
+msgstr ""
+
+#: settingsediting.cpp:208
+msgid "Doe, John"
+msgstr ""
+
+#: settingsediting.cpp:209
+msgid "Show names as 'John Doe' instead of 'Doe, John'"
+msgstr ""
+
+#: settingsediting.cpp:210
+msgid ""
+"Show names as 'John Doe' instead of 'Doe, John'.\n"
+"\n"
+"Takes only effect after the next start of KBibTeX."
+msgstr ""
+
+#: settingsediting.cpp:212
+msgid "Document Search Paths"
+msgstr ""
+
+#: settingsediting.cpp:214
+msgid "Edit Search Paths"
+msgstr ""
+
+#: settingsediting.cpp:218
+msgid "Sensitivity:"
+msgstr ""
+
+#: settingsediting.cpp:221
+msgid "Low"
+msgstr ""
+
+#: settingsediting.cpp:228
+msgid "High"
+msgstr ""
+
+#: settingsfileio.cpp:53
+msgid "English|German|French|Spanish|Swedish"
+msgstr ""
+
+#: settingsfileio.cpp:58
+msgid ""
+"plain|achemso (American Chemical Society)|alpha|unsrt|abbrv|acm (Association "
+"of Computing Machinery)|apacite|apalike|authordate|ieeetr|natbib|siam"
+msgstr ""
+
+#: settingsfileio.cpp:177
+msgid "XSLT Stylesheet"
+msgstr ""
+
+#: settingsfileio.cpp:201
+msgid "No exporter available"
+msgstr ""
+
+#: settingsfileio.cpp:223
+msgid "Path to the jar files for bib2db5"
+msgstr ""
+
+#: settingsfileio.cpp:236
+msgid ""
+"To export DocBook5 bibliographies, the path to the jar file for bib2db5 has "
+"to be set first."
+msgstr ""
+
+#: settingsfileio.cpp:236
+msgid "Invalid path for bib2db5"
+msgstr ""
+
+#: settingsfileio.cpp:244
+msgid "BibTeX Import and Export"
+msgstr ""
+
+#: settingsfileio.cpp:246
+msgid "&Encoding:"
+msgstr ""
+
+#: settingsfileio.cpp:249
+msgid "Text &delimiters:"
+msgstr ""
+
+#: settingsfileio.cpp:252
+msgid "Keyword casing:"
+msgstr ""
+
+#: settingsfileio.cpp:255
+msgid "Protect title's casing:"
+msgstr ""
+
+#: settingsfileio.cpp:256
+msgid "Put curly brackets around"
+msgstr ""
+
+#: settingsfileio.cpp:257
+msgid "Put curly brackets around title and other selected fields."
+msgstr ""
+
+#: settingsfileio.cpp:258
+msgid ""
+"Put curly brackets around title and other selected fields to protect them "
+"from case changes in certain BibTeX styles."
+msgstr ""
+
+#: settingsfileio.cpp:260
+msgid "PDF, PostScript and Rich Text Format Export"
+msgstr ""
+
+#: settingsfileio.cpp:262
+msgid ""
+"Select the layout of the resulting PDF, PostScript or Rich Text Format "
+"document when exporting a BibTeX file."
+msgstr ""
+
+#: settingsfileio.cpp:263
+msgid "&Language:"
+msgstr ""
+
+#: settingsfileio.cpp:266
+msgid "&Biblography style:"
+msgstr ""
+
+#: settingsfileio.cpp:270
+msgid "PDF Export"
+msgstr ""
+
+#: settingsfileio.cpp:272
+msgid "Embed local files into PDF if possible"
+msgstr ""
+
+#: settingsfileio.cpp:273
+msgid ""
+"<qt>If checked, KBibTeX tries to embed all referenced files for the BibTeX "
+"entries into the exported PDF file.<br/>This requires that you have "
+"installed <tt>embedfile.sty</tt>.</qt>"
+msgstr ""
+
+#: settingsfileio.cpp:275
+msgid "XML Export"
+msgstr ""
+
+#: settingsfileio.cpp:278
+msgid "Path to the jar files for bib2db5:"
+msgstr ""
+
+#: settingsfileio.cpp:293
+msgid "Export Systems"
+msgstr ""
+
+#: settingsfileio.cpp:295
+msgid "HTML:"
+msgstr ""
+
+#: settingsfileio.cpp:299
+msgid "BibUtils"
+msgstr ""
+
+#: settingsfileio.cpp:301
+msgid "Always use BibUtils"
+msgstr ""
+
+#: settingsfileio.cpp:302
+msgid "If possible, use BibUtils to import and export alien bibliography."
+msgstr ""
+
+#: settingsfileio.cpp:303
+msgid ""
+"If possible, use BibUtils to import and export alien bibliography such as "
+"RIS.\n"
+"If unchecked, prefer internal import and export library."
+msgstr ""
+
+#: settingsfileio.cpp:307
+msgid "Backups"
+msgstr ""
+
+#: settingsfileio.cpp:309
+msgid "Number of Backups:"
+msgstr ""
+
+#: settingsidsuggestions.cpp:90
+#, c-format
+msgid ""
+"\n"
+"Example: %1"
+msgstr ""
+
+#: settingsidsuggestions.cpp:345
+msgid ""
+"_: id suggestion\n"
+"New"
+msgstr ""
+
+#: settingsidsuggestions.cpp:349
+msgid ""
+"_: id suggestion\n"
+"Edit"
+msgstr ""
+
+#: settingsidsuggestions.cpp:353
+msgid ""
+"_: id suggestion\n"
+"Delete"
+msgstr ""
+
+#: settingsidsuggestions.cpp:357
+msgid ""
+"_: id suggestion\n"
+"Up"
+msgstr ""
+
+#: settingsidsuggestions.cpp:361
+msgid ""
+"_: id suggestion\n"
+"Down"
+msgstr ""
+
+#: settingsidsuggestions.cpp:365
+msgid "Toogle default"
+msgstr ""
+
+#: settingsidsuggestions.cpp:370
+msgid "Use default id suggestion when editing new entries"
+msgstr ""
+
+#: settingsidsuggestions.cpp:373
+msgid "Small Words:"
+msgstr ""
+
+#: settingsidsuggestions.cpp:386
+msgid "Small Words"
+msgstr ""
+
+#: settingskeyword.cpp:83
+msgid "New Keyword"
+msgstr ""
+
+#: settingskeyword.cpp:131
+#, c-format
+msgid ""
+"_n: 1 keyword has been imported.\n"
+"%n keywords have been imported."
+msgstr ""
+
+#: settingskeyword.cpp:131
+msgid "Keywords imported"
+msgstr ""
+
+#: settingskeyword.cpp:172
+msgid ""
+"_: keyword\n"
+"Delete"
+msgstr ""
+
+#: settingskeyword.cpp:176
+msgid ""
+"_: keyword\n"
+"Import"
+msgstr ""
+
+#: settingssearchurl.cpp:108
+msgid ""
+"The list of URLs will be checked and known entries will be replaced by the "
+"program standards. Search entries you have defined by yourself will be kept "
+"most likely."
+msgstr ""
+
+#: settingssearchurl.cpp:108
+msgid "Reset list of URLs"
+msgstr ""
+
+#: settingssearchurl.cpp:108 settingsz3950.cpp:297
+msgid "Reset"
+msgstr ""
+
+#: settingssearchurl.cpp:133
+msgid "Description"
+msgstr ""
+
+#: settingssearchurl.cpp:140
+msgid ""
+"_: search url\n"
+"New"
+msgstr ""
+
+#: settingssearchurl.cpp:144
+msgid ""
+"_: search url\n"
+"Edit"
+msgstr ""
+
+#: settingssearchurl.cpp:148
+msgid ""
+"_: search url\n"
+"Delete"
+msgstr ""
+
+#: settingssearchurl.cpp:152
+msgid ""
+"_: search url\n"
+"Reset"
+msgstr ""
+
+#: settingssearchurl.cpp:170
+msgid "New URL"
+msgstr ""
+
+#: settingssearchurl.cpp:170
+msgid "Edit URL"
+msgstr ""
+
+#: settingssearchurl.cpp:173
+msgid "Description:"
+msgstr ""
+
+#: settingssearchurl.cpp:178
+msgid "URL:"
+msgstr ""
+
+#: settingssearchurl.cpp:184
+msgid "Within the URL, '%1' will be replaced by the search term."
+msgstr ""
+
+#: settingssearchurl.cpp:185
+msgid "Include Author:"
+msgstr ""
+
+#: settingsuserdefinedinput.cpp:62 settingsuserdefinedinput.cpp:74
+#: settingsuserdefinedinput.cpp:229 settingsuserdefinedinput.cpp:238
+#: settingsuserdefinedinput.cpp:251 settingsuserdefinedinput.cpp:257
+msgid "Single line"
+msgstr ""
+
+#: settingsuserdefinedinput.cpp:74 settingsuserdefinedinput.cpp:230
+#: settingsuserdefinedinput.cpp:251 settingsuserdefinedinput.cpp:257
+msgid "Multiple lines"
+msgstr ""
+
+#: settingsuserdefinedinput.cpp:168
+msgid "Name"
+msgstr ""
+
+#: settingsuserdefinedinput.cpp:170
+msgid "Label"
+msgstr ""
+
+#: settingsuserdefinedinput.cpp:180
+msgid ""
+"_: user-defined input\n"
+"New"
+msgstr ""
+
+#: settingsuserdefinedinput.cpp:183
+msgid ""
+"_: user-defined input\n"
+"Edit"
+msgstr ""
+
+#: settingsuserdefinedinput.cpp:186
+msgid ""
+"_: user-defined input\n"
+"Delete"
+msgstr ""
+
+#: settingsuserdefinedinput.cpp:189
+msgid ""
+"_: user-defined input\n"
+"Up"
+msgstr ""
+
+#: settingsuserdefinedinput.cpp:193
+msgid ""
+"_: user-defined input\n"
+"Down"
+msgstr ""
+
+#: settingsuserdefinedinput.cpp:210
+msgid "New Field"
+msgstr ""
+
+#: settingsuserdefinedinput.cpp:210
+msgid "Edit Field"
+msgstr ""
+
+#: settingsuserdefinedinput.cpp:213 settingsz3950.cpp:71
+msgid "Name:"
+msgstr ""
+
+#: settingsuserdefinedinput.cpp:218
+msgid "Label:"
+msgstr ""
+
+#: settingsuserdefinedinput.cpp:224
+msgid "Input Type:"
+msgstr ""
+
+#: settingsz3950.cpp:77
+msgid "Database:"
+msgstr ""
+
+#: settingsz3950.cpp:83
+msgid "Host:"
+msgstr ""
+
+#: settingsz3950.cpp:89
+msgid "Port:"
+msgstr ""
+
+#: settingsz3950.cpp:98
+msgid "User:"
+msgstr ""
+
+#: settingsz3950.cpp:104
+msgid "Password:"
+msgstr ""
+
+#: settingsz3950.cpp:110
+msgid "Syntax:"
+msgstr ""
+
+#: settingsz3950.cpp:122
+msgid "Locale:"
+msgstr ""
+
+#: settingsz3950.cpp:149
+msgid "Edit Z39.50 Server"
+msgstr ""
+
+#: settingsz3950.cpp:297
+msgid "All Z39.50 server configurations will be reset to defaults."
+msgstr ""
+
+#: settingsz3950.cpp:297
+msgid "Reset to Default"
+msgstr ""
+
+#: settingsz3950.cpp:324
+msgid ""
+"_: z3950 server\n"
+"Name"
+msgstr ""
+
+#: settingsz3950.cpp:325
+msgid ""
+"_: z3950 server\n"
+"Database"
+msgstr ""
+
+#: settingsz3950.cpp:334
+msgid ""
+"_: z3950 server\n"
+"New"
+msgstr ""
+
+#: settingsz3950.cpp:338
+msgid ""
+"_: z3950 server\n"
+"Edit"
+msgstr ""
+
+#: settingsz3950.cpp:342
+msgid ""
+"_: z3950 server\n"
+"Delete"
+msgstr ""
+
+#: settingsz3950.cpp:346
+msgid ""
+"_: z3950 server\n"
+"Up"
+msgstr ""
+
+#: settingsz3950.cpp:350
+msgid ""
+"_: z3950 server\n"
+"Down"
+msgstr ""
+
+#: settingsz3950.cpp:355
+msgid ""
+"_: z3950 server\n"
+"Reset"
+msgstr ""
+
+#: sidebar.cpp:113
+msgid "Toggle between showing all fields or only important fields"
+msgstr ""
+
+#: sidebar.cpp:117
+msgid "Filter this sidebar for a given field"
+msgstr ""
+
+#: sidebar.cpp:124
+msgid ""
+"Toggle between selecting only one item or multiple items (AND-connected in "
+"search)"
+msgstr ""
+
+#: sidebar.cpp:127
+msgid "#"
+msgstr ""
+
+#: sidebar.cpp:128
+msgid "Items"
+msgstr ""
+
+#: sidebar.cpp:135
+msgid "Rename all occurrences"
+msgstr ""
+
+#: valuewidget.cpp:39
+msgid "Edit field '%1'"
+msgstr ""
+
+#: valuewidget.cpp:137
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewValue%1"
+msgstr ""
+
+#: valuewidget.cpp:205
+msgid "Checked entries are string keys, unchecked entries are quoted text."
+msgstr ""
+
+#: valuewidget.cpp:232
+msgid "Toggle"
+msgstr ""
+
+#: webquery.cpp:94 webquerycsb.cpp:83 webquerydblp.cpp:68
+#: webquerymathscinet.cpp:61 webqueryspireshep.cpp:99
+msgid "Search &term:"
+msgstr ""
+
+#: webquery.cpp:105 webquerycsb.cpp:103 webquerydblp.cpp:79
+#: webquerysciencedirect.cpp:165 webqueryz3950.cpp:102
+msgid "&Number of results:"
+msgstr ""
+
+#: webquery.cpp:153
+msgid "Searching"
+msgstr ""
+
+#: webquery.cpp:153
+#, c-format
+msgid "Searching %1"
+msgstr ""
+
+#: webquery.cpp:315
+msgid "&Import"
+msgstr ""
+
+#: webquery.cpp:315
+msgid "Import selected items"
+msgstr ""
+
+#: webquery.cpp:363
+#, c-format
+msgid "Search %1"
+msgstr ""
+
+#: webquery.cpp:402
+msgid ""
+"You do not have the necessary permissions to query data from this service."
+msgstr ""
+
+#: webquery.cpp:431
+msgid "&Engine:"
+msgstr ""
+
+#: webquery.cpp:442
+msgid "&Search"
+msgstr ""
+
+#: webquery.cpp:468
+msgid "Import all hits"
+msgstr ""
+
+#: webqueryamatex.cpp:55
+msgid "Amatex"
+msgstr ""
+
+#: webqueryamatex.cpp:60
+msgid "About Amatex"
+msgstr ""
+
+#: webqueryamatex.cpp:111 webquerybibsonomy.cpp:116 webquerycitebase.cpp:118
+#: webquerycsb.cpp:280 webquerydblp.cpp:204 webqueryieeexplore.cpp:156
+#: webquerymathscinet.cpp:176 webquerypubmed.cpp:159 webquerypubmed.cpp:171
+#: webqueryspireshep.cpp:206 webqueryzmath.cpp:113
+msgid "Querying database '%1' failed."
+msgstr ""
+
+#: webqueryarxiv.cpp:78
+msgid "arXiv"
+msgstr ""
+
+#: webqueryarxiv.cpp:83
+msgid "arXiv is an archive for preprints"
+msgstr ""
+
+#: webquerybibsonomy.cpp:63
+msgid "BibSonomy"
+msgstr ""
+
+#: webquerybibsonomy.cpp:68
+msgid "BibSonomy bookmark sharing system"
+msgstr ""
+
+#: webquerycitebase.cpp:62
+msgid "Citebase"
+msgstr ""
+
+#: webquerycitebase.cpp:67
+msgid "Citebase citation index"
+msgstr ""
+
+#: webqueryciteseerx.cpp:83
+msgid "CiteSeerX"
+msgstr ""
+
+#: webqueryciteseerx.cpp:92
+msgid "About CiteSeerX"
+msgstr ""
+
+#: webquerycsb.cpp:90
+msgid ""
+"_: Here, \"Field\" refers to a parameter for the CSB search (author, title, "
+"any)\n"
+"&Field:"
+msgstr ""
+
+#: webquerycsb.cpp:111
+msgid "&Year:"
+msgstr ""
+
+#: webquerycsb.cpp:125
+msgid "Sort &by:"
+msgstr ""
+
+#: webquerycsb.cpp:134
+msgid "Online papers only"
+msgstr ""
+
+#: webquerycsb.cpp:137 webqueryz3950.cpp:59
+msgid "any"
+msgstr ""
+
+#: webquerycsb.cpp:138 webqueryspireshep.cpp:86 webqueryz3950.cpp:59
+msgid "author"
+msgstr ""
+
+#: webquerycsb.cpp:139 webqueryspireshep.cpp:87 webqueryz3950.cpp:59
+msgid "title"
+msgstr ""
+
+#: webquerycsb.cpp:140
+msgid "exact"
+msgstr ""
+
+#: webquerycsb.cpp:141
+msgid "until"
+msgstr ""
+
+#: webquerycsb.cpp:142
+msgid "from"
+msgstr ""
+
+#: webquerycsb.cpp:144
+msgid "none"
+msgstr ""
+
+#: webquerycsb.cpp:145
+msgid "score"
+msgstr ""
+
+#: webquerycsb.cpp:146
+msgid "year"
+msgstr ""
+
+#: webquerycsb.cpp:171
+msgid "Computer Science Bibliographies"
+msgstr ""
+
+#: webquerycsb.cpp:176
+msgid "Copyright for the Bibliography Collection"
+msgstr ""
+
+#: webquerydblp.cpp:89
+msgid "Do not merge corresponding entries"
+msgstr ""
+
+#: webquerydblp.cpp:110
+msgid "DBLP"
+msgstr ""
+
+#: webquerydblp.cpp:115
+msgid "DBLP - Copyright"
+msgstr ""
+
+#: webquerygooglescholar.cpp:69
+msgid "Google Scholar"
+msgstr ""
+
+#: webquerygooglescholar.cpp:74
+msgid "About Google Scholar"
+msgstr ""
+
+#: webqueryieeexplore.cpp:67
+msgid "IEEExplore"
+msgstr ""
+
+#: webqueryieeexplore.cpp:72
+msgid "What is IEEE Xplore?"
+msgstr ""
+
+#: webqueryieeexplore.cpp:109
+msgid "You have entered an invalid search."
+msgstr ""
+
+#: webqueryieeexplore.cpp:109
+msgid "Search Error"
+msgstr ""
+
+#: webquerymathscinet.cpp:81
+msgid ""
+"<qt>Use the same synatx as for <a "
+"href=\"http://www.math.tamu.edu/~comech/tools/bibget/\">BIBGET</a>. For "
+"spaces within a search element, use \"<tt>+</tt>\".<br/>Example: "
+"<tt>a=gilkey t=invariance book 1984</tt></qt>"
+msgstr ""
+
+#: webquerymathscinet.cpp:102
+msgid "MathSciNet"
+msgstr ""
+
+#: webquerymathscinet.cpp:107
+msgid "American Mathematical Society"
+msgstr ""
+
+#: webquerypubmed.cpp:67
+msgid "NCBI (PubMed)"
+msgstr ""
+
+#: webquerypubmed.cpp:72
+msgid "NCBI's Disclaimer and Copyright"
+msgstr ""
+
+#: webquerysciencedirect.cpp:84
+msgid "Title, abstract, keywords:"
+msgstr ""
+
+#: webquerysciencedirect.cpp:103
+msgid "Author:"
+msgstr ""
+
+#: webquerysciencedirect.cpp:120
+msgid "Journal/book title:"
+msgstr ""
+
+#: webquerysciencedirect.cpp:135
+msgid "Volume:"
+msgstr ""
+
+#: webquerysciencedirect.cpp:145
+msgid "Issue:"
+msgstr ""
+
+#: webquerysciencedirect.cpp:155
+msgid "Page:"
+msgstr ""
+
+#: webquerysciencedirect.cpp:196
+msgid "ScienceDirect"
+msgstr ""
+
+#: webquerysciencedirect.cpp:201
+msgid "About ScienceDirect"
+msgstr ""
+
+#: webqueryspireshep.cpp:42
+msgid "DESY (Germany)"
+msgstr ""
+
+#: webqueryspireshep.cpp:42
+msgid "FNAL (U.S.A.)"
+msgstr ""
+
+#: webqueryspireshep.cpp:42
+msgid "IHEP (Russia)"
+msgstr ""
+
+#: webqueryspireshep.cpp:42
+msgid "Durham U (U.K.)"
+msgstr ""
+
+#: webqueryspireshep.cpp:42
+msgid "SLAC (U.S.A.)"
+msgstr ""
+
+#: webqueryspireshep.cpp:42
+msgid "YITP (Japan)"
+msgstr ""
+
+#: webqueryspireshep.cpp:42
+msgid "LIPI (Indonesia)"
+msgstr ""
+
+#: webqueryspireshep.cpp:78
+msgid "Type:"
+msgstr ""
+
+#: webqueryspireshep.cpp:85
+msgid "raw query"
+msgstr ""
+
+#: webqueryspireshep.cpp:88
+msgid "journal"
+msgstr ""
+
+#: webqueryspireshep.cpp:89
+msgid "EPrint number"
+msgstr ""
+
+#: webqueryspireshep.cpp:90
+msgid "report number"
+msgstr ""
+
+#: webqueryspireshep.cpp:91
+msgid "keywords"
+msgstr ""
+
+#: webqueryspireshep.cpp:109
+msgid "Include abstracts from arxiv.org if available"
+msgstr ""
+
+#: webqueryspireshep.cpp:130
+msgid "SPIRES-HEP"
+msgstr ""
+
+#: webqueryspireshep.cpp:135
+msgid "SPIRES-HEP Search"
+msgstr ""
+
+#: webqueryz3950.cpp:59
+msgid "publisher"
+msgstr ""
+
+#: webqueryz3950.cpp:94
+msgid "Server:"
+msgstr ""
+
+#: webqueryz3950.cpp:116
+msgid "Search term 1:"
+msgstr ""
+
+#: webqueryz3950.cpp:126 webqueryz3950.cpp:147
+msgid "Search in:"
+msgstr ""
+
+#: webqueryz3950.cpp:138
+msgid "Search term 2:"
+msgstr ""
+
+#: webqueryz3950.cpp:163
+msgid "and"
+msgstr ""
+
+#: webqueryz3950.cpp:164
+msgid "or"
+msgstr ""
+
+#: webqueryz3950.cpp:330
+#, c-format
+msgid ""
+"The server returned the following message:\n"
+"\n"
+"%1"
+msgstr ""
+
+#: webqueryz3950.cpp:330
+msgid "Error querying Z39.50 server"
+msgstr ""
+
+#: webqueryzmath.cpp:61
+msgid "Zentralblatt MATH"
+msgstr ""
+
+#: webqueryzmath.cpp:66
+msgid "About Zentralblatt MATH"
+msgstr ""
+
+#: z3950connection.cpp:158
+msgid "Query error!"
+msgstr ""
+
+#: z3950connection.cpp:205
+msgid "Connection search error %1: %2"
+msgstr ""
+
+#: z3950connection.cpp:294
+msgid "Record syntax error"
+msgstr ""
+
+#: z3950connection.cpp:405
+msgid "Connection error %1: %2"
+msgstr ""
diff --git a/po/messages.sh b/po/messages.sh
new file mode 100755
index 0000000..d47478e
--- /dev/null
+++ b/po/messages.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+export PATH="/usr/kde/3.5/bin/${PATH/kde\/4.2/kde/3.5}"
+
+if [ -z "$1" ] ; then
+ msgmergebin=`which msgmerge`
+elif [ -x "$1" ] ; then
+ msgmergebin="$1"
+else
+ echo "The given parameter does not point to an executable file" >&2
+ exit 2
+fi
+
+$msgmergebin --version |grep -q 0.10.35 || { echo "The provided msgmerge binary is most likely a non-KDE version." >&2 ; echo "Please provide the patched version as a parameter for this script." >&2 ; exit 1 ; }
+echo $msgmergebin
+$msgmergebin --version
+
+PROJECT=kbibtex
+
+cd .. ; make -f admin/Makefile.common package-messages ; cd po
+
+catalogs=`find . -name '*.po'`
+for cat in $catalogs; do
+ echo $cat
+ $msgmergebin -o $cat.new $cat ${PROJECT}.pot && mv $cat.new $cat
+done
+
+echo "Done"
diff --git a/po/pl.po b/po/pl.po
new file mode 100644
index 0000000..8ce8999
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,2765 @@
+# translation of pl.po to Polish
+#
+# Michał Smoczyk <msmoczyk@wp.pl>, 2008, 2009, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: pl\n"
+"POT-Creation-Date: 2010-07-01 13:55+0200\n"
+"PO-Revision-Date: 2010-07-02 12:24+0200\n"
+"Last-Translator: Michał Smoczyk <msmoczyk@wp.pl>\n"
+"Language-Team: Polish <pl@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Report-Msgid-Bugs-To: \n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: _translatorinfo.cpp:1
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Michał Smoczyk"
+
+#: _translatorinfo.cpp:3
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "msmoczyk@wp.pl"
+
+#: commentwidget.cpp:55
+msgid "Co&mment:"
+msgstr "Ko&mentarz:"
+
+#: commentwidget.cpp:64
+msgid "&Use @Comment for comment instead of plain text"
+msgstr "&Użyj @Comment dla komentarza zamiast zwykłego tekstu"
+
+#: commentwidget.cpp:82
+msgid "Edit BibTeX Comment"
+msgstr "Edytuj komentarz BibTeX"
+
+#: documentlistview.cpp:120
+msgid "List View"
+msgstr "Widok listy"
+
+#: documentlistview.cpp:120
+msgid "Updating main view ..."
+msgstr "Aktualizacja głównego widoku..."
+
+#: documentlistview.cpp:253
+msgid "Show Columns"
+msgstr "Pokaż kolumny"
+
+#: documentlistview.cpp:259 documentlistview.cpp:756 settingsediting.cpp:164
+msgid "Element Type"
+msgstr "Typ elementu"
+
+#: documentlistview.cpp:450
+msgid "Paste text as..."
+msgstr "Wklej tekst jako..."
+
+#: documentlistview.cpp:757 settingsediting.cpp:165
+msgid "Entry Id"
+msgstr "Identyfikator wpisu"
+
+#: documentlistviewitem.cpp:114 kbibtex_part.cpp:506
+msgid "Comment"
+msgstr "Komentarz"
+
+#: documentlistviewitem.cpp:124 kbibtex_part.cpp:507 macrowidget.cpp:93
+msgid "Macro"
+msgstr "Makro"
+
+#: documentlistviewitem.cpp:138 kbibtex_part.cpp:505 preamblewidget.cpp:78
+msgid "Preamble"
+msgstr "Nagłówek"
+
+#: documentsourceview.cpp:214
+msgid "Source View"
+msgstr "Widok źródła"
+
+#: documentsourceview.cpp:214
+msgid "Converting BibTeX document to plain text ..."
+msgstr "Konwertowanie dokumentu BibTeX do zwykłego tekstu..."
+
+#: documentsourceview.cpp:369
+msgid ""
+"Could not find text '%1' in the document.\n"
+"Start from the beginning?"
+msgstr ""
+"Nie można znaleźć tekstu \"%1\" w dokumencie.\n"
+"Zacząć od początku?"
+
+#: documentsourceview.cpp:369
+msgid "Find text in source view"
+msgstr "Znajdź tekst w widoku źródła"
+
+#: documentsourceview.cpp:369
+msgid "Restart search"
+msgstr "Uruchom szukanie ponownie"
+
+#: documentwidget.cpp:120
+msgid "L&ist view"
+msgstr "Widok &listy"
+
+#: documentwidget.cpp:142
+msgid "So&urce view"
+msgstr "Widok źró&dła"
+
+#: documentwidget.cpp:174
+msgid "<qt>Loading file <b>%1</b></qt>"
+msgstr "<qt>Wczytywanie pliku <b>%1</b></qt>"
+
+#: documentwidget.cpp:221
+msgid "Do you want to search for duplicates in the merged document?"
+msgstr "Czy chcesz wyszukać duplikaty w połączonym dokumencie?"
+
+#: documentwidget.cpp:221
+msgid "Find duplicates?"
+msgstr "Szukać duplikatów?"
+
+#: documentwidget.cpp:221 findduplicates.cpp:58 mergeelements.cpp:484
+#: mergeelements.cpp:492 settingsediting.cpp:216
+msgid "Find Duplicates"
+msgstr "Znajdź duplikaty"
+
+#: documentwidget.cpp:281 documentwidget.cpp:1345 documentwidget.cpp:1359
+#: kbibtex_part.cpp:306 kbibtex_part.cpp:320
+msgid "Choose file format"
+msgstr "Wybierz format pliku"
+
+#: documentwidget.cpp:281 documentwidget.cpp:1345 documentwidget.cpp:1359
+#: kbibtex_part.cpp:306 kbibtex_part.cpp:320
+msgid "Choose file format of file '%1':"
+msgstr "Wybierz format pliku \"%1\":"
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid ""
+"The selected filename \"%1\" is a symbolic link pointing to \"%2\".\n"
+"Replace the link with a new file or overwrite the existing file the link "
+"points to?"
+msgstr ""
+"Wybrana nazwa pliku \"%1\" to symboliczne dowiązanie wskazujące na \"%2\".\n"
+"Zamienić odsyłacz nowym plikiem, czy też nadpisać istniejący plik, na który wskazuje dowiązanie?"
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Symbolic Link"
+msgstr "Dowiązanie symboliczne"
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Replace link"
+msgstr "Zamień odsyłacz"
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Overwrite file the link points to"
+msgstr "Nadpisz plik na który wskazuje odsyłacz"
+
+#: documentwidget.cpp:301
+msgid "<qt>Writing file <b>%1</b></qt>"
+msgstr "<qt>Zapisywanie pliku <b>%1</b></qt>"
+
+#: documentwidget.cpp:388
+msgid ""
+"To export a BibTeX document to the Rich Text Format (RTF) KBibTeX requires "
+"the program 'latex2rtf'."
+msgstr ""
+"Eksportowanie dokumentu BibTeX do formatu RTF (Rich Text Format) wymaga "
+"zainstalowania programu \"latex2rtf\"."
+
+#: documentwidget.cpp:405
+msgid ""
+"To export a BibTeX document to the DocBook5 format KBibTeX requires the "
+"program 'bib2db5'."
+msgstr ""
+"Eksportowanie dokumentu BibTeX do formatu DocBook5 wymaga zainstalowania "
+"programu \"bib2db5\"."
+
+#: documentwidget.cpp:420
+msgid ""
+"Embedding files into the PDF file is enabled, but the required file "
+"'embedfile.sty' was not found. Embedding files will be disabled."
+msgstr ""
+"Osadzanie plików w plikach PDF jest włączone, ale wymagany plik "
+"\"embedfile.sty\" nie został znaleziony. Osadzanie plików będzie "
+"wyłączone."
+
+#: documentwidget.cpp:420
+msgid "Embedding files disabled"
+msgstr "Osadzanie plików wyłączone"
+
+#: documentwidget.cpp:471
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewMacro%1"
+msgstr ""
+
+#: documentwidget.cpp:489
+msgid "Put your comment here..."
+msgstr "Dodaj tutaj swój komentarz..."
+
+#: documentwidget.cpp:543
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewString%1"
+msgstr ""
+
+#: documentwidget.cpp:544
+msgid "No text yet"
+msgstr "Brak jeszcze tekstu"
+
+#: documentwidget.cpp:548
+msgid "@comment{ Put your comment here... }"
+msgstr "@comment{ Wpisz tutaj swój komentarz... }"
+
+#: documentwidget.cpp:552
+msgid "@preamble{\"Put your preamble here using double quotes...\"}"
+msgstr "@preamble{\"Dodaj tutaj nagłówek objęty cudzysłowem...\"}"
+
+#: documentwidget.cpp:568
+msgid "REQUIRED"
+msgstr "WYMAGANY"
+
+#: documentwidget.cpp:568
+msgid "optional"
+msgstr "opcjonalny"
+
+#: documentwidget.cpp:610
+#, c-format
+msgid ""
+"_n: This BibTeX file contains 1 element.\n"
+"This BibTeX file contains %n elements."
+msgstr ""
+
+#: documentwidget.cpp:610
+msgid "File Statistics"
+msgstr "Statystyka pliku"
+
+#: documentwidget.cpp:806 documentwidget.cpp:815
+msgid "%1 ... %2"
+msgstr "%1 ... %2"
+
+#: documentwidget.cpp:827
+msgid "New keyword:"
+msgstr "Nowe słowo kluczowe:"
+
+#: documentwidget.cpp:999
+msgid ""
+"\n"
+"\n"
+"Either LyX is not running or has not been correctly configured to send "
+"references to."
+msgstr ""
+"\n"
+"\n"
+"LyX nie jest uruchomiony lub nie został poprawnie skonfigurowany do "
+"wysyłania do niego cytowań."
+
+#: documentwidget.cpp:1000
+msgid "Error communicating with LyX"
+msgstr "Błąd komunikacji z LyX"
+
+#: documentwidget.cpp:1007
+msgid "Cannot determine how to send references to LyX."
+msgstr "Nie można określić sposobu wysłania cytowania do LyX."
+
+#: documentwidget.cpp:1012
+msgid "The inpipe as configured in LyX does not exist."
+msgstr "Potok skonfigurowany w LyX nie istnieje."
+
+#: documentwidget.cpp:1016
+msgid "Cannot open the inpipe as configured in LyX."
+msgstr "Nie można utworzyć potoku skonfigurowanego w LyX."
+
+#: documentwidget.cpp:1288 documentwidget.cpp:1293
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewEntry%1"
+msgstr ""
+
+#: documentwidget.cpp:1398
+msgid "The file '%1' does not contain a known type of bibliography."
+msgstr "Plik \"%1\" nie zawiera bibliografii znanego typu."
+
+#: documentwidget.cpp:1398
+msgid "Unknown file format"
+msgstr "Nieznany format pliku"
+
+#: documentwidget.cpp:1453
+msgid "No preview available"
+msgstr "Brak dostępnego podglądu"
+
+#: documentwidget.cpp:1554
+msgid "File '%1' has been modified. Reload file to import changes or ignore changes?"
+msgstr ""
+"Plik \"%1\" został zmodyfikowany. Wczytać plik ponownie aby zaimportować "
+"zmiany czy też zignorować zmiany?"
+
+#: documentwidget.cpp:1554
+msgid "Reload file?"
+msgstr "Czy wczytać ponownie plik?"
+
+#: documentwidget.cpp:1554
+msgid "Ignore"
+msgstr "Ignoruj"
+
+#: documentwidget.cpp:1691
+msgid "You must set a default id suggestion in the settings dialog."
+msgstr "Musisz ustawić domyślą sugestię identyfikatora w ustawieniach programu."
+
+#: documentwidget.cpp:1713
+msgid "No entries were selected."
+msgstr "Nie wybrano żadnych wpisów."
+
+#: documentwidget.cpp:1714
+#, fuzzy
+msgid ""
+"The following changes will be applied to the currently selected elements.\n"
+"Conflicts with duplicate entry ids will be resolved when applying the new "
+"ids."
+msgstr ""
+"Następujące zmiany zostaną zastosowane w aktualnie wybranych elementach.\n"
+"Konflikty ze zduplikowanymi wpisami będą rozwiązane poprzez zastosowanie nowych identyfikatorów."
+
+#: documentwidget.cpp:1714 kbibtex_part.cpp:482
+msgid "Normalize Entry Ids"
+msgstr "Normalizacja identyfikatorów wpisów"
+
+#: documentwidget.cpp:1714
+msgid "Replace Entry Ids"
+msgstr "Zamień identyfikatory wpisów"
+
+#: entrywidget.cpp:65
+msgid "Edit BibTeX Entry"
+msgstr "Edytuj wpis BibTeX"
+
+#: entrywidget.cpp:142
+msgid "The current entry has been modified. Do you want do discard your changes?"
+msgstr "Bieżący wpis został zmodyfikowany. Czy chcesz odrzucić dokonane zmiany?"
+
+#: entrywidget.cpp:142
+msgid "Discard changes"
+msgstr "Odrzuć zmiany"
+
+#: entrywidget.cpp:256
+msgid ""
+"The source code does not contain valid BibTeX code.\n"
+"\n"
+"Restore previous version or continue editing?"
+msgstr ""
+"Kod źródłowy nie zawiera poprawnego kodu BibTeX.\n"
+"\n"
+"Przywrócić poprzednią wersję czy kontynuować edycję?"
+
+#: entrywidget.cpp:256
+msgid "Invalid BibTeX code"
+msgstr "Niepoprawny kod BibTeX"
+
+#: entrywidget.cpp:314
+msgid "E&ntry Type:"
+msgstr "Typ &wpisu:"
+
+#: entrywidget.cpp:324
+msgid "&Identifier"
+msgstr "&Identyfikator"
+
+#: entrywidget.cpp:341
+msgid "Use the default id suggestion to set the entry id"
+msgstr "Użyj domyślnych sugestii identyfikatorów aby ustawić identyfikator wpisu"
+
+#: entrywidget.cpp:342
+msgid ""
+"Use the default id suggestion to set the entry id.\n"
+"You can edit and select the default id suggestion in the configuration "
+"dialog."
+msgstr ""
+"Użyj domyślnych sugestii identyfikatorów aby ustawić identyfikator "
+"wpisu.\n"
+"Możesz wybrać i edytować domyślne sugestie identyfikatorów wpisów "
+"bibliograficznych w oknie ustawień programu."
+
+#: entrywidget.cpp:350 settingsediting.cpp:194
+msgid "Enable all &fields for editing"
+msgstr "Pozwól na edycję wszystkich &pól"
+
+#: entrywidget.cpp:353
+msgid "Refetch"
+msgstr "Pobierz ponownie"
+
+#: entrywidget.cpp:361
+msgid "Message"
+msgstr "Komunikat"
+
+#: entrywidget.cpp:385 entrywidgettitle.cpp:116 entrywidgettitle.cpp:118
+#: idsuggestions.cpp:345 idsuggestionswidget.cpp:201
+#: idsuggestionswidget.cpp:485 settings.cpp:681 webquery.cpp:450
+msgid "Title"
+msgstr "Tytuł"
+
+#: entrywidget.cpp:386
+msgid "Author/Editor"
+msgstr "Autor/Edytor"
+
+#: entrywidget.cpp:387
+msgid "Publication"
+msgstr "Publikacja"
+
+#: entrywidget.cpp:388 kbibtex_part.cpp:500 settings.cpp:720
+msgid "Misc"
+msgstr "Różne"
+
+#: entrywidget.cpp:389 settings.cpp:659 settingskeyword.cpp:161
+msgid "Keywords"
+msgstr "Słowa kluczowe"
+
+#: entrywidget.cpp:390
+msgid "External"
+msgstr "Zewnętrzne"
+
+#: entrywidget.cpp:391
+msgid "User Defined"
+msgstr "Zdefiniowane przez użytkownika"
+
+#: entrywidget.cpp:392
+msgid "Other Fields"
+msgstr "Inne pola"
+
+#: entrywidget.cpp:395
+msgid "Source"
+msgstr "Źródło"
+
+#: entrywidget.cpp:438
+msgid "Please supply more fields to use the default id"
+msgstr "Proszę wypełnić więcej pól aby użyć domyślnego identyfikatora"
+
+#: entrywidget.cpp:441
+msgid "Using '%1' as entry id"
+msgstr "Użycie \"%1\" jako identyfikatora wpisu"
+
+#: entrywidget.cpp:446
+msgid "An entry has to have an identifier"
+msgstr "Wpis musi mieć identyfikator"
+
+#: entrywidget.cpp:448
+#, c-format
+msgid "The identifier contains invalid characters at position %1"
+msgstr "Identyfikator zawiera niepoprawne znaki w pozycji %1"
+
+#: entrywidget.cpp:458
+msgid "The identifier contains non-ascii characters, first one is '%1'"
+msgstr "Identyfikator zawiera znaki spoza zestawu ASCII, pierwszy w pozycji %1"
+
+#: entrywidget.cpp:474
+msgid "This BibTeX file already contains an entry with id '%1'."
+msgstr "Ten plik BibTeX zawiera już wpis z identyfikatorem \"%1\"."
+
+#: entrywidget.cpp:491
+msgid "Require either 'Editor', 'Organization', or 'Key'"
+msgstr "Wymaga wypełnienia pól \"Edytor\", \"Organizacja\" lub \"Klucz\""
+
+#: entrywidget.cpp:500
+msgid ""
+"Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Book "
+"Title'"
+msgstr ""
+"Skorelowany wpis \"%1\" musi zawierać pozycje \"Edytor\", \"Klucz\" lub "
+"\"Tytuł książki\""
+
+#: entrywidget.cpp:510
+msgid "Cross referenced entry '%1' must contain 'Volume'"
+msgstr "Skorelowany wpis \"%1\" musi zawierać pozycję \"Tom\""
+
+#: entrywidget.cpp:513
+msgid "Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Series'"
+msgstr ""
+"Skorelowany wpis \"%1\" musi zawierać pozycje \"Edytor\", \"Klucz\" lub "
+"\"Seria\""
+
+#: entrywidget.cpp:537
+msgid "No suggestions available"
+msgstr "Brak dostępnych sugestii"
+
+#: entrywidget.cpp:641
+msgid ""
+"Currently only refetching from ArXiv sources is supported.\n"
+"\n"
+"This requires that the URL field points to an \"abstract\" page (i.e. the "
+"URL contains \"arxiv.org/abs/\")."
+msgstr ""
+"Aktualnie wspierane jest tylko ponowne pobieranie ze źródeł ArXiv.\n"
+"\n"
+"Wymagane jest ponadto, żeby pole odnośnika URL wskazywało na stronę "
+"\"abstraktu\" (tzn. adres URL musi zawierać \"arxiv.org/abs/\")."
+
+#: entrywidget.cpp:641 entrywidget.cpp:668
+msgid "Refetching entry"
+msgstr "Ponowne pobieranie wpisu"
+
+#: entrywidget.cpp:668
+msgid "Fetching updated bibliographic data failed."
+msgstr "Pobieranie zaktualizowanych danych bibliograficznych nie powiodło się."
+
+#: entrywidgetauthor.cpp:83
+msgid "The fields 'Author' or 'Editor' are required, but both are missing"
+msgstr "Pola \"Autor\" lub \"Edytor\" są wymagane, ale obu brakuje"
+
+#: entrywidgetauthor.cpp:98 entrywidgetauthor.cpp:100
+#: idsuggestionswidget.cpp:112 idsuggestionswidget.cpp:483 settings.cpp:633
+#: settingssearchurl.cpp:134 webquery.cpp:449
+msgid "Author"
+msgstr "Autor"
+
+#: entrywidgetauthor.cpp:100
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewAuthor"
+msgstr ""
+
+#: entrywidgetauthor.cpp:105 entrywidgetauthor.cpp:107 settings.cpp:645
+msgid "Editor"
+msgstr "Edytor"
+
+#: entrywidgetauthor.cpp:107
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewEditor"
+msgstr ""
+
+#: entrywidgetexternal.cpp:197 entrywidgetexternal.cpp:285
+msgid "Previously used directory"
+msgstr "Poprzednio użyty katalog"
+
+#: entrywidgetexternal.cpp:223 entrywidgetexternal.cpp:225
+#: entrywidgetexternal.cpp:235 settings.cpp:685 settingssearchurl.cpp:135
+msgid "URL"
+msgstr "URL"
+
+#: entrywidgetexternal.cpp:235 entrywidgetexternal.cpp:268
+#, c-format
+msgid "Open %1"
+msgstr "Otwórz %1"
+
+#: entrywidgetexternal.cpp:238 entrywidgetexternal.cpp:242 settings.cpp:641
+msgid "DOI"
+msgstr "DOI"
+
+#: entrywidgetexternal.cpp:239
+msgid "Digital Object Identifier"
+msgstr "Cyfrowy Identyfikator Obiektu"
+
+#: entrywidgetexternal.cpp:253
+msgid "Open DOI"
+msgstr "Otwórz DOI"
+
+#: entrywidgetexternal.cpp:256 entrywidgetexternal.cpp:258
+#: entrywidgetexternal.cpp:268 settings.cpp:661
+msgid "Local File"
+msgstr "Plik lokalny"
+
+#: entrywidgetexternal.cpp:274
+msgid "&Browse..."
+msgstr "&Przeglądaj..."
+
+#: entrywidgetexternal.cpp:275
+msgid "Browse for a local file"
+msgstr "Przeglądaj w poszukiwaniu pliku lokalnego"
+
+#: entrywidgetexternal.cpp:282
+msgid "Select base directory"
+msgstr "Wybierz katalog bazowy"
+
+#: entrywidgetexternal.cpp:283
+msgid "Current directory"
+msgstr "Bieżący katalog"
+
+#: entrywidgetkeyword.cpp:56
+msgid "Global"
+msgstr "Globalne"
+
+#: entrywidgetkeyword.cpp:61
+msgid "In this file only"
+msgstr "Tylko w tym pliku"
+
+#: entrywidgetkeyword.cpp:168
+msgid ""
+"The keyword '%1' does already exist in the list of keywords.\n"
+"The old name has been restored."
+msgstr ""
+"Słowo kluczowe \"%1\" już istnieje na liście słów kluczowych.\n"
+"Przywrócono starą nazwę."
+
+#: entrywidgetkeyword.cpp:168
+msgid "Renaming keyword failed"
+msgstr "Zmiana nazwy słowa kluczowego nie powiodła się"
+
+#: entrywidgetkeyword.cpp:193
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewKeyword%1"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:230
+msgid "Keyword"
+msgstr "Słowo kluczowe"
+
+#: entrywidgetkeyword.cpp:231
+msgid "Origin"
+msgstr "Pochodzenie"
+
+#: entrywidgetkeyword.cpp:238 settingskeyword.cpp:166
+msgid ""
+"_: keyword\n"
+"New"
+msgstr "Nowe"
+
+#: entrywidgetkeyword.cpp:241
+msgid "Add a new keyword to the list"
+msgstr "Dodaj nowe słowo kluczowe do listy"
+
+#: entrywidgetkeyword.cpp:245 settingskeyword.cpp:169
+msgid ""
+"_: keyword\n"
+"Edit"
+msgstr "Edytuj"
+
+#: entrywidgetkeyword.cpp:247
+msgid "Edit the selected keyword"
+msgstr "Edytuj wybrane słowo kluczowe"
+
+#: entrywidgetkeyword.cpp:252
+msgid ""
+"_: keyword\n"
+"Toggle &global"
+msgstr "Ustaw jako &globalne"
+
+#: entrywidgetkeyword.cpp:254
+msgid "Add or remove the selected keyword to or from the global list"
+msgstr "Dodaj lub usuń wybrane słowo kluczowe z listy globalnych słów"
+
+#: entrywidgetkeyword.cpp:259
+msgid ""
+"There is no need to delete keywords. Simply uncheck unwanted keywords and "
+"make them non-global.\n"
+"Global keywords can also be edited in the settings dialog."
+msgstr ""
+"Nie ma potrzeby usuwania słów kluczowych. Po prostu odznacz niechciane "
+"słowa kluczowe i przestaną być wtedy globalne.\n"
+"Globalne słowa kluczowe mogą być również edytowane w oknie ustawień "
+"programu."
+
+#: entrywidgetmisc.cpp:135 entrywidgetmisc.cpp:137 mergeelements.cpp:581
+#: settings.cpp:683 settingsuserdefinedinput.cpp:172
+msgid "Type"
+msgstr "Typ"
+
+#: entrywidgetmisc.cpp:142 entrywidgetmisc.cpp:144 entrywidgetother.cpp:153
+#: mergeelements.cpp:72 settings.cpp:657
+msgid "Key"
+msgstr "Klucz"
+
+#: entrywidgetmisc.cpp:149 entrywidgetmisc.cpp:151 settings.cpp:667
+msgid "Note"
+msgstr "Notatka"
+
+#: entrywidgetmisc.cpp:156 entrywidgetmisc.cpp:158 settings.cpp:631
+msgid "Annote"
+msgstr "Adnotacja"
+
+#: entrywidgetmisc.cpp:163 entrywidgetmisc.cpp:165 settings.cpp:627
+msgid "Abstract"
+msgstr "Streszczenie"
+
+#: entrywidgetother.cpp:131
+msgid "Name of the user-defined field"
+msgstr "Nazwa pola zdefiniowanego przez użytkownika"
+
+#: entrywidgetother.cpp:132
+msgid "The name of the user-defined field. Should only contain letters and numbers."
+msgstr ""
+"Nazwa pola zdefiniowanego przez użytkownika. Powinna zawierać tylko litery "
+"i cyfry."
+
+#: entrywidgetother.cpp:133
+msgid "&Name:"
+msgstr "&Nazwa:"
+
+#: entrywidgetother.cpp:137 entrywidgetother.cpp:201
+msgid "&Add"
+msgstr "&Dodaj"
+
+#: entrywidgetother.cpp:141 entrywidgetother.cpp:154 mergeelements.cpp:72
+msgid "Value"
+msgstr "Wartość"
+
+#: entrywidgetother.cpp:143
+msgid "Content of the user-defined field"
+msgstr "Zawartość pola zdefiniowanego przez użytkownika"
+
+#: entrywidgetother.cpp:144
+msgid "The content of the user-defined field. May contain any text."
+msgstr ""
+"Zawartość pola zdefiniowanego przez użytkownika. Może zawierać "
+"jakikolwiek tekst."
+
+#: entrywidgetother.cpp:145
+msgid "&Content:"
+msgstr "&Zawartość:"
+
+#: entrywidgetother.cpp:159
+msgid "&List:"
+msgstr "&Lista:"
+
+#: entrywidgetother.cpp:168
+msgid "Op&en"
+msgstr "&Otwórz"
+
+#: entrywidgetpublication.cpp:308
+msgid "The fields 'Chapter' or 'Pages' are required, but both are missing"
+msgstr "Pola \"Rozdział\" i \"Strony\" są wymagane, ale obu brakuje"
+
+#: entrywidgetpublication.cpp:325
+msgid "The field 'Journal' refers to a not existing entry"
+msgstr "Pole \"Czasopismo\" odnosi się do nie istniejącego wpisu"
+
+#: entrywidgetpublication.cpp:392
+#, c-format
+msgid "http://en.wikipedia.org/w/index.php?title=Special:Booksources&isbn=%1"
+msgstr "http://en.wikipedia.org/w/index.php?title=Special:Booksources&isbn=%1"
+
+#: entrywidgetpublication.cpp:405 entrywidgetpublication.cpp:407
+#: settings.cpp:655
+msgid "Journal"
+msgstr "Czasopismo"
+
+#: entrywidgetpublication.cpp:412 entrywidgetpublication.cpp:414
+#: settings.cpp:687
+msgid "Volume"
+msgstr "Tom"
+
+#: entrywidgetpublication.cpp:419 entrywidgetpublication.cpp:421
+#: settings.cpp:669
+msgid "Number"
+msgstr "Numer"
+
+#: entrywidgetpublication.cpp:426 entrywidgetpublication.cpp:435
+#: settings.cpp:665
+msgid "Month"
+msgstr "Miesiąc"
+
+#: entrywidgetpublication.cpp:440 entrywidgetpublication.cpp:442
+#: idsuggestionswidget.cpp:276 idsuggestionswidget.cpp:484 settings.cpp:689
+#: webquery.cpp:448
+msgid "Year"
+msgstr "Rok"
+
+#: entrywidgetpublication.cpp:447 entrywidgetpublication.cpp:449
+#: settings.cpp:673
+msgid "Pages"
+msgstr "Strony"
+
+#: entrywidgetpublication.cpp:454 entrywidgetpublication.cpp:456
+#: settings.cpp:643
+msgid "Edition"
+msgstr "Wydanie"
+
+#: entrywidgetpublication.cpp:461 entrywidgetpublication.cpp:463
+#: settings.cpp:637
+msgid "Chapter"
+msgstr "Rozdział"
+
+#: entrywidgetpublication.cpp:468 entrywidgetpublication.cpp:470
+msgid "Cross Reference"
+msgstr "Skorelowany wpis"
+
+#: entrywidgetpublication.cpp:476 entrywidgetpublication.cpp:478
+#: settings.cpp:671
+msgid "Organization"
+msgstr "Organizacja"
+
+#: entrywidgetpublication.cpp:483 entrywidgetpublication.cpp:485
+#: settings.cpp:675
+msgid "Publisher"
+msgstr "Wydawca"
+
+#: entrywidgetpublication.cpp:490 entrywidgetpublication.cpp:492
+#: settings.cpp:679
+msgid "School"
+msgstr "Szkoła"
+
+#: entrywidgetpublication.cpp:497 entrywidgetpublication.cpp:499
+#: settings.cpp:649
+msgid "Institution"
+msgstr "Instytucja"
+
+#: entrywidgetpublication.cpp:504 entrywidgetpublication.cpp:506
+#: settings.cpp:663
+msgid "Location"
+msgstr "Miejsce"
+
+#: entrywidgetpublication.cpp:511 entrywidgetpublication.cpp:513
+#: settings.cpp:629
+msgid "Address"
+msgstr "Adres"
+
+#: entrywidgetpublication.cpp:518 entrywidgetpublication.cpp:527
+#: settings.cpp:651
+msgid "ISBN"
+msgstr "ISBN"
+
+#: entrywidgetpublication.cpp:525
+msgid "Lookup ISBN number in Wikipedia"
+msgstr "Szukaj numeru ISBN w Wikipedii"
+
+#: entrywidgetpublication.cpp:533 entrywidgetpublication.cpp:535
+#: settings.cpp:653
+msgid "ISSN"
+msgstr "ISSN"
+
+#: entrywidgetpublication.cpp:540 entrywidgetpublication.cpp:542
+#: settings.cpp:647
+msgid "How Published"
+msgstr "Sposób publikacji"
+
+#: entrywidgettab.cpp:65
+msgid "The field '%1' is required, but missing"
+msgstr "Pole \"%1\" jest wymagane, a brakujące"
+
+#: entrywidgettab.cpp:71
+msgid "Using cross referenced entry '%1' for field '%2'"
+msgstr "Użycie skorelowanego wpisu \"%1\" dla pola \"%2\""
+
+#: entrywidgettab.cpp:79
+msgid "The field '%1' contains string keys with invalid characters"
+msgstr "Pole \"%1\" zawiera tekst z nieprawidłowymi znakami"
+
+#: entrywidgettab.cpp:87
+msgid "The field '%1' contains some unknown error"
+msgstr "Pole \"%1\" zawiera nieznany błąd"
+
+#: entrywidgettitle.cpp:122 entrywidgettitle.cpp:124 settings.cpp:635
+msgid "Book Title"
+msgstr "Tytuł książki"
+
+#: entrywidgettitle.cpp:128 entrywidgettitle.cpp:130 settings.cpp:677
+msgid "Series"
+msgstr "Seria"
+
+#: entrywidgetuserdefined.cpp:137
+msgid "Please use the settings dialog to add user-defined fields here."
+msgstr "Użyj proszę okna ustawień aby dodać tutaj własne pola."
+
+#: fieldlineedit.cpp:91 fieldlineedit.cpp:92 fieldlineedit.cpp:96
+#: fieldlineedit.cpp:97 fieldlistview.cpp:100 fieldlistview.cpp:101
+msgid "BibTeX field '%1'"
+msgstr "Pole BibTeX \"%1\""
+
+#: fieldlineedit.cpp:228
+msgid "Set '%1' to be a string key"
+msgstr "Ustaw \"%1\" jako klucz tekstowy"
+
+#: fieldlineedit.cpp:240
+#, fuzzy
+msgid "Edit '%1' as a concatenated value"
+msgstr "Edytuj \"%1\" jako połączoną wartość"
+
+#: fieldlineedit.cpp:325 fieldlineedit.cpp:328
+#, fuzzy
+msgid "Concatenated value"
+msgstr "Połączona wartość"
+
+#: fieldlistview.cpp:321
+msgid "Add new '%1' item (Ctrl+A)"
+msgstr "Dodaj nowy element \"%1\" (Ctrl+A)"
+
+#: fieldlistview.cpp:327
+msgid "Edit current '%1' item (F2)"
+msgstr "Edytuj bieżący element \"%1\" (F2)"
+
+#: fieldlistview.cpp:333
+msgid "Delete current '%1' item (Del)"
+msgstr "Usuń bieżący element \"%1\" (Del)"
+
+#: fieldlistview.cpp:335 idsuggestionswidget.cpp:59 valuewidget.cpp:242
+msgid "Up"
+msgstr "Do góry"
+
+#: fieldlistview.cpp:339
+msgid "Move current '%1' item up (Ctrl+Up)"
+msgstr "Przenieś bieżący element \"%1\" do góry (Ctrl+strzałka w górę)"
+
+#: fieldlistview.cpp:341 idsuggestionswidget.cpp:60 valuewidget.cpp:247
+msgid "Down"
+msgstr "W dół"
+
+#: fieldlistview.cpp:345
+msgid "Move current '%1' item down (Ctrl+Down)"
+msgstr "Przenieś bieżący element \"%1\" w dół (Ctrl+strzałka w dół)"
+
+#: fieldlistview.cpp:347
+#, fuzzy
+msgid "Complex..."
+msgstr "Złożony..."
+
+#: fieldlistview.cpp:351
+#, fuzzy
+msgid "Edit current '%1' item as a concatenated string (Ctrl+Alt+C)"
+msgstr "Edytuj bieżący element jako złączony łańcuch (Ctrl+Alt+C)"
+
+#: fieldlistview.cpp:353
+msgid "... and others (et al.)"
+msgstr "... i inni (et al.)"
+
+#: findduplicates.cpp:58
+msgid "Searching for duplicates..."
+msgstr "Szukanie duplikatów..."
+
+#: idsuggestions.cpp:330 idsuggestionswidget.cpp:128
+msgid "First author only"
+msgstr "Tylko pierwszy autor"
+
+#: idsuggestions.cpp:331 idsuggestionswidget.cpp:129
+msgid "All but first author"
+msgstr "Wszyscy autorzy oprócz pierwszego"
+
+#: idsuggestions.cpp:332 idsuggestionswidget.cpp:127
+msgid "All authors"
+msgstr "Wszyscy autorzy"
+
+#: idsuggestions.cpp:335
+#, c-format
+msgid ""
+"_n: , but only first letter of each last name\n"
+", but only first %n letters of each last name"
+msgstr ""
+
+#: idsuggestions.cpp:336 idsuggestions.cpp:348
+msgid ", in upper case"
+msgstr ", dużymi literami"
+
+#: idsuggestions.cpp:337 idsuggestions.cpp:349
+msgid ", in lower case"
+msgstr ", małymi literami"
+
+#: idsuggestions.cpp:338 idsuggestions.cpp:350
+msgid ", with '%1' in between"
+msgstr ", z \"%1\" pomiędzy"
+
+#: idsuggestions.cpp:340
+msgid "Year (2 digits)"
+msgstr "Rok (2 cyfry)"
+
+#: idsuggestions.cpp:341
+msgid "Year (4 digits)"
+msgstr "Rok (4 cyfry)"
+
+#: idsuggestions.cpp:347
+#, c-format
+msgid ""
+"_n: , but only first letter of each word\n"
+", but only first %n letters of each word"
+msgstr ""
+
+#: idsuggestions.cpp:351
+msgid ", small words removed"
+msgstr ", usunięte krótkie słowa"
+
+#: idsuggestions.cpp:353
+msgid "Text: '%1'"
+msgstr "Tekst: \"%1\""
+
+#: idsuggestionswidget.cpp:140 idsuggestionswidget.cpp:221
+msgid "Casing:"
+msgstr "Wielkość liter:"
+
+#: idsuggestionswidget.cpp:145 idsuggestionswidget.cpp:226
+msgid "No change"
+msgstr "Bez zmian"
+
+#: idsuggestionswidget.cpp:146 idsuggestionswidget.cpp:227
+msgid "Lower case"
+msgstr "Małe litery"
+
+#: idsuggestionswidget.cpp:147 idsuggestionswidget.cpp:228
+msgid "Upper case"
+msgstr "Duże litery"
+
+#: idsuggestionswidget.cpp:156 idsuggestionswidget.cpp:237
+msgid "Only first letters:"
+msgstr "Tylko pierwsze litery:"
+
+#: idsuggestionswidget.cpp:163 idsuggestionswidget.cpp:165
+msgid "Complete name"
+msgstr "Pełne nazwisko"
+
+#: idsuggestionswidget.cpp:168
+msgid "Text between authors:"
+msgstr "Tekst między autorami:"
+
+#: idsuggestionswidget.cpp:214
+msgid "Remove small words"
+msgstr "Usuń krótkie słowa"
+
+#: idsuggestionswidget.cpp:244 idsuggestionswidget.cpp:246
+msgid "Complete title"
+msgstr "Pełny tytuł"
+
+#: idsuggestionswidget.cpp:249
+msgid "Text between words:"
+msgstr "Tekst między słowami:"
+
+#: idsuggestionswidget.cpp:289
+msgid "Year:"
+msgstr "Rok:"
+
+#: idsuggestionswidget.cpp:294
+msgid "2 digits"
+msgstr "2 cyfry"
+
+#: idsuggestionswidget.cpp:295
+msgid "4 digits"
+msgstr "4 cyfry"
+
+#: idsuggestionswidget.cpp:311 idsuggestionswidget.cpp:486 valuewidget.cpp:211
+msgid "Text"
+msgstr "Tekst"
+
+#: idsuggestionswidget.cpp:324
+msgid "Text in between:"
+msgstr "Tekst rozdzielający:"
+
+#: idsuggestionswidget.cpp:388
+msgid "Edit Id Suggestions"
+msgstr "Edytuj sugestie identyfikatorów"
+
+#: idsuggestionswidget.cpp:563
+msgid "<qt>Example:<br/><b>%1</b></qt>"
+msgstr "<qt>Przykład:<br/><b>%1</b></qt>"
+
+#: kbibtex_part.cpp:158
+msgid ""
+"The document '%1' has been modified.\n"
+"Do you want to save your changes or discard them?"
+msgstr ""
+"Dokument \"%1\" został zmodyfikowany.\n"
+"Czy chcesz zapisać zmiany czy też odrzucić je?"
+
+#: kbibtex_part.cpp:160
+msgid "Close Document"
+msgstr "Zamknij dokument"
+
+#: kbibtex_part.cpp:251 kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "BibTeX (*.bib)"
+msgstr "BibTeX (*.bib)"
+
+#: kbibtex_part.cpp:251 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "Reference Manager (*.ris)"
+msgstr "Reference Manager (*.ris)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)"
+msgstr "EndNote (format Refer) (*.ref *.refer *.rfr *.txt)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "ISI Web of Knowledge (*.isi *.cgi)"
+msgstr "ISI Web of Knowledge (*.isi *.cgi)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273
+msgid "DocBook 5 or MODS (*.xml)"
+msgstr "DocBook 5 lub MODS (*.xml)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273
+msgid "DocBook 5 (*.xml)"
+msgstr "DocBook 5 (*.xml)"
+
+#: kbibtex_part.cpp:256 kbibtex_part.cpp:279
+msgid "A file named '%1' already exists. Are you sure you want to overwrite it?"
+msgstr "Plik o nazwie \"%1\" już istnieje. Czy na pewno chcesz go nadpisać?"
+
+#: kbibtex_part.cpp:256 kbibtex_part.cpp:279
+msgid "Overwrite"
+msgstr "Nadpisz"
+
+#: kbibtex_part.cpp:273
+msgid "Portable Document File (*.pdf)"
+msgstr "Portable Document File (*.pdf)"
+
+#: kbibtex_part.cpp:273
+msgid "PostScript (*.ps)"
+msgstr "PostScript (*.ps)"
+
+#: kbibtex_part.cpp:273
+msgid "Hypertext Markup Langage (*.html)"
+msgstr "Hypertext Markup Language (*.html)"
+
+#: kbibtex_part.cpp:273
+msgid "Rich Text Format (*.rtf)"
+msgstr "Rich Text Format (*.rtf)"
+
+#: kbibtex_part.cpp:333
+msgid "Exporting"
+msgstr "Eksportowanie"
+
+#: kbibtex_part.cpp:344
+msgid "File could not be exported in '%1'."
+msgstr "Nie można wyeksportować pliku do \"%1\"."
+
+#: kbibtex_part.cpp:344
+msgid ""
+"\n"
+"\n"
+"See the following error log for details."
+msgstr ""
+"\n"
+"\n"
+"Zobacz dziennik błędów żeby uzyskać więcej informacji."
+
+#: kbibtex_part.cpp:344 kbibtex_part.cpp:347
+msgid "Exporting failed"
+msgstr "Eksportowanie nie powiodło się"
+
+#: kbibtex_part.cpp:347
+msgid "File could not be exported to '%1'."
+msgstr "Nie można wyeksportować pliku do \"%1\"."
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "Supported Bibliographies"
+msgstr "Obsługiwane bibliografie"
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "MODS or EndNote XML (*.xml)"
+msgstr "MODS lub EndNote XML (*.xml)"
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "All files (*.*)"
+msgstr "Wszystkie pliki (*.*)"
+
+#: kbibtex_part.cpp:383 kbibtexshell.cpp:332
+msgid ""
+"The given file could not be read, check if it exists or if it is readable "
+"for the current user."
+msgstr ""
+"Podany plik nie może być odczytany, sprawdź czy istnieje lub czy masz do "
+"niego prawa odczytu."
+
+#: kbibtex_part.cpp:398
+msgid "The given file could not be merged."
+msgstr "Podany plik nie może być dołączony."
+
+#: kbibtex_part.cpp:427
+msgid "Save the current file"
+msgstr "Zapisz bieżący plik"
+
+#: kbibtex_part.cpp:428
+msgid "Save the current file under a new filename"
+msgstr "Zapisz bieżący pod nową nazwą"
+
+#: kbibtex_part.cpp:430
+msgid "Statistics..."
+msgstr "Statystyki..."
+
+#: kbibtex_part.cpp:431
+msgid "Find Duplicates..."
+msgstr "Znajdź duplikaty..."
+
+#: kbibtex_part.cpp:432
+msgid "Export..."
+msgstr "Eksportuj..."
+
+#: kbibtex_part.cpp:433
+msgid "Export to a different file format"
+msgstr "Eksportuj do innego formatu plików"
+
+#: kbibtex_part.cpp:434
+msgid "Merge..."
+msgstr "Dołącz..."
+
+#: kbibtex_part.cpp:435
+msgid "Merge BibTeX entries from another file"
+msgstr "Dołącz wpisy BibTeX z innego pliku"
+
+#: kbibtex_part.cpp:438
+msgid "Cut the selected BibTeX elements to the clipboard"
+msgstr "Wytnij wybrane elementy BibTeX do schowka"
+
+#: kbibtex_part.cpp:441
+msgid "Copy the selected BibTeX elements to the clipboard"
+msgstr "Kopiuj wybrane elementy BibTeX do schowka"
+
+#: kbibtex_part.cpp:445
+msgid "Copy &Reference"
+msgstr "Kopiuj &cytowanie"
+
+#: kbibtex_part.cpp:446
+msgid "Copy a reference of the selected BibTeX elements to the clipboard"
+msgstr "Kopiuj cytowania wybranych elementów BibTeX do schowka"
+
+#: kbibtex_part.cpp:449
+msgid "Paste BibTeX elements from the clipboard"
+msgstr "Wklej elementy BibTeX ze schowka"
+
+#: kbibtex_part.cpp:451
+msgid "Select all BibTeX elements"
+msgstr "Wybierz wszystkie elementy BibTeX"
+
+#: kbibtex_part.cpp:452
+msgid "Send Reference to &LyX"
+msgstr "Wyślij cytowanie do &LyX"
+
+#: kbibtex_part.cpp:453
+msgid "Send a reference of the selected BibTeX elements to LyX"
+msgstr "Wyślij cytowania wybranych elementów BibTeX do LyX"
+
+#: kbibtex_part.cpp:456
+msgid "Find text"
+msgstr "Znajdź tekst"
+
+#: kbibtex_part.cpp:458
+msgid "Find next occurrence"
+msgstr "Znajdź następne wystąpienie"
+
+#: kbibtex_part.cpp:462
+msgid "Search Online Databases"
+msgstr "Szukaj w bazach danych online"
+
+#: kbibtex_part.cpp:463
+msgid "Search online databases to import bibliography data"
+msgstr "Szukaj w sieciowych bazach danych aby zaimportować dane bibliograficzne"
+
+#: kbibtex_part.cpp:465
+msgid "Search Document Online"
+msgstr "Szukaj dokumentów w internecie"
+
+#: kbibtex_part.cpp:466
+msgid "Search websites for the selected BibTeX element"
+msgstr "Szukaj wybranego elementu BibTeX na stronach internetowych"
+
+#: kbibtex_part.cpp:470
+msgid "&Show Columns"
+msgstr "&Pokaż kolumny"
+
+#: kbibtex_part.cpp:471
+msgid "Select columns to show in the main list"
+msgstr "Wybierz kolumny do pokazania na głównej liście"
+
+#: kbibtex_part.cpp:472
+msgid "View Document"
+msgstr "Pokaż dokument"
+
+#: kbibtex_part.cpp:473
+msgid "View the documents associated with this BibTeX entry"
+msgstr "Pokaż dokumenty powiązane z tym wpisem BibTeX"
+
+#: kbibtex_part.cpp:475
+msgid "View Primary Document"
+msgstr "Pokaż główny dokument"
+
+#: kbibtex_part.cpp:477
+msgid "View Primary Online Reference"
+msgstr "Pokaż główną referencję online"
+
+#: kbibtex_part.cpp:479
+msgid "Assign Keywords"
+msgstr "Przypisz słowa kluczowe"
+
+#: kbibtex_part.cpp:480
+msgid "Assign keywords to this entry"
+msgstr "Przypisz słowa kluczowe do tego wpisu"
+
+#: kbibtex_part.cpp:483
+msgid "Set entry ids as specified in the id suggestion settings"
+msgstr "Ustaw identyfikator wpisu wg sugestii podanych w ustawieniach"
+
+#: kbibtex_part.cpp:487
+msgid "Configure KBibTeX"
+msgstr "Konfiguracja: KBibTeX"
+
+#: kbibtex_part.cpp:488
+msgid "Configure Source View..."
+msgstr "Konfiguracja widoku źródła..."
+
+#: kbibtex_part.cpp:489
+msgid "Configure the Source Editor"
+msgstr "Konfiguracja edytora źródła"
+
+#: kbibtex_part.cpp:491 settings.cpp:700
+msgid "Article"
+msgstr "Artykuł"
+
+#: kbibtex_part.cpp:491
+msgid "Add an article to the BibTeX file"
+msgstr "Dodaj artykuł do pliku BibTeX"
+
+#: kbibtex_part.cpp:492 settings.cpp:702
+msgid "Book"
+msgstr "Książka"
+
+#: kbibtex_part.cpp:492
+msgid "Add a book to the BibTeX file"
+msgstr "Dodaj książkę do pliku BibTeX"
+
+#: kbibtex_part.cpp:493 settings.cpp:704
+msgid "Booklet"
+msgstr "Broszura (publikacja bez wydawcy)"
+
+#: kbibtex_part.cpp:493
+msgid "Add a booklet to the BibTeX file"
+msgstr "Dodaj publikację bez wydawcy do pliku BibTeX"
+
+#: kbibtex_part.cpp:494
+msgid "Electronic (IEEE)"
+msgstr "Standard IEEE"
+
+#: kbibtex_part.cpp:494
+msgid "Add an electronic reference (IEEE) to the BibTeX file"
+msgstr "Dodaj instrukcję elektroniczną (IEEE) do pliku BibTeX"
+
+#: kbibtex_part.cpp:495 settings.cpp:710
+msgid "InBook"
+msgstr "Rozdział książki"
+
+#: kbibtex_part.cpp:495
+msgid "Add a part of a book to the BibTeX file"
+msgstr "Dodaj część książki (rozdział lub strony od-do) do pliku BibTeX"
+
+#: kbibtex_part.cpp:496 settings.cpp:712
+msgid "InCollection"
+msgstr "Część publikacji z własnym tytułem"
+
+#: kbibtex_part.cpp:496
+msgid "Add a publication which is part of some collection to the BibTeX file"
+msgstr "Dodaj część publikacji (np. książki) z własnym tytułem do pliku BibTeX"
+
+#: kbibtex_part.cpp:497 settings.cpp:714
+msgid "InProceedings"
+msgstr "Część materiałów konferencyjnych"
+
+#: kbibtex_part.cpp:497
+msgid "Add a publication which is part of some proceedings to the BibTeX file"
+msgstr ""
+"Dodaj publikację która jest częścią materiałów konferencyjnych do "
+"pliku BibTeX"
+
+#: kbibtex_part.cpp:498 settings.cpp:716
+msgid "Manual"
+msgstr "Instrukcja obsługi"
+
+#: kbibtex_part.cpp:498
+msgid "Add a manual to the BibTeX file"
+msgstr "Dodaj instrukcję obsługi lub dokumentację techniczną pliku BibTeX"
+
+#: kbibtex_part.cpp:499 settings.cpp:718
+msgid "MastersThesis"
+msgstr "Praca magisterska"
+
+#: kbibtex_part.cpp:499
+msgid "Add a master or diploma thesis to the BibTeX file"
+msgstr "Dodaj pracę magisterską lub dyplomową do pliku BibTeX"
+
+#: kbibtex_part.cpp:500
+msgid "Add a not specified document or reference to the BibTeX file"
+msgstr "Dodaj nieokreślony dokument (nie pasujący do innych typów) do pliku BibTeX"
+
+#: kbibtex_part.cpp:501 settings.cpp:722
+msgid "PhDThesis"
+msgstr "Praca doktorska"
+
+#: kbibtex_part.cpp:501
+msgid "Add a PhD thesis to the BibTeX file"
+msgstr "Dodaj rozprawę doktorską do pliku BibTeX"
+
+#: kbibtex_part.cpp:502 settings.cpp:724
+msgid "Proceedings"
+msgstr "Materiały konferencyjne"
+
+#: kbibtex_part.cpp:502
+msgid "Add some proceedings to the BibTeX file"
+msgstr "Dodaj materiały konferencyjne do pliku BibTeX"
+
+#: kbibtex_part.cpp:503 settings.cpp:726
+msgid "TechReport"
+msgstr "Raport techniczny"
+
+#: kbibtex_part.cpp:503
+msgid "Add a technical report to the BibTeX file"
+msgstr ""
+"Dodaj raport techniczny (raport uczelni lub innej instytucji, zwykle "
+"wchodzący w skład numerowanej serii) do pliku BibTeX"
+
+#: kbibtex_part.cpp:504 settings.cpp:728
+msgid "Unpublished"
+msgstr "Niepublikowane"
+
+#: kbibtex_part.cpp:504
+msgid "Add an unpublished document to the BibTeX file"
+msgstr "Dodaj niepublikowany dokument do pliku BibTeX"
+
+#: kbibtex_part.cpp:505
+msgid "Add a preamble to the BibTeX file"
+msgstr "Dodaj nagłówek do pliku BibTeX"
+
+#: kbibtex_part.cpp:506
+msgid "Add a comment to the BibTeX file"
+msgstr "Dodaj komentarz do pliku BibTeX"
+
+#: kbibtex_part.cpp:507
+msgid "Add a macro to the BibTeX file"
+msgstr "Dodaj makro do pliku BibTeX"
+
+#: kbibtex_part.cpp:510
+msgid "Edit the selected BibTeX element"
+msgstr "Edytuj wybrany element BibTeX"
+
+#: kbibtex_part.cpp:513
+msgid "Delete the selected BibTeX elements"
+msgstr "Usuń wybrany element BibTeX"
+
+#: kbibtex_part.cpp:516
+msgid "Show &Comments"
+msgstr "Pokaż &komentarze"
+
+#: kbibtex_part.cpp:517
+msgid "Show the comments of a BibTeX document"
+msgstr "Pokaż komentarze dokumentu BibTeX"
+
+#: kbibtex_part.cpp:518
+msgid "Show &Macros"
+msgstr "Pokaż &makra"
+
+#: kbibtex_part.cpp:519
+msgid "Show the macros of a BibTeX document"
+msgstr "Pokaż makra dokumentu BibTeX"
+
+#: kbibtex_part.cpp:521
+msgid "Accept input from other programs"
+msgstr "Akceptuj wejście z innych programów"
+
+#: kbibtex_part.cpp:537 rc.cpp:9 rc.cpp:18 rc.cpp:21 rc.cpp:39 rc.cpp:48
+#: rc.cpp:51
+msgid "&New"
+msgstr "&Nowy"
+
+#: kbibtex_part.cpp:538
+msgid "Add a new element to this BibTeX document"
+msgstr "Dodaj nowy element do tego dokumentu BibTeX"
+
+#: kbibtex_part.cpp:622
+msgid ""
+"Some other KBibTeX instance is using the pipe.\n"
+"If this assumption is wrong, please delete '%1'."
+msgstr ""
+"Inna instancja KBibTeX używa potoku.\n"
+"Jeśli uważasz, że to przypuszczenie jest błędne, usuń proszę \"%1\"."
+
+#: kbibtex_part.cpp:622
+msgid "Pipe already in use"
+msgstr "Potok już jest w użyciu"
+
+#: kbibtex_part.cpp:651
+msgid "Could not create pipe at '%1'."
+msgstr "Nie można utworzyć potoku w \"%1\"."
+
+#: kbibtex_part.cpp:651
+msgid "Error creating pipe"
+msgstr "Błąd podczas tworzenia potoku"
+
+#: kbibtex_part.cpp:695
+msgid ""
+"The KBibTeX part has problems to initialize itself. Only limited "
+"functionality will be available."
+msgstr ""
+"Moduł KBibTeX ma problemy z zainicjowaniem. Dostępna będzie tylko "
+"ograniczona funkcjonalność."
+
+#: kbibtex_part.cpp:695
+msgid "KBibTeX Part"
+msgstr "Moduł KBibTeX"
+
+#: kbibtex_part.cpp:742
+msgid "KBibTeXPart"
+msgstr "KBibTeXPart"
+
+#: kbibtexshell.cpp:76
+msgid "Could not find our part!"
+msgstr "Nie można znaleźć modułu KBibTeX!"
+
+#: kbibtexshell.cpp:145
+msgid ""
+"Click to open a file\n"
+"Click and hold to open a recent file"
+msgstr ""
+"Kliknij aby otworzyć plik\n"
+"Kliknij i przytrzymaj aby otworzyć ostatnio używany plik"
+
+#: kbibtexshell.cpp:182
+msgid "Create a new window for a new BibTeX file"
+msgstr "Utwórz nowe okno dla nowego pliku BibTeX"
+
+#: kbibtexshell.cpp:184
+msgid "Open an existing BibTeX file"
+msgstr "Otwórz istniejący plik BibTeX"
+
+#: kbibtexshell.cpp:187
+msgid ""
+"This lists files which you have opened recently, and allows you to easily "
+"open them again."
+msgstr ""
+"Pokazuje listę plików które były ostatnio otwierane i umożliwia szybkie "
+"ponowne ich otwarcie."
+
+#: kbibtexshell.cpp:191
+msgid "Close this KBibTeX window"
+msgstr "Zamknij to okno KBibTeX"
+
+#: kbibtexshell.cpp:196
+msgid "Show or hide the window's status bar"
+msgstr "Pokaż lub ukryj pasek statusu okna"
+
+#: kbibtexshell.cpp:198
+msgid "Configure key bindings for KBibTeX"
+msgstr "Konfiguruj skróty klawiszowe dla KBibTeX"
+
+#: kbibtexshell.cpp:199
+msgid "Configure the tool bar for KBibTeX"
+msgstr "Konfiguruj pasek narzędzi KBibTeX"
+
+#: kbibtexshell.cpp:350 main.cpp:95
+msgid "Could not open file '%1'."
+msgstr "Nie można otworzyć pliku \"%1\"."
+
+#: macrowidget.cpp:39
+msgid "Edit BibTeX Macro"
+msgstr "Edytuj makro BibTeX"
+
+#: macrowidget.cpp:84
+msgid "Macro &id:"
+msgstr "&ID makra:"
+
+#: macrowidget.cpp:91
+msgid "Macro &value:"
+msgstr "&Wartość makra:"
+
+#: main.cpp:40
+msgid "A BibTeX editor for KDE"
+msgstr "Edytor BibTeX dla środowiska KDE"
+
+#: main.cpp:46
+msgid "Document to open."
+msgstr "Dokument do otwarcia."
+
+#: main.cpp:111
+msgid "KBibTeX"
+msgstr "KBibTeX"
+
+#: main.cpp:114
+msgid "NAME OF TRANSLATORS"
+msgstr "Michał Smoczyk"
+
+#: main.cpp:114
+msgid "EMAIL OF TRANSLATORS"
+msgstr "msmoczyk@wp.pl"
+
+#: mergeelements.cpp:112
+msgid "Preamble text"
+msgstr "Tekst nagłówka"
+
+#: mergeelements.cpp:124
+msgid "Next"
+msgstr "Następny"
+
+#: mergeelements.cpp:124
+msgid "Previous"
+msgstr "Poprzedni"
+
+#: mergeelements.cpp:143
+msgid ""
+"Select elements to merge. At least two elements must be checked to perform a "
+"merge operation. Checked entries will be replaced by the merged element, "
+"unchecked elements will be kept."
+msgstr ""
+"Wybierz elementy do dołączenia. Aby wykonać operację dołączenia, "
+"należy zaznaczyć co najmniej dwa elementy. Zaznaczone wpisy będą "
+"zastąpione dołączanymi elementami, niezaznaczone wpisy zostaną zachowane."
+
+#: mergeelements.cpp:147
+msgid "Entry/Macro Id"
+msgstr "Identyfikator wpisu/makra"
+
+#: mergeelements.cpp:159
+msgid ""
+"Choose from this list which alternatives you want to keep in the merged "
+"element."
+msgstr ""
+"Wybierz z tej listy wpisy alternatywne, które chcesz zachować w łączonym "
+"elemencie."
+
+#: mergeelements.cpp:163
+msgid "Field/Key"
+msgstr "Pole/Klucz"
+
+#: mergeelements.cpp:492
+msgid "No duplicates found."
+msgstr "Nie znaleziono duplikatów."
+
+#: mergeelements.cpp:557
+msgid "Id"
+msgstr "Identyfikator"
+
+#: preamblewidget.cpp:33
+msgid "Edit BibTeX Preamble"
+msgstr "Edytuj nagłówek BibTeX"
+
+#: preamblewidget.cpp:76
+msgid "&Preamble:"
+msgstr "&Nagłówek:"
+
+#: rc.cpp:6 rc.cpp:36
+msgid "E&lement"
+msgstr "E&lement"
+
+#: rc.cpp:15 rc.cpp:27 rc.cpp:45 rc.cpp:57
+msgid "Se&ttings"
+msgstr "&Ustawienia"
+
+#: searchbar.cpp:92
+msgid "Add a new BibTeX entry, comment or macro to this file"
+msgstr "Dodaj nowy wpis BibTeX, komentarz lub makro do tego pliku"
+
+#: searchbar.cpp:97
+msgid "Add a new BibTeX entry from an online database"
+msgstr "Dodaj nowy wpis BibTeX z sieciowej bazy danych"
+
+#: searchbar.cpp:105
+msgid "Erase current search pattern"
+msgstr "Wyczyść bieżące kryteria wyszukiwania"
+
+#: searchbar.cpp:108
+msgid "&Search:"
+msgstr "&Szukaj:"
+
+#: searchbar.cpp:121
+msgid "Exact"
+msgstr "Dokładnie"
+
+#: searchbar.cpp:122
+msgid "Every word"
+msgstr "Każde słowo"
+
+#: searchbar.cpp:123
+msgid "Any word"
+msgstr "Dowolne słowo"
+
+#: searchbar.cpp:126
+msgid "Restrict to:"
+msgstr "Ogranicz do:"
+
+#: searchbar.cpp:133
+msgid "All fields"
+msgstr "Wszystkie pola"
+
+#: settings.cpp:57
+msgid "Could not determine filename for XSLT file"
+msgstr "Nie można określić nazwy dla pliku XSLT"
+
+#: settings.cpp:57
+msgid "Initialization failed"
+msgstr "Inicjalizacja nie powiodła się"
+
+#: settings.cpp:639
+msgid "Crossref"
+msgstr "Skorelowany wpis"
+
+#: settings.cpp:691 settings.cpp:730
+msgid "Unknown"
+msgstr "Nieznany"
+
+#: settings.cpp:706
+msgid "Collection"
+msgstr "Część publikacji z własnym tytułem"
+
+#: settings.cpp:708
+msgid "Electronic"
+msgstr "Standard IEEE"
+
+#: settingsdlg.cpp:42
+msgid "&Editing"
+msgstr "&Edycja"
+
+#: settingsdlg.cpp:48
+msgid "&File Open&&Save"
+msgstr "Zapis i otwieranie &plików"
+
+#: settingsdlg.cpp:54
+msgid "&Search URLs"
+msgstr "&Wyszukiwanie adresów URL"
+
+#: settingsdlg.cpp:60
+msgid "Global &Keywords"
+msgstr "Globalne słowa &kluczowe"
+
+#: settingsdlg.cpp:66 settingsidsuggestions.cpp:337
+msgid "Id Suggestions"
+msgstr "Sugestie ID"
+
+#: settingsdlg.cpp:72
+msgid "User Defined Fields"
+msgstr "Pola zdefiniowane przez użytkownika"
+
+#: settingsdlg.cpp:79 webqueryz3950.cpp:188 webqueryz3950.cpp:193
+msgid "Z39.50"
+msgstr "Z39.50"
+
+#: settingsediting.cpp:56
+msgid "Path to add:"
+msgstr "Ścieżka do dodania:"
+
+#: settingsediting.cpp:63
+msgid "Select a path to add"
+msgstr "Wybierz ścieżkę do dodania"
+
+#: settingsediting.cpp:67
+msgid "Add chosen path to list"
+msgstr "Dodaj wybraną ścieżkę do listy"
+
+#: settingsediting.cpp:70
+msgid "List of paths:"
+msgstr "Lista ścieżek:"
+
+#: settingsediting.cpp:73
+msgid "Path"
+msgstr "Ścieżka"
+
+#: settingsediting.cpp:82
+msgid "Remove selected path from list"
+msgstr "Usuń wybraną ścieżkę z listy"
+
+#: settingsediting.cpp:99
+msgid "Edit Document Search Paths"
+msgstr "Edytuj ścieżki wyszukiwania dokumentów"
+
+#: settingsediting.cpp:140
+msgid "Folder '%1' does not exist or is not readable."
+msgstr "Katalog \"%1\" nie istnieje lub nie może zostać odczytany."
+
+#: settingsediting.cpp:160
+msgid "Main List"
+msgstr "Główna lista"
+
+#: settingsediting.cpp:162
+msgid "&Sorting:"
+msgstr "&Sortowanie:"
+
+#: settingsediting.cpp:174
+msgid "So&rting order:"
+msgstr "Po&rządek sortowania:"
+
+#: settingsediting.cpp:176
+msgid "Ascending"
+msgstr "Rosnąco"
+
+#: settingsediting.cpp:177
+msgid "Descending"
+msgstr "Malejąco"
+
+#: settingsediting.cpp:180
+msgid "&Double click action:"
+msgstr "Działanie &podwójnego kliknięcia:"
+
+#: settingsediting.cpp:182
+msgid "Edit element"
+msgstr "Edycja elementu"
+
+#: settingsediting.cpp:183
+msgid "Open document"
+msgstr "Otwarcie pliku"
+
+#: settingsediting.cpp:186
+msgid "On dragging with mouse:"
+msgstr "Przy przeciąganiu myszą:"
+
+#: settingsediting.cpp:188
+msgid "Copy reference (\\cite{...})"
+msgstr "Skopiuj odwołanie (\\cite{...})"
+
+#: settingsediting.cpp:189
+msgid "Copy BibTeX text (@article{...})"
+msgstr "Skopiuj wpis BibTeX (@article{...})"
+
+#: settingsediting.cpp:192
+msgid "Entry Editing"
+msgstr "Edycja wpisów"
+
+#: settingsediting.cpp:196
+msgid "Search Bar"
+msgstr "Pasek wyszukiwania"
+
+#: settingsediting.cpp:198
+msgid "Reset field filter when changing filter text"
+msgstr "Wyczyść filtr pól przy zmianie tekstu filtru"
+
+#: settingsediting.cpp:200
+msgid "Presentation"
+msgstr "Wygląd"
+
+#: settingsediting.cpp:202
+msgid "Use special &font"
+msgstr "Użyj specjalnej &czcionki"
+
+#: settingsediting.cpp:204
+msgid "Author and editor names:"
+msgstr "Nazwiska autorów i edytorów:"
+
+#: settingsediting.cpp:207
+msgid "John Doe"
+msgstr "Jan Kowalski"
+
+#: settingsediting.cpp:208
+msgid "Doe, John"
+msgstr "Kowalski, Jan"
+
+#: settingsediting.cpp:209
+msgid "Show names as 'John Doe' instead of 'Doe, John'"
+msgstr "Pokaż nazwiska jako \"Jan Kowalski\" zamiast jako \"Kowalski, Jan\""
+
+#: settingsediting.cpp:210
+msgid ""
+"Show names as 'John Doe' instead of 'Doe, John'.\n"
+"\n"
+"Takes only effect after the next start of KBibTeX."
+msgstr ""
+"Pokaż nazwiska jako \"Jan Kowalski\" zamiast jako \"Kowalski, Jan\".\n"
+"\n"
+"Zmiany zostaną zastosowane przy następnym uruchomieniu KBibTeX."
+
+#: settingsediting.cpp:212
+msgid "Document Search Paths"
+msgstr "Ścieżki wyszukiwania dokumentów"
+
+#: settingsediting.cpp:214
+msgid "Edit Search Paths"
+msgstr "Edytuj ścieżki wyszukiwania"
+
+#: settingsediting.cpp:218
+msgid "Sensitivity:"
+msgstr "Czułość:"
+
+#: settingsediting.cpp:221
+msgid "Low"
+msgstr "Niska"
+
+#: settingsediting.cpp:228
+msgid "High"
+msgstr "Wysoka"
+
+#: settingsfileio.cpp:53
+msgid "English|German|French|Spanish|Swedish"
+msgstr "Angielski|Niemiecki|Francuski|Hiszpański|Szwedzki"
+
+#: settingsfileio.cpp:58
+msgid ""
+"plain|achemso (American Chemical Society)|alpha|unsrt|abbrv|acm (Association "
+"of Computing Machinery)|apacite|apalike|authordate|ieeetr|natbib|siam"
+msgstr ""
+"plain|achemso (American Chemical Society)|alpha|unsrt|abbrv|acm (Association "
+"of Computing Machinery)|apacite|apalike|authordate|ieeetr|natbib|siam"
+
+#: settingsfileio.cpp:177
+msgid "XSLT Stylesheet"
+msgstr "Arkusz stylów XSLT"
+
+#: settingsfileio.cpp:201
+msgid "No exporter available"
+msgstr "Brak dostępnego ekspotera"
+
+#: settingsfileio.cpp:223
+msgid "Path to the jar files for bib2db5"
+msgstr "Ścieżka do plików jar dla bib2db5"
+
+#: settingsfileio.cpp:236
+msgid ""
+"To export DocBook5 bibliographies, the path to the jar file for bib2db5 has "
+"to be set first."
+msgstr ""
+"Aby można było eksportować bibliografie DocBook5, najpierw musi być "
+"ustawiona ścieżka do pliku jar dla programu bib2db5."
+
+#: settingsfileio.cpp:236
+msgid "Invalid path for bib2db5"
+msgstr "Nieprawidłowa ścieżka do bib2db5"
+
+#: settingsfileio.cpp:244
+msgid "BibTeX Import and Export"
+msgstr "Import i eksport BibTeX"
+
+#: settingsfileio.cpp:246
+msgid "&Encoding:"
+msgstr "&Kodowanie:"
+
+#: settingsfileio.cpp:249
+msgid "Text &delimiters:"
+msgstr "&Separatory tekstu:"
+
+#: settingsfileio.cpp:252
+msgid "Keyword casing:"
+msgstr "Wielkość liter słów kluczowych:"
+
+#: settingsfileio.cpp:255
+msgid "Protect title's casing:"
+msgstr "Ochrona wielkości liter tytułów:"
+
+#: settingsfileio.cpp:256
+msgid "Put curly brackets around"
+msgstr "Obejmij nawiasami klamrowymi"
+
+#: settingsfileio.cpp:257
+msgid "Put curly brackets around title and other selected fields."
+msgstr "Obejmij tytuły i inne wybrane pola nawiasami klamrowymi."
+
+#: settingsfileio.cpp:258
+msgid ""
+"Put curly brackets around title and other selected fields to protect them "
+"from case changes in certain BibTeX styles."
+msgstr ""
+"Obejmij tytuły i inne wybrane pola nawiasami klamrowymi aby chronić je "
+"przed zmianami wielkości liter w niektórych stylach BibTeX."
+
+#: settingsfileio.cpp:260
+msgid "PDF, PostScript and Rich Text Format Export"
+msgstr "Eksport PDF, PostScript i RTF"
+
+#: settingsfileio.cpp:262
+msgid ""
+"Select the layout of the resulting PDF, PostScript or Rich Text Format "
+"document when exporting a BibTeX file."
+msgstr ""
+"Wybierz układ wynikowego dokumentu PDF, PostScript lub Rich Text Format "
+"podczas eksportu pliku BibTeX."
+
+#: settingsfileio.cpp:263
+msgid "&Language:"
+msgstr "&Język:"
+
+#: settingsfileio.cpp:266
+msgid "&Biblography style:"
+msgstr "Styl &bibliografii:"
+
+#: settingsfileio.cpp:270
+msgid "PDF Export"
+msgstr "Eksport PDF"
+
+#: settingsfileio.cpp:272
+msgid "Embed local files into PDF if possible"
+msgstr "Osadź lokalne pliki w PDF jeśli to możliwe"
+
+#: settingsfileio.cpp:273
+msgid ""
+"<qt>If checked, KBibTeX tries to embed all referenced files for the BibTeX "
+"entries into the exported PDF file.<br/>This requires that you have "
+"installed <tt>embedfile.sty</tt>.</qt>"
+msgstr ""
+"<qt>Jeśli zaznaczone, KBibTeX spróbuje osadzić wszystkie pliki "
+"skorelowane z wpisami BibTeX w eksportowanym pliku PDF.<br/>Wymaga "
+"zainstalowanego pliku <tt>embedfile.sty</tt>.</qt>"
+
+#: settingsfileio.cpp:275
+msgid "XML Export"
+msgstr "Eksport XML"
+
+#: settingsfileio.cpp:278
+msgid "Path to the jar files for bib2db5:"
+msgstr "Ścieżka do plików jar dla bib2db5:"
+
+#: settingsfileio.cpp:293
+msgid "Export Systems"
+msgstr "Systemy eksportu"
+
+#: settingsfileio.cpp:295
+msgid "HTML:"
+msgstr "HTML:"
+
+#: settingsfileio.cpp:299
+msgid "BibUtils"
+msgstr "BibUtils"
+
+#: settingsfileio.cpp:301
+msgid "Always use BibUtils"
+msgstr "Zawsze używaj BibUtils"
+
+#: settingsfileio.cpp:302
+msgid "If possible, use BibUtils to import and export alien bibliography."
+msgstr ""
+"Użyj BibUtils do importu i eksportu obcych formatów bibliografii jeśli to "
+"możliwe."
+
+#: settingsfileio.cpp:303
+msgid ""
+"If possible, use BibUtils to import and export alien bibliography such as "
+"RIS.\n"
+"If unchecked, prefer internal import and export library."
+msgstr ""
+"Jeśli to możliwe, używa BibUtils do importu i eksportu obcych formatów "
+"bibliografii, takich jak np. RIS.\n"
+"Jeśli niezaznaczone, preferowana jest wewnętrzna biblioteka importu i "
+"eksportu."
+
+#: settingsfileio.cpp:307
+msgid "Backups"
+msgstr "Kopie zapasowe"
+
+#: settingsfileio.cpp:309
+msgid "Number of Backups:"
+msgstr "Liczba kopii zapasowych:"
+
+#: settingsidsuggestions.cpp:90
+#, c-format
+msgid ""
+"\n"
+"Example: %1"
+msgstr ""
+"\n"
+"Przykład: %1"
+
+#: settingsidsuggestions.cpp:345
+msgid ""
+"_: id suggestion\n"
+"New"
+msgstr "Nowa"
+
+#: settingsidsuggestions.cpp:349
+msgid ""
+"_: id suggestion\n"
+"Edit"
+msgstr "Edytuj"
+
+#: settingsidsuggestions.cpp:353
+msgid ""
+"_: id suggestion\n"
+"Delete"
+msgstr "Usuń"
+
+#: settingsidsuggestions.cpp:357
+msgid ""
+"_: id suggestion\n"
+"Up"
+msgstr "Do góry"
+
+#: settingsidsuggestions.cpp:361
+msgid ""
+"_: id suggestion\n"
+"Down"
+msgstr "W dół"
+
+#: settingsidsuggestions.cpp:365
+msgid "Toogle default"
+msgstr "Ustaw jako domyślną"
+
+#: settingsidsuggestions.cpp:370
+msgid "Use default id suggestion when editing new entries"
+msgstr "Użyj domyślnej sugestii identyfikatora w trakcie edytowania nowych wpisów"
+
+#: settingsidsuggestions.cpp:373
+msgid "Small Words:"
+msgstr "Krótkie słowa:"
+
+#: settingsidsuggestions.cpp:386
+msgid "Small Words"
+msgstr "Krótkie słowa"
+
+#: settingskeyword.cpp:83
+msgid "New Keyword"
+msgstr "Nowe słowo kluczowe"
+
+#: settingskeyword.cpp:131
+#, fuzzy, c-format
+msgid ""
+"_n: 1 keyword has been imported.\n"
+"%n keywords have been imported."
+msgstr "Zaimportowano %n słowa kluczowe."
+
+#: settingskeyword.cpp:131
+msgid "Keywords imported"
+msgstr "Zaimportowano słowa kluczowe"
+
+#: settingskeyword.cpp:172
+msgid ""
+"_: keyword\n"
+"Delete"
+msgstr "Usuń"
+
+#: settingskeyword.cpp:176
+msgid ""
+"_: keyword\n"
+"Import"
+msgstr "Importuj"
+
+#: settingssearchurl.cpp:108
+msgid ""
+"The list of URLs will be checked and known entries will be replaced by the "
+"program standards. Search entries you have defined by yourself will be kept "
+"most likely."
+msgstr ""
+"Lista adresów URL zostanie sprawdzona i rozpoznane wpisy zostaną "
+"zastąpione przez domyślne ustawienia programu. Adresy wyszukiwania, które "
+"zostały zdefiniowane przez użytkownika zostaną najprawdopodobniej "
+"zachowane."
+
+#: settingssearchurl.cpp:108
+msgid "Reset list of URLs"
+msgstr "Resetuj listę adresów URL"
+
+#: settingssearchurl.cpp:108 settingsz3950.cpp:297
+msgid "Reset"
+msgstr "Resetuj"
+
+#: settingssearchurl.cpp:133
+msgid "Description"
+msgstr "Opis"
+
+#: settingssearchurl.cpp:140
+msgid ""
+"_: search url\n"
+"New"
+msgstr "Nowy"
+
+#: settingssearchurl.cpp:144
+msgid ""
+"_: search url\n"
+"Edit"
+msgstr "Edytuj"
+
+#: settingssearchurl.cpp:148
+msgid ""
+"_: search url\n"
+"Delete"
+msgstr "Usuń"
+
+#: settingssearchurl.cpp:152
+msgid ""
+"_: search url\n"
+"Reset"
+msgstr "Resetuj"
+
+#: settingssearchurl.cpp:170
+msgid "New URL"
+msgstr "Nowy URL"
+
+#: settingssearchurl.cpp:170
+msgid "Edit URL"
+msgstr "Edytuj URL"
+
+#: settingssearchurl.cpp:173
+msgid "Description:"
+msgstr "Opis:"
+
+#: settingssearchurl.cpp:178
+msgid "URL:"
+msgstr "URL:"
+
+#: settingssearchurl.cpp:184
+msgid "Within the URL, '%1' will be replaced by the search term."
+msgstr "W adresie URL, \"%1\" zostanie zastąpione przez szukane wyrażenie."
+
+#: settingssearchurl.cpp:185
+msgid "Include Author:"
+msgstr "Dołącz autora:"
+
+#: settingsuserdefinedinput.cpp:62 settingsuserdefinedinput.cpp:74
+#: settingsuserdefinedinput.cpp:229 settingsuserdefinedinput.cpp:238
+#: settingsuserdefinedinput.cpp:251 settingsuserdefinedinput.cpp:257
+msgid "Single line"
+msgstr "Jedna linia"
+
+#: settingsuserdefinedinput.cpp:74 settingsuserdefinedinput.cpp:230
+#: settingsuserdefinedinput.cpp:251 settingsuserdefinedinput.cpp:257
+msgid "Multiple lines"
+msgstr "Wiele linii"
+
+#: settingsuserdefinedinput.cpp:168
+msgid "Name"
+msgstr "Nazwa"
+
+#: settingsuserdefinedinput.cpp:170
+msgid "Label"
+msgstr "Etykieta"
+
+#: settingsuserdefinedinput.cpp:180
+msgid ""
+"_: user-defined input\n"
+"New"
+msgstr "Nowy"
+
+#: settingsuserdefinedinput.cpp:183
+msgid ""
+"_: user-defined input\n"
+"Edit"
+msgstr "Edytuj"
+
+#: settingsuserdefinedinput.cpp:186
+msgid ""
+"_: user-defined input\n"
+"Delete"
+msgstr "Usuń"
+
+#: settingsuserdefinedinput.cpp:189
+msgid ""
+"_: user-defined input\n"
+"Up"
+msgstr "W górę"
+
+#: settingsuserdefinedinput.cpp:193
+msgid ""
+"_: user-defined input\n"
+"Down"
+msgstr "W dół"
+
+#: settingsuserdefinedinput.cpp:210
+msgid "New Field"
+msgstr "Nowe pole"
+
+#: settingsuserdefinedinput.cpp:210
+msgid "Edit Field"
+msgstr "Edytuj pole"
+
+#: settingsuserdefinedinput.cpp:213 settingsz3950.cpp:71
+msgid "Name:"
+msgstr "Nazwa:"
+
+#: settingsuserdefinedinput.cpp:218
+msgid "Label:"
+msgstr "Etykieta:"
+
+#: settingsuserdefinedinput.cpp:224
+msgid "Input Type:"
+msgstr "Typ wejściowy:"
+
+#: settingsz3950.cpp:77
+msgid "Database:"
+msgstr "Baza danych:"
+
+#: settingsz3950.cpp:83
+msgid "Host:"
+msgstr "Komputer:"
+
+#: settingsz3950.cpp:89
+msgid "Port:"
+msgstr "Port:"
+
+#: settingsz3950.cpp:98
+msgid "User:"
+msgstr "Użytkownik:"
+
+#: settingsz3950.cpp:104
+msgid "Password:"
+msgstr "Hasło:"
+
+#: settingsz3950.cpp:110
+msgid "Syntax:"
+msgstr "Składnia:"
+
+#: settingsz3950.cpp:122
+msgid "Locale:"
+msgstr "Lokalizacja:"
+
+#: settingsz3950.cpp:149
+msgid "Edit Z39.50 Server"
+msgstr "Edytuj serwer Z39.50"
+
+#: settingsz3950.cpp:297
+msgid "All Z39.50 server configurations will be reset to defaults."
+msgstr ""
+"Wszystkie ustawienia serwera Z39.50 będą przywrócone do wartości "
+"domyślnych."
+
+#: settingsz3950.cpp:297
+msgid "Reset to Default"
+msgstr "Przywróć wartości domyślne"
+
+#: settingsz3950.cpp:324
+msgid ""
+"_: z3950 server\n"
+"Name"
+msgstr "Nazwa"
+
+#: settingsz3950.cpp:325
+msgid ""
+"_: z3950 server\n"
+"Database"
+msgstr "Baza danych"
+
+#: settingsz3950.cpp:334
+msgid ""
+"_: z3950 server\n"
+"New"
+msgstr "Nowy"
+
+#: settingsz3950.cpp:338
+msgid ""
+"_: z3950 server\n"
+"Edit"
+msgstr "Edytuj"
+
+#: settingsz3950.cpp:342
+msgid ""
+"_: z3950 server\n"
+"Delete"
+msgstr "Usuń"
+
+#: settingsz3950.cpp:346
+msgid ""
+"_: z3950 server\n"
+"Up"
+msgstr "W górę"
+
+#: settingsz3950.cpp:350
+msgid ""
+"_: z3950 server\n"
+"Down"
+msgstr "W dół"
+
+#: settingsz3950.cpp:355
+msgid ""
+"_: z3950 server\n"
+"Reset"
+msgstr "Resetuj"
+
+#: sidebar.cpp:113
+msgid "Toggle between showing all fields or only important fields"
+msgstr "Przełącz między pokazywaniem wszystkich pól lub tylko ważnych pól"
+
+#: sidebar.cpp:117
+msgid "Filter this sidebar for a given field"
+msgstr "Filtruj ten pasek boczny dla podanego pola"
+
+#: sidebar.cpp:124
+msgid ""
+"Toggle between selecting only one item or multiple items (AND-connected in "
+"search)"
+msgstr ""
+"Przełącz między wybieraniem tylko jednego elementu lub wielu elementów "
+"(połączonych logicznym operatorem \"i\" w wyszukiwaniu)"
+
+#: sidebar.cpp:127
+msgid "#"
+msgstr "Nr"
+
+#: sidebar.cpp:128
+msgid "Items"
+msgstr "Elementy"
+
+#: sidebar.cpp:135
+msgid "Rename all occurrences"
+msgstr "Zmień nazwę wszystkich wystąpień"
+
+#: valuewidget.cpp:39
+msgid "Edit field '%1'"
+msgstr "Edytuj pole \"%1\""
+
+#: valuewidget.cpp:137
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewValue%1"
+msgstr ""
+
+#: valuewidget.cpp:205
+#, fuzzy
+msgid "Checked entries are string keys, unchecked entries are quoted text."
+msgstr "Zaznaczone wpisy to klucze tekstowe, niezaznaczone wpisy to cytowany tekst."
+
+#: valuewidget.cpp:232
+msgid "Toggle"
+msgstr "Przełącz"
+
+#: webquery.cpp:94 webquerycsb.cpp:83 webquerydblp.cpp:68
+#: webquerymathscinet.cpp:61 webqueryspireshep.cpp:99
+msgid "Search &term:"
+msgstr "Szukane &wyrażenie:"
+
+#: webquery.cpp:105 webquerycsb.cpp:103 webquerydblp.cpp:79
+#: webquerysciencedirect.cpp:165 webqueryz3950.cpp:102
+msgid "&Number of results:"
+msgstr "&Liczba wyników:"
+
+#: webquery.cpp:153
+msgid "Searching"
+msgstr "Wyszukiwanie"
+
+#: webquery.cpp:153
+#, c-format
+msgid "Searching %1"
+msgstr "Wyszukiwanie %1"
+
+#: webquery.cpp:315
+msgid "&Import"
+msgstr "&Importuj"
+
+#: webquery.cpp:315
+msgid "Import selected items"
+msgstr "Importuj wybrane elementy"
+
+#: webquery.cpp:363
+#, c-format
+msgid "Search %1"
+msgstr "Szukaj %1"
+
+#: webquery.cpp:402
+msgid "You do not have the necessary permissions to query data from this service."
+msgstr ""
+"Nie posiadasz wystarczających uprawnień aby przeszukiwać dane z tego "
+"źródła."
+
+#: webquery.cpp:431
+msgid "&Engine:"
+msgstr "&Silnik:"
+
+#: webquery.cpp:442
+msgid "&Search"
+msgstr "&Szukaj"
+
+#: webquery.cpp:468
+msgid "Import all hits"
+msgstr "Importuj wszystkie wyniki"
+
+#: webqueryamatex.cpp:55
+msgid "Amatex"
+msgstr "Amatex"
+
+#: webqueryamatex.cpp:60
+msgid "About Amatex"
+msgstr "Informacje o Amatex"
+
+#: webqueryamatex.cpp:111 webquerybibsonomy.cpp:116 webquerycitebase.cpp:118
+#: webquerycsb.cpp:280 webquerydblp.cpp:204 webqueryieeexplore.cpp:156
+#: webquerymathscinet.cpp:176 webquerypubmed.cpp:159 webquerypubmed.cpp:171
+#: webqueryspireshep.cpp:206 webqueryzmath.cpp:113
+msgid "Querying database '%1' failed."
+msgstr "Przeszukiwanie bazy danych \"%\" nie powiodło się."
+
+#: webqueryarxiv.cpp:78
+msgid "arXiv"
+msgstr "arXiv"
+
+#: webqueryarxiv.cpp:83
+msgid "arXiv is an archive for preprints"
+msgstr "arXiv jest archiwum publikacji elektronicznych"
+
+#: webquerybibsonomy.cpp:63
+msgid "BibSonomy"
+msgstr "BibSonomy"
+
+#: webquerybibsonomy.cpp:68
+msgid "BibSonomy bookmark sharing system"
+msgstr "BibSonomy - system wpółdzielenia zakładek i danych bibliograficznych"
+
+#: webquerycitebase.cpp:62
+msgid "Citebase"
+msgstr "Citebase"
+
+#: webquerycitebase.cpp:67
+msgid "Citebase citation index"
+msgstr "Citebase Search to system indeksowania cytowań"
+
+#: webqueryciteseerx.cpp:83
+msgid "CiteSeerX"
+msgstr "CiteSeerX"
+
+#: webqueryciteseerx.cpp:92
+msgid "About CiteSeerX"
+msgstr "Informacje o CiteSeerX"
+
+#: webquerycsb.cpp:90
+msgid ""
+"_: Here, \"Field\" refers to a parameter for the CSB search (author, title, "
+"any)\n"
+"&Field:"
+msgstr "&Pole:"
+
+#: webquerycsb.cpp:111
+msgid "&Year:"
+msgstr "&Rok:"
+
+#: webquerycsb.cpp:125
+msgid "Sort &by:"
+msgstr "Sortuj &po:"
+
+#: webquerycsb.cpp:134
+msgid "Online papers only"
+msgstr "Tylko dokumenty online"
+
+#: webquerycsb.cpp:137 webqueryz3950.cpp:59
+msgid "any"
+msgstr "dowolny"
+
+#: webquerycsb.cpp:138 webqueryspireshep.cpp:86 webqueryz3950.cpp:59
+msgid "author"
+msgstr "autor"
+
+#: webquerycsb.cpp:139 webqueryspireshep.cpp:87 webqueryz3950.cpp:59
+msgid "title"
+msgstr "tytuł"
+
+#: webquerycsb.cpp:140
+msgid "exact"
+msgstr "dokładnie"
+
+#: webquerycsb.cpp:141
+msgid "until"
+msgstr "dopóki"
+
+#: webquerycsb.cpp:142
+msgid "from"
+msgstr "z"
+
+#: webquerycsb.cpp:144
+msgid "none"
+msgstr "brak"
+
+#: webquerycsb.cpp:145
+msgid "score"
+msgstr "wynik"
+
+#: webquerycsb.cpp:146
+msgid "year"
+msgstr "rok"
+
+#: webquerycsb.cpp:171
+msgid "Computer Science Bibliographies"
+msgstr "Computer Science Bibliographies"
+
+#: webquerycsb.cpp:176
+msgid "Copyright for the Bibliography Collection"
+msgstr "Prawa autorskie dla Bibliography Collection"
+
+#: webquerydblp.cpp:89
+msgid "Do not merge corresponding entries"
+msgstr "Nie łącz powiązanych wpisów"
+
+#: webquerydblp.cpp:110
+msgid "DBLP"
+msgstr "DBLP"
+
+#: webquerydblp.cpp:115
+msgid "DBLP - Copyright"
+msgstr "DBLP -Prawa autorskie"
+
+#: webquerygooglescholar.cpp:69
+msgid "Google Scholar"
+msgstr "Google Scholar"
+
+#: webquerygooglescholar.cpp:74
+msgid "About Google Scholar"
+msgstr "Informacje o Google Scholar"
+
+#: webqueryieeexplore.cpp:67
+msgid "IEEExplore"
+msgstr "IEEExplore"
+
+#: webqueryieeexplore.cpp:72
+msgid "What is IEEE Xplore?"
+msgstr "Co to jest IEEE Xplore?"
+
+#: webqueryieeexplore.cpp:109
+msgid "You have entered an invalid search."
+msgstr "Wyszukiwanie jest nieprawidłowe."
+
+#: webqueryieeexplore.cpp:109
+msgid "Search Error"
+msgstr "Błąd wyszukiwania"
+
+#: webquerymathscinet.cpp:81
+msgid ""
+"<qt>Use the same synatx as for <a "
+"href=\"http://www.math.tamu.edu/~comech/tools/bibget/\">BIBGET</a>. For "
+"spaces within a search element, use \"<tt>+</tt>\".<br/>Example: "
+"<tt>a=gilkey t=invariance book 1984</tt></qt>"
+msgstr ""
+"<qt>Użyj takiej samej składni jak w <a "
+"href=\"http://www.math.tamu.edu/~comech/tools/bibget/\">BIBGET</a>. Dla "
+"spacji wewnątrz szukanego elementu użyj \"<tt>+</tt>\".<br/>Przykład: "
+"<tt>a=gilkey t=invariance book 1984</tt></qt>"
+
+#: webquerymathscinet.cpp:102
+msgid "MathSciNet"
+msgstr "MathSciNet"
+
+#: webquerymathscinet.cpp:107
+msgid "American Mathematical Society"
+msgstr "American Mathematical Society"
+
+#: webquerypubmed.cpp:67
+msgid "NCBI (PubMed)"
+msgstr "NCBI (PubMed)"
+
+#: webquerypubmed.cpp:72
+msgid "NCBI's Disclaimer and Copyright"
+msgstr "NCBI - prawa autorskie i zastrzeżenia"
+
+#: webquerysciencedirect.cpp:84
+msgid "Title, abstract, keywords:"
+msgstr "Tytuł, abstrakt, słowa kluczowe:"
+
+#: webquerysciencedirect.cpp:103
+msgid "Author:"
+msgstr "Autor:"
+
+#: webquerysciencedirect.cpp:120
+msgid "Journal/book title:"
+msgstr "Tytuł czasopisma/książki:"
+
+#: webquerysciencedirect.cpp:135
+msgid "Volume:"
+msgstr "Tom:"
+
+#: webquerysciencedirect.cpp:145
+msgid "Issue:"
+msgstr "Wydanie:"
+
+#: webquerysciencedirect.cpp:155
+msgid "Page:"
+msgstr "Strona:"
+
+#: webquerysciencedirect.cpp:196
+msgid "ScienceDirect"
+msgstr "ScienceDirect"
+
+#: webquerysciencedirect.cpp:201
+msgid "About ScienceDirect"
+msgstr "Informacje o ScienceDirect"
+
+#: webqueryspireshep.cpp:42
+msgid "DESY (Germany)"
+msgstr "DESY (Niemcy)"
+
+#: webqueryspireshep.cpp:42
+msgid "FNAL (U.S.A.)"
+msgstr "FNAL (U.S.A.)"
+
+#: webqueryspireshep.cpp:42
+msgid "IHEP (Russia)"
+msgstr "IHEP (Rosja)"
+
+#: webqueryspireshep.cpp:42
+msgid "Durham U (U.K.)"
+msgstr "Durham U (Wielka Brytania)"
+
+#: webqueryspireshep.cpp:42
+msgid "SLAC (U.S.A.)"
+msgstr "SLAC (U.S.A.)"
+
+#: webqueryspireshep.cpp:42
+msgid "YITP (Japan)"
+msgstr "YITP (Japonia)"
+
+#: webqueryspireshep.cpp:42
+msgid "LIPI (Indonesia)"
+msgstr "LIPI (Indonezja)"
+
+#: webqueryspireshep.cpp:78
+msgid "Type:"
+msgstr "Typ:"
+
+#: webqueryspireshep.cpp:85
+msgid "raw query"
+msgstr "surowe zapytanie"
+
+#: webqueryspireshep.cpp:88
+msgid "journal"
+msgstr "czasopismo"
+
+#: webqueryspireshep.cpp:89
+msgid "EPrint number"
+msgstr "numer EPrint"
+
+#: webqueryspireshep.cpp:90
+msgid "report number"
+msgstr "numer raportu"
+
+#: webqueryspireshep.cpp:91
+msgid "keywords"
+msgstr "słowa kluczowe"
+
+#: webqueryspireshep.cpp:109
+msgid "Include abstracts from arxiv.org if available"
+msgstr "Załącz abstrakty z arXiv.org jeśli są dostępne"
+
+#: webqueryspireshep.cpp:130
+msgid "SPIRES-HEP"
+msgstr "SPIRES-HEP"
+
+#: webqueryspireshep.cpp:135
+msgid "SPIRES-HEP Search"
+msgstr "Wyszukiwanie w SPIRES-HEP"
+
+#: webqueryz3950.cpp:59
+msgid "publisher"
+msgstr "wydawca"
+
+#: webqueryz3950.cpp:94
+msgid "Server:"
+msgstr "Serwer:"
+
+#: webqueryz3950.cpp:116
+msgid "Search term 1:"
+msgstr "Szukane wyrażenie 1:"
+
+#: webqueryz3950.cpp:126 webqueryz3950.cpp:147
+msgid "Search in:"
+msgstr "Wyszukiwanie w:"
+
+#: webqueryz3950.cpp:138
+msgid "Search term 2:"
+msgstr "Szukane wyrażenie 2:"
+
+#: webqueryz3950.cpp:163
+msgid "and"
+msgstr "i"
+
+#: webqueryz3950.cpp:164
+msgid "or"
+msgstr "lub"
+
+#: webqueryz3950.cpp:330
+#, c-format
+msgid ""
+"The server returned the following message:\n"
+"\n"
+"%1"
+msgstr ""
+"Serwer zwrócił następujący komunikat:\n"
+"\n"
+"%1"
+
+#: webqueryz3950.cpp:330
+msgid "Error querying Z39.50 server"
+msgstr "Błąd odpytywania serwera Z39.50"
+
+#: webqueryzmath.cpp:61
+msgid "Zentralblatt MATH"
+msgstr "Zentralblatt MATH"
+
+#: webqueryzmath.cpp:66
+msgid "About Zentralblatt MATH"
+msgstr "Informacje o Zentralblatt MATH"
+
+#: z3950connection.cpp:158
+msgid "Query error!"
+msgstr "Błąd zapytania!"
+
+#: z3950connection.cpp:205
+msgid "Connection search error %1: %2"
+msgstr "Błąd połączenia przy wyszukiwaniu %1: %2"
+
+#: z3950connection.cpp:294
+msgid "Record syntax error"
+msgstr "Błąd składni rekordu"
+
+#: z3950connection.cpp:405
+msgid "Connection error %1: %2"
+msgstr "Błąd połączenia %1: %2"
+
diff --git a/po/ru.po b/po/ru.po
new file mode 100644
index 0000000..c68a97c
--- /dev/null
+++ b/po/ru.po
@@ -0,0 +1,3038 @@
+# translation of ru.po to Русский
+# Header entry was created by KBabel!
+#
+# Alexey Beshenov <al@beshenov.ru>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: ru\n"
+"POT-Creation-Date: 2010-07-01 13:55+0200\n"
+"PO-Revision-Date: 2008-03-15 20:20+0300\n"
+"Last-Translator: Alexey Beshenov <al@beshenov.ru>\n"
+"Language-Team: Русский\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Report-Msgid-Bugs-To: \n"
+"X-Generator: KBabel 1.11.4\n"
+
+#: _translatorinfo.cpp:1
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Алексей Бешенов"
+
+#: _translatorinfo.cpp:3
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "al@beshenov.ru"
+
+#: commentwidget.cpp:55
+msgid "Co&mment:"
+msgstr "&Комментарий:"
+
+#: commentwidget.cpp:64
+msgid "&Use @Comment for comment instead of plain text"
+msgstr ""
+"&Использовать @Comment для комментариев "
+"вместо простого текста"
+
+#: commentwidget.cpp:82
+msgid "Edit BibTeX Comment"
+msgstr "Редактировать комментарий BibTeX"
+
+#: documentlistview.cpp:120
+#, fuzzy
+msgid "List View"
+msgstr "С&писок"
+
+#: documentlistview.cpp:120
+#, fuzzy
+msgid "Updating main view ..."
+msgstr "Обновление основного вида"
+
+#: documentlistview.cpp:253
+msgid "Show Columns"
+msgstr "Показать столбцы"
+
+#: documentlistview.cpp:259 documentlistview.cpp:756 settingsediting.cpp:164
+msgid "Element Type"
+msgstr "Тип элемента"
+
+#: documentlistview.cpp:450
+msgid "Paste text as..."
+msgstr "Вставить текст как…"
+
+#: documentlistview.cpp:757 settingsediting.cpp:165
+msgid "Entry Id"
+msgstr "Идентификатор записи"
+
+#: documentlistviewitem.cpp:114 kbibtex_part.cpp:506
+msgid "Comment"
+msgstr "Комментарий"
+
+#: documentlistviewitem.cpp:124 kbibtex_part.cpp:507 macrowidget.cpp:93
+msgid "Macro"
+msgstr "Макрос"
+
+#: documentlistviewitem.cpp:138 kbibtex_part.cpp:505 preamblewidget.cpp:78
+msgid "Preamble"
+msgstr "Преамбула"
+
+#: documentsourceview.cpp:214
+#, fuzzy
+msgid "Source View"
+msgstr "Ис&ходный код"
+
+#: documentsourceview.cpp:214
+msgid "Converting BibTeX document to plain text ..."
+msgstr ""
+
+#: documentsourceview.cpp:369
+msgid ""
+"Could not find text '%1' in the document.\n"
+"Start from the beginning?"
+msgstr ""
+"Не могу найти в документе текст «%1».\n"
+"Начать сначала?"
+
+#: documentsourceview.cpp:369
+msgid "Find text in source view"
+msgstr "Найти текст в исходном коде"
+
+#: documentsourceview.cpp:369
+msgid "Restart search"
+msgstr "Перезапустить поиск"
+
+#: documentwidget.cpp:120
+msgid "L&ist view"
+msgstr "С&писок"
+
+#: documentwidget.cpp:142
+msgid "So&urce view"
+msgstr "Ис&ходный код"
+
+#: documentwidget.cpp:174
+msgid "<qt>Loading file <b>%1</b></qt>"
+msgstr "<qt>Загрузка файла <b>%1</b></qt>"
+
+#: documentwidget.cpp:221
+msgid "Do you want to search for duplicates in the merged document?"
+msgstr ""
+
+#: documentwidget.cpp:221
+msgid "Find duplicates?"
+msgstr ""
+
+#: documentwidget.cpp:221 findduplicates.cpp:58 mergeelements.cpp:484
+#: mergeelements.cpp:492 settingsediting.cpp:216
+msgid "Find Duplicates"
+msgstr ""
+
+#: documentwidget.cpp:281 documentwidget.cpp:1345 documentwidget.cpp:1359
+#: kbibtex_part.cpp:306 kbibtex_part.cpp:320
+#, fuzzy
+msgid "Choose file format"
+msgstr "Формат файла не распознан"
+
+#: documentwidget.cpp:281 documentwidget.cpp:1345 documentwidget.cpp:1359
+#: kbibtex_part.cpp:306 kbibtex_part.cpp:320
+#, fuzzy
+msgid "Choose file format of file '%1':"
+msgstr "Не могу открыть файл «%1»."
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid ""
+"The selected filename \"%1\" is a symbolic link pointing to \"%2\".\n"
+"Replace the link with a new file or overwrite the existing file the link "
+"points to?"
+msgstr ""
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Symbolic Link"
+msgstr ""
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+#, fuzzy
+msgid "Replace link"
+msgstr "Идентификатор записи"
+
+#: documentwidget.cpp:296 kbibtex_part.cpp:228
+msgid "Overwrite file the link points to"
+msgstr ""
+
+#: documentwidget.cpp:301
+msgid "<qt>Writing file <b>%1</b></qt>"
+msgstr "<qt>Запись файла <b>%1</b></qt>"
+
+#: documentwidget.cpp:388
+#, fuzzy
+msgid ""
+"To export a BibTeX document to the Rich Text Format (RTF) KBibTeX requires "
+"the program 'latex2rtf'."
+msgstr ""
+"Для экспортирования документа BibTeX в RTF "
+"требуется установить программу latex2rtf."
+
+#: documentwidget.cpp:405
+#, fuzzy
+msgid ""
+"To export a BibTeX document to the DocBook5 format KBibTeX requires the "
+"program 'bib2db5'."
+msgstr ""
+"Для экспортирования документа BibTeX в RTF "
+"требуется установить программу latex2rtf."
+
+#: documentwidget.cpp:420
+msgid ""
+"Embedding files into the PDF file is enabled, but the required file "
+"'embedfile.sty' was not found. Embedding files will be disabled."
+msgstr ""
+"Встраивание файлов в PDF включено, но "
+"необходимый файл «embedfile.sty» не найден. "
+"Встраивание будет отключено."
+
+#: documentwidget.cpp:420
+msgid "Embedding files disabled"
+msgstr "Встраивание файлов отключено"
+
+#: documentwidget.cpp:471
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewMacro%1"
+msgstr "NewMacro%1"
+
+#: documentwidget.cpp:489
+msgid "Put your comment here..."
+msgstr "Введите здесь комментарий…"
+
+#: documentwidget.cpp:543
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewString%1"
+msgstr "NewString%1"
+
+#: documentwidget.cpp:544
+msgid "No text yet"
+msgstr "Еще нет текста"
+
+#: documentwidget.cpp:548
+msgid "@comment{ Put your comment here... }"
+msgstr ""
+"@comment{ Введите здесь свой комментарий... }"
+
+#: documentwidget.cpp:552
+msgid "@preamble{\"Put your preamble here using double quotes...\"}"
+msgstr ""
+"@preamble{\"Укажите здесь в двойных кавычках "
+"преамбулу...\"}"
+
+#: documentwidget.cpp:568
+msgid "REQUIRED"
+msgstr "ОБЯЗАТЕЛЬНО"
+
+#: documentwidget.cpp:568
+msgid "optional"
+msgstr "необязятально"
+
+#: documentwidget.cpp:610
+#, fuzzy, c-format
+msgid ""
+"_n: This BibTeX file contains 1 element.\n"
+"This BibTeX file contains %n elements."
+msgstr ""
+"Этот файл BibTeX содержит %n элемент.\n"
+"Этот файл BibTeX содержит %n элемента.\n"
+"Этот файл BibTeX содержит %n элементов."
+
+#: documentwidget.cpp:610
+msgid "File Statistics"
+msgstr "Статистика файла"
+
+#: documentwidget.cpp:806 documentwidget.cpp:815
+msgid "%1 ... %2"
+msgstr "%1 ... %2"
+
+#: documentwidget.cpp:827
+msgid "New keyword:"
+msgstr "Новое ключевое слово:"
+
+#: documentwidget.cpp:999
+msgid ""
+"\n"
+"\n"
+"Either LyX is not running or has not been correctly configured to send "
+"references to."
+msgstr ""
+
+#: documentwidget.cpp:1000
+msgid "Error communicating with LyX"
+msgstr "Ошибка обмена данными с LyX"
+
+#: documentwidget.cpp:1007
+msgid "Cannot determine how to send references to LyX."
+msgstr ""
+
+#: documentwidget.cpp:1012
+msgid "The inpipe as configured in LyX does not exist."
+msgstr ""
+
+#: documentwidget.cpp:1016
+msgid "Cannot open the inpipe as configured in LyX."
+msgstr ""
+
+#: documentwidget.cpp:1288 documentwidget.cpp:1293
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewEntry%1"
+msgstr "NewEntry%1"
+
+#: documentwidget.cpp:1398
+msgid "The file '%1' does not contain a known type of bibliography."
+msgstr ""
+"Файл «%1» не содержит библиографию "
+"известного типа."
+
+#: documentwidget.cpp:1398
+msgid "Unknown file format"
+msgstr "Формат файла не распознан"
+
+#: documentwidget.cpp:1453
+msgid "No preview available"
+msgstr "Просмотр недоступен"
+
+#: documentwidget.cpp:1554
+msgid ""
+"File '%1' has been modified. Reload file to import changes or ignore changes?"
+msgstr ""
+"Файл «%1» был изменен. Перезагрузить файл "
+"или игнорировать изменения?"
+
+#: documentwidget.cpp:1554
+msgid "Reload file?"
+msgstr "Перезагрузить файл?"
+
+#: documentwidget.cpp:1554
+msgid "Ignore"
+msgstr "Игнорировать"
+
+#: documentwidget.cpp:1691
+#, fuzzy
+msgid "You must set a default id suggestion in the settings dialog."
+msgstr ""
+"Использовать предложение идентификатора "
+"по умолчанию для задания идентификатора "
+"записи"
+
+#: documentwidget.cpp:1713
+msgid "No entries were selected."
+msgstr ""
+
+#: documentwidget.cpp:1714
+msgid ""
+"The following changes will be applied to the currently selected elements.\n"
+"Conflicts with duplicate entry ids will be resolved when applying the new "
+"ids."
+msgstr ""
+
+#: documentwidget.cpp:1714 kbibtex_part.cpp:482
+msgid "Normalize Entry Ids"
+msgstr ""
+
+#: documentwidget.cpp:1714
+#, fuzzy
+msgid "Replace Entry Ids"
+msgstr "Идентификатор записи"
+
+#: entrywidget.cpp:65
+msgid "Edit BibTeX Entry"
+msgstr "Редактировать запись BibTeX"
+
+#: entrywidget.cpp:142
+msgid ""
+"The current entry has been modified. Do you want do discard your changes?"
+msgstr ""
+"Текущая запись была отредактирована. "
+"Хотите отказаться от изменений?"
+
+#: entrywidget.cpp:142
+msgid "Discard changes"
+msgstr "Отказаться от изменений"
+
+#: entrywidget.cpp:256
+msgid ""
+"The source code does not contain valid BibTeX code.\n"
+"\n"
+"Restore previous version or continue editing?"
+msgstr ""
+
+#: entrywidget.cpp:256
+#, fuzzy
+msgid "Invalid BibTeX code"
+msgstr "Редактировать макрос BibTeX"
+
+#: entrywidget.cpp:314
+msgid "E&ntry Type:"
+msgstr "&Тип записи:"
+
+#: entrywidget.cpp:324
+msgid "&Identifier"
+msgstr "&Идентификатор"
+
+#: entrywidget.cpp:341
+msgid "Use the default id suggestion to set the entry id"
+msgstr ""
+"Использовать предложение идентификатора "
+"по умолчанию для задания идентификатора "
+"записи"
+
+#: entrywidget.cpp:342
+msgid ""
+"Use the default id suggestion to set the entry id.\n"
+"You can edit and select the default id suggestion in the configuration "
+"dialog."
+msgstr ""
+"Использовать предложение идентификатора "
+"по умолчанию для задания идентификатора "
+"записи.\n"
+"Вы можете редактировать и выбрать "
+"предложение идентификатора по умолчанию "
+"в диалоге настроек."
+
+#: entrywidget.cpp:350 settingsediting.cpp:194
+msgid "Enable all &fields for editing"
+msgstr "&Разрешить редактирование всех полей"
+
+#: entrywidget.cpp:353
+#, fuzzy
+msgid "Refetch"
+msgstr "Сбросить"
+
+#: entrywidget.cpp:361
+msgid "Message"
+msgstr "Сообщение"
+
+#: entrywidget.cpp:385 entrywidgettitle.cpp:116 entrywidgettitle.cpp:118
+#: idsuggestions.cpp:345 idsuggestionswidget.cpp:201
+#: idsuggestionswidget.cpp:485 settings.cpp:681 webquery.cpp:450
+msgid "Title"
+msgstr "Заголовок"
+
+#: entrywidget.cpp:386
+msgid "Author/Editor"
+msgstr "Автор (редактор)"
+
+#: entrywidget.cpp:387
+msgid "Publication"
+msgstr "Публикация"
+
+#: entrywidget.cpp:388 kbibtex_part.cpp:500 settings.cpp:720
+msgid "Misc"
+msgstr "Разное"
+
+#: entrywidget.cpp:389 settings.cpp:659 settingskeyword.cpp:161
+msgid "Keywords"
+msgstr "Ключевые слова"
+
+#: entrywidget.cpp:390
+msgid "External"
+msgstr "Внешние"
+
+#: entrywidget.cpp:391
+msgid "User Defined"
+msgstr "Пользовательские поля"
+
+#: entrywidget.cpp:392
+msgid "Other Fields"
+msgstr "Другие поля"
+
+#: entrywidget.cpp:395
+msgid "Source"
+msgstr "Исходный код"
+
+#: entrywidget.cpp:438
+msgid "Please supply more fields to use the default id"
+msgstr ""
+"Пожалуйста, укажите больше полей для "
+"использования идентификатора по "
+"умолчанию"
+
+#: entrywidget.cpp:441
+msgid "Using '%1' as entry id"
+msgstr ""
+"В качестве идентификатора записи "
+"используется «%1»"
+
+#: entrywidget.cpp:446
+msgid "An entry has to have an identifier"
+msgstr "Запись должна иметь идентификатор"
+
+#: entrywidget.cpp:448
+#, c-format
+msgid "The identifier contains invalid characters at position %1"
+msgstr ""
+"Идентификатор содержит недопустимые "
+"символы в позиции %1"
+
+#: entrywidget.cpp:458
+msgid "The identifier contains non-ascii characters, first one is '%1'"
+msgstr ""
+"Идентификатор содержит не ASCII-символы, "
+"первый из них — «%1»"
+
+#: entrywidget.cpp:474
+msgid "This BibTeX file already contains an entry with id '%1'."
+msgstr ""
+
+#: entrywidget.cpp:491
+msgid "Require either 'Editor', 'Organization', or 'Key'"
+msgstr ""
+"Требовать указания редактора, "
+"организации, либо ключа"
+
+#: entrywidget.cpp:500
+msgid ""
+"Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Book "
+"Title'"
+msgstr ""
+"Запись из перекрестной ссылки «%1» должна "
+"содержать указание редактора, ключа, либо "
+"заголовка книги"
+
+#: entrywidget.cpp:510
+msgid "Cross referenced entry '%1' must contain 'Volume'"
+msgstr ""
+"Запись из перекрестной ссылки «%1» должна "
+"содержать указание тома"
+
+#: entrywidget.cpp:513
+msgid ""
+"Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Series'"
+msgstr ""
+"Запись из перекрестной ссылки «%1» должна "
+"содержать указание редактора, ключа, либо "
+"серии"
+
+#: entrywidget.cpp:537
+msgid "No suggestions available"
+msgstr "Нет доступных предложений"
+
+#: entrywidget.cpp:641
+msgid ""
+"Currently only refetching from ArXiv sources is supported.\n"
+"\n"
+"This requires that the URL field points to an \"abstract\" page (i.e. the "
+"URL contains \"arxiv.org/abs/\")."
+msgstr ""
+
+#: entrywidget.cpp:641 entrywidget.cpp:668
+msgid "Refetching entry"
+msgstr ""
+
+#: entrywidget.cpp:668
+msgid "Fetching updated bibliographic data failed."
+msgstr ""
+
+#: entrywidgetauthor.cpp:83
+msgid "The fields 'Author' or 'Editor' are required, but both are missing"
+msgstr ""
+"Поля «Автор» или «Редактор» обязательны, "
+"но ни одно из них не заполнено"
+
+#: entrywidgetauthor.cpp:98 entrywidgetauthor.cpp:100
+#: idsuggestionswidget.cpp:112 idsuggestionswidget.cpp:483 settings.cpp:633
+#: settingssearchurl.cpp:134 webquery.cpp:449
+msgid "Author"
+msgstr "Автор"
+
+#: entrywidgetauthor.cpp:100
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewAuthor"
+msgstr "NewAuthor"
+
+#: entrywidgetauthor.cpp:105 entrywidgetauthor.cpp:107 settings.cpp:645
+msgid "Editor"
+msgstr "Редактор"
+
+#: entrywidgetauthor.cpp:107
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewEditor"
+msgstr "NewEditor"
+
+#: entrywidgetexternal.cpp:197 entrywidgetexternal.cpp:285
+msgid "Previously used directory"
+msgstr ""
+
+#: entrywidgetexternal.cpp:223 entrywidgetexternal.cpp:225
+#: entrywidgetexternal.cpp:235 settings.cpp:685 settingssearchurl.cpp:135
+msgid "URL"
+msgstr "URL"
+
+#: entrywidgetexternal.cpp:235 entrywidgetexternal.cpp:268
+#, c-format
+msgid "Open %1"
+msgstr "Открыть %1"
+
+#: entrywidgetexternal.cpp:238 entrywidgetexternal.cpp:242 settings.cpp:641
+msgid "DOI"
+msgstr "DOI"
+
+#: entrywidgetexternal.cpp:239
+msgid "Digital Object Identifier"
+msgstr "Идентификатор цифрового объекта"
+
+#: entrywidgetexternal.cpp:253
+msgid "Open DOI"
+msgstr "Открыть DOI"
+
+#: entrywidgetexternal.cpp:256 entrywidgetexternal.cpp:258
+#: entrywidgetexternal.cpp:268 settings.cpp:661
+msgid "Local File"
+msgstr "Локальный файл"
+
+#: entrywidgetexternal.cpp:274
+msgid "&Browse..."
+msgstr "&Просмотр…"
+
+#: entrywidgetexternal.cpp:275
+msgid "Browse for a local file"
+msgstr "Поиск локального файла"
+
+#: entrywidgetexternal.cpp:282
+msgid "Select base directory"
+msgstr ""
+
+#: entrywidgetexternal.cpp:283
+msgid "Current directory"
+msgstr ""
+
+#: entrywidgetkeyword.cpp:56
+msgid "Global"
+msgstr "Глобальный"
+
+#: entrywidgetkeyword.cpp:61
+msgid "In this file only"
+msgstr "Только в этом файле"
+
+#: entrywidgetkeyword.cpp:168
+msgid ""
+"The keyword '%1' does already exist in the list of keywords.\n"
+"The old name has been restored."
+msgstr ""
+"Ключевое слово «%1» уже содержится в "
+"перечне.\n"
+"Было восстановлено прежнее имя."
+
+#: entrywidgetkeyword.cpp:168
+msgid "Renaming keyword failed"
+msgstr ""
+"Не удалось переименовать ключевое слово"
+
+#: entrywidgetkeyword.cpp:193
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewKeyword%1"
+msgstr "NewKeyword%1"
+
+#: entrywidgetkeyword.cpp:230
+msgid "Keyword"
+msgstr "Ключевое слово"
+
+#: entrywidgetkeyword.cpp:231
+msgid "Origin"
+msgstr "Источник"
+
+#: entrywidgetkeyword.cpp:238 settingskeyword.cpp:166
+msgid ""
+"_: keyword\n"
+"New"
+msgstr "Новое"
+
+#: entrywidgetkeyword.cpp:241
+msgid "Add a new keyword to the list"
+msgstr ""
+"Добавить в перечень новое ключевое слово"
+
+#: entrywidgetkeyword.cpp:245 settingskeyword.cpp:169
+msgid ""
+"_: keyword\n"
+"Edit"
+msgstr "Редактировать"
+
+#: entrywidgetkeyword.cpp:247
+msgid "Edit the selected keyword"
+msgstr ""
+"Редактировать выбранное ключевое слово"
+
+#: entrywidgetkeyword.cpp:252
+msgid ""
+"_: keyword\n"
+"Toggle &global"
+msgstr "Сделать &глобальным"
+
+#: entrywidgetkeyword.cpp:254
+msgid "Add or remove the selected keyword to or from the global list"
+msgstr ""
+"Добавить или удалить выбранное ключевое "
+"слово из глобального перечня"
+
+#: entrywidgetkeyword.cpp:259
+msgid ""
+"There is no need to delete keywords. Simply uncheck unwanted keywords and "
+"make them non-global.\n"
+"Global keywords can also be edited in the settings dialog."
+msgstr ""
+"Нет необходимости удалять ключевые "
+"слова. Просто снимите отметку у ненужных "
+"слов и сделайте их неглобальными.\n"
+"Глобальные ключевые слова также могут "
+"редактироваться в диалоге настроек."
+
+#: entrywidgetmisc.cpp:135 entrywidgetmisc.cpp:137 mergeelements.cpp:581
+#: settings.cpp:683 settingsuserdefinedinput.cpp:172
+msgid "Type"
+msgstr "Тип"
+
+#: entrywidgetmisc.cpp:142 entrywidgetmisc.cpp:144 entrywidgetother.cpp:153
+#: mergeelements.cpp:72 settings.cpp:657
+msgid "Key"
+msgstr "Ключ"
+
+#: entrywidgetmisc.cpp:149 entrywidgetmisc.cpp:151 settings.cpp:667
+msgid "Note"
+msgstr "Примечание"
+
+#: entrywidgetmisc.cpp:156 entrywidgetmisc.cpp:158 settings.cpp:631
+msgid "Annote"
+msgstr "Аннотация"
+
+#: entrywidgetmisc.cpp:163 entrywidgetmisc.cpp:165 settings.cpp:627
+msgid "Abstract"
+msgstr "Резюме"
+
+#: entrywidgetother.cpp:131
+msgid "Name of the user-defined field"
+msgstr "Имя пользовательского поля"
+
+#: entrywidgetother.cpp:132
+msgid ""
+"The name of the user-defined field. Should only contain letters and numbers."
+msgstr ""
+"Имя пользовательского поля. Должно "
+"состоять только из букв и цифр."
+
+#: entrywidgetother.cpp:133
+msgid "&Name:"
+msgstr "&Имя:"
+
+#: entrywidgetother.cpp:137 entrywidgetother.cpp:201
+msgid "&Add"
+msgstr "&Добавить"
+
+#: entrywidgetother.cpp:141 entrywidgetother.cpp:154 mergeelements.cpp:72
+msgid "Value"
+msgstr "Значение"
+
+#: entrywidgetother.cpp:143
+msgid "Content of the user-defined field"
+msgstr "Содержимое пользовательского поля"
+
+#: entrywidgetother.cpp:144
+msgid "The content of the user-defined field. May contain any text."
+msgstr ""
+"Содержимое пользовательского поля. Может "
+"содержать произвольный текст."
+
+#: entrywidgetother.cpp:145
+msgid "&Content:"
+msgstr "&Содержимое:"
+
+#: entrywidgetother.cpp:159
+msgid "&List:"
+msgstr "&Список:"
+
+#: entrywidgetother.cpp:168
+msgid "Op&en"
+msgstr "&Открыть"
+
+#: entrywidgetpublication.cpp:308
+msgid "The fields 'Chapter' or 'Pages' are required, but both are missing"
+msgstr ""
+"Поле «Глава» или «Страницы» обязательно, "
+"но ни одно не заполнено"
+
+#: entrywidgetpublication.cpp:325
+msgid "The field 'Journal' refers to a not existing entry"
+msgstr ""
+"Поле «Журнал» ссылается на "
+"несуществующую запись"
+
+#: entrywidgetpublication.cpp:392
+#, c-format
+msgid "http://en.wikipedia.org/w/index.php?title=Special:Booksources&isbn=%1"
+msgstr "http://en.wikipedia.org/w/index.php?title=Special:Booksources&isbn=%1"
+
+#: entrywidgetpublication.cpp:405 entrywidgetpublication.cpp:407
+#: settings.cpp:655
+msgid "Journal"
+msgstr "Журнал"
+
+#: entrywidgetpublication.cpp:412 entrywidgetpublication.cpp:414
+#: settings.cpp:687
+msgid "Volume"
+msgstr "Том"
+
+#: entrywidgetpublication.cpp:419 entrywidgetpublication.cpp:421
+#: settings.cpp:669
+msgid "Number"
+msgstr "Номер"
+
+#: entrywidgetpublication.cpp:426 entrywidgetpublication.cpp:435
+#: settings.cpp:665
+msgid "Month"
+msgstr "Месяц"
+
+#: entrywidgetpublication.cpp:440 entrywidgetpublication.cpp:442
+#: idsuggestionswidget.cpp:276 idsuggestionswidget.cpp:484 settings.cpp:689
+#: webquery.cpp:448
+msgid "Year"
+msgstr "Год"
+
+#: entrywidgetpublication.cpp:447 entrywidgetpublication.cpp:449
+#: settings.cpp:673
+msgid "Pages"
+msgstr "Страницы"
+
+#: entrywidgetpublication.cpp:454 entrywidgetpublication.cpp:456
+#: settings.cpp:643
+msgid "Edition"
+msgstr "Издание"
+
+#: entrywidgetpublication.cpp:461 entrywidgetpublication.cpp:463
+#: settings.cpp:637
+msgid "Chapter"
+msgstr "Глава"
+
+#: entrywidgetpublication.cpp:468 entrywidgetpublication.cpp:470
+msgid "Cross Reference"
+msgstr "Перекрестная ссылка"
+
+#: entrywidgetpublication.cpp:476 entrywidgetpublication.cpp:478
+#: settings.cpp:671
+msgid "Organization"
+msgstr "Организация"
+
+#: entrywidgetpublication.cpp:483 entrywidgetpublication.cpp:485
+#: settings.cpp:675
+msgid "Publisher"
+msgstr "Издатель"
+
+#: entrywidgetpublication.cpp:490 entrywidgetpublication.cpp:492
+#: settings.cpp:679
+msgid "School"
+msgstr "Факультет"
+
+#: entrywidgetpublication.cpp:497 entrywidgetpublication.cpp:499
+#: settings.cpp:649
+msgid "Institution"
+msgstr "Учебное заведение"
+
+#: entrywidgetpublication.cpp:504 entrywidgetpublication.cpp:506
+#: settings.cpp:663
+msgid "Location"
+msgstr "Местоположение"
+
+#: entrywidgetpublication.cpp:511 entrywidgetpublication.cpp:513
+#: settings.cpp:629
+msgid "Address"
+msgstr "Адрес"
+
+#: entrywidgetpublication.cpp:518 entrywidgetpublication.cpp:527
+#: settings.cpp:651
+msgid "ISBN"
+msgstr "ISBN"
+
+#: entrywidgetpublication.cpp:525
+msgid "Lookup ISBN number in Wikipedia"
+msgstr "Искать ISBN в «Википедии»"
+
+#: entrywidgetpublication.cpp:533 entrywidgetpublication.cpp:535
+#: settings.cpp:653
+msgid "ISSN"
+msgstr "ISSN"
+
+#: entrywidgetpublication.cpp:540 entrywidgetpublication.cpp:542
+#: settings.cpp:647
+msgid "How Published"
+msgstr "Как опубликовано"
+
+#: entrywidgettab.cpp:65
+msgid "The field '%1' is required, but missing"
+msgstr "Поле «%1» обязательно, но не заполнено"
+
+#: entrywidgettab.cpp:71
+msgid "Using cross referenced entry '%1' for field '%2'"
+msgstr ""
+"Для поля «%2» используется элемент "
+"перекрестной ссылки «%1»"
+
+#: entrywidgettab.cpp:79
+msgid "The field '%1' contains string keys with invalid characters"
+msgstr ""
+"Поле «%1» содержит строковые ключи с "
+"недопустимыми символами"
+
+#: entrywidgettab.cpp:87
+msgid "The field '%1' contains some unknown error"
+msgstr "Поле «%1» содержит неопознанную ошибку"
+
+#: entrywidgettitle.cpp:122 entrywidgettitle.cpp:124 settings.cpp:635
+msgid "Book Title"
+msgstr "Заглавие книги"
+
+#: entrywidgettitle.cpp:128 entrywidgettitle.cpp:130 settings.cpp:677
+msgid "Series"
+msgstr "Серия"
+
+#: entrywidgetuserdefined.cpp:137
+msgid "Please use the settings dialog to add user-defined fields here."
+msgstr ""
+"Используйте диалог настроек, чтобы "
+"добавить пользовательские поля."
+
+#: fieldlineedit.cpp:91 fieldlineedit.cpp:92 fieldlineedit.cpp:96
+#: fieldlineedit.cpp:97 fieldlistview.cpp:100 fieldlistview.cpp:101
+msgid "BibTeX field '%1'"
+msgstr "Поле BibTeX «%1»"
+
+#: fieldlineedit.cpp:228
+msgid "Set '%1' to be a string key"
+msgstr "Сделать «%1» строковым ключом"
+
+#: fieldlineedit.cpp:240
+msgid "Edit '%1' as a concatenated value"
+msgstr ""
+"Редактировать «%1» как объединенное "
+"значение"
+
+#: fieldlineedit.cpp:325 fieldlineedit.cpp:328
+msgid "Concatenated value"
+msgstr "Объединенное значение"
+
+#: fieldlistview.cpp:321
+msgid "Add new '%1' item (Ctrl+A)"
+msgstr "Добавить новый элемент «%1» (Ctrl+A)"
+
+#: fieldlistview.cpp:327
+msgid "Edit current '%1' item (F2)"
+msgstr "Редактировать текущий элемент «%1» (F2)"
+
+#: fieldlistview.cpp:333
+msgid "Delete current '%1' item (Del)"
+msgstr "Удалить текущий элемент «%1» (Del)"
+
+#: fieldlistview.cpp:335 idsuggestionswidget.cpp:59 valuewidget.cpp:242
+msgid "Up"
+msgstr "Вверх"
+
+#: fieldlistview.cpp:339
+msgid "Move current '%1' item up (Ctrl+Up)"
+msgstr ""
+"Переместить текущий элемент «%1» вверх "
+"(Ctrl+Вверх)"
+
+#: fieldlistview.cpp:341 idsuggestionswidget.cpp:60 valuewidget.cpp:247
+msgid "Down"
+msgstr "Вниз"
+
+#: fieldlistview.cpp:345
+msgid "Move current '%1' item down (Ctrl+Down)"
+msgstr ""
+"Переместить текущий элемент «%1» вниз "
+"(Ctrl+Вниз)"
+
+#: fieldlistview.cpp:347
+msgid "Complex..."
+msgstr "Объединенная строка..."
+
+#: fieldlistview.cpp:351
+msgid "Edit current '%1' item as a concatenated string (Ctrl+Alt+C)"
+msgstr ""
+"Редактировать текущий элемент «%1» как "
+"объединенную строку (Ctrl+Alt+C)"
+
+#: fieldlistview.cpp:353
+msgid "... and others (et al.)"
+msgstr "... и другие (и др.)"
+
+#: findduplicates.cpp:58
+msgid "Searching for duplicates..."
+msgstr ""
+
+#: idsuggestions.cpp:330 idsuggestionswidget.cpp:128
+msgid "First author only"
+msgstr "Только первый автор"
+
+#: idsuggestions.cpp:331 idsuggestionswidget.cpp:129
+#, fuzzy
+msgid "All but first author"
+msgstr "Все авторы"
+
+#: idsuggestions.cpp:332 idsuggestionswidget.cpp:127
+msgid "All authors"
+msgstr "Все авторы"
+
+#: idsuggestions.cpp:335
+#, c-format
+msgid ""
+"_n: , but only first letter of each last name\n"
+", but only first %n letters of each last name"
+msgstr ""
+", но только %n первая буква каждой фамилии\n"
+", но только %n первые буквы каждой фамилии\n"
+", но только %n первых букв каждой фамилии"
+
+#: idsuggestions.cpp:336 idsuggestions.cpp:348
+msgid ", in upper case"
+msgstr ", в верхнем регистре"
+
+#: idsuggestions.cpp:337 idsuggestions.cpp:349
+msgid ", in lower case"
+msgstr ", в нижнем регистре"
+
+#: idsuggestions.cpp:338 idsuggestions.cpp:350
+msgid ", with '%1' in between"
+msgstr ", с разделителем «%1»"
+
+#: idsuggestions.cpp:340
+msgid "Year (2 digits)"
+msgstr "Год (2 цифры)"
+
+#: idsuggestions.cpp:341
+msgid "Year (4 digits)"
+msgstr "Год (4 цифры)"
+
+#: idsuggestions.cpp:347
+#, fuzzy, c-format
+msgid ""
+"_n: , but only first letter of each word\n"
+", but only first %n letters of each word"
+msgstr ""
+", но только %n первая буква каждой фамилии\n"
+", но только %n первые буквы каждой фамилии\n"
+", но только %n первых букв каждой фамилии"
+
+#: idsuggestions.cpp:351
+msgid ", small words removed"
+msgstr ", без коротких слов"
+
+#: idsuggestions.cpp:353
+msgid "Text: '%1'"
+msgstr "Текст: «%1»"
+
+#: idsuggestionswidget.cpp:140 idsuggestionswidget.cpp:221
+msgid "Casing:"
+msgstr "Регистр:"
+
+#: idsuggestionswidget.cpp:145 idsuggestionswidget.cpp:226
+msgid "No change"
+msgstr "Не менять"
+
+#: idsuggestionswidget.cpp:146 idsuggestionswidget.cpp:227
+msgid "Lower case"
+msgstr "Нижний регистр"
+
+#: idsuggestionswidget.cpp:147 idsuggestionswidget.cpp:228
+msgid "Upper case"
+msgstr "Верхний регистр"
+
+#: idsuggestionswidget.cpp:156 idsuggestionswidget.cpp:237
+msgid "Only first letters:"
+msgstr "Только первые буквы:"
+
+#: idsuggestionswidget.cpp:163 idsuggestionswidget.cpp:165
+msgid "Complete name"
+msgstr "Полное имя"
+
+#: idsuggestionswidget.cpp:168
+msgid "Text between authors:"
+msgstr "Разделитель авторов:"
+
+#: idsuggestionswidget.cpp:214
+msgid "Remove small words"
+msgstr "Удалить короткие слова"
+
+#: idsuggestionswidget.cpp:244 idsuggestionswidget.cpp:246
+msgid "Complete title"
+msgstr "Полный заголовок"
+
+#: idsuggestionswidget.cpp:249
+msgid "Text between words:"
+msgstr "Разделитель слов:"
+
+#: idsuggestionswidget.cpp:289
+msgid "Year:"
+msgstr "Год:"
+
+#: idsuggestionswidget.cpp:294
+msgid "2 digits"
+msgstr "2 цифры"
+
+#: idsuggestionswidget.cpp:295
+msgid "4 digits"
+msgstr "4 цифры"
+
+#: idsuggestionswidget.cpp:311 idsuggestionswidget.cpp:486 valuewidget.cpp:211
+msgid "Text"
+msgstr "Текст"
+
+#: idsuggestionswidget.cpp:324
+msgid "Text in between:"
+msgstr "Разделитель:"
+
+#: idsuggestionswidget.cpp:388
+msgid "Edit Id Suggestions"
+msgstr ""
+"Редактировать предложения для "
+"идентификатора"
+
+#: idsuggestionswidget.cpp:563
+msgid "<qt>Example:<br/><b>%1</b></qt>"
+msgstr "<qt>Пример:<br/><b>%1</b></qt>"
+
+#: kbibtex_part.cpp:158
+msgid ""
+"The document '%1' has been modified.\n"
+"Do you want to save your changes or discard them?"
+msgstr ""
+"Документ «%1» был изменен.\n"
+"Сохранить или отклонить изменения?"
+
+#: kbibtex_part.cpp:160
+msgid "Close Document"
+msgstr "Закрыть документ"
+
+#: kbibtex_part.cpp:251 kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "BibTeX (*.bib)"
+msgstr "BibTeX (*.bib)"
+
+#: kbibtex_part.cpp:251 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "Reference Manager (*.ris)"
+msgstr "Менеджер ссылок (*.ris)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)"
+msgstr "EndNote (формат Refer) (*.ref *.refer *.rfr *.txt)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273 kbibtex_part.cpp:369
+#: kbibtexshell.cpp:316
+msgid "ISI Web of Knowledge (*.isi *.cgi)"
+msgstr "Сеть знаний ISI (*.isi *.cgi)"
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273
+msgid "DocBook 5 or MODS (*.xml)"
+msgstr ""
+
+#: kbibtex_part.cpp:252 kbibtex_part.cpp:273
+msgid "DocBook 5 (*.xml)"
+msgstr ""
+
+#: kbibtex_part.cpp:256 kbibtex_part.cpp:279
+msgid ""
+"A file named '%1' already exists. Are you sure you want to overwrite it?"
+msgstr ""
+"Файл «%1» уже существует. Вы уверены, что "
+"хотите переписать его?"
+
+#: kbibtex_part.cpp:256 kbibtex_part.cpp:279
+msgid "Overwrite"
+msgstr "Перезаписать"
+
+#: kbibtex_part.cpp:273
+msgid "Portable Document File (*.pdf)"
+msgstr "Portable Document File (*.pdf)"
+
+#: kbibtex_part.cpp:273
+msgid "PostScript (*.ps)"
+msgstr "PostScript (*.ps)"
+
+#: kbibtex_part.cpp:273
+msgid "Hypertext Markup Langage (*.html)"
+msgstr "Язык гипертекстовой разметки (*.html)"
+
+#: kbibtex_part.cpp:273
+msgid "Rich Text Format (*.rtf)"
+msgstr "Rich Text Format (*.rtf)"
+
+#: kbibtex_part.cpp:333
+msgid "Exporting"
+msgstr "Экспорт"
+
+#: kbibtex_part.cpp:344
+msgid "File could not be exported in '%1'."
+msgstr ""
+"Файл не можеть быть экспортирован в «%1»."
+
+#: kbibtex_part.cpp:344
+msgid ""
+"\n"
+"\n"
+"See the following error log for details."
+msgstr ""
+"\n"
+"\n"
+"Детали см. в следующем журнале ошибок."
+
+#: kbibtex_part.cpp:344 kbibtex_part.cpp:347
+msgid "Exporting failed"
+msgstr "Экспорт не удался"
+
+#: kbibtex_part.cpp:347
+msgid "File could not be exported to '%1'."
+msgstr ""
+"Файл не можеть быть экспортирован в «%1»."
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "Supported Bibliographies"
+msgstr "Поддерживаемые библиографии"
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+msgid "MODS or EndNote XML (*.xml)"
+msgstr ""
+
+#: kbibtex_part.cpp:369 kbibtexshell.cpp:316
+#, fuzzy
+msgid "All files (*.*)"
+msgstr "Все поля"
+
+#: kbibtex_part.cpp:383 kbibtexshell.cpp:332
+msgid ""
+"The given file could not be read, check if it exists or if it is readable "
+"for the current user."
+msgstr ""
+"Данный файл не может быть прочитан; "
+"убедитесь, что он существует и доступен "
+"текущему пользователю."
+
+#: kbibtex_part.cpp:398
+msgid "The given file could not be merged."
+msgstr "Данный файл не может быть присоединен."
+
+#: kbibtex_part.cpp:427
+msgid "Save the current file"
+msgstr "Сохранить текущий файл"
+
+#: kbibtex_part.cpp:428
+msgid "Save the current file under a new filename"
+msgstr ""
+"Сохранить текущий файл под новым именем"
+
+#: kbibtex_part.cpp:430
+msgid "Statistics..."
+msgstr "Статистика..."
+
+#: kbibtex_part.cpp:431
+msgid "Find Duplicates..."
+msgstr ""
+
+#: kbibtex_part.cpp:432
+msgid "Export..."
+msgstr "Экспорт..."
+
+#: kbibtex_part.cpp:433
+msgid "Export to a different file format"
+msgstr "Экспорт в файл другого формата"
+
+#: kbibtex_part.cpp:434
+msgid "Merge..."
+msgstr "Слияние..."
+
+#: kbibtex_part.cpp:435
+msgid "Merge BibTeX entries from another file"
+msgstr "Добавить записи BibTeX из другого файла"
+
+#: kbibtex_part.cpp:438
+msgid "Cut the selected BibTeX elements to the clipboard"
+msgstr ""
+"Вырезать в буфер обмена выбранные "
+"элементы BibTeX"
+
+#: kbibtex_part.cpp:441
+msgid "Copy the selected BibTeX elements to the clipboard"
+msgstr ""
+"Копировать в буфер обмена выбранные "
+"элементы BibTeX"
+
+#: kbibtex_part.cpp:445
+msgid "Copy &Reference"
+msgstr "Копировать &ссылку"
+
+#: kbibtex_part.cpp:446
+msgid "Copy a reference of the selected BibTeX elements to the clipboard"
+msgstr ""
+"Копировать в буфер обмена ссылку на "
+"текущие элементы BibTeX"
+
+#: kbibtex_part.cpp:449
+msgid "Paste BibTeX elements from the clipboard"
+msgstr ""
+"Вставить из буфера обмена элементы BibTeX"
+
+#: kbibtex_part.cpp:451
+msgid "Select all BibTeX elements"
+msgstr "Выбрать все элементы BibTeX"
+
+#: kbibtex_part.cpp:452
+msgid "Send Reference to &LyX"
+msgstr "Переслать ссылку в &LyX"
+
+#: kbibtex_part.cpp:453
+msgid "Send a reference of the selected BibTeX elements to LyX"
+msgstr ""
+"Переслать в LyX ссылку на выбранные "
+"элементы BibTeX"
+
+#: kbibtex_part.cpp:456
+msgid "Find text"
+msgstr "Найти текст"
+
+#: kbibtex_part.cpp:458
+msgid "Find next occurrence"
+msgstr "Найти следующее вхождение"
+
+#: kbibtex_part.cpp:462
+msgid "Search Online Databases"
+msgstr "Поиск по сетевым базам данных"
+
+#: kbibtex_part.cpp:463
+msgid "Search online databases to import bibliography data"
+msgstr ""
+"Искать в сетевых базах данных для импорта "
+"библиографических сведений"
+
+#: kbibtex_part.cpp:465
+msgid "Search Document Online"
+msgstr "Поиск документа в Сети"
+
+#: kbibtex_part.cpp:466
+msgid "Search websites for the selected BibTeX element"
+msgstr ""
+"Искать выбранный элемент BibTeX на сайтах"
+
+#: kbibtex_part.cpp:470
+msgid "&Show Columns"
+msgstr "&Показать столбцы"
+
+#: kbibtex_part.cpp:471
+msgid "Select columns to show in the main list"
+msgstr ""
+"Выбрать столбцы для отображения в "
+"основном списке"
+
+#: kbibtex_part.cpp:472
+msgid "View Document"
+msgstr "Просмотреть документ"
+
+#: kbibtex_part.cpp:473
+msgid "View the documents associated with this BibTeX entry"
+msgstr ""
+"Просмотреть документы, связанные с "
+"данной записью BibTeX"
+
+#: kbibtex_part.cpp:475
+#, fuzzy
+msgid "View Primary Document"
+msgstr "Просмотреть документ"
+
+#: kbibtex_part.cpp:477
+#, fuzzy
+msgid "View Primary Online Reference"
+msgstr "Поиск документа в Сети"
+
+#: kbibtex_part.cpp:479
+msgid "Assign Keywords"
+msgstr "Присвоить ключевые слова"
+
+#: kbibtex_part.cpp:480
+msgid "Assign keywords to this entry"
+msgstr ""
+"Присвоить ключевые слова к данной записи"
+
+#: kbibtex_part.cpp:483
+msgid "Set entry ids as specified in the id suggestion settings"
+msgstr ""
+
+#: kbibtex_part.cpp:487
+msgid "Configure KBibTeX"
+msgstr "Настроить KBibTeX"
+
+#: kbibtex_part.cpp:488
+msgid "Configure Source View..."
+msgstr "Настроить просмотр исходного кода..."
+
+#: kbibtex_part.cpp:489
+msgid "Configure the Source Editor"
+msgstr "Настроить редактор исходного кода"
+
+#: kbibtex_part.cpp:491 settings.cpp:700
+msgid "Article"
+msgstr "Article"
+
+#: kbibtex_part.cpp:491
+msgid "Add an article to the BibTeX file"
+msgstr "Добавить в файл BibTeX статью"
+
+#: kbibtex_part.cpp:492 settings.cpp:702
+msgid "Book"
+msgstr "Book"
+
+#: kbibtex_part.cpp:492
+msgid "Add a book to the BibTeX file"
+msgstr "Добавить в файл BibTeX книгу"
+
+#: kbibtex_part.cpp:493 settings.cpp:704
+msgid "Booklet"
+msgstr "Booklet"
+
+#: kbibtex_part.cpp:493
+msgid "Add a booklet to the BibTeX file"
+msgstr "Добавить в файл BibTeX брошюру"
+
+#: kbibtex_part.cpp:494
+msgid "Electronic (IEEE)"
+msgstr "Electronic (IEEE)"
+
+#: kbibtex_part.cpp:494
+msgid "Add an electronic reference (IEEE) to the BibTeX file"
+msgstr ""
+"Добавить в файл BibTeX электронную ссылку "
+"(IEEE)BibTeX"
+
+#: kbibtex_part.cpp:495 settings.cpp:710
+msgid "InBook"
+msgstr "InBook"
+
+#: kbibtex_part.cpp:495
+msgid "Add a part of a book to the BibTeX file"
+msgstr "Добавить в файл BibTeX часть книги"
+
+#: kbibtex_part.cpp:496 settings.cpp:712
+msgid "InCollection"
+msgstr "InCollection"
+
+#: kbibtex_part.cpp:496
+msgid "Add a publication which is part of some collection to the BibTeX file"
+msgstr ""
+"Добавить в файл BibTeX часть некоторой "
+"коллекции"
+
+#: kbibtex_part.cpp:497 settings.cpp:714
+msgid "InProceedings"
+msgstr "InProceedings"
+
+#: kbibtex_part.cpp:497
+msgid "Add a publication which is part of some proceedings to the BibTeX file"
+msgstr ""
+"Добавить в файл BibTeX часть некоторых "
+"записок"
+
+#: kbibtex_part.cpp:498 settings.cpp:716
+msgid "Manual"
+msgstr "Manual"
+
+#: kbibtex_part.cpp:498
+msgid "Add a manual to the BibTeX file"
+msgstr "Добавить в файл BibTeX руководство"
+
+#: kbibtex_part.cpp:499 settings.cpp:718
+msgid "MastersThesis"
+msgstr "MastersThesis"
+
+#: kbibtex_part.cpp:499
+msgid "Add a master or diploma thesis to the BibTeX file"
+msgstr ""
+"Добавить в файл BibTeX магистрскую или "
+"дипломную диссертацию"
+
+#: kbibtex_part.cpp:500
+msgid "Add a not specified document or reference to the BibTeX file"
+msgstr ""
+"Добавить в файл BibTeX не указанный документ "
+"или ссылку"
+
+#: kbibtex_part.cpp:501 settings.cpp:722
+msgid "PhDThesis"
+msgstr "PhDThesis"
+
+#: kbibtex_part.cpp:501
+msgid "Add a PhD thesis to the BibTeX file"
+msgstr ""
+"Добавить в файл BibTeX кандидатскую "
+"диссертацию"
+
+#: kbibtex_part.cpp:502 settings.cpp:724
+msgid "Proceedings"
+msgstr "Proceedings"
+
+#: kbibtex_part.cpp:502
+msgid "Add some proceedings to the BibTeX file"
+msgstr "Добавить в файл BibTeX некоторые записки"
+
+#: kbibtex_part.cpp:503 settings.cpp:726
+msgid "TechReport"
+msgstr "TechReport"
+
+#: kbibtex_part.cpp:503
+msgid "Add a technical report to the BibTeX file"
+msgstr "Добавить в файл BibTeX технический отчет"
+
+#: kbibtex_part.cpp:504 settings.cpp:728
+msgid "Unpublished"
+msgstr "Unpublished"
+
+#: kbibtex_part.cpp:504
+msgid "Add an unpublished document to the BibTeX file"
+msgstr ""
+"Добавить в файл BibTeX неопубликованный "
+"документ"
+
+#: kbibtex_part.cpp:505
+msgid "Add a preamble to the BibTeX file"
+msgstr "Добавить в файл BibTeX преамбулу"
+
+#: kbibtex_part.cpp:506
+msgid "Add a comment to the BibTeX file"
+msgstr "Добавить в файл BibTeX комментарий"
+
+#: kbibtex_part.cpp:507
+msgid "Add a macro to the BibTeX file"
+msgstr "Добавить в файл BibTeX макрос"
+
+#: kbibtex_part.cpp:510
+msgid "Edit the selected BibTeX element"
+msgstr "Редактировать выбранный элемент BibTeX"
+
+#: kbibtex_part.cpp:513
+msgid "Delete the selected BibTeX elements"
+msgstr "Удалить выделенные элементы BibTeX"
+
+#: kbibtex_part.cpp:516
+msgid "Show &Comments"
+msgstr "Показать &комментарии"
+
+#: kbibtex_part.cpp:517
+msgid "Show the comments of a BibTeX document"
+msgstr "Показать комментарии документа BibTeX"
+
+#: kbibtex_part.cpp:518
+msgid "Show &Macros"
+msgstr "Показать &макросы"
+
+#: kbibtex_part.cpp:519
+msgid "Show the macros of a BibTeX document"
+msgstr "Показать макросы документа BibTeX"
+
+#: kbibtex_part.cpp:521
+msgid "Accept input from other programs"
+msgstr "Принять вывод других программ"
+
+#: kbibtex_part.cpp:537 rc.cpp:9 rc.cpp:18 rc.cpp:21 rc.cpp:39 rc.cpp:48
+#: rc.cpp:51
+msgid "&New"
+msgstr "&Новый"
+
+#: kbibtex_part.cpp:538
+msgid "Add a new element to this BibTeX document"
+msgstr ""
+"Добавить новый элемент в этот документ "
+"BibTeX"
+
+#: kbibtex_part.cpp:622
+msgid ""
+"Some other KBibTeX instance is using the pipe.\n"
+"If this assumption is wrong, please delete '%1'."
+msgstr ""
+"Какая-то другая копия KBibTeX использует "
+"pipeline.\n"
+"Если это не так, пожалуйста, удалите «%1»."
+
+#: kbibtex_part.cpp:622
+msgid "Pipe already in use"
+msgstr "Pipeline уже используется"
+
+#: kbibtex_part.cpp:651
+msgid "Could not create pipe at '%1'."
+msgstr "Не могу создать pipeline «%1»."
+
+#: kbibtex_part.cpp:651
+msgid "Error creating pipe"
+msgstr "Ошибка создания pipeline"
+
+#: kbibtex_part.cpp:695
+msgid ""
+"The KBibTeX part has problems to initialize itself. Only limited "
+"functionality will be available."
+msgstr ""
+"Во время инициализации KBibTeX возникли "
+"проблемы. Будут доступны только "
+"ограниченные возможности."
+
+#: kbibtex_part.cpp:695
+msgid "KBibTeX Part"
+msgstr "Часть KBibTeX"
+
+#: kbibtex_part.cpp:742
+msgid "KBibTeXPart"
+msgstr "KBibTeXPart"
+
+#: kbibtexshell.cpp:76
+msgid "Could not find our part!"
+msgstr "Не могу найти часть KBibTeX!"
+
+#: kbibtexshell.cpp:145
+msgid ""
+"Click to open a file\n"
+"Click and hold to open a recent file"
+msgstr ""
+"Щелкните для открытия файла\n"
+"Щелкните и удерживайте для открытия "
+"последнего файла"
+
+#: kbibtexshell.cpp:182
+msgid "Create a new window for a new BibTeX file"
+msgstr ""
+"Создать новое окно для нового файла BibTeX"
+
+#: kbibtexshell.cpp:184
+msgid "Open an existing BibTeX file"
+msgstr "Открыть имеющийся файл BibTeX"
+
+#: kbibtexshell.cpp:187
+msgid ""
+"This lists files which you have opened recently, and allows you to easily "
+"open them again."
+msgstr ""
+"Перечисляет файлы, которые вы недавно "
+"открывали, и позволяет легко открывать их "
+"снова."
+
+#: kbibtexshell.cpp:191
+msgid "Close this KBibTeX window"
+msgstr "Закрыть это окно KBibTeX"
+
+#: kbibtexshell.cpp:196
+msgid "Show or hide the window's status bar"
+msgstr ""
+"Показать или скрыть строку состояния окна"
+
+#: kbibtexshell.cpp:198
+msgid "Configure key bindings for KBibTeX"
+msgstr "Настроить комбинации клавиш для KBibTeX"
+
+#: kbibtexshell.cpp:199
+msgid "Configure the tool bar for KBibTeX"
+msgstr "Настроить панель инструментов KBibTeX"
+
+#: kbibtexshell.cpp:350 main.cpp:95
+msgid "Could not open file '%1'."
+msgstr "Не могу открыть файл «%1»."
+
+#: macrowidget.cpp:39
+msgid "Edit BibTeX Macro"
+msgstr "Редактировать макрос BibTeX"
+
+#: macrowidget.cpp:84
+msgid "Macro &id:"
+msgstr "&Идентификатор макроса:"
+
+#: macrowidget.cpp:91
+msgid "Macro &value:"
+msgstr "&Значение макроса:"
+
+#: main.cpp:40
+msgid "A BibTeX editor for KDE"
+msgstr "Редактор BibTeX для KDE"
+
+#: main.cpp:46
+msgid "Document to open."
+msgstr "Документ для открытия."
+
+#: main.cpp:111
+msgid "KBibTeX"
+msgstr "KBibTeX"
+
+#: main.cpp:114
+msgid "NAME OF TRANSLATORS"
+msgstr "Алексей Бешенов"
+
+#: main.cpp:114
+msgid "EMAIL OF TRANSLATORS"
+msgstr "al@beshenov.ru"
+
+#: mergeelements.cpp:112
+#, fuzzy
+msgid "Preamble text"
+msgstr "Преамбула"
+
+#: mergeelements.cpp:124
+#, fuzzy
+msgid "Next"
+msgstr "Текст"
+
+#: mergeelements.cpp:124
+msgid "Previous"
+msgstr ""
+
+#: mergeelements.cpp:143
+msgid ""
+"Select elements to merge. At least two elements must be checked to perform a "
+"merge operation. Checked entries will be replaced by the merged element, "
+"unchecked elements will be kept."
+msgstr ""
+
+#: mergeelements.cpp:147
+#, fuzzy
+msgid "Entry/Macro Id"
+msgstr "Идентификатор записи"
+
+#: mergeelements.cpp:159
+msgid ""
+"Choose from this list which alternatives you want to keep in the merged "
+"element."
+msgstr ""
+
+#: mergeelements.cpp:163
+#, fuzzy
+msgid "Field/Key"
+msgstr "Новое поле"
+
+#: mergeelements.cpp:492
+msgid "No duplicates found."
+msgstr ""
+
+#: mergeelements.cpp:557
+msgid "Id"
+msgstr ""
+
+#: preamblewidget.cpp:33
+msgid "Edit BibTeX Preamble"
+msgstr "Редактировать преамбулу BibTeX"
+
+#: preamblewidget.cpp:76
+msgid "&Preamble:"
+msgstr "&Преамбула:"
+
+#: rc.cpp:6 rc.cpp:36
+msgid "E&lement"
+msgstr "&Элемент"
+
+#: rc.cpp:15 rc.cpp:27 rc.cpp:45 rc.cpp:57
+msgid "Se&ttings"
+msgstr "&Настройка"
+
+#: searchbar.cpp:92
+msgid "Add a new BibTeX entry, comment or macro to this file"
+msgstr ""
+"Добавить в этот файл новую запись, "
+"комментарий или макрос"
+
+#: searchbar.cpp:97
+msgid "Add a new BibTeX entry from an online database"
+msgstr ""
+"Добавить новую запись BibTeX из сетевой базы "
+"данных"
+
+#: searchbar.cpp:105
+msgid "Erase current search pattern"
+msgstr "Стереть текущий шаблон поиска"
+
+#: searchbar.cpp:108
+msgid "&Search:"
+msgstr "&Поиск:"
+
+#: searchbar.cpp:121
+msgid "Exact"
+msgstr "Точно"
+
+#: searchbar.cpp:122
+msgid "Every word"
+msgstr "Каждое слово"
+
+#: searchbar.cpp:123
+msgid "Any word"
+msgstr "Любое слово"
+
+#: searchbar.cpp:126
+msgid "Restrict to:"
+msgstr "Ограничить:"
+
+#: searchbar.cpp:133
+msgid "All fields"
+msgstr "Все поля"
+
+#: settings.cpp:57
+msgid "Could not determine filename for XSLT file"
+msgstr "Не могу определить имя файла XSLT"
+
+#: settings.cpp:57
+msgid "Initialization failed"
+msgstr "Инициализация не удалась"
+
+#: settings.cpp:639
+msgid "Crossref"
+msgstr "Перекрестная ссылка"
+
+#: settings.cpp:691 settings.cpp:730
+msgid "Unknown"
+msgstr "Неизвестный"
+
+#: settings.cpp:706
+#, fuzzy
+msgid "Collection"
+msgstr "InCollection"
+
+#: settings.cpp:708
+#, fuzzy
+msgid "Electronic"
+msgstr "Electronic (IEEE)"
+
+#: settingsdlg.cpp:42
+msgid "&Editing"
+msgstr "&Редактирование"
+
+#: settingsdlg.cpp:48
+msgid "&File Open&&Save"
+msgstr "&Открытие и &сохранение файлов"
+
+#: settingsdlg.cpp:54
+msgid "&Search URLs"
+msgstr "&Адреса поиска"
+
+#: settingsdlg.cpp:60
+msgid "Global &Keywords"
+msgstr "&Глобальные ключевые слова"
+
+#: settingsdlg.cpp:66 settingsidsuggestions.cpp:337
+msgid "Id Suggestions"
+msgstr "Предложения для идентификаторов"
+
+#: settingsdlg.cpp:72
+msgid "User Defined Fields"
+msgstr "Пользовательские поля"
+
+#: settingsdlg.cpp:79 webqueryz3950.cpp:188 webqueryz3950.cpp:193
+msgid "Z39.50"
+msgstr ""
+
+#: settingsediting.cpp:56
+msgid "Path to add:"
+msgstr ""
+
+#: settingsediting.cpp:63
+msgid "Select a path to add"
+msgstr ""
+
+#: settingsediting.cpp:67
+msgid "Add chosen path to list"
+msgstr ""
+
+#: settingsediting.cpp:70
+msgid "List of paths:"
+msgstr ""
+
+#: settingsediting.cpp:73
+msgid "Path"
+msgstr ""
+
+#: settingsediting.cpp:82
+msgid "Remove selected path from list"
+msgstr ""
+
+#: settingsediting.cpp:99
+#, fuzzy
+msgid "Edit Document Search Paths"
+msgstr "Путь поиска документов"
+
+#: settingsediting.cpp:140
+msgid "Folder '%1' does not exist or is not readable."
+msgstr ""
+
+#: settingsediting.cpp:160
+msgid "Main List"
+msgstr "Основной список"
+
+#: settingsediting.cpp:162
+msgid "&Sorting:"
+msgstr "&Сортировка:"
+
+#: settingsediting.cpp:174
+msgid "So&rting order:"
+msgstr "&Порядок сортировки:"
+
+#: settingsediting.cpp:176
+msgid "Ascending"
+msgstr "По возрастанию"
+
+#: settingsediting.cpp:177
+msgid "Descending"
+msgstr "По убыванию"
+
+#: settingsediting.cpp:180
+msgid "&Double click action:"
+msgstr "&Действие по двойному щелчку:"
+
+#: settingsediting.cpp:182
+msgid "Edit element"
+msgstr "Редактировать элемент"
+
+#: settingsediting.cpp:183
+msgid "Open document"
+msgstr "Открыть документ"
+
+#: settingsediting.cpp:186
+msgid "On dragging with mouse:"
+msgstr "При перетаскивании мышью:"
+
+#: settingsediting.cpp:188
+msgid "Copy reference (\\cite{...})"
+msgstr "Копировать ссылку (\\cite{...})"
+
+#: settingsediting.cpp:189
+msgid "Copy BibTeX text (@article{...})"
+msgstr "Копировать текст BibTeX (@article{...})"
+
+#: settingsediting.cpp:192
+msgid "Entry Editing"
+msgstr "Редактировать запись"
+
+#: settingsediting.cpp:196
+msgid "Search Bar"
+msgstr "Панель поиска"
+
+#: settingsediting.cpp:198
+msgid "Reset field filter when changing filter text"
+msgstr ""
+"Сбрасывать фильтр полей при изменении "
+"текста фильтра"
+
+#: settingsediting.cpp:200
+msgid "Presentation"
+msgstr "Представление"
+
+#: settingsediting.cpp:202
+msgid "Use special &font"
+msgstr "Использовать специальный &шрифт"
+
+#: settingsediting.cpp:204
+msgid "Author and editor names:"
+msgstr "Имена автора и редактора:"
+
+#: settingsediting.cpp:207
+msgid "John Doe"
+msgstr "Иван Петров"
+
+#: settingsediting.cpp:208
+msgid "Doe, John"
+msgstr "Петров, Иван"
+
+#: settingsediting.cpp:209
+msgid "Show names as 'John Doe' instead of 'Doe, John'"
+msgstr ""
+"Отображать имена в виде «Иван Петров», а "
+"не «Петров, Иван»"
+
+#: settingsediting.cpp:210
+msgid ""
+"Show names as 'John Doe' instead of 'Doe, John'.\n"
+"\n"
+"Takes only effect after the next start of KBibTeX."
+msgstr ""
+"Отображать имена в виде «Иван Петров», а "
+"«Петров, Иван».\n"
+"\n"
+"Вступает в силу только после перезапуска "
+"KBibTeX."
+
+#: settingsediting.cpp:212
+#, fuzzy
+msgid "Document Search Paths"
+msgstr "Путь поиска документов"
+
+#: settingsediting.cpp:214
+#, fuzzy
+msgid "Edit Search Paths"
+msgstr "Путь поиска документов"
+
+#: settingsediting.cpp:218
+msgid "Sensitivity:"
+msgstr ""
+
+#: settingsediting.cpp:221
+msgid "Low"
+msgstr ""
+
+#: settingsediting.cpp:228
+msgid "High"
+msgstr ""
+
+#: settingsfileio.cpp:53
+msgid "English|German|French|Spanish|Swedish"
+msgstr ""
+"Английский|Немецкий|Французский|Испански"
+"й|Шведский"
+
+#: settingsfileio.cpp:58
+msgid ""
+"plain|achemso (American Chemical Society)|alpha|unsrt|abbrv|acm (Association "
+"of Computing Machinery)|apacite|apalike|authordate|ieeetr|natbib|siam"
+msgstr ""
+"plain|achemso (Американское химическое "
+"общество)|alpha|unsrt|abbrv|acm (Ассоциация "
+"вычислительной "
+"техники)|apacite|apalike|authordate|ieeetr|natbib|siam"
+
+#: settingsfileio.cpp:177
+msgid "XSLT Stylesheet"
+msgstr "Таблица стилей XSLT"
+
+#: settingsfileio.cpp:201
+msgid "No exporter available"
+msgstr "Нет доступных средств экспорта"
+
+#: settingsfileio.cpp:223
+msgid "Path to the jar files for bib2db5"
+msgstr ""
+
+#: settingsfileio.cpp:236
+msgid ""
+"To export DocBook5 bibliographies, the path to the jar file for bib2db5 has "
+"to be set first."
+msgstr ""
+
+#: settingsfileio.cpp:236
+msgid "Invalid path for bib2db5"
+msgstr ""
+
+#: settingsfileio.cpp:244
+msgid "BibTeX Import and Export"
+msgstr "Импорт и экспорт BibTeX"
+
+#: settingsfileio.cpp:246
+msgid "&Encoding:"
+msgstr "&Кодировка:"
+
+#: settingsfileio.cpp:249
+msgid "Text &delimiters:"
+msgstr "Текстовые &разделители:"
+
+#: settingsfileio.cpp:252
+msgid "Keyword casing:"
+msgstr "Регистр ключевых слов:"
+
+#: settingsfileio.cpp:255
+msgid "Protect title's casing:"
+msgstr "Защитить регистр заголовка:"
+
+#: settingsfileio.cpp:256
+msgid "Put curly brackets around"
+msgstr "Заключить в фигурные скобки"
+
+#: settingsfileio.cpp:257
+msgid "Put curly brackets around title and other selected fields."
+msgstr ""
+"Заключить заглавие и другие выбранные "
+"поля в фигурные скобки."
+
+#: settingsfileio.cpp:258
+msgid ""
+"Put curly brackets around title and other selected fields to protect them "
+"from case changes in certain BibTeX styles."
+msgstr ""
+"Заключить заглавие и другие выбранные "
+"поля в фигурные скобки, чтобы защитить их "
+"от изменения регистра в некоторых стилях "
+"BibTeX."
+
+#: settingsfileio.cpp:260
+msgid "PDF, PostScript and Rich Text Format Export"
+msgstr "Экспорт в PDF, PostScript и RTF"
+
+#: settingsfileio.cpp:262
+msgid ""
+"Select the layout of the resulting PDF, PostScript or Rich Text Format "
+"document when exporting a BibTeX file."
+msgstr ""
+"Выберите оформление выходного документа "
+"PDF, PostScript или RTF при экспорте файла BibTeX."
+
+#: settingsfileio.cpp:263
+msgid "&Language:"
+msgstr "&Язык:"
+
+#: settingsfileio.cpp:266
+msgid "&Biblography style:"
+msgstr "&Стиль библиографии:"
+
+#: settingsfileio.cpp:270
+msgid "PDF Export"
+msgstr "Экспорт в PDF"
+
+#: settingsfileio.cpp:272
+msgid "Embed local files into PDF if possible"
+msgstr ""
+"Встраивать локальные файлы в PDF, если "
+"возможно"
+
+#: settingsfileio.cpp:273
+msgid ""
+"<qt>If checked, KBibTeX tries to embed all referenced files for the BibTeX "
+"entries into the exported PDF file.<br/>This requires that you have "
+"installed <tt>embedfile.sty</tt>.</qt>"
+msgstr ""
+"<qt>Если отмечено, KBibTeX пытается встроить "
+"все связанные файлы для записей BibTeX в "
+"экспортируемый файл PDF.<br/>Требует "
+"установки файла <tt>embedfile.sty</tt>.</qt>"
+
+#: settingsfileio.cpp:275
+#, fuzzy
+msgid "XML Export"
+msgstr "Экспорт в PDF"
+
+#: settingsfileio.cpp:278
+msgid "Path to the jar files for bib2db5:"
+msgstr ""
+
+#: settingsfileio.cpp:293
+msgid "Export Systems"
+msgstr "Системы экспорта"
+
+#: settingsfileio.cpp:295
+msgid "HTML:"
+msgstr "HTML:"
+
+#: settingsfileio.cpp:299
+msgid "BibUtils"
+msgstr ""
+
+#: settingsfileio.cpp:301
+msgid "Always use BibUtils"
+msgstr ""
+
+#: settingsfileio.cpp:302
+msgid "If possible, use BibUtils to import and export alien bibliography."
+msgstr ""
+
+#: settingsfileio.cpp:303
+msgid ""
+"If possible, use BibUtils to import and export alien bibliography such as "
+"RIS.\n"
+"If unchecked, prefer internal import and export library."
+msgstr ""
+
+#: settingsfileio.cpp:307
+msgid "Backups"
+msgstr ""
+
+#: settingsfileio.cpp:309
+#, fuzzy
+msgid "Number of Backups:"
+msgstr "&Количество результатов:"
+
+#: settingsidsuggestions.cpp:90
+#, c-format
+msgid ""
+"\n"
+"Example: %1"
+msgstr ""
+"\n"
+"Пример: %1"
+
+#: settingsidsuggestions.cpp:345
+msgid ""
+"_: id suggestion\n"
+"New"
+msgstr "Новое"
+
+#: settingsidsuggestions.cpp:349
+msgid ""
+"_: id suggestion\n"
+"Edit"
+msgstr "Редактировать"
+
+#: settingsidsuggestions.cpp:353
+msgid ""
+"_: id suggestion\n"
+"Delete"
+msgstr "Удалить"
+
+#: settingsidsuggestions.cpp:357
+msgid ""
+"_: id suggestion\n"
+"Up"
+msgstr "Вверх"
+
+#: settingsidsuggestions.cpp:361
+msgid ""
+"_: id suggestion\n"
+"Down"
+msgstr "Вниз"
+
+#: settingsidsuggestions.cpp:365
+msgid "Toogle default"
+msgstr "Использовать по умолчанию"
+
+#: settingsidsuggestions.cpp:370
+msgid "Use default id suggestion when editing new entries"
+msgstr ""
+"Использовать предложения "
+"идентификаторов по умолчанию при "
+"редактировании новых записей"
+
+#: settingsidsuggestions.cpp:373
+#, fuzzy
+msgid "Small Words:"
+msgstr "Удалить короткие слова"
+
+#: settingsidsuggestions.cpp:386
+#, fuzzy
+msgid "Small Words"
+msgstr "Удалить короткие слова"
+
+#: settingskeyword.cpp:83
+msgid "New Keyword"
+msgstr "Новое ключевое слово"
+
+#: settingskeyword.cpp:131
+#, c-format
+msgid ""
+"_n: 1 keyword has been imported.\n"
+"%n keywords have been imported."
+msgstr ""
+"Импортировано %n ключевое слово\n"
+"Импортировано %n ключевых слова\n"
+"Импортировано %n ключевых слов"
+
+#: settingskeyword.cpp:131
+msgid "Keywords imported"
+msgstr "Ключевые слова импортированы"
+
+#: settingskeyword.cpp:172
+msgid ""
+"_: keyword\n"
+"Delete"
+msgstr "Удалить"
+
+#: settingskeyword.cpp:176
+msgid ""
+"_: keyword\n"
+"Import"
+msgstr "Импортировать"
+
+#: settingssearchurl.cpp:108
+msgid ""
+"The list of URLs will be checked and known entries will be replaced by the "
+"program standards. Search entries you have defined by yourself will be kept "
+"most likely."
+msgstr ""
+"Перечень URL будет проверен, и известные "
+"записи будут заменены по стандартам "
+"программы. Элементы поиска, которые вы "
+"определили сами, скорее всего сохранятся."
+
+#: settingssearchurl.cpp:108
+msgid "Reset list of URLs"
+msgstr "Сбросить перечень URL"
+
+#: settingssearchurl.cpp:108 settingsz3950.cpp:297
+msgid "Reset"
+msgstr "Сбросить"
+
+#: settingssearchurl.cpp:133
+msgid "Description"
+msgstr "Описание"
+
+#: settingssearchurl.cpp:140
+#, fuzzy
+msgid ""
+"_: search url\n"
+"New"
+msgstr "Сбросить"
+
+#: settingssearchurl.cpp:144
+msgid ""
+"_: search url\n"
+"Edit"
+msgstr "Редактировать"
+
+#: settingssearchurl.cpp:148
+msgid ""
+"_: search url\n"
+"Delete"
+msgstr "Удалить"
+
+#: settingssearchurl.cpp:152
+msgid ""
+"_: search url\n"
+"Reset"
+msgstr "Сбросить"
+
+#: settingssearchurl.cpp:170
+msgid "New URL"
+msgstr "Новый URL"
+
+#: settingssearchurl.cpp:170
+msgid "Edit URL"
+msgstr "Редактировать URL"
+
+#: settingssearchurl.cpp:173
+msgid "Description:"
+msgstr "Описание:"
+
+#: settingssearchurl.cpp:178
+msgid "URL:"
+msgstr "Адрес:"
+
+#: settingssearchurl.cpp:184
+msgid "Within the URL, '%1' will be replaced by the search term."
+msgstr ""
+"В пределах URL «%1» будет заменено условием "
+"поиска."
+
+#: settingssearchurl.cpp:185
+msgid "Include Author:"
+msgstr "Включить автора:"
+
+#: settingsuserdefinedinput.cpp:62 settingsuserdefinedinput.cpp:74
+#: settingsuserdefinedinput.cpp:229 settingsuserdefinedinput.cpp:238
+#: settingsuserdefinedinput.cpp:251 settingsuserdefinedinput.cpp:257
+msgid "Single line"
+msgstr "Одна строка"
+
+#: settingsuserdefinedinput.cpp:74 settingsuserdefinedinput.cpp:230
+#: settingsuserdefinedinput.cpp:251 settingsuserdefinedinput.cpp:257
+msgid "Multiple lines"
+msgstr "Несколько строк"
+
+#: settingsuserdefinedinput.cpp:168
+msgid "Name"
+msgstr "Имя"
+
+#: settingsuserdefinedinput.cpp:170
+msgid "Label"
+msgstr "Метка"
+
+#: settingsuserdefinedinput.cpp:180
+msgid ""
+"_: user-defined input\n"
+"New"
+msgstr "Новое"
+
+#: settingsuserdefinedinput.cpp:183
+msgid ""
+"_: user-defined input\n"
+"Edit"
+msgstr "Редактировать"
+
+#: settingsuserdefinedinput.cpp:186
+msgid ""
+"_: user-defined input\n"
+"Delete"
+msgstr "Удалить"
+
+#: settingsuserdefinedinput.cpp:189
+#, fuzzy
+msgid ""
+"_: user-defined input\n"
+"Up"
+msgstr "Новое"
+
+#: settingsuserdefinedinput.cpp:193
+msgid ""
+"_: user-defined input\n"
+"Down"
+msgstr "Вниз"
+
+#: settingsuserdefinedinput.cpp:210
+msgid "New Field"
+msgstr "Новое поле"
+
+#: settingsuserdefinedinput.cpp:210
+msgid "Edit Field"
+msgstr "Редактировать поле"
+
+#: settingsuserdefinedinput.cpp:213 settingsz3950.cpp:71
+msgid "Name:"
+msgstr "Имя:"
+
+#: settingsuserdefinedinput.cpp:218
+msgid "Label:"
+msgstr "Метка:"
+
+#: settingsuserdefinedinput.cpp:224
+msgid "Input Type:"
+msgstr "Тип ввода:"
+
+#: settingsz3950.cpp:77
+msgid "Database:"
+msgstr ""
+
+#: settingsz3950.cpp:83
+msgid "Host:"
+msgstr ""
+
+#: settingsz3950.cpp:89
+msgid "Port:"
+msgstr ""
+
+#: settingsz3950.cpp:98
+#, fuzzy
+msgid "User:"
+msgstr "Год:"
+
+#: settingsz3950.cpp:104
+msgid "Password:"
+msgstr ""
+
+#: settingsz3950.cpp:110
+msgid "Syntax:"
+msgstr ""
+
+#: settingsz3950.cpp:122
+#, fuzzy
+msgid "Locale:"
+msgstr "Локальный файл"
+
+#: settingsz3950.cpp:149
+msgid "Edit Z39.50 Server"
+msgstr ""
+
+#: settingsz3950.cpp:297
+msgid "All Z39.50 server configurations will be reset to defaults."
+msgstr ""
+
+#: settingsz3950.cpp:297
+msgid "Reset to Default"
+msgstr ""
+
+#: settingsz3950.cpp:324
+#, fuzzy
+msgid ""
+"_: z3950 server\n"
+"Name"
+msgstr "Удалить"
+
+#: settingsz3950.cpp:325
+#, fuzzy
+msgid ""
+"_: z3950 server\n"
+"Database"
+msgstr "Удалить"
+
+#: settingsz3950.cpp:334
+#, fuzzy
+msgid ""
+"_: z3950 server\n"
+"New"
+msgstr "Удалить"
+
+#: settingsz3950.cpp:338
+#, fuzzy
+msgid ""
+"_: z3950 server\n"
+"Edit"
+msgstr "Редактировать"
+
+#: settingsz3950.cpp:342
+#, fuzzy
+msgid ""
+"_: z3950 server\n"
+"Delete"
+msgstr "Удалить"
+
+#: settingsz3950.cpp:346
+#, fuzzy
+msgid ""
+"_: z3950 server\n"
+"Up"
+msgstr "Редактировать"
+
+#: settingsz3950.cpp:350
+#, fuzzy
+msgid ""
+"_: z3950 server\n"
+"Down"
+msgstr "Удалить"
+
+#: settingsz3950.cpp:355
+#, fuzzy
+msgid ""
+"_: z3950 server\n"
+"Reset"
+msgstr "Удалить"
+
+#: sidebar.cpp:113
+msgid "Toggle between showing all fields or only important fields"
+msgstr ""
+"Переключиться между указанием всех полей "
+"или только важных полей"
+
+#: sidebar.cpp:117
+msgid "Filter this sidebar for a given field"
+msgstr ""
+"Фильтровать содержимое боковой панели по "
+"указанному полю"
+
+#: sidebar.cpp:124
+msgid ""
+"Toggle between selecting only one item or multiple items (AND-connected in "
+"search)"
+msgstr ""
+
+#: sidebar.cpp:127
+msgid "#"
+msgstr "№"
+
+#: sidebar.cpp:128
+msgid "Items"
+msgstr "Записи"
+
+#: sidebar.cpp:135
+msgid "Rename all occurrences"
+msgstr "Переименовать все вхождения"
+
+#: valuewidget.cpp:39
+msgid "Edit field '%1'"
+msgstr "Редактировать поле «%1»"
+
+#: valuewidget.cpp:137
+#, c-format
+msgid ""
+"_: May only contain ASCII characters, in case of doubt keep English form\n"
+"NewValue%1"
+msgstr "NewValue%1"
+
+#: valuewidget.cpp:205
+msgid "Checked entries are string keys, unchecked entries are quoted text."
+msgstr ""
+"Отмеченные записи — строковые ключи, не "
+"отмеченные — текст в кавычках."
+
+#: valuewidget.cpp:232
+msgid "Toggle"
+msgstr "Переключить"
+
+#: webquery.cpp:94 webquerycsb.cpp:83 webquerydblp.cpp:68
+#: webquerymathscinet.cpp:61 webqueryspireshep.cpp:99
+msgid "Search &term:"
+msgstr "&Запрос:"
+
+#: webquery.cpp:105 webquerycsb.cpp:103 webquerydblp.cpp:79
+#: webquerysciencedirect.cpp:165 webqueryz3950.cpp:102
+msgid "&Number of results:"
+msgstr "&Количество результатов:"
+
+#: webquery.cpp:153
+msgid "Searching"
+msgstr "Поиск"
+
+#: webquery.cpp:153
+#, c-format
+msgid "Searching %1"
+msgstr "Поиск в %1"
+
+#: webquery.cpp:315
+msgid "&Import"
+msgstr "&Импорт"
+
+#: webquery.cpp:315
+msgid "Import selected items"
+msgstr "Импортировать выбранные элементы"
+
+#: webquery.cpp:363
+#, c-format
+msgid "Search %1"
+msgstr "Искать %1"
+
+#: webquery.cpp:402
+msgid ""
+"You do not have the necessary permissions to query data from this service."
+msgstr ""
+
+#: webquery.cpp:431
+msgid "&Engine:"
+msgstr "&Движок:"
+
+#: webquery.cpp:442
+msgid "&Search"
+msgstr "&Поиск"
+
+#: webquery.cpp:468
+msgid "Import all hits"
+msgstr "Импортировать всё"
+
+#: webqueryamatex.cpp:55
+msgid "Amatex"
+msgstr "Amatex"
+
+#: webqueryamatex.cpp:60
+msgid "About Amatex"
+msgstr "Об Amatex"
+
+#: webqueryamatex.cpp:111 webquerybibsonomy.cpp:116 webquerycitebase.cpp:118
+#: webquerycsb.cpp:280 webquerydblp.cpp:204 webqueryieeexplore.cpp:156
+#: webquerymathscinet.cpp:176 webquerypubmed.cpp:159 webquerypubmed.cpp:171
+#: webqueryspireshep.cpp:206 webqueryzmath.cpp:113
+msgid "Querying database '%1' failed."
+msgstr "Не удалось запросить базу данных «%1»."
+
+#: webqueryarxiv.cpp:78
+msgid "arXiv"
+msgstr "arXiv"
+
+#: webqueryarxiv.cpp:83
+#, fuzzy
+msgid "arXiv is an archive for preprints"
+msgstr "arXiv — архив электронных препринтов"
+
+#: webquerybibsonomy.cpp:63
+msgid "BibSonomy"
+msgstr "BibSonomy"
+
+#: webquerybibsonomy.cpp:68
+#, fuzzy
+msgid "BibSonomy bookmark sharing system"
+msgstr ""
+"BibSonomy — социальная сеть обмена "
+"закладками и публикациями"
+
+#: webquerycitebase.cpp:62
+msgid "Citebase"
+msgstr "Citebase"
+
+#: webquerycitebase.cpp:67
+#, fuzzy
+msgid "Citebase citation index"
+msgstr "Citebase — полуавтономный каталог цитат"
+
+#: webqueryciteseerx.cpp:83
+msgid "CiteSeerX"
+msgstr ""
+
+#: webqueryciteseerx.cpp:92
+msgid "About CiteSeerX"
+msgstr ""
+
+#: webquerycsb.cpp:90
+msgid ""
+"_: Here, \"Field\" refers to a parameter for the CSB search (author, title, "
+"any)\n"
+"&Field:"
+msgstr ""
+
+#: webquerycsb.cpp:111
+#, fuzzy
+msgid "&Year:"
+msgstr "Год:"
+
+#: webquerycsb.cpp:125
+msgid "Sort &by:"
+msgstr ""
+
+#: webquerycsb.cpp:134
+msgid "Online papers only"
+msgstr ""
+
+#: webquerycsb.cpp:137 webqueryz3950.cpp:59
+msgid "any"
+msgstr ""
+
+#: webquerycsb.cpp:138 webqueryspireshep.cpp:86 webqueryz3950.cpp:59
+#, fuzzy
+msgid "author"
+msgstr "Автор"
+
+#: webquerycsb.cpp:139 webqueryspireshep.cpp:87 webqueryz3950.cpp:59
+#, fuzzy
+msgid "title"
+msgstr "Заголовок"
+
+#: webquerycsb.cpp:140
+#, fuzzy
+msgid "exact"
+msgstr "Точно"
+
+#: webquerycsb.cpp:141
+#, fuzzy
+msgid "until"
+msgstr "Заголовок"
+
+#: webquerycsb.cpp:142
+msgid "from"
+msgstr ""
+
+#: webquerycsb.cpp:144
+#, fuzzy
+msgid "none"
+msgstr "Аннотация"
+
+#: webquerycsb.cpp:145
+msgid "score"
+msgstr ""
+
+#: webquerycsb.cpp:146
+#, fuzzy
+msgid "year"
+msgstr "Год"
+
+#: webquerycsb.cpp:171
+#, fuzzy
+msgid "Computer Science Bibliographies"
+msgstr "Поддерживаемые библиографии"
+
+#: webquerycsb.cpp:176
+msgid "Copyright for the Bibliography Collection"
+msgstr ""
+
+#: webquerydblp.cpp:89
+msgid "Do not merge corresponding entries"
+msgstr ""
+
+#: webquerydblp.cpp:110
+msgid "DBLP"
+msgstr "DBLP"
+
+#: webquerydblp.cpp:115
+msgid "DBLP - Copyright"
+msgstr ""
+"Digital Bibliography & Library Project — авторские права"
+
+#: webquerygooglescholar.cpp:69
+msgid "Google Scholar"
+msgstr "Google Scholar"
+
+#: webquerygooglescholar.cpp:74
+msgid "About Google Scholar"
+msgstr "О Google Scholar"
+
+#: webqueryieeexplore.cpp:67
+msgid "IEEExplore"
+msgstr ""
+
+#: webqueryieeexplore.cpp:72
+msgid "What is IEEE Xplore?"
+msgstr ""
+
+#: webqueryieeexplore.cpp:109
+msgid "You have entered an invalid search."
+msgstr ""
+
+#: webqueryieeexplore.cpp:109
+#, fuzzy
+msgid "Search Error"
+msgstr "Панель поиска"
+
+#: webquerymathscinet.cpp:81
+msgid ""
+"<qt>Use the same synatx as for <a "
+"href=\"http://www.math.tamu.edu/~comech/tools/bibget/\">BIBGET</a>. For "
+"spaces within a search element, use \"<tt>+</tt>\".<br/>Example: "
+"<tt>a=gilkey t=invariance book 1984</tt></qt>"
+msgstr ""
+
+#: webquerymathscinet.cpp:102
+msgid "MathSciNet"
+msgstr ""
+
+#: webquerymathscinet.cpp:107
+msgid "American Mathematical Society"
+msgstr ""
+
+#: webquerypubmed.cpp:67
+msgid "NCBI (PubMed)"
+msgstr "PubMed"
+
+#: webquerypubmed.cpp:72
+msgid "NCBI's Disclaimer and Copyright"
+msgstr ""
+"Уведомление национального центра "
+"биотехнологической информации об отказе "
+"от ответственности и авторских правах"
+
+#: webquerysciencedirect.cpp:84
+msgid "Title, abstract, keywords:"
+msgstr ""
+
+#: webquerysciencedirect.cpp:103
+#, fuzzy
+msgid "Author:"
+msgstr "Автор"
+
+#: webquerysciencedirect.cpp:120
+msgid "Journal/book title:"
+msgstr ""
+
+#: webquerysciencedirect.cpp:135
+#, fuzzy
+msgid "Volume:"
+msgstr "Том"
+
+#: webquerysciencedirect.cpp:145
+msgid "Issue:"
+msgstr ""
+
+#: webquerysciencedirect.cpp:155
+#, fuzzy
+msgid "Page:"
+msgstr "Страницы"
+
+#: webquerysciencedirect.cpp:196
+msgid "ScienceDirect"
+msgstr ""
+
+#: webquerysciencedirect.cpp:201
+msgid "About ScienceDirect"
+msgstr ""
+
+#: webqueryspireshep.cpp:42
+msgid "DESY (Germany)"
+msgstr "DESY (Германия)"
+
+#: webqueryspireshep.cpp:42
+msgid "FNAL (U.S.A.)"
+msgstr "FNAL (США)"
+
+#: webqueryspireshep.cpp:42
+msgid "IHEP (Russia)"
+msgstr "ИФВЭ (Россия)"
+
+#: webqueryspireshep.cpp:42
+msgid "Durham U (U.K.)"
+msgstr ""
+"Даремский университет \t(Великобритания)"
+
+#: webqueryspireshep.cpp:42
+msgid "SLAC (U.S.A.)"
+msgstr "SLAC (США)"
+
+#: webqueryspireshep.cpp:42
+msgid "YITP (Japan)"
+msgstr "YITP (Япония)"
+
+#: webqueryspireshep.cpp:42
+msgid "LIPI (Indonesia)"
+msgstr "LIPI (Индонезия)"
+
+#: webqueryspireshep.cpp:78
+#, fuzzy
+msgid "Type:"
+msgstr "Тип"
+
+#: webqueryspireshep.cpp:85
+msgid "raw query"
+msgstr ""
+
+#: webqueryspireshep.cpp:88
+#, fuzzy
+msgid "journal"
+msgstr "Журнал"
+
+#: webqueryspireshep.cpp:89
+msgid "EPrint number"
+msgstr ""
+
+#: webqueryspireshep.cpp:90
+msgid "report number"
+msgstr ""
+
+#: webqueryspireshep.cpp:91
+#, fuzzy
+msgid "keywords"
+msgstr "Ключевые слова"
+
+#: webqueryspireshep.cpp:109
+msgid "Include abstracts from arxiv.org if available"
+msgstr ""
+
+#: webqueryspireshep.cpp:130
+msgid "SPIRES-HEP"
+msgstr "SPIRES-HEP"
+
+#: webqueryspireshep.cpp:135
+msgid "SPIRES-HEP Search"
+msgstr ""
+"Поиск в базе SPIRES по физике высоких энергий"
+
+#: webqueryz3950.cpp:59
+#, fuzzy
+msgid "publisher"
+msgstr "Издатель"
+
+#: webqueryz3950.cpp:94
+#, fuzzy
+msgid "Server:"
+msgstr "Серия"
+
+#: webqueryz3950.cpp:116
+#, fuzzy
+msgid "Search term 1:"
+msgstr "&Запрос:"
+
+#: webqueryz3950.cpp:126 webqueryz3950.cpp:147
+#, fuzzy
+msgid "Search in:"
+msgstr "Поиск"
+
+#: webqueryz3950.cpp:138
+#, fuzzy
+msgid "Search term 2:"
+msgstr "&Запрос:"
+
+#: webqueryz3950.cpp:163
+msgid "and"
+msgstr ""
+
+#: webqueryz3950.cpp:164
+msgid "or"
+msgstr ""
+
+#: webqueryz3950.cpp:330
+#, c-format
+msgid ""
+"The server returned the following message:\n"
+"\n"
+"%1"
+msgstr ""
+
+#: webqueryz3950.cpp:330
+msgid "Error querying Z39.50 server"
+msgstr ""
+
+#: webqueryzmath.cpp:61
+msgid "Zentralblatt MATH"
+msgstr "Zentralblatt MATH"
+
+#: webqueryzmath.cpp:66
+msgid "About Zentralblatt MATH"
+msgstr "О Zentralblatt MATH"
+
+#: z3950connection.cpp:158
+msgid "Query error!"
+msgstr ""
+
+#: z3950connection.cpp:205
+msgid "Connection search error %1: %2"
+msgstr ""
+
+#: z3950connection.cpp:294
+msgid "Record syntax error"
+msgstr ""
+
+#: z3950connection.cpp:405
+msgid "Connection error %1: %2"
+msgstr ""
+
+#~ msgid "Cannot establish a link to LyX"
+#~ msgstr "Не могу соединиться с LyX"
+
+#~ msgid "Cannot establish a link to LyX using the pipe '%1'"
+#~ msgstr ""
+#~ "Не могу соединиться с LyX через pipeline «%1»"
+
+#~ msgid ""
+#~ "\n"
+#~ "Maybe LyX is not running?"
+#~ msgstr ""
+#~ "\n"
+#~ "Возможно, LyX не запущен?"
+
+#, fuzzy
+#~ msgid "keyword"
+#~ msgstr "Ключевые слова"
+
+#, fuzzy
+#~ msgid ", but only first letter of each last name"
+#~ msgstr ""
+#~ ", но только %n первая буква каждого слова\n"
+#~ ", но только %n первые буквы каждого слова\n"
+#~ ", но только %n первых букв каждого слова"
+
+#, fuzzy
+#~ msgid ", but only first letter of each word"
+#~ msgstr ""
+#~ ", но только %n первая буква каждого слова\n"
+#~ ", но только %n первые буквы каждого слова\n"
+#~ ", но только %n первых букв каждого слова"
+
+#, fuzzy
+#~ msgid "id suggestion"
+#~ msgstr "Предложения для идентификаторов"
+
+#, fuzzy
+#~ msgid "1 keyword has been imported."
+#~ msgstr "Ключевые слова импортированы"
+
+#, fuzzy
+#~ msgid "search url"
+#~ msgstr "Новый"
+
+#, fuzzy
+#~ msgid "user-defined input"
+#~ msgstr "Вверх"
+
+#, fuzzy
+#~ msgid "z3950 server"
+#~ msgstr "Новый"
+
+#~ msgid "Updating"
+#~ msgstr "Обновление"
+
+#~ msgid "eXtended Markup Language (*.xml)"
+#~ msgstr ""
+#~ "Расширенный язык гипертекстовой "
+#~ "разметки (*.xml)"
+
+#~ msgid "Use first author only"
+#~ msgstr "Использовать только первого автора"
+
+#, fuzzy
+#~ msgid "Merge BibTeX Elements"
+#~ msgstr "Объединить элементы BibTeX"
+
+#~ msgid "Original element:"
+#~ msgstr "Исходный элемент:"
+
+#~ msgid "Inserted element:"
+#~ msgstr "Вставленный элемент:"
+
+#~ msgid "Keep Original"
+#~ msgstr "Оставить исходный"
+
+#~ msgid "Use Inserted"
+#~ msgstr "Использовать вставленный"
+
+#~ msgid "Rename Inserted"
+#~ msgstr "Переименовать вставленный"
+
+#~ msgid "Merge"
+#~ msgstr "Объединить"
+
+#~ msgid "LaTeX|UTF-8"
+#~ msgstr "LaTeX|UTF-8"
+
+#, fuzzy
+#~ msgid ""
+#~ "Default search paths for documents (e.g. PDF files) associated with an "
+#~ "BibTeX entry:"
+#~ msgstr ""
+#~ "Путь по умолчанию для поиска документов "
+#~ "(например, PDF-файлов), связанных с записью "
+#~ "BibTeX:"
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..68488d0
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,92 @@
+# set the include path for X, qt and KDE
+INCLUDES = $(all_includes) $(LIBXSLT_CFLAGS) $(LIBXML_CFLAGS) $(LIBYAZ_CFLAGS) $(LIBBIBUTILS_CFLAGS)
+
+# these are the headers for your project
+noinst_HEADERS = documentlistviewitem.h fileexportertoolchain.h \
+ comment.h commentwidget.h documentlistview.h documentlistviewitem.h \
+ documentsourceview.h documentwidget.h element.h encoder.h encoderlatex.h encoderxml.h \
+ entry.h entryfield.h entrywidget.h entrywidgetauthor.h entrywidgetexternal.h \
+ entrywidgetkeyword.h entrywidgetmisc.h entrywidgetother.h entrywidgetpublication.h \
+ entrywidgetsource.h entrywidgettab.h entrywidgettitle.h entrywidgetuserdefined.h \
+ entrywidgetwarningsitem.h fieldlineedit.h fieldlistview.h file.h fileexporter.h \
+ fileexporterbibtex.h fileexporterbibutils.h fileexporterdocbook5.h fileexporterexternal.h \
+ fileexporterpdf.h fileexporterps.h fileexporterris.h fileimporterbibtex.h \
+ fileexporterrtf.h fileexporterxml.h fileexporterxslt.h fileimporter.h \
+ fileimporterbibutils.h fileimporterexternal.h fileimporterris.h findduplicates.h \
+ idsuggestions.h idsuggestionswidget.h iso5426converter.h iso6937converter.h \
+ kbibtex_part.h kbibtexshell.h latin1literal.h macro.h macrowidget.h mergeelements.h \
+ messagehandler.h preamble.h preamblewidget.h searchbar.h settings.h settingsdlg.h \
+ settingsediting.h settingsfileio.h settingsidsuggestions.h settingskeyword.h \
+ settingssearchurl.h settingsuserdefinedinput.h settingsz3950.h sidebar.h value.h \
+ valuewidget.h webquery.h webqueryamatex.h webqueryarxiv.h webquerybibsonomy.h \
+ webquerycitebase.h webqueryciteseerx.h webquerycsb.h webquerydblp.h \
+ webquerygooglescholar.h webqueryieeexplore.h webquerymathscinet.h webquerypubmed.h \
+ webquerysciencedirect.h webqueryspireshep.h webqueryz3950.h webqueryzmath.h xsltransform.h \
+ z3950connection.h
+# let automoc handle all of the meta source files (moc)
+METASOURCES = AUTO
+
+messages: rc.cpp
+ $(EXTRACTRC) *.rc >>rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/kbibtex.pot
+
+KDE_ICON = AUTO
+
+# this Makefile creates both a KPart application and a KPart
+#########################################################################
+# APPLICATION SECTION
+#########################################################################
+# this is the program that gets installed. it's name is used for all
+# of the other Makefile.am variables
+bin_PROGRAMS = kbibtex
+
+# the application source, library search path, and link libraries
+kbibtex_SOURCES = kbibtexshell.cpp main.cpp
+kbibtex_LDFLAGS = $(all_libraries)
+kbibtex_LDADD = $(LIB_KPARTS)
+
+# this is where the desktop file will go
+shelldesktopdir = $(xdg_appsdir)
+shelldesktop_DATA = kbibtex.desktop
+
+#########################################################################
+# KPART SECTION
+#########################################################################
+kde_module_LTLIBRARIES = libkbibtexpart.la
+
+# the Part's source, library search path, and link libraries
+libkbibtexpart_la_SOURCES = comment.cpp fileexporterdocbook5.cpp commentwidget.cpp documentlistview.cpp \
+ documentlistviewitem.cpp documentsourceview.cpp documentwidget.cpp element.cpp encoder.cpp \
+ encoderlatex.cpp encoderxml.cpp entry.cpp entryfield.cpp entrywidget.cpp \
+ entrywidgetauthor.cpp entrywidgetexternal.cpp entrywidgetkeyword.cpp entrywidgetmisc.cpp \
+ entrywidgetother.cpp entrywidgetpublication.cpp entrywidgetsource.cpp entrywidgettab.cpp \
+ entrywidgettitle.cpp entrywidgetuserdefined.cpp entrywidgetwarningsitem.cpp \
+ z3950connection.cpp fieldlineedit.cpp fieldlistview.cpp file.cpp fileexporter.cpp \
+ fileexporterbibtex.cpp fileexporterris.cpp fileexporterbibutils.cpp fileexporterexternal.cpp fileexporterpdf.cpp \
+ fileexporterps.cpp fileexporterrtf.cpp fileexportertoolchain.cpp fileexporterxml.cpp \
+ fileexporterxslt.cpp fileimporter.cpp fileimporterbibtex.cpp fileimporterbibutils.cpp \
+ fileimporterexternal.cpp fileimporterris.cpp idsuggestions.cpp idsuggestionswidget.cpp \
+ kbibtex_part.cpp macro.cpp macrowidget.cpp mergeelements.cpp preamble.cpp webqueryieeexplore.cpp \
+ preamblewidget.cpp searchbar.cpp settings.cpp settingsdlg.cpp settingsediting.cpp \
+ settingsfileio.cpp settingsidsuggestions.cpp settingskeyword.cpp settingssearchurl.cpp \
+ settingsuserdefinedinput.cpp sidebar.cpp value.cpp valuewidget.cpp webquery.cpp webqueryamatex.cpp \
+ webqueryarxiv.cpp webqueryciteseerx.cpp webquerybibsonomy.cpp webquerycsb.cpp webquerycitebase.cpp webquerydblp.cpp webqueryz3950.cpp \
+ webquerygooglescholar.cpp webquerypubmed.cpp webqueryspireshep.cpp webqueryzmath.cpp \
+ xsltransform.cpp webquerysciencedirect.cpp findduplicates.cpp settingsz3950.cpp \
+ messagehandler.cpp iso6937converter.cpp iso5426converter.cpp webquerymathscinet.cpp
+libkbibtexpart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
+libkbibtexpart_la_LIBADD = $(LIB_KPARTS) $(LIB_KFILE) $(LIB_KUTILS) $(LIBXSLT_LIBS) $(LIBXML_LIBS) $(LIBYAZ_LIBS) $(LIBBIBUTILS_LIBS) -lkatepartinterfaces
+
+# this is where the desktop file will go
+partdesktopdir = $(kde_servicesdir)
+partdesktop_DATA = kbibtex_part.desktop
+
+# this is where the XML-GUI resource fileis go
+partrcdir = ${kde_datadir}/kbibtexpart
+partrc_DATA = kbibtex_part.rc
+shellrcdir = ${kde_datadir}/kbibtex
+shellrc_DATA = kbibtex_shell.rc
+
+appdir = $(kde_datadir)/kbibtex
+app_DATA = z3950-servers.cfg
+
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..d858e05
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,1710 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = kbibtex$(EXEEXT)
+subdir = src
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(kde_moduledir)" "$(DESTDIR)$(bindir)" \
+ "$(DESTDIR)$(appdir)" "$(DESTDIR)$(partdesktopdir)" \
+ "$(DESTDIR)$(partrcdir)" "$(DESTDIR)$(shelldesktopdir)" \
+ "$(DESTDIR)$(shellrcdir)"
+kde_moduleLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(kde_module_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libkbibtexpart_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_libkbibtexpart_la_OBJECTS = comment.lo fileexporterdocbook5.lo \
+ commentwidget.lo documentlistview.lo documentlistviewitem.lo \
+ documentsourceview.lo documentwidget.lo element.lo encoder.lo \
+ encoderlatex.lo encoderxml.lo entry.lo entryfield.lo \
+ entrywidget.lo entrywidgetauthor.lo entrywidgetexternal.lo \
+ entrywidgetkeyword.lo entrywidgetmisc.lo entrywidgetother.lo \
+ entrywidgetpublication.lo entrywidgetsource.lo \
+ entrywidgettab.lo entrywidgettitle.lo \
+ entrywidgetuserdefined.lo entrywidgetwarningsitem.lo \
+ z3950connection.lo fieldlineedit.lo fieldlistview.lo file.lo \
+ fileexporter.lo fileexporterbibtex.lo fileexporterris.lo \
+ fileexporterbibutils.lo fileexporterexternal.lo \
+ fileexporterpdf.lo fileexporterps.lo fileexporterrtf.lo \
+ fileexportertoolchain.lo fileexporterxml.lo \
+ fileexporterxslt.lo fileimporter.lo fileimporterbibtex.lo \
+ fileimporterbibutils.lo fileimporterexternal.lo \
+ fileimporterris.lo idsuggestions.lo idsuggestionswidget.lo \
+ kbibtex_part.lo macro.lo macrowidget.lo mergeelements.lo \
+ preamble.lo webqueryieeexplore.lo preamblewidget.lo \
+ searchbar.lo settings.lo settingsdlg.lo settingsediting.lo \
+ settingsfileio.lo settingsidsuggestions.lo settingskeyword.lo \
+ settingssearchurl.lo settingsuserdefinedinput.lo sidebar.lo \
+ value.lo valuewidget.lo webquery.lo webqueryamatex.lo \
+ webqueryarxiv.lo webqueryciteseerx.lo webquerybibsonomy.lo \
+ webquerycsb.lo webquerycitebase.lo webquerydblp.lo \
+ webqueryz3950.lo webquerygooglescholar.lo webquerypubmed.lo \
+ webqueryspireshep.lo webqueryzmath.lo xsltransform.lo \
+ webquerysciencedirect.lo findduplicates.lo settingsz3950.lo \
+ messagehandler.lo iso6937converter.lo iso5426converter.lo \
+ webquerymathscinet.lo
+#>- libkbibtexpart_la_OBJECTS = $(am_libkbibtexpart_la_OBJECTS)
+#>+ 33
+libkbibtexpart_la_final_OBJECTS = libkbibtexpart_la.all_cpp.lo
+libkbibtexpart_la_nofinal_OBJECTS = comment.lo fileexporterdocbook5.lo \
+ commentwidget.lo documentlistview.lo documentlistviewitem.lo \
+ documentsourceview.lo documentwidget.lo element.lo encoder.lo \
+ encoderlatex.lo encoderxml.lo entry.lo entryfield.lo \
+ entrywidget.lo entrywidgetauthor.lo entrywidgetexternal.lo \
+ entrywidgetkeyword.lo entrywidgetmisc.lo entrywidgetother.lo \
+ entrywidgetpublication.lo entrywidgetsource.lo \
+ entrywidgettab.lo entrywidgettitle.lo \
+ entrywidgetuserdefined.lo entrywidgetwarningsitem.lo \
+ z3950connection.lo fieldlineedit.lo fieldlistview.lo file.lo \
+ fileexporter.lo fileexporterbibtex.lo fileexporterris.lo \
+ fileexporterbibutils.lo fileexporterexternal.lo \
+ fileexporterpdf.lo fileexporterps.lo fileexporterrtf.lo \
+ fileexportertoolchain.lo fileexporterxml.lo \
+ fileexporterxslt.lo fileimporter.lo fileimporterbibtex.lo \
+ fileimporterbibutils.lo fileimporterexternal.lo \
+ fileimporterris.lo idsuggestions.lo idsuggestionswidget.lo \
+ kbibtex_part.lo macro.lo macrowidget.lo mergeelements.lo \
+ preamble.lo webqueryieeexplore.lo preamblewidget.lo \
+ searchbar.lo settings.lo settingsdlg.lo settingsediting.lo \
+ settingsfileio.lo settingsidsuggestions.lo settingskeyword.lo \
+ settingssearchurl.lo settingsuserdefinedinput.lo sidebar.lo \
+ value.lo valuewidget.lo webquery.lo webqueryamatex.lo \
+ webqueryarxiv.lo webqueryciteseerx.lo webquerybibsonomy.lo \
+ webquerycsb.lo webquerycitebase.lo webquerydblp.lo \
+ webqueryz3950.lo webquerygooglescholar.lo webquerypubmed.lo \
+ webqueryspireshep.lo webqueryzmath.lo xsltransform.lo \
+ webquerysciencedirect.lo findduplicates.lo settingsz3950.lo \
+ messagehandler.lo iso6937converter.lo iso5426converter.lo \
+ webquerymathscinet.lo
+@KDE_USE_FINAL_FALSE@libkbibtexpart_la_OBJECTS = $(libkbibtexpart_la_nofinal_OBJECTS)
+@KDE_USE_FINAL_TRUE@libkbibtexpart_la_OBJECTS = $(libkbibtexpart_la_final_OBJECTS)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_kbibtex_OBJECTS = kbibtexshell.$(OBJEXT) main.$(OBJEXT)
+#>- kbibtex_OBJECTS = $(am_kbibtex_OBJECTS)
+#>+ 4
+kbibtex_final_OBJECTS = kbibtex.all_cpp.o
+kbibtex_nofinal_OBJECTS = kbibtexshell.$(OBJEXT) main.$(OBJEXT)
+@KDE_USE_FINAL_FALSE@kbibtex_OBJECTS = $(kbibtex_nofinal_OBJECTS)
+@KDE_USE_FINAL_TRUE@kbibtex_OBJECTS = $(kbibtex_final_OBJECTS)
+kbibtex_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 2
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libkbibtexpart_la_SOURCES) $(kbibtex_SOURCES)
+DIST_SOURCES = $(libkbibtexpart_la_SOURCES) $(kbibtex_SOURCES)
+appDATA_INSTALL = $(INSTALL_DATA)
+partdesktopDATA_INSTALL = $(INSTALL_DATA)
+partrcDATA_INSTALL = $(INSTALL_DATA)
+shelldesktopDATA_INSTALL = $(INSTALL_DATA)
+shellrcDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(app_DATA) $(partdesktop_DATA) $(partrc_DATA) \
+ $(shelldesktop_DATA) $(shellrc_DATA)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSCCONFIG = @ARTSCCONFIG@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOPIDLNG = @DCOPIDLNG@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KCFG_DEPENDENCIES = @KCFG_DEPENDENCIES@
+KCONFIG_COMPILER = @KCONFIG_COMPILER@
+KDECONFIG = @KDECONFIG@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_RPATH = @KDE_RPATH@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_FPIE = @KDE_USE_FPIE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+KDE_USE_PIE = @KDE_USE_PIE@
+KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBYAZ_CFLAGS = @LIBYAZ_CFLAGS@
+LIBYAZ_LIBS = @LIBYAZ_LIBS@
+LIBYAZ_RPATH = @LIBYAZ_RPATH@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KABC = @LIB_KABC@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDED = @LIB_KDED@
+LIB_KDEPIM = @LIB_KDEPIM@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KDNSSD = @LIB_KDNSSD@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIMPROXY = @LIB_KIMPROXY@
+LIB_KIO = @LIB_KIO@
+LIB_KJS = @LIB_KJS@
+LIB_KNEWSTUFF = @LIB_KNEWSTUFF@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_KUNITTEST = @LIB_KUNITTEST@
+LIB_KUTILS = @LIB_KUTILS@
+LIB_POLL = @LIB_POLL@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LIB_XRENDER = @LIB_XRENDER@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKEKDEWIDGETS = @MAKEKDEWIDGETS@
+MCOPIDL = @MCOPIDL@
+MEINPROC = @MEINPROC@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+XGETTEXT = @XGETTEXT@
+XMKMF = @XMKMF@
+XMLLINT = @XMLLINT@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+X_PRE_LIBS = @X_PRE_LIBS@
+X_RPATH = @X_RPATH@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+include_ARTS_FALSE = @include_ARTS_FALSE@
+include_ARTS_TRUE = @include_ARTS_TRUE@
+include_x11_FALSE = @include_x11_FALSE@
+include_x11_TRUE = @include_x11_TRUE@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_kcfgdir = @kde_kcfgdir@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+kdeinitdir = @kdeinitdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+xdg_appsdir = @xdg_appsdir@
+xdg_directorydir = @xdg_directorydir@
+xdg_menudir = @xdg_menudir@
+
+# set the include path for X, qt and KDE
+INCLUDES = $(all_includes) $(LIBXSLT_CFLAGS) $(LIBXML_CFLAGS) $(LIBYAZ_CFLAGS) $(LIBBIBUTILS_CFLAGS)
+
+# these are the headers for your project
+noinst_HEADERS = documentlistviewitem.h fileexportertoolchain.h \
+ comment.h commentwidget.h documentlistview.h documentlistviewitem.h \
+ documentsourceview.h documentwidget.h element.h encoder.h encoderlatex.h encoderxml.h \
+ entry.h entryfield.h entrywidget.h entrywidgetauthor.h entrywidgetexternal.h \
+ entrywidgetkeyword.h entrywidgetmisc.h entrywidgetother.h entrywidgetpublication.h \
+ entrywidgetsource.h entrywidgettab.h entrywidgettitle.h entrywidgetuserdefined.h \
+ entrywidgetwarningsitem.h fieldlineedit.h fieldlistview.h file.h fileexporter.h \
+ fileexporterbibtex.h fileexporterbibutils.h fileexporterdocbook5.h fileexporterexternal.h \
+ fileexporterpdf.h fileexporterps.h fileexporterris.h fileimporterbibtex.h \
+ fileexporterrtf.h fileexporterxml.h fileexporterxslt.h fileimporter.h \
+ fileimporterbibutils.h fileimporterexternal.h fileimporterris.h findduplicates.h \
+ idsuggestions.h idsuggestionswidget.h iso5426converter.h iso6937converter.h \
+ kbibtex_part.h kbibtexshell.h latin1literal.h macro.h macrowidget.h mergeelements.h \
+ messagehandler.h preamble.h preamblewidget.h searchbar.h settings.h settingsdlg.h \
+ settingsediting.h settingsfileio.h settingsidsuggestions.h settingskeyword.h \
+ settingssearchurl.h settingsuserdefinedinput.h settingsz3950.h sidebar.h value.h \
+ valuewidget.h webquery.h webqueryamatex.h webqueryarxiv.h webquerybibsonomy.h \
+ webquerycitebase.h webqueryciteseerx.h webquerycsb.h webquerydblp.h \
+ webquerygooglescholar.h webqueryieeexplore.h webquerymathscinet.h webquerypubmed.h \
+ webquerysciencedirect.h webqueryspireshep.h webqueryz3950.h webqueryzmath.h xsltransform.h \
+ z3950connection.h
+
+# let automoc handle all of the meta source files (moc)
+#>- METASOURCES = AUTO
+KDE_ICON = AUTO
+
+# the application source, library search path, and link libraries
+kbibtex_SOURCES = kbibtexshell.cpp main.cpp
+kbibtex_LDFLAGS = $(all_libraries)
+kbibtex_LDADD = $(LIB_KPARTS)
+
+# this is where the desktop file will go
+shelldesktopdir = $(xdg_appsdir)
+shelldesktop_DATA = kbibtex.desktop
+
+#########################################################################
+# KPART SECTION
+#########################################################################
+kde_module_LTLIBRARIES = libkbibtexpart.la
+
+# the Part's source, library search path, and link libraries
+libkbibtexpart_la_SOURCES = comment.cpp fileexporterdocbook5.cpp commentwidget.cpp documentlistview.cpp \
+ documentlistviewitem.cpp documentsourceview.cpp documentwidget.cpp element.cpp encoder.cpp \
+ encoderlatex.cpp encoderxml.cpp entry.cpp entryfield.cpp entrywidget.cpp \
+ entrywidgetauthor.cpp entrywidgetexternal.cpp entrywidgetkeyword.cpp entrywidgetmisc.cpp \
+ entrywidgetother.cpp entrywidgetpublication.cpp entrywidgetsource.cpp entrywidgettab.cpp \
+ entrywidgettitle.cpp entrywidgetuserdefined.cpp entrywidgetwarningsitem.cpp \
+ z3950connection.cpp fieldlineedit.cpp fieldlistview.cpp file.cpp fileexporter.cpp \
+ fileexporterbibtex.cpp fileexporterris.cpp fileexporterbibutils.cpp fileexporterexternal.cpp fileexporterpdf.cpp \
+ fileexporterps.cpp fileexporterrtf.cpp fileexportertoolchain.cpp fileexporterxml.cpp \
+ fileexporterxslt.cpp fileimporter.cpp fileimporterbibtex.cpp fileimporterbibutils.cpp \
+ fileimporterexternal.cpp fileimporterris.cpp idsuggestions.cpp idsuggestionswidget.cpp \
+ kbibtex_part.cpp macro.cpp macrowidget.cpp mergeelements.cpp preamble.cpp webqueryieeexplore.cpp \
+ preamblewidget.cpp searchbar.cpp settings.cpp settingsdlg.cpp settingsediting.cpp \
+ settingsfileio.cpp settingsidsuggestions.cpp settingskeyword.cpp settingssearchurl.cpp \
+ settingsuserdefinedinput.cpp sidebar.cpp value.cpp valuewidget.cpp webquery.cpp webqueryamatex.cpp \
+ webqueryarxiv.cpp webqueryciteseerx.cpp webquerybibsonomy.cpp webquerycsb.cpp webquerycitebase.cpp webquerydblp.cpp webqueryz3950.cpp \
+ webquerygooglescholar.cpp webquerypubmed.cpp webqueryspireshep.cpp webqueryzmath.cpp \
+ xsltransform.cpp webquerysciencedirect.cpp findduplicates.cpp settingsz3950.cpp \
+ messagehandler.cpp iso6937converter.cpp iso5426converter.cpp webquerymathscinet.cpp
+
+libkbibtexpart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
+libkbibtexpart_la_LIBADD = $(LIB_KPARTS) $(LIB_KFILE) $(LIB_KUTILS) $(LIBXSLT_LIBS) $(LIBXML_LIBS) $(LIBYAZ_LIBS) $(LIBBIBUTILS_LIBS) -lkatepartinterfaces
+
+# this is where the desktop file will go
+partdesktopdir = $(kde_servicesdir)
+partdesktop_DATA = kbibtex_part.desktop
+
+# this is where the XML-GUI resource fileis go
+partrcdir = ${kde_datadir}/kbibtexpart
+partrc_DATA = kbibtex_part.rc
+shellrcdir = ${kde_datadir}/kbibtex
+shellrc_DATA = kbibtex_shell.rc
+appdir = $(kde_datadir)/kbibtex
+app_DATA = z3950-servers.cfg
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu src/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/Makefile
+ cd $(top_srcdir) && perl admin/am_edit src/Makefile.in
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-kde_moduleLTLIBRARIES: $(kde_module_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(kde_moduledir)" || $(mkdir_p) "$(DESTDIR)$(kde_moduledir)"
+ @list='$(kde_module_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(kde_moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(kde_moduledir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(kde_moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(kde_moduledir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-kde_moduleLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(kde_module_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(kde_moduledir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(kde_moduledir)/$$p"; \
+ done
+
+clean-kde_moduleLTLIBRARIES:
+ -test -z "$(kde_module_LTLIBRARIES)" || rm -f $(kde_module_LTLIBRARIES)
+ @list='$(kde_module_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
+#>- libkbibtexpart.la: $(libkbibtexpart_la_OBJECTS) $(libkbibtexpart_la_DEPENDENCIES)
+#>+ 2
+@KDE_USE_CLOSURE_TRUE@libkbibtexpart.la: libkbibtexpart.la.closure $(libkbibtexpart_la_OBJECTS) $(libkbibtexpart_la_DEPENDENCIES)
+@KDE_USE_CLOSURE_FALSE@libkbibtexpart.la: $(libkbibtexpart_la_OBJECTS) $(libkbibtexpart_la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(kde_moduledir) $(libkbibtexpart_la_LDFLAGS) $(libkbibtexpart_la_OBJECTS) $(libkbibtexpart_la_LIBADD) $(LIBS)
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+ done
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+kbibtex$(EXEEXT): $(kbibtex_OBJECTS) $(kbibtex_DEPENDENCIES)
+ @rm -f kbibtex$(EXEEXT)
+ $(CXXLINK) $(kbibtex_LDFLAGS) $(kbibtex_OBJECTS) $(kbibtex_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/comment.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commentwidget.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/documentlistview.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/documentlistviewitem.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/documentsourceview.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/documentwidget.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/element.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/encoder.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/encoderlatex.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/encoderxml.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entry.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entryfield.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entrywidget.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entrywidgetauthor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entrywidgetexternal.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entrywidgetkeyword.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entrywidgetmisc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entrywidgetother.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entrywidgetpublication.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entrywidgetsource.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entrywidgettab.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entrywidgettitle.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entrywidgetuserdefined.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entrywidgetwarningsitem.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fieldlineedit.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fieldlistview.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileexporter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileexporterbibtex.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileexporterbibutils.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileexporterdocbook5.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileexporterexternal.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileexporterpdf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileexporterps.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileexporterris.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileexporterrtf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileexportertoolchain.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileexporterxml.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileexporterxslt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileimporter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileimporterbibtex.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileimporterbibutils.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileimporterexternal.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileimporterris.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findduplicates.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idsuggestions.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idsuggestionswidget.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iso5426converter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iso6937converter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kbibtex_part.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kbibtexshell.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macro.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macrowidget.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mergeelements.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/messagehandler.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preamble.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preamblewidget.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/searchbar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settings.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settingsdlg.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settingsediting.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settingsfileio.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settingsidsuggestions.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settingskeyword.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settingssearchurl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settingsuserdefinedinput.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settingsz3950.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sidebar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/value.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/valuewidget.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webquery.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webqueryamatex.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webqueryarxiv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webquerybibsonomy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webquerycitebase.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webqueryciteseerx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webquerycsb.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webquerydblp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webquerygooglescholar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webqueryieeexplore.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webquerymathscinet.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webquerypubmed.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webquerysciencedirect.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webqueryspireshep.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webqueryz3950.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/webqueryzmath.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsltransform.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/z3950connection.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+install-appDATA: $(app_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(appdir)" || $(mkdir_p) "$(DESTDIR)$(appdir)"
+ @list='$(app_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(appDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appdir)/$$f'"; \
+ $(appDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appdir)/$$f"; \
+ done
+
+uninstall-appDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(app_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(appdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(appdir)/$$f"; \
+ done
+install-partdesktopDATA: $(partdesktop_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(partdesktopdir)" || $(mkdir_p) "$(DESTDIR)$(partdesktopdir)"
+ @list='$(partdesktop_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(partdesktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(partdesktopdir)/$$f'"; \
+ $(partdesktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(partdesktopdir)/$$f"; \
+ done
+
+uninstall-partdesktopDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(partdesktop_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(partdesktopdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(partdesktopdir)/$$f"; \
+ done
+install-partrcDATA: $(partrc_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(partrcdir)" || $(mkdir_p) "$(DESTDIR)$(partrcdir)"
+ @list='$(partrc_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(partrcDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(partrcdir)/$$f'"; \
+ $(partrcDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(partrcdir)/$$f"; \
+ done
+
+uninstall-partrcDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(partrc_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(partrcdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(partrcdir)/$$f"; \
+ done
+install-shelldesktopDATA: $(shelldesktop_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(shelldesktopdir)" || $(mkdir_p) "$(DESTDIR)$(shelldesktopdir)"
+ @list='$(shelldesktop_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(shelldesktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(shelldesktopdir)/$$f'"; \
+ $(shelldesktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(shelldesktopdir)/$$f"; \
+ done
+
+uninstall-shelldesktopDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(shelldesktop_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(shelldesktopdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(shelldesktopdir)/$$f"; \
+ done
+install-shellrcDATA: $(shellrc_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(shellrcdir)" || $(mkdir_p) "$(DESTDIR)$(shellrcdir)"
+ @list='$(shellrc_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(shellrcDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(shellrcdir)/$$f'"; \
+ $(shellrcDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(shellrcdir)/$$f"; \
+ done
+
+uninstall-shellrcDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(shellrc_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(shellrcdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(shellrcdir)/$$f"; \
+ done
+
+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
+
+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; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+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
+
+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"; \
+ $(mkdir_p) "$(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) $(PROGRAMS) $(DATA) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(kde_moduledir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdir)" "$(DESTDIR)$(partdesktopdir)" "$(DESTDIR)$(partrcdir)" "$(DESTDIR)$(shelldesktopdir)" "$(DESTDIR)$(shellrcdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-binPROGRAMS clean-generic clean-kde_moduleLTLIBRARIES \
+#>- clean-libtool mostlyclean-am
+#>+ 2
+clean-am: clean-metasources clean-closures clean-bcheck clean-final clean-binPROGRAMS clean-generic clean-kde_moduleLTLIBRARIES \
+ 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:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+#>- install-data-am: install-appDATA install-kde_moduleLTLIBRARIES \
+#>- install-partdesktopDATA install-partrcDATA \
+#>- install-shelldesktopDATA install-shellrcDATA
+#>+ 3
+install-data-am: install-kde-icons install-appDATA \
+ install-partdesktopDATA install-partrcDATA \
+ install-shelldesktopDATA install-shellrcDATA
+
+#>- install-exec-am: install-binPROGRAMS
+#>+ 1
+install-exec-am: install-binPROGRAMS install-kde_moduleLTLIBRARIES
+
+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-appDATA uninstall-binPROGRAMS \
+#>- uninstall-info-am uninstall-kde_moduleLTLIBRARIES \
+#>- uninstall-partdesktopDATA uninstall-partrcDATA \
+#>- uninstall-shelldesktopDATA uninstall-shellrcDATA
+#>+ 4
+uninstall-am: uninstall-kde-icons uninstall-appDATA uninstall-binPROGRAMS \
+ uninstall-info-am uninstall-kde_moduleLTLIBRARIES \
+ uninstall-partdesktopDATA uninstall-partrcDATA \
+ uninstall-shelldesktopDATA uninstall-shellrcDATA
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-kde_moduleLTLIBRARIES clean-libtool ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-appDATA \
+ install-binPROGRAMS install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am \
+ install-kde_moduleLTLIBRARIES install-man \
+ install-partdesktopDATA install-partrcDATA \
+ install-shelldesktopDATA install-shellrcDATA 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-appDATA \
+ uninstall-binPROGRAMS uninstall-info-am \
+ uninstall-kde_moduleLTLIBRARIES uninstall-partdesktopDATA \
+ uninstall-partrcDATA uninstall-shelldesktopDATA \
+ uninstall-shellrcDATA
+
+
+messages: rc.cpp
+ $(EXTRACTRC) *.rc >>rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/kbibtex.pot
+# 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:
+
+#>+ 8
+libkbibtexpart.la.closure: $(libkbibtexpart_la_OBJECTS) $(libkbibtexpart_la_DEPENDENCIES)
+ @echo "int main() {return 0;}" > libkbibtexpart_la_closure.cpp
+ @$(LTCXXCOMPILE) -c libkbibtexpart_la_closure.cpp
+ $(CXXLINK) libkbibtexpart_la_closure.lo $(libkbibtexpart_la_LDFLAGS) $(libkbibtexpart_la_OBJECTS) $(libkbibtexpart_la_LIBADD) $(LIBS)
+ @rm -f libkbibtexpart_la_closure.* libkbibtexpart.la.closure
+ @echo "timestamp" > libkbibtexpart.la.closure
+
+
+#>+ 3
+entrywidgetuserdefined.moc: $(srcdir)/entrywidgetuserdefined.h
+ $(MOC) $(srcdir)/entrywidgetuserdefined.h -o entrywidgetuserdefined.moc
+
+#>+ 2
+mocs: entrywidgetuserdefined.moc
+
+#>+ 3
+documentlistview.moc: $(srcdir)/documentlistview.h
+ $(MOC) $(srcdir)/documentlistview.h -o documentlistview.moc
+
+#>+ 2
+mocs: documentlistview.moc
+
+#>+ 3
+file.moc: $(srcdir)/file.h
+ $(MOC) $(srcdir)/file.h -o file.moc
+
+#>+ 2
+mocs: file.moc
+
+#>+ 3
+documentsourceview.moc: $(srcdir)/documentsourceview.h
+ $(MOC) $(srcdir)/documentsourceview.h -o documentsourceview.moc
+
+#>+ 2
+mocs: documentsourceview.moc
+
+#>+ 3
+webqueryamatex.moc: $(srcdir)/webqueryamatex.h
+ $(MOC) $(srcdir)/webqueryamatex.h -o webqueryamatex.moc
+
+#>+ 2
+mocs: webqueryamatex.moc
+
+#>+ 3
+fileimporterbibutils.moc: $(srcdir)/fileimporterbibutils.h
+ $(MOC) $(srcdir)/fileimporterbibutils.h -o fileimporterbibutils.moc
+
+#>+ 2
+mocs: fileimporterbibutils.moc
+
+#>+ 3
+fieldlineedit.moc: $(srcdir)/fieldlineedit.h
+ $(MOC) $(srcdir)/fieldlineedit.h -o fieldlineedit.moc
+
+#>+ 2
+mocs: fieldlineedit.moc
+
+#>+ 3
+webquerymathscinet.moc: $(srcdir)/webquerymathscinet.h
+ $(MOC) $(srcdir)/webquerymathscinet.h -o webquerymathscinet.moc
+
+#>+ 2
+mocs: webquerymathscinet.moc
+
+#>+ 3
+webqueryciteseerx.moc: $(srcdir)/webqueryciteseerx.h
+ $(MOC) $(srcdir)/webqueryciteseerx.h -o webqueryciteseerx.moc
+
+#>+ 2
+mocs: webqueryciteseerx.moc
+
+#>+ 3
+webquerygooglescholar.moc: $(srcdir)/webquerygooglescholar.h
+ $(MOC) $(srcdir)/webquerygooglescholar.h -o webquerygooglescholar.moc
+
+#>+ 2
+mocs: webquerygooglescholar.moc
+
+#>+ 3
+entrywidget.moc: $(srcdir)/entrywidget.h
+ $(MOC) $(srcdir)/entrywidget.h -o entrywidget.moc
+
+#>+ 2
+mocs: entrywidget.moc
+
+#>+ 3
+webquerypubmed.moc: $(srcdir)/webquerypubmed.h
+ $(MOC) $(srcdir)/webquerypubmed.h -o webquerypubmed.moc
+
+#>+ 2
+mocs: webquerypubmed.moc
+
+#>+ 3
+webqueryz3950.moc: $(srcdir)/webqueryz3950.h
+ $(MOC) $(srcdir)/webqueryz3950.h -o webqueryz3950.moc
+
+#>+ 2
+mocs: webqueryz3950.moc
+
+#>+ 3
+fileexporterbibutils.moc: $(srcdir)/fileexporterbibutils.h
+ $(MOC) $(srcdir)/fileexporterbibutils.h -o fileexporterbibutils.moc
+
+#>+ 2
+mocs: fileexporterbibutils.moc
+
+#>+ 3
+entrywidgetmisc.moc: $(srcdir)/entrywidgetmisc.h
+ $(MOC) $(srcdir)/entrywidgetmisc.h -o entrywidgetmisc.moc
+
+#>+ 2
+mocs: entrywidgetmisc.moc
+
+#>+ 3
+entrywidgetexternal.moc: $(srcdir)/entrywidgetexternal.h
+ $(MOC) $(srcdir)/entrywidgetexternal.h -o entrywidgetexternal.moc
+
+#>+ 2
+mocs: entrywidgetexternal.moc
+
+#>+ 3
+kbibtex_part.moc: $(srcdir)/kbibtex_part.h
+ $(MOC) $(srcdir)/kbibtex_part.h -o kbibtex_part.moc
+
+#>+ 2
+mocs: kbibtex_part.moc
+
+#>+ 3
+webqueryzmath.moc: $(srcdir)/webqueryzmath.h
+ $(MOC) $(srcdir)/webqueryzmath.h -o webqueryzmath.moc
+
+#>+ 2
+mocs: webqueryzmath.moc
+
+#>+ 3
+webqueryspireshep.moc: $(srcdir)/webqueryspireshep.h
+ $(MOC) $(srcdir)/webqueryspireshep.h -o webqueryspireshep.moc
+
+#>+ 2
+mocs: webqueryspireshep.moc
+
+#>+ 3
+entrywidgetother.moc: $(srcdir)/entrywidgetother.h
+ $(MOC) $(srcdir)/entrywidgetother.h -o entrywidgetother.moc
+
+#>+ 2
+mocs: entrywidgetother.moc
+
+#>+ 3
+settingsediting.moc: $(srcdir)/settingsediting.h
+ $(MOC) $(srcdir)/settingsediting.h -o settingsediting.moc
+
+#>+ 2
+mocs: settingsediting.moc
+
+#>+ 3
+webqueryieeexplore.moc: $(srcdir)/webqueryieeexplore.h
+ $(MOC) $(srcdir)/webqueryieeexplore.h -o webqueryieeexplore.moc
+
+#>+ 2
+mocs: webqueryieeexplore.moc
+
+#>+ 3
+settingssearchurl.moc: $(srcdir)/settingssearchurl.h
+ $(MOC) $(srcdir)/settingssearchurl.h -o settingssearchurl.moc
+
+#>+ 2
+mocs: settingssearchurl.moc
+
+#>+ 3
+webquerycitebase.moc: $(srcdir)/webquerycitebase.h
+ $(MOC) $(srcdir)/webquerycitebase.h -o webquerycitebase.moc
+
+#>+ 2
+mocs: webquerycitebase.moc
+
+#>+ 3
+webquerydblp.moc: $(srcdir)/webquerydblp.h
+ $(MOC) $(srcdir)/webquerydblp.h -o webquerydblp.moc
+
+#>+ 2
+mocs: webquerydblp.moc
+
+#>+ 3
+preamblewidget.moc: $(srcdir)/preamblewidget.h
+ $(MOC) $(srcdir)/preamblewidget.h -o preamblewidget.moc
+
+#>+ 2
+mocs: preamblewidget.moc
+
+#>+ 3
+commentwidget.moc: $(srcdir)/commentwidget.h
+ $(MOC) $(srcdir)/commentwidget.h -o commentwidget.moc
+
+#>+ 2
+mocs: commentwidget.moc
+
+#>+ 3
+mergeelements.moc: $(srcdir)/mergeelements.h
+ $(MOC) $(srcdir)/mergeelements.h -o mergeelements.moc
+
+#>+ 2
+mocs: mergeelements.moc
+
+#>+ 3
+fileimporterexternal.moc: $(srcdir)/fileimporterexternal.h
+ $(MOC) $(srcdir)/fileimporterexternal.h -o fileimporterexternal.moc
+
+#>+ 2
+mocs: fileimporterexternal.moc
+
+#>+ 3
+settingskeyword.moc: $(srcdir)/settingskeyword.h
+ $(MOC) $(srcdir)/settingskeyword.h -o settingskeyword.moc
+
+#>+ 2
+mocs: settingskeyword.moc
+
+#>+ 3
+webquerybibsonomy.moc: $(srcdir)/webquerybibsonomy.h
+ $(MOC) $(srcdir)/webquerybibsonomy.h -o webquerybibsonomy.moc
+
+#>+ 2
+mocs: webquerybibsonomy.moc
+
+#>+ 3
+findduplicates.moc: $(srcdir)/findduplicates.h
+ $(MOC) $(srcdir)/findduplicates.h -o findduplicates.moc
+
+#>+ 2
+mocs: findduplicates.moc
+
+#>+ 3
+entrywidgettitle.moc: $(srcdir)/entrywidgettitle.h
+ $(MOC) $(srcdir)/entrywidgettitle.h -o entrywidgettitle.moc
+
+#>+ 2
+mocs: entrywidgettitle.moc
+
+#>+ 3
+entrywidgetkeyword.moc: $(srcdir)/entrywidgetkeyword.h
+ $(MOC) $(srcdir)/entrywidgetkeyword.h -o entrywidgetkeyword.moc
+
+#>+ 2
+mocs: entrywidgetkeyword.moc
+
+#>+ 3
+entrywidgetsource.moc: $(srcdir)/entrywidgetsource.h
+ $(MOC) $(srcdir)/entrywidgetsource.h -o entrywidgetsource.moc
+
+#>+ 2
+mocs: entrywidgetsource.moc
+
+#>+ 3
+fileexporter.moc: $(srcdir)/fileexporter.h
+ $(MOC) $(srcdir)/fileexporter.h -o fileexporter.moc
+
+#>+ 2
+mocs: fileexporter.moc
+
+#>+ 3
+fileimporter.moc: $(srcdir)/fileimporter.h
+ $(MOC) $(srcdir)/fileimporter.h -o fileimporter.moc
+
+#>+ 2
+mocs: fileimporter.moc
+
+#>+ 3
+searchbar.moc: $(srcdir)/searchbar.h
+ $(MOC) $(srcdir)/searchbar.h -o searchbar.moc
+
+#>+ 2
+mocs: searchbar.moc
+
+#>+ 3
+settingsz3950.moc: $(srcdir)/settingsz3950.h
+ $(MOC) $(srcdir)/settingsz3950.h -o settingsz3950.moc
+
+#>+ 2
+mocs: settingsz3950.moc
+
+#>+ 3
+idsuggestionswidget.moc: $(srcdir)/idsuggestionswidget.h
+ $(MOC) $(srcdir)/idsuggestionswidget.h -o idsuggestionswidget.moc
+
+#>+ 2
+mocs: idsuggestionswidget.moc
+
+#>+ 3
+entrywidgettab.moc: $(srcdir)/entrywidgettab.h
+ $(MOC) $(srcdir)/entrywidgettab.h -o entrywidgettab.moc
+
+#>+ 2
+mocs: entrywidgettab.moc
+
+#>+ 3
+entrywidgetpublication.moc: $(srcdir)/entrywidgetpublication.h
+ $(MOC) $(srcdir)/entrywidgetpublication.h -o entrywidgetpublication.moc
+
+#>+ 2
+mocs: entrywidgetpublication.moc
+
+#>+ 3
+kbibtexshell.moc: $(srcdir)/kbibtexshell.h
+ $(MOC) $(srcdir)/kbibtexshell.h -o kbibtexshell.moc
+
+#>+ 2
+mocs: kbibtexshell.moc
+
+#>+ 3
+fileexportertoolchain.moc: $(srcdir)/fileexportertoolchain.h
+ $(MOC) $(srcdir)/fileexportertoolchain.h -o fileexportertoolchain.moc
+
+#>+ 2
+mocs: fileexportertoolchain.moc
+
+#>+ 3
+settingsidsuggestions.moc: $(srcdir)/settingsidsuggestions.h
+ $(MOC) $(srcdir)/settingsidsuggestions.h -o settingsidsuggestions.moc
+
+#>+ 2
+mocs: settingsidsuggestions.moc
+
+#>+ 3
+webquerysciencedirect.moc: $(srcdir)/webquerysciencedirect.h
+ $(MOC) $(srcdir)/webquerysciencedirect.h -o webquerysciencedirect.moc
+
+#>+ 2
+mocs: webquerysciencedirect.moc
+
+#>+ 3
+settingsfileio.moc: $(srcdir)/settingsfileio.h
+ $(MOC) $(srcdir)/settingsfileio.h -o settingsfileio.moc
+
+#>+ 2
+mocs: settingsfileio.moc
+
+#>+ 3
+entrywidgetauthor.moc: $(srcdir)/entrywidgetauthor.h
+ $(MOC) $(srcdir)/entrywidgetauthor.h -o entrywidgetauthor.moc
+
+#>+ 2
+mocs: entrywidgetauthor.moc
+
+#>+ 3
+settingsuserdefinedinput.moc: $(srcdir)/settingsuserdefinedinput.h
+ $(MOC) $(srcdir)/settingsuserdefinedinput.h -o settingsuserdefinedinput.moc
+
+#>+ 2
+mocs: settingsuserdefinedinput.moc
+
+#>+ 3
+settingsdlg.moc: $(srcdir)/settingsdlg.h
+ $(MOC) $(srcdir)/settingsdlg.h -o settingsdlg.moc
+
+#>+ 2
+mocs: settingsdlg.moc
+
+#>+ 3
+sidebar.moc: $(srcdir)/sidebar.h
+ $(MOC) $(srcdir)/sidebar.h -o sidebar.moc
+
+#>+ 2
+mocs: sidebar.moc
+
+#>+ 3
+webqueryarxiv.moc: $(srcdir)/webqueryarxiv.h
+ $(MOC) $(srcdir)/webqueryarxiv.h -o webqueryarxiv.moc
+
+#>+ 2
+mocs: webqueryarxiv.moc
+
+#>+ 3
+webquery.moc: $(srcdir)/webquery.h
+ $(MOC) $(srcdir)/webquery.h -o webquery.moc
+
+#>+ 2
+mocs: webquery.moc
+
+#>+ 3
+fileexporterexternal.moc: $(srcdir)/fileexporterexternal.h
+ $(MOC) $(srcdir)/fileexporterexternal.h -o fileexporterexternal.moc
+
+#>+ 2
+mocs: fileexporterexternal.moc
+
+#>+ 3
+valuewidget.moc: $(srcdir)/valuewidget.h
+ $(MOC) $(srcdir)/valuewidget.h -o valuewidget.moc
+
+#>+ 2
+mocs: valuewidget.moc
+
+#>+ 3
+fieldlistview.moc: $(srcdir)/fieldlistview.h
+ $(MOC) $(srcdir)/fieldlistview.h -o fieldlistview.moc
+
+#>+ 2
+mocs: fieldlistview.moc
+
+#>+ 3
+macrowidget.moc: $(srcdir)/macrowidget.h
+ $(MOC) $(srcdir)/macrowidget.h -o macrowidget.moc
+
+#>+ 2
+mocs: macrowidget.moc
+
+#>+ 3
+webquerycsb.moc: $(srcdir)/webquerycsb.h
+ $(MOC) $(srcdir)/webquerycsb.h -o webquerycsb.moc
+
+#>+ 2
+mocs: webquerycsb.moc
+
+#>+ 3
+documentwidget.moc: $(srcdir)/documentwidget.h
+ $(MOC) $(srcdir)/documentwidget.h -o documentwidget.moc
+
+#>+ 2
+mocs: documentwidget.moc
+
+#>+ 3
+clean-metasources:
+ -rm -f entrywidgetuserdefined.moc documentlistview.moc file.moc documentsourceview.moc webqueryamatex.moc fileimporterbibutils.moc fieldlineedit.moc webquerymathscinet.moc webqueryciteseerx.moc webquerygooglescholar.moc entrywidget.moc webquerypubmed.moc webqueryz3950.moc fileexporterbibutils.moc entrywidgetmisc.moc entrywidgetexternal.moc kbibtex_part.moc webqueryzmath.moc webqueryspireshep.moc entrywidgetother.moc settingsediting.moc webqueryieeexplore.moc settingssearchurl.moc webquerycitebase.moc webquerydblp.moc preamblewidget.moc commentwidget.moc mergeelements.moc fileimporterexternal.moc settingskeyword.moc webquerybibsonomy.moc findduplicates.moc entrywidgettitle.moc entrywidgetkeyword.moc entrywidgetsource.moc fileexporter.moc fileimporter.moc searchbar.moc settingsz3950.moc idsuggestionswidget.moc entrywidgettab.moc entrywidgetpublication.moc kbibtexshell.moc fileexportertoolchain.moc settingsidsuggestions.moc webquerysciencedirect.moc settingsfileio.moc entrywidgetauthor.moc settingsuserdefinedinput.moc settingsdlg.moc sidebar.moc webqueryarxiv.moc webquery.moc fileexporterexternal.moc valuewidget.moc fieldlistview.moc macrowidget.moc webquerycsb.moc documentwidget.moc
+
+#>+ 2
+KDE_DIST=hi64-app-kbibtex.png Makefile.in z3950-servers.cfg kbibtex_shell.rc hi48-app-kbibtex.png kbibtex_part.rc hi128-app-kbibtex.png kbibtex.desktop hi16-app-kbibtex.png hi22-app-kbibtex.png hi32-app-kbibtex.png kbibtex.lsm Makefile.am kbibtex_part.desktop
+
+#>+ 3
+clean-closures:
+ -rm -f libkbibtexpart.la.closure
+
+#>+ 2
+docs-am:
+
+#>+ 22
+install-kde-icons:
+ $(mkinstalldirs) $(DESTDIR)$(kde_icondir)/hicolor/22x22/apps
+ $(INSTALL_DATA) $(srcdir)/hi22-app-kbibtex.png $(DESTDIR)$(kde_icondir)/hicolor/22x22/apps/kbibtex.png
+ $(mkinstalldirs) $(DESTDIR)$(kde_icondir)/hicolor/128x128/apps
+ $(INSTALL_DATA) $(srcdir)/hi128-app-kbibtex.png $(DESTDIR)$(kde_icondir)/hicolor/128x128/apps/kbibtex.png
+ $(mkinstalldirs) $(DESTDIR)$(kde_icondir)/hicolor/64x64/apps
+ $(INSTALL_DATA) $(srcdir)/hi64-app-kbibtex.png $(DESTDIR)$(kde_icondir)/hicolor/64x64/apps/kbibtex.png
+ $(mkinstalldirs) $(DESTDIR)$(kde_icondir)/hicolor/16x16/apps
+ $(INSTALL_DATA) $(srcdir)/hi16-app-kbibtex.png $(DESTDIR)$(kde_icondir)/hicolor/16x16/apps/kbibtex.png
+ $(mkinstalldirs) $(DESTDIR)$(kde_icondir)/hicolor/48x48/apps
+ $(INSTALL_DATA) $(srcdir)/hi48-app-kbibtex.png $(DESTDIR)$(kde_icondir)/hicolor/48x48/apps/kbibtex.png
+ $(mkinstalldirs) $(DESTDIR)$(kde_icondir)/hicolor/32x32/apps
+ $(INSTALL_DATA) $(srcdir)/hi32-app-kbibtex.png $(DESTDIR)$(kde_icondir)/hicolor/32x32/apps/kbibtex.png
+
+uninstall-kde-icons:
+ -rm -f $(DESTDIR)$(kde_icondir)/hicolor/22x22/apps/kbibtex.png
+ -rm -f $(DESTDIR)$(kde_icondir)/hicolor/128x128/apps/kbibtex.png
+ -rm -f $(DESTDIR)$(kde_icondir)/hicolor/64x64/apps/kbibtex.png
+ -rm -f $(DESTDIR)$(kde_icondir)/hicolor/16x16/apps/kbibtex.png
+ -rm -f $(DESTDIR)$(kde_icondir)/hicolor/48x48/apps/kbibtex.png
+ -rm -f $(DESTDIR)$(kde_icondir)/hicolor/32x32/apps/kbibtex.png
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/Makefile
+ cd $(top_srcdir) && perl admin/am_edit src/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 11
+libkbibtexpart_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/comment.cpp $(srcdir)/fileexporterdocbook5.cpp $(srcdir)/commentwidget.cpp $(srcdir)/documentlistview.cpp $(srcdir)/documentlistviewitem.cpp $(srcdir)/documentsourceview.cpp $(srcdir)/documentwidget.cpp $(srcdir)/element.cpp $(srcdir)/encoder.cpp $(srcdir)/encoderlatex.cpp $(srcdir)/encoderxml.cpp $(srcdir)/entry.cpp $(srcdir)/entryfield.cpp $(srcdir)/entrywidget.cpp $(srcdir)/entrywidgetauthor.cpp $(srcdir)/entrywidgetexternal.cpp $(srcdir)/entrywidgetkeyword.cpp $(srcdir)/entrywidgetmisc.cpp $(srcdir)/entrywidgetother.cpp $(srcdir)/entrywidgetpublication.cpp $(srcdir)/entrywidgetsource.cpp $(srcdir)/entrywidgettab.cpp $(srcdir)/entrywidgettitle.cpp $(srcdir)/entrywidgetuserdefined.cpp $(srcdir)/entrywidgetwarningsitem.cpp $(srcdir)/z3950connection.cpp $(srcdir)/fieldlineedit.cpp $(srcdir)/fieldlistview.cpp $(srcdir)/file.cpp $(srcdir)/fileexporter.cpp $(srcdir)/fileexporterbibtex.cpp $(srcdir)/fileexporterris.cpp $(srcdir)/fileexporterbibutils.cpp $(srcdir)/fileexporterexternal.cpp $(srcdir)/fileexporterpdf.cpp $(srcdir)/fileexporterps.cpp $(srcdir)/fileexporterrtf.cpp $(srcdir)/fileexportertoolchain.cpp $(srcdir)/fileexporterxml.cpp $(srcdir)/fileexporterxslt.cpp $(srcdir)/fileimporter.cpp $(srcdir)/fileimporterbibtex.cpp $(srcdir)/fileimporterbibutils.cpp $(srcdir)/fileimporterexternal.cpp $(srcdir)/fileimporterris.cpp $(srcdir)/idsuggestions.cpp $(srcdir)/idsuggestionswidget.cpp $(srcdir)/kbibtex_part.cpp $(srcdir)/macro.cpp $(srcdir)/macrowidget.cpp $(srcdir)/mergeelements.cpp $(srcdir)/preamble.cpp $(srcdir)/webqueryieeexplore.cpp $(srcdir)/preamblewidget.cpp $(srcdir)/searchbar.cpp $(srcdir)/settings.cpp $(srcdir)/settingsdlg.cpp $(srcdir)/settingsediting.cpp $(srcdir)/settingsfileio.cpp $(srcdir)/settingsidsuggestions.cpp $(srcdir)/settingskeyword.cpp $(srcdir)/settingssearchurl.cpp $(srcdir)/settingsuserdefinedinput.cpp $(srcdir)/sidebar.cpp $(srcdir)/value.cpp $(srcdir)/valuewidget.cpp $(srcdir)/webquery.cpp $(srcdir)/webqueryamatex.cpp $(srcdir)/webqueryarxiv.cpp $(srcdir)/webqueryciteseerx.cpp $(srcdir)/webquerybibsonomy.cpp $(srcdir)/webquerycsb.cpp $(srcdir)/webquerycitebase.cpp $(srcdir)/webquerydblp.cpp $(srcdir)/webqueryz3950.cpp $(srcdir)/webquerygooglescholar.cpp $(srcdir)/webquerypubmed.cpp $(srcdir)/webqueryspireshep.cpp $(srcdir)/webqueryzmath.cpp $(srcdir)/xsltransform.cpp $(srcdir)/webquerysciencedirect.cpp $(srcdir)/findduplicates.cpp $(srcdir)/settingsz3950.cpp $(srcdir)/messagehandler.cpp $(srcdir)/iso6937converter.cpp $(srcdir)/iso5426converter.cpp $(srcdir)/webquerymathscinet.cpp documentsourceview.moc file.moc documentlistview.moc entrywidgetuserdefined.moc webqueryamatex.moc fileimporterbibutils.moc webquerymathscinet.moc fieldlineedit.moc webqueryciteseerx.moc webquerygooglescholar.moc webquerypubmed.moc entrywidget.moc webqueryz3950.moc fileexporterbibutils.moc entrywidgetmisc.moc entrywidgetexternal.moc kbibtex_part.moc webqueryspireshep.moc webqueryzmath.moc settingsediting.moc entrywidgetother.moc settingssearchurl.moc webqueryieeexplore.moc webquerycitebase.moc webquerydblp.moc preamblewidget.moc commentwidget.moc mergeelements.moc fileimporterexternal.moc settingskeyword.moc webquerybibsonomy.moc findduplicates.moc entrywidgetkeyword.moc entrywidgettitle.moc fileexporter.moc entrywidgetsource.moc fileimporter.moc searchbar.moc idsuggestionswidget.moc settingsz3950.moc entrywidgettab.moc entrywidgetpublication.moc fileexportertoolchain.moc settingsidsuggestions.moc settingsuserdefinedinput.moc entrywidgetauthor.moc settingsfileio.moc webquerysciencedirect.moc settingsdlg.moc webqueryarxiv.moc sidebar.moc fileexporterexternal.moc webquery.moc valuewidget.moc fieldlistview.moc documentwidget.moc webquerycsb.moc macrowidget.moc
+ @echo 'creating libkbibtexpart_la.all_cpp.cpp ...'; \
+ rm -f libkbibtexpart_la.all_cpp.files libkbibtexpart_la.all_cpp.final; \
+ echo "#define KDE_USE_FINAL 1" >> libkbibtexpart_la.all_cpp.final; \
+ for file in comment.cpp fileexporterdocbook5.cpp commentwidget.cpp documentlistview.cpp documentlistviewitem.cpp documentsourceview.cpp documentwidget.cpp element.cpp encoder.cpp encoderlatex.cpp encoderxml.cpp entry.cpp entryfield.cpp entrywidget.cpp entrywidgetauthor.cpp entrywidgetexternal.cpp entrywidgetkeyword.cpp entrywidgetmisc.cpp entrywidgetother.cpp entrywidgetpublication.cpp entrywidgetsource.cpp entrywidgettab.cpp entrywidgettitle.cpp entrywidgetuserdefined.cpp entrywidgetwarningsitem.cpp z3950connection.cpp fieldlineedit.cpp fieldlistview.cpp file.cpp fileexporter.cpp fileexporterbibtex.cpp fileexporterris.cpp fileexporterbibutils.cpp fileexporterexternal.cpp fileexporterpdf.cpp fileexporterps.cpp fileexporterrtf.cpp fileexportertoolchain.cpp fileexporterxml.cpp fileexporterxslt.cpp fileimporter.cpp fileimporterbibtex.cpp fileimporterbibutils.cpp fileimporterexternal.cpp fileimporterris.cpp idsuggestions.cpp idsuggestionswidget.cpp kbibtex_part.cpp macro.cpp macrowidget.cpp mergeelements.cpp preamble.cpp webqueryieeexplore.cpp preamblewidget.cpp searchbar.cpp settings.cpp settingsdlg.cpp settingsediting.cpp settingsfileio.cpp settingsidsuggestions.cpp settingskeyword.cpp settingssearchurl.cpp settingsuserdefinedinput.cpp sidebar.cpp value.cpp valuewidget.cpp webquery.cpp webqueryamatex.cpp webqueryarxiv.cpp webqueryciteseerx.cpp webquerybibsonomy.cpp webquerycsb.cpp webquerycitebase.cpp webquerydblp.cpp webqueryz3950.cpp webquerygooglescholar.cpp webquerypubmed.cpp webqueryspireshep.cpp webqueryzmath.cpp xsltransform.cpp webquerysciencedirect.cpp findduplicates.cpp settingsz3950.cpp messagehandler.cpp iso6937converter.cpp iso5426converter.cpp webquerymathscinet.cpp ; do \
+ echo "#include \"$$file\"" >> libkbibtexpart_la.all_cpp.files; \
+ test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> libkbibtexpart_la.all_cpp.final; \
+ done; \
+ cat libkbibtexpart_la.all_cpp.final libkbibtexpart_la.all_cpp.files > libkbibtexpart_la.all_cpp.cpp; \
+ rm -f libkbibtexpart_la.all_cpp.final libkbibtexpart_la.all_cpp.files
+
+#>+ 11
+kbibtex.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/kbibtexshell.cpp $(srcdir)/main.cpp kbibtexshell.moc
+ @echo 'creating kbibtex.all_cpp.cpp ...'; \
+ rm -f kbibtex.all_cpp.files kbibtex.all_cpp.final; \
+ echo "#define KDE_USE_FINAL 1" >> kbibtex.all_cpp.final; \
+ for file in kbibtexshell.cpp main.cpp ; do \
+ echo "#include \"$$file\"" >> kbibtex.all_cpp.files; \
+ test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> kbibtex.all_cpp.final; \
+ done; \
+ cat kbibtex.all_cpp.final kbibtex.all_cpp.files > kbibtex.all_cpp.cpp; \
+ rm -f kbibtex.all_cpp.final kbibtex.all_cpp.files
+
+#>+ 3
+clean-final:
+ -rm -f libkbibtexpart_la.all_cpp.cpp kbibtex.all_cpp.cpp
+
+#>+ 3
+final:
+ $(MAKE) libkbibtexpart_la_OBJECTS="$(libkbibtexpart_la_final_OBJECTS)" kbibtex_OBJECTS="$(kbibtex_final_OBJECTS)" all-am
+
+#>+ 3
+final-install:
+ $(MAKE) libkbibtexpart_la_OBJECTS="$(libkbibtexpart_la_final_OBJECTS)" kbibtex_OBJECTS="$(kbibtex_final_OBJECTS)" install-am
+
+#>+ 3
+no-final:
+ $(MAKE) libkbibtexpart_la_OBJECTS="$(libkbibtexpart_la_nofinal_OBJECTS)" kbibtex_OBJECTS="$(kbibtex_nofinal_OBJECTS)" all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) libkbibtexpart_la_OBJECTS="$(libkbibtexpart_la_nofinal_OBJECTS)" kbibtex_OBJECTS="$(kbibtex_nofinal_OBJECTS)" install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 121
+idsuggestionswidget.lo: idsuggestionswidget.moc
+idsuggestionswidget.o: idsuggestionswidget.moc
+settingskeyword.lo: settingskeyword.moc
+sidebar.o: sidebar.moc
+kbibtex_part.lo: kbibtex_part.moc
+settingssearchurl.lo: settingssearchurl.moc
+sidebar.lo: sidebar.moc
+settingsidsuggestions.lo: settingsidsuggestions.moc
+fieldlistview.o: fieldlistview.moc
+webqueryz3950.o: webqueryz3950.moc
+webquerybibsonomy.lo: webquerybibsonomy.moc
+kbibtex_part.o: kbibtex_part.moc
+webquerydblp.lo: webquerydblp.moc
+entrywidgetpublication.lo: entrywidgetpublication.moc
+settingsuserdefinedinput.o: settingsuserdefinedinput.moc
+kbibtexshell.lo: kbibtexshell.moc
+documentwidget.o: documentwidget.moc
+findduplicates.o: findduplicates.moc
+nmcheck-am: nmcheck
+entrywidgetother.o: entrywidgetother.moc
+webquerypubmed.lo: webquerypubmed.moc
+fileexportertoolchain.lo: fileexportertoolchain.moc
+entrywidgetother.lo: entrywidgetother.moc
+fileexportertoolchain.o: fileexportertoolchain.moc
+settingsz3950.lo: settingsz3950.moc
+mergeelements.lo: mergeelements.moc
+webqueryzmath.lo: webqueryzmath.moc
+fieldlineedit.lo: fieldlineedit.moc
+file.o: file.moc
+entrywidgetexternal.o: entrywidgetexternal.moc
+valuewidget.lo: valuewidget.moc
+commentwidget.o: commentwidget.moc
+entrywidgetsource.lo: entrywidgetsource.moc
+entrywidgetpublication.o: entrywidgetpublication.moc
+entrywidgetmisc.o: entrywidgetmisc.moc
+settingsfileio.lo: settingsfileio.moc
+entrywidget.o: entrywidget.moc
+webqueryieeexplore.o: webqueryieeexplore.moc
+webqueryciteseerx.o: webqueryciteseerx.moc
+documentsourceview.lo: documentsourceview.moc
+settingssearchurl.o: settingssearchurl.moc
+fieldlistview.lo: fieldlistview.moc
+webqueryamatex.o: webqueryamatex.moc
+webqueryz3950.lo: webqueryz3950.moc
+fileexporter.lo: fileexporter.moc
+entrywidgetuserdefined.o: entrywidgetuserdefined.moc
+entrywidget.lo: entrywidget.moc
+webquerymathscinet.lo: webquerymathscinet.moc
+fileimporterbibutils.lo: fileimporterbibutils.moc
+searchbar.lo: searchbar.moc
+kbibtexshell.o: kbibtexshell.moc
+fileexporterbibutils.o: fileexporterbibutils.moc
+entrywidgetkeyword.lo: entrywidgetkeyword.moc
+fieldlineedit.o: fieldlineedit.moc
+mergeelements.o: mergeelements.moc
+webqueryieeexplore.lo: webqueryieeexplore.moc
+webquerycsb.lo: webquerycsb.moc
+webquerysciencedirect.o: webquerysciencedirect.moc
+macrowidget.o: macrowidget.moc
+webqueryspireshep.o: webqueryspireshep.moc
+webquerycitebase.o: webquerycitebase.moc
+webqueryspireshep.lo: webqueryspireshep.moc
+webquerydblp.o: webquerydblp.moc
+entrywidgettitle.o: entrywidgettitle.moc
+webqueryciteseerx.lo: webqueryciteseerx.moc
+webquerysciencedirect.lo: webquerysciencedirect.moc
+entrywidgetmisc.lo: entrywidgetmisc.moc
+webquerycsb.o: webquerycsb.moc
+webquerygooglescholar.o: webquerygooglescholar.moc
+fileexporter.o: fileexporter.moc
+preamblewidget.lo: preamblewidget.moc
+fileimporterexternal.o: fileimporterexternal.moc
+settingsdlg.o: settingsdlg.moc
+documentsourceview.o: documentsourceview.moc
+documentlistview.o: documentlistview.moc
+findduplicates.lo: findduplicates.moc
+fileimporter.lo: fileimporter.moc
+settingsediting.lo: settingsediting.moc
+settingsuserdefinedinput.lo: settingsuserdefinedinput.moc
+settingsidsuggestions.o: settingsidsuggestions.moc
+entrywidgetkeyword.o: entrywidgetkeyword.moc
+preamblewidget.o: preamblewidget.moc
+settingsediting.o: settingsediting.moc
+fileimporterexternal.lo: fileimporterexternal.moc
+entrywidgetauthor.lo: entrywidgetauthor.moc
+entrywidgetsource.o: entrywidgetsource.moc
+documentwidget.lo: documentwidget.moc
+macrowidget.lo: macrowidget.moc
+webquerypubmed.o: webquerypubmed.moc
+webqueryamatex.lo: webqueryamatex.moc
+entrywidgetuserdefined.lo: entrywidgetuserdefined.moc
+webquery.lo: webquery.moc
+fileimporter.o: fileimporter.moc
+webquery.o: webquery.moc
+settingsz3950.o: settingsz3950.moc
+webquerymathscinet.o: webquerymathscinet.moc
+documentlistview.lo: documentlistview.moc
+settingsfileio.o: settingsfileio.moc
+fileexporterexternal.lo: fileexporterexternal.moc
+entrywidgettitle.lo: entrywidgettitle.moc
+file.lo: file.moc
+webquerygooglescholar.lo: webquerygooglescholar.moc
+webquerybibsonomy.o: webquerybibsonomy.moc
+nmcheck:
+entrywidgetauthor.o: entrywidgetauthor.moc
+fileimporterbibutils.o: fileimporterbibutils.moc
+fileexporterexternal.o: fileexporterexternal.moc
+settingsdlg.lo: settingsdlg.moc
+entrywidgettab.o: entrywidgettab.moc
+entrywidgettab.lo: entrywidgettab.moc
+settingskeyword.o: settingskeyword.moc
+webqueryarxiv.lo: webqueryarxiv.moc
+fileexporterbibutils.lo: fileexporterbibutils.moc
+searchbar.o: searchbar.moc
+entrywidgetexternal.lo: entrywidgetexternal.moc
+valuewidget.o: valuewidget.moc
+webquerycitebase.lo: webquerycitebase.moc
+webqueryarxiv.o: webqueryarxiv.moc
+webqueryzmath.o: webqueryzmath.moc
+commentwidget.lo: commentwidget.moc
diff --git a/src/comment.cpp b/src/comment.cpp
new file mode 100644
index 0000000..dcf0a58
--- /dev/null
+++ b/src/comment.cpp
@@ -0,0 +1,93 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qregexp.h>
+#include <qstringlist.h>
+
+#include <comment.h>
+#include <xsltransform.h>
+
+namespace BibTeX
+{
+
+ Comment::Comment( const QString& text, bool useCommand ) : Element(), m_text( text ), m_useCommand( useCommand )
+ {
+ // nothing
+ }
+
+ Comment::Comment( Comment *other )
+ {
+ m_text = other->m_text;
+ m_useCommand = other->m_useCommand;
+ }
+
+ Comment::~Comment()
+ {
+ // nothing
+ }
+
+ QString Comment::text() const
+ {
+ return m_text;
+ }
+
+ void Comment::setText( const QString &text )
+ {
+ m_text = text;
+ }
+
+ bool Comment::useCommand() const
+ {
+ return m_useCommand;
+ }
+
+ void Comment::setUseCommand( bool useCommand )
+ {
+ m_useCommand = useCommand;
+ }
+
+ bool Comment::containsPattern( const QString& pattern, EntryField::FieldType fieldType, FilterType filterType, bool caseSensitive ) const
+ {
+ if ( filterType == ftExact )
+ {
+ /** check for exact match */
+ return fieldType == EntryField::ftUnknown && m_text.contains( pattern, caseSensitive );
+ }
+ else
+ {
+ /** for each word in the search pattern ... */
+ QStringList words = QStringList::split( QRegExp( "\\s+" ), pattern );
+ unsigned int hits = 0;
+ for ( QStringList::Iterator it = words.begin(); it != words.end(); ++it )
+ {
+ /** check if word is contained in text */
+ if ( fieldType == EntryField::ftUnknown && m_text.contains( *it, caseSensitive ) )
+ ++hits;
+ }
+
+ /** return success depending on filter type and number of hits */
+ return ( ( filterType == ftAnyWord && hits > 0 ) || ( filterType == ftEveryWord && hits == words.count() ) );
+ }
+ }
+
+ Element* Comment::clone()
+ {
+ return new Comment( this );
+ }
+}
diff --git a/src/comment.h b/src/comment.h
new file mode 100644
index 0000000..f259daf
--- /dev/null
+++ b/src/comment.h
@@ -0,0 +1,49 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXCOMMENT_H
+#define BIBTEXCOMMENT_H
+
+#include <element.h>
+
+namespace BibTeX
+{
+
+ class Comment : public Element
+ {
+ public:
+ Comment( const QString &text, bool useCommand = false );
+ Comment( Comment *other );
+ virtual ~Comment();
+
+ QString text() const;
+ void setText( const QString &text );
+ bool useCommand() const;
+ void setUseCommand( bool useCommand );
+
+ bool containsPattern( const QString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const;
+ Element* clone();
+
+ private:
+ QString m_text;
+ bool m_useCommand;
+ };
+
+}
+#endif
diff --git a/src/commentwidget.cpp b/src/commentwidget.cpp
new file mode 100644
index 0000000..09d371f
--- /dev/null
+++ b/src/commentwidget.cpp
@@ -0,0 +1,98 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlabel.h>
+#include <qmultilineedit.h>
+#include <qlayout.h>
+#include <qcheckbox.h>
+#include <kdialogbase.h>
+#include <kglobalsettings.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+
+#include <comment.h>
+#include <element.h>
+
+#include "commentwidget.h"
+
+namespace KBibTeX
+{
+ CommentWidget::CommentWidget( BibTeX::Comment *comment, bool isReadOnly, QWidget *parent, const char *name )
+ : QWidget( parent, name ), m_comment( comment ), m_isReadOnly( isReadOnly )
+ {
+ setupGUI();
+ getCommentData();
+ m_multiLineEdit->setReadOnly( isReadOnly );
+ }
+
+
+ CommentWidget::~CommentWidget()
+ {
+ // nothing
+ }
+
+ void CommentWidget::setupGUI()
+ {
+ setMinimumWidth( 384 );
+ QVBoxLayout * layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+
+ QLabel *label = new QLabel( i18n( "Co&mment:" ), this );
+ layout->addWidget( label );
+
+ m_multiLineEdit = new QMultiLineEdit( this );
+ m_multiLineEdit->setFont( KGlobalSettings::fixedFont() );
+ layout->addWidget( m_multiLineEdit );
+ label->setBuddy( m_multiLineEdit );
+ m_multiLineEdit->setReadOnly( m_isReadOnly );
+
+ m_checkboxUseCommand = new QCheckBox( i18n( "&Use @Comment for comment instead of plain text" ), this );
+ layout->addWidget( m_checkboxUseCommand );
+ }
+
+ void CommentWidget::getCommentData()
+ {
+ m_multiLineEdit->setText( m_comment->text() );
+ m_checkboxUseCommand->setChecked( m_comment->useCommand() );
+ }
+
+ void CommentWidget::setCommentData()
+ {
+ m_comment->setText( m_multiLineEdit->text() );
+ m_comment->setUseCommand( m_checkboxUseCommand->isChecked() );
+ }
+
+ QDialog::DialogCode CommentWidget::execute( BibTeX::Comment *comment, bool isReadOnly, QWidget *parent, const char *name )
+ {
+ KDialogBase * dlg = new KDialogBase( parent, name, true, i18n( "Edit BibTeX Comment" ), KDialogBase::Ok | KDialogBase::Cancel );
+ CommentWidget* ui = new CommentWidget( comment, isReadOnly, dlg, "kbibtex::commentwidget" );
+ dlg->setMainWidget( ui );
+
+ QDialog::DialogCode result = ( QDialog::DialogCode ) dlg->exec();
+ if ( !isReadOnly && result == QDialog::Accepted )
+ ui->setCommentData();
+
+ delete( ui );
+ delete( dlg );
+
+ return result;
+ }
+}
+
+#include "commentwidget.moc"
+
diff --git a/src/commentwidget.h b/src/commentwidget.h
new file mode 100644
index 0000000..16ac051
--- /dev/null
+++ b/src/commentwidget.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef COMMENTWIDGET_H
+#define COMMENTWIDGET_H
+
+#include <qwidget.h>
+#include <qdialog.h>
+
+#include <comment.h>
+
+class QMultiLineEdit;
+class QCheckBox;
+
+namespace KBibTeX
+{
+ class CommentWidget : public QWidget
+ {
+ Q_OBJECT
+ public:
+ CommentWidget( BibTeX::Comment *comment, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~CommentWidget();
+
+ static QDialog::DialogCode execute( BibTeX::Comment *comment, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+
+ private:
+ BibTeX::Comment* m_comment;
+ QCheckBox *m_checkboxUseCommand;
+ QMultiLineEdit *m_multiLineEdit;
+ bool m_isReadOnly;
+
+ void setupGUI();
+ void setCommentData();
+ void getCommentData();
+ };
+
+}
+
+#endif
diff --git a/src/documentlistview.cpp b/src/documentlistview.cpp
new file mode 100644
index 0000000..61ff980
--- /dev/null
+++ b/src/documentlistview.cpp
@@ -0,0 +1,768 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <qevent.h>
+#include <qdragobject.h>
+#include <qfile.h>
+#include <qvaluelist.h>
+#include <qcursor.h>
+#include <qbuffer.h>
+#include <qlistview.h>
+#include <qclipboard.h>
+#include <qheader.h>
+#include <qtextstream.h>
+#include <qtimer.h>
+
+#include <kapplication.h>
+#include <kio/netaccess.h>
+#include <ktempfile.h>
+#include <klocale.h>
+#include <kurl.h>
+#include <kurldrag.h>
+#include <kactionclasses.h>
+#include <kaction.h>
+#include <kpopupmenu.h>
+#include <kmessagebox.h>
+#include <kprogress.h>
+#include <kiconloader.h>
+
+#include <kbibtex_part.h>
+#include <documentlistviewitem.h>
+#include <file.h>
+#include <fileimporterbibutils.h>
+#include <fileimporterris.h>
+#include <fileimporterbibtex.h>
+#include <fileexporterbibtex.h>
+#include <element.h>
+#include <entry.h>
+#include <macro.h>
+#include <comment.h>
+#include <preamblewidget.h>
+#include <preamble.h>
+#include <entrywidget.h>
+#include <commentwidget.h>
+#include <macrowidget.h>
+#include <settings.h>
+#include <encoderlatex.h>
+
+#include "documentlistview.h"
+
+namespace KBibTeX
+{
+ DocumentListView::DocumentListView( KBibTeX::DocumentWidget *docWidget, bool isReadOnly, QWidget *parent, const char *name )
+ : KListView( parent, name ), m_docWidget( docWidget ), m_bibtexFile( NULL ), m_contextMenu( NULL ), m_headerMenu( NULL ), m_isReadOnly( isReadOnly ), m_newElementCounter( 1 )
+ {
+ setAllColumnsShowFocus( true );
+ setShowSortIndicator( true );
+ setSelectionMode( QListView::Extended );
+ header() ->setClickEnabled( TRUE );
+ header() ->setMovingEnabled( TRUE );
+ buildColumns();
+
+ setDragEnabled( true );
+ // setDragAutoScroll( true );
+ setAcceptDrops( TRUE );
+ setDropVisualizer( TRUE );
+
+ connect( header(), SIGNAL( clicked( int ) ), this, SLOT( setSortingColumn( int ) ) );
+ connect( this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), this, SLOT( showBibtexListContextMenu( KListView *, QListViewItem *, const QPoint & ) ) );
+ connect( this, SIGNAL( doubleClicked( QListViewItem*, const QPoint&, int ) ), this, SLOT( slotDoubleClick( QListViewItem* ) ) );
+ connect( this, SIGNAL( dropped( QDropEvent*, QListViewItem* ) ), this, SLOT( slotDropped( QDropEvent*, QListViewItem* ) ) );
+ }
+
+ DocumentListView::~DocumentListView()
+ {
+ // nothing
+ }
+
+ void DocumentListView::setFactory( KXMLGUIFactory *factory, KXMLGUIClient *client )
+ {
+ m_contextMenu = static_cast<KPopupMenu*>( factory -> container( "popup_bibtexlist", client ) );
+ }
+
+ bool DocumentListView::setBibTeXFile( BibTeX::File *bibtexFile )
+ {
+ m_bibtexFile = bibtexFile;
+ setItems();
+
+ return TRUE;
+ }
+
+ BibTeX::File* DocumentListView::getBibTeXFile( )
+ {
+ return m_bibtexFile;
+ }
+
+ void DocumentListView::setItems()
+ {
+ QApplication::setOverrideCursor( Qt::waitCursor );
+
+ KProgressDialog *prgDlg = new KProgressDialog( this, "prgDlg", i18n( "List View" ), i18n( "Updating main view ..." ), TRUE );
+ prgDlg->show();
+ KProgress *progress = prgDlg->progressBar();
+ progress->setTotalSteps( m_bibtexFile->count() );
+
+ bool update = viewport()->isUpdatesEnabled();
+ viewport()->setUpdatesEnabled( FALSE );
+ int sortCol = sortColumn();
+ setSortColumn( -1 );
+
+ clear();
+ for ( unsigned int i = 0; i < m_bibtexFile->count(); i++ )
+ {
+ BibTeX::Element *element = m_bibtexFile->at( i );
+ new DocumentListViewItem( m_bibtexFile, element, this );
+ progress->setProgress( i );
+
+ if ( i % 43 == 23 )
+ kapp->processEvents();
+ }
+
+ viewport()->setUpdatesEnabled( update );
+ setSortColumn( sortCol );
+ triggerUpdate();
+ delete prgDlg;
+
+ updateVisiblity();
+
+ QApplication::restoreOverrideCursor();
+ }
+
+ void DocumentListView::insertItems( BibTeX::File *items, KBibTeX::DocumentListViewItem *after )
+ {
+ for ( BibTeX::File::ElementList::iterator it = items->begin(); it != items->end(); it++ )
+ after = insertItem( *it, after );
+ }
+
+ KBibTeX::DocumentListViewItem * DocumentListView::insertItem( BibTeX::Element *item, KBibTeX::DocumentListViewItem *after )
+ {
+ if ( m_bibtexFile == NULL )
+ m_bibtexFile = new BibTeX::File();
+
+ BibTeX::Element *element = NULL;
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry *>( item );
+ if ( entry != NULL )
+ {
+ BibTeX::Entry *newEntry = new BibTeX::Entry( entry );
+ if ( m_bibtexFile->containsKey( newEntry->id() ) )
+ {
+ int counter = 0;
+ QString newId = QString( newEntry->id() ).append( '_' ).append( QString::number( ++counter ) );
+ while ( m_bibtexFile->containsKey( newId ) )
+ newId = QString( newEntry->id() ).append( '_' ).append( QString::number( ++counter ) );
+ newEntry->setId( newId );
+ }
+ element = newEntry;
+ }
+ else
+ element = item->clone();
+
+
+ m_bibtexFile->appendElement( element, after == NULL ? NULL : after->element() );
+ after = new DocumentListViewItem( m_bibtexFile, element, this, after );
+ after->setUnreadStatus( TRUE );
+ updateVisiblity( after );
+ m_unreadItems.append( after );
+
+ emit modified();
+ QTimer::singleShot( 3500, this, SLOT( makeNewItemsUnread() ) );
+
+ return after;
+ }
+
+ void DocumentListView::insertItem( BibTeX::Element *item )
+ {
+ insertItem( item, NULL );
+ }
+
+ void DocumentListView::updateVisiblity()
+ {
+ QListViewItemIterator it( this );
+ while ( it.current() )
+ {
+ DocumentListViewItem * kblvi = dynamic_cast<DocumentListViewItem*>( it.current() );
+ updateVisiblity( kblvi );
+ it++;
+ }
+ }
+
+ void DocumentListView::updateVisiblity( KBibTeX::DocumentListViewItem *item )
+ {
+ Settings * settings = Settings::self( m_bibtexFile );
+ BibTeX::Element *element = item->element();
+ bool notFiltered = m_filter.isEmpty() || element ->containsPattern( m_filter, m_filterFieldType, m_filterType );
+
+ BibTeX::Macro *macro = dynamic_cast<BibTeX::Macro*>( element );
+ if ( macro != NULL )
+ item->setVisible( notFiltered && settings->editing_ShowMacros );
+ else
+ {
+ BibTeX::Comment *comment = dynamic_cast<BibTeX::Comment*>( element );
+ if ( comment != NULL )
+ item->setVisible( notFiltered && settings->editing_ShowComments );
+ else
+ item->setVisible( notFiltered );
+ }
+ }
+
+ void DocumentListView::deferredInitialization()
+ {
+ connect( header(), SIGNAL( sizeChange( int, int, int ) ), this, SLOT( saveColumnWidths() ) );
+ connect( header(), SIGNAL( indexChange( int, int, int ) ), this, SLOT( saveColumnIndex() ) );
+ }
+
+ void DocumentListView::restoreState()
+ {
+ Settings * settings = Settings::self( m_bibtexFile );
+ if ( settings->editing_UseSpecialFont )
+ setFont( settings->editing_SpecialFont );
+ else
+ setFont( KGlobalSettings::generalFont() );
+ header() ->setFont( KGlobalSettings::generalFont() );
+
+ restoreColumnIndex();
+ restoreColumnWidths();
+ restoreSortingColumn();
+ }
+
+ void DocumentListView::setViewShowColumnsMenu( KActionMenu *actionMenu )
+ {
+ if ( m_headerMenu == NULL )
+ {
+ m_headerMenu = actionMenu->popupMenu();
+ m_headerMenu->insertTitle( i18n( "Show Columns" ) );
+ m_headerMenu->setCheckable( TRUE );
+ connect( m_headerMenu, SIGNAL( activated( int ) ), this, SLOT( activateShowColumnMenu( int ) ) );
+
+ Settings * settings = Settings::self( m_bibtexFile );
+
+ int item = m_headerMenu->insertItem( i18n( "Element Type" ), 0 );
+ m_headerMenu->setItemChecked( item, settings->editing_MainListColumnsWidth[ 0 ] > 0 );
+ m_headerMenu->insertSeparator();
+
+ for ( int i = 0; i <= ( int ) BibTeX::EntryField::ftYear - ( int ) BibTeX::EntryField::ftAbstract; i++ )
+ {
+ BibTeX::EntryField::FieldType fieldType = ( BibTeX::EntryField::FieldType )( i + ( int ) BibTeX::EntryField::ftAbstract );
+ QString label = Settings::fieldTypeToI18NString( fieldType );
+ item = m_headerMenu->insertItem( label, ( int ) fieldType + 2 );
+ m_headerMenu->setItemChecked( item, settings->editing_MainListColumnsWidth[ i + 2 ] > 0 );
+ }
+ }
+ }
+
+ void DocumentListView::deleteSelected()
+ {
+ QListViewItemIterator it( this, QListViewItemIterator::Selected | QListViewItemIterator::Visible );
+ if ( it.current() == NULL ) return;
+
+ QListViewItem *above = it.current() ->itemAbove();
+ QValueList<DocumentListViewItem*> toBeDeleted;
+ while ( it.current() )
+ {
+ DocumentListViewItem * kblvi = dynamic_cast<DocumentListViewItem*>( it.current() );
+ toBeDeleted.append( kblvi );
+ it++;
+ }
+
+ for ( QValueList<DocumentListViewItem*>::Iterator it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it )
+ {
+ m_bibtexFile->deleteElement(( *it )->element() );
+ takeItem( *it );
+ delete( *it );
+ }
+
+ if ( above )
+ ensureItemVisible( above );
+
+ emit modified();
+ }
+
+ const QValueList<BibTeX::Element*> DocumentListView::selectedItems()
+ {
+ QValueList<BibTeX::Element*> result;
+
+ QListViewItemIterator it( this, QListViewItemIterator::Selected );
+ while ( it.current() )
+ {
+ DocumentListViewItem * kblvi = dynamic_cast<DocumentListViewItem*>( it.current() );
+ if ( kblvi->isVisible() )
+ result.append( kblvi->element() );
+ it++;
+ }
+
+ return result;
+ }
+
+ QString DocumentListView::selectedToBibTeXText()
+ {
+ BibTeX::FileExporterBibTeX *exporter = new BibTeX::FileExporterBibTeX();
+ exporter->setEncoding( "latex" );
+
+ QBuffer buffer;
+ buffer.open( IO_WriteOnly );
+ QValueList<BibTeX::Element*> selectedElements = selectedItems();
+ for ( QValueList<BibTeX::Element*>::iterator it = selectedElements.begin(); it != selectedElements.end(); ++it )
+ exporter->save( &buffer, *it );
+ buffer.close();
+ delete exporter;
+
+ buffer.open( IO_ReadOnly );
+ QTextStream in( &buffer );
+ in.setEncoding( QTextStream::UnicodeUTF8 );
+ QString result = in.read();
+ buffer.close();
+
+ return result;
+ }
+
+ QString DocumentListView::selectedToBibTeXRefs()
+ {
+ QString refs;
+ QValueList<BibTeX::Element*> selectedElements = selectedItems();
+ for ( QValueList<BibTeX::Element*>::iterator it = selectedElements.begin(); it != selectedElements.end(); ++it )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( entry == NULL ) continue;
+
+ if ( !refs.isEmpty() )
+ refs.append( "," );
+ refs.append( entry->id() );
+ }
+ return QString( "\\cite{%1}" ).arg( refs );
+ }
+
+ void DocumentListView::copy()
+ {
+ kapp->clipboard() ->setText( selectedToBibTeXText() );
+ }
+
+ void DocumentListView::copyReferences()
+ {
+ kapp->clipboard() ->setText( selectedToBibTeXRefs() );
+ }
+
+ void DocumentListView::cut()
+ {
+ copy();
+ deleteSelected();
+ }
+
+ bool DocumentListView::paste()
+ {
+ DocumentListViewItem * dlvi = dynamic_cast<KBibTeX::DocumentListViewItem *>( selectedItem() );
+ if ( dlvi == NULL )
+ dlvi = dynamic_cast<KBibTeX::DocumentListViewItem *>( currentItem() );
+
+ QString clipboardText = kapp->clipboard() ->text();
+ return paste( clipboardText, dlvi );
+ }
+
+ bool DocumentListView::paste( const QString& text, DocumentListViewItem *at )
+ {
+ Settings * settings = Settings::self( m_bibtexFile );
+
+ /** check if clipboard contains BibTeX content */
+ if ( BibTeX::FileImporterBibTeX::guessCanDecode( text ) )
+ {
+ BibTeX::FileImporter *importer = new BibTeX::FileImporterBibTeX( settings->editing_FirstNameFirst );
+ BibTeX::File *clipboardData = importer->load( text );
+ delete importer;
+
+ if ( clipboardData != NULL )
+ {
+ insertItems( clipboardData, at );
+ delete clipboardData;
+ return TRUE;
+ }
+ else
+ return FALSE;
+ }
+ else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && BibTeX::FileImporterBibUtils::guessCanDecode( text ) )
+ {
+ Settings * settings = Settings::self( m_bibtexFile );
+ BibTeX::File::FileFormat inputFormat = BibTeX::FileImporterBibUtils::guessInputFormat( text );
+ BibTeX::FileImporter *importer = NULL;
+ if ( inputFormat == BibTeX::File::formatRIS && !settings->fileIO_useBibUtils )
+ importer = new BibTeX::FileImporterRIS();
+ else
+ importer = new BibTeX::FileImporterBibUtils( inputFormat );
+ BibTeX::File *clipboardData = importer->load( text );
+ delete importer;
+
+ if ( clipboardData != NULL )
+ {
+ insertItems( clipboardData, at );
+ delete clipboardData;
+ return TRUE;
+ }
+ else
+ return FALSE;
+ }
+ else if ( BibTeX::FileImporterRIS::guessCanDecode( text ) )
+ {
+ BibTeX::FileImporter *importer = new BibTeX::FileImporterRIS( );
+ BibTeX::File *clipboardData = importer->load( text );
+ delete importer;
+
+ if ( clipboardData != NULL )
+ {
+ insertItems( clipboardData, at );
+ delete clipboardData;
+ return TRUE;
+ }
+ else
+ return FALSE;
+ }
+ else
+ {
+ /** Decoding the paste text as bibtex failed. Maybe the user wants
+ to paste the text as link address, abstract, etc... */
+ if ( !at ) // no list view item selected to add data to
+ return FALSE;
+
+ // fetch BibTeX element from current list view item
+ BibTeX::Entry * element = dynamic_cast<BibTeX::Entry*>( at->element() );
+ if ( ! element )
+ return FALSE;
+
+ // build popup menu
+ KPopupMenu * popup = new KPopupMenu( this, "pastePopup" );
+ popup->insertTitle( i18n( "Paste text as..." ) );
+ for ( int i = ( int ) BibTeX::EntryField::ftAuthor; i <= ( int ) BibTeX::EntryField::ftYear; i++ )
+ {
+ BibTeX::EntryField::FieldType ft = ( BibTeX::EntryField::FieldType ) i;
+ popup->insertItem( Settings::fieldTypeToI18NString( ft ), i );
+ }
+ popup->insertSeparator();
+ QIconSet cancelPixmap = KGlobal::iconLoader() ->loadIconSet( "cancel", KIcon::Small );
+ int cancelId = popup->insertItem( cancelPixmap, i18n( "Cancel" ) );
+
+ // show popup menu
+ int selectedId = popup->exec( QCursor::pos() );
+ if ( selectedId == cancelId || selectedId == -1 )
+ return FALSE; // cancel menu
+
+ // determine field to add clipboard value to
+ BibTeX::EntryField::FieldType fieldType = ( BibTeX::EntryField::FieldType ) selectedId;
+ BibTeX::EntryField * field = element->getField( fieldType );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( fieldType );
+ element->addField( field );
+ }
+ else if ( field->value() != NULL )
+ delete field->value();
+
+ QString encodedText = BibTeX::EncoderLaTeX::currentEncoderLaTeX() ->encode( text );
+
+ // create new value from clipboard's content
+ BibTeX::Value * value = new BibTeX::Value();
+ if ( fieldType == BibTeX::EntryField::ftAuthor || fieldType == BibTeX::EntryField::ftEditor )
+ {
+ Settings * settings = Settings::self( m_bibtexFile );
+ value->items.append( new BibTeX::PersonContainer( encodedText, settings->editing_FirstNameFirst ) );
+ }
+ else if ( fieldType == BibTeX::EntryField::ftKeywords )
+ value->items.append( new BibTeX::KeywordContainer( encodedText ) );
+ else
+ value->items.append( new BibTeX::PlainText( encodedText ) );
+
+ field->setValue( value );
+
+ return TRUE;
+ }
+ }
+
+ void DocumentListView::selectAll()
+ {
+ QListView::selectAll( true );
+ }
+
+ /* void DocumentListView::sendSelectedToLyx()
+ {
+ QStringList refsToSend;
+ QListViewItemIterator it( this, QListViewItemIterator::Selected );
+ while ( it.current() )
+ {
+ DocumentListViewItem * kblvi = dynamic_cast<DocumentListViewItem*>( it.current() );
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( kblvi->element() );
+ if ( entry != NULL && kblvi->isVisible() )
+ refsToSend.append( entry->id() );
+ it++;
+ }
+
+ Settings * settings = Settings::self( m_bibtexFile );
+ QString lyxPipeFilename = settings->detectLyXInPipe();
+ kdDebug() << "sendSelectedToLyx: lyxPipeFilename= " << lyxPipeFilename << endl;
+ QFile pipe( lyxPipeFilename );
+ if ( pipe.exists() && pipe.open( IO_WriteOnly ) )
+ {
+ QTextStream * writer = new QTextStream( &pipe );
+ QString msg = "LYXCMD:kbibtex:citation-insert:" + refsToSend.join( "," );
+ *writer << msg << endl;
+ delete writer;
+ pipe.close();
+ }
+ else
+ KMessageBox::error( this, ( lyxPipeFilename.isEmpty() ? i18n( "Cannot establish a link to LyX" ) : QString( i18n( "Cannot establish a link to LyX using the pipe \"%1\"" ) ).arg( lyxPipeFilename ) ) + i18n( "\nMaybe LyX is not running?" ), i18n( "Error communicating with LyX" ) );
+ }*/
+
+ void DocumentListView::slotDoubleClick( QListViewItem *item )
+ {
+ DocumentListViewItem *dlvi = dynamic_cast<DocumentListViewItem*>( item );
+ if ( dlvi != NULL ) emit executed( dlvi );
+ }
+
+ void DocumentListView::filter( const QString & text, BibTeX::Element::FilterType filterType, BibTeX::EntryField::FieldType fieldType )
+ {
+ m_filter = text;
+ m_filterType = filterType;
+ m_filterFieldType = fieldType;
+ updateVisiblity();
+ }
+
+ void DocumentListView::setReadOnly( bool isReadOnly )
+ {
+ m_isReadOnly = isReadOnly;
+ }
+
+ void DocumentListView::activateShowColumnMenu( int id )
+ {
+ if ( id >= 0 )
+ {
+ if ( columnWidth( id ) > 0 )
+ {
+ hideColumn( id );
+ m_headerMenu->setItemChecked( id, FALSE );
+ }
+ else
+ {
+ showColumn( id );
+ m_headerMenu->setItemChecked( id, TRUE );
+ }
+ }
+ }
+
+ void DocumentListView::showBibtexListContextMenu( KListView *, QListViewItem *, const QPoint & p )
+ {
+ if ( m_contextMenu != NULL )
+ {
+ emit selectionChanged();
+ m_contextMenu->popup( p );
+ }
+ }
+
+ void DocumentListView::setSortingColumn( int column )
+ {
+ Settings * settings = Settings::self( m_bibtexFile );
+ settings->editing_MainListSortingColumn = column;
+ settings->editing_MainListSortingOrder = ( sortOrder() == Qt::Ascending ) ? 1 : -1;
+ }
+
+ bool DocumentListView::acceptDrag( QDropEvent * event ) const
+ {
+ if ( event->source() == this ) return false;
+ return QTextDrag::canDecode( event ) || QUriDrag::canDecode( event );
+ }
+
+ void DocumentListView::startDrag()
+ {
+ Settings * settings = Settings::self( m_bibtexFile );
+ QDragObject *d = new QTextDrag( settings->editing_DragAction == Settings::COPYREFERENCE ? selectedToBibTeXRefs() : selectedToBibTeXText(), this );
+ d->dragCopy();
+ }
+ void DocumentListView::saveColumnIndex()
+ {
+ Settings * settings = Settings::self( m_bibtexFile );
+ QHeader *hdr = header();
+
+ for ( int i = 0; i < columns(); i++ )
+ settings->editing_MainListColumnsIndex[ i ] = hdr->mapToIndex( i );
+ }
+
+ void DocumentListView::restoreColumnIndex()
+ {
+ Settings * settings = Settings::self( m_bibtexFile );
+ QHeader *hdr = header();
+
+ for ( int i = 0; i < columns(); i++ )
+ hdr->moveSection( i, settings->editing_MainListColumnsIndex[ i ] );
+ }
+
+ void DocumentListView::saveColumnWidths( int col )
+ {
+ Settings * settings = Settings::self( m_bibtexFile );
+
+ int from = col == -1 ? 0 : col, to = col == -1 ? columns() : ( col + 1 );
+
+ for ( int i = from; i < to; i++ )
+ {
+ if ( columnWidthMode( i ) == QListView::Manual )
+ settings->editing_MainListColumnsWidth[ i ] = columnWidth( i );
+ else
+ settings->editing_MainListColumnsWidth[ i ] = 0xffff;
+ }
+ }
+
+ void DocumentListView::restoreColumnWidths()
+ {
+ Settings * settings = Settings::self( m_bibtexFile );
+
+ for ( int col = 0; col < columns(); col++ )
+ {
+ int colWidth = settings->editing_MainListColumnsWidth[ col ];
+ showColumn( col, colWidth );
+ }
+ }
+
+ void DocumentListView::restoreSortingColumn()
+ {
+ Settings * settings = Settings::self( m_bibtexFile );
+ setSortColumn( settings->editing_MainListSortingColumn );
+ setSortOrder( settings->editing_MainListSortingOrder > 0 ? Qt::Ascending : Qt::Descending );
+ }
+
+ void DocumentListView::makeNewItemsUnread()
+ {
+ for ( QValueList<DocumentListViewItem*>::ConstIterator it = m_unreadItems.begin() ; it != m_unreadItems.end(); ++it )
+ {
+ ( *it ) ->setUnreadStatus( FALSE );
+ ( *it ) ->repaint();
+ }
+
+ m_unreadItems.clear();
+ }
+
+ void DocumentListView::slotDropped( QDropEvent * event, QListViewItem * item )
+ {
+ QString text;
+ QStrList urlList;
+
+ if ( QTextDrag::decode( event, text ) && KURL( text ).isValid() )
+ urlList.append( text );
+
+ if ( !urlList.isEmpty() || QUriDrag::decode( event, urlList ) )
+ {
+ QString url = urlList.at( 0 );
+ QString tmpFile;
+ if ( ! KIO::NetAccess::download( url, tmpFile, 0 ) )
+ {
+ KMessageBox::error( this, KIO::NetAccess::lastErrorString() );
+ return ;
+ }
+ QFile f( tmpFile );
+ if ( ! f.open( IO_ReadOnly ) )
+ {
+ KMessageBox::error( this, f.errorString() );
+ KIO::NetAccess::removeTempFile( tmpFile );
+ return ;
+ }
+ QByteArray ba = f.readAll();
+ text = QString( ba );
+ f.close();
+ KIO::NetAccess::removeTempFile( tmpFile );
+ }
+ else if ( !QTextDrag::decode( event, text ) )
+ return;
+
+ event->accept( TRUE );
+ DocumentListViewItem * dlvi = dynamic_cast<KBibTeX::DocumentListViewItem *>( item );
+
+ paste( text, dlvi );
+ }
+
+ bool DocumentListView::eventFilter( QObject * watched, QEvent * e )
+ {
+ if ( watched == header() )
+ {
+ switch ( e->type() )
+ {
+ case QEvent::MouseButtonPress:
+ {
+ if ( static_cast<QMouseEvent *>( e ) ->button() == RightButton && m_headerMenu != NULL )
+ m_headerMenu->popup( QCursor::pos() );
+
+ break;
+ }
+
+ default:
+ break;
+ }
+ }
+
+ return KListView::eventFilter( watched, e );
+ }
+
+ void DocumentListView::keyPressEvent( QKeyEvent *e )
+ {
+ if ( e->key() == QKeyEvent::Key_Enter || e->key() == QKeyEvent::Key_Return )
+ {
+ DocumentListViewItem *item = dynamic_cast<DocumentListViewItem*>( selectedItem() );
+ if ( item == NULL )
+ item = dynamic_cast<DocumentListViewItem*>( currentItem() );
+ if ( item != NULL )
+ emit executed( item );
+ }
+ else
+ KListView::keyPressEvent( e );
+ }
+
+ void DocumentListView::showColumn( int col, int colWidth )
+ {
+ if ( colWidth == 0xffff )
+ {
+ adjustColumn( col );
+ if ( columnWidth( col ) > width() / 3 )
+ colWidth = width() / 4;
+ if ( columnWidth( col ) < width() / 12 )
+ colWidth = width() / 8;
+ }
+
+ if ( colWidth < 0xffff )
+ setColumnWidth( col, colWidth );
+
+ header() ->setResizeEnabled( colWidth > 0, col );
+ setColumnWidthMode( col, colWidth < 0xffff ? QListView::Manual : QListView::Maximum );
+ saveColumnWidths( col );
+ }
+
+ void DocumentListView::hideColumn( int col )
+ {
+ showColumn( col, 0 );
+ }
+
+ void DocumentListView::buildColumns()
+ {
+ addColumn( i18n( "Element Type" ) );
+ addColumn( i18n( "Entry Id" ) );
+
+ for ( int i = 0; i <= ( int ) BibTeX::EntryField::ftYear - ( int ) BibTeX::EntryField::ftAbstract; i++ )
+ {
+ BibTeX::EntryField::FieldType fieldType = ( BibTeX::EntryField::FieldType )( i + ( int ) BibTeX::EntryField::ftAbstract );
+ QString label = Settings::fieldTypeToI18NString( fieldType );
+ addColumn( label );
+ }
+ }
+}
+
+#include "documentlistview.moc"
diff --git a/src/documentlistview.h b/src/documentlistview.h
new file mode 100644
index 0000000..da2c6c5
--- /dev/null
+++ b/src/documentlistview.h
@@ -0,0 +1,127 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXDOCUMENTLISTVIEW_H
+#define KBIBTEXDOCUMENTLISTVIEW_H
+
+#include <klistview.h>
+#include <kxmlguifactory.h>
+
+#include <fileimporter.h>
+#include <settings.h>
+#include <file.h>
+
+class QString;
+class KURL;
+class KActionMenu;
+class KPopupMenu;
+
+namespace KBibTeX
+{
+ class DocumentWidget;
+ class DocumentListViewItem;
+
+ class DocumentListView : public KListView
+ {
+ Q_OBJECT
+ public:
+ DocumentListView( KBibTeX::DocumentWidget *docWidget, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~DocumentListView();
+
+ void setFactory( KXMLGUIFactory *factory, KXMLGUIClient *client );
+ void setViewShowColumnsMenu( KActionMenu *actionMenu );
+
+ bool setBibTeXFile( BibTeX::File *bibtexFile );
+ BibTeX::File* getBibTeXFile( );
+ KBibTeX::DocumentListViewItem *insertItem( BibTeX::Element *item, KBibTeX::DocumentListViewItem *after );
+
+ void deleteSelected();
+ const QValueList<BibTeX::Element*> selectedItems();
+// void sendSelectedToLyx();
+
+ void updateVisiblity();
+ void updateVisiblity( KBibTeX::DocumentListViewItem *item );
+
+ void deferredInitialization();
+ void restoreState();
+
+ signals:
+ void modified();
+ void executed( DocumentListViewItem* );
+
+ public slots:
+ void copy();
+ void copyReferences();
+ void cut();
+ bool paste();
+ bool paste( const QString& text, DocumentListViewItem *at );
+ void selectAll();
+ void filter( const QString& text, BibTeX::Element::FilterType filterType, BibTeX::EntryField::FieldType fieldType );
+ void setReadOnly( bool isReadOnly );
+ void activateShowColumnMenu( int id );
+
+ void insertItems( BibTeX::File *items, KBibTeX::DocumentListViewItem *after = NULL );
+ void insertItem( BibTeX::Element *item );
+
+ private slots:
+ void slotDoubleClick( QListViewItem * item = NULL );
+ void setSortingColumn( int column );
+ void showBibtexListContextMenu( KListView *, QListViewItem *, const QPoint &p );
+ void slotDropped( QDropEvent* event, QListViewItem* item );
+ void saveColumnIndex();
+ void restoreColumnIndex();
+ void saveColumnWidths( int col = -1 );
+ void restoreColumnWidths();
+ void restoreSortingColumn();
+ void makeNewItemsUnread();
+
+ protected:
+ bool acceptDrag( QDropEvent* e ) const;
+ void startDrag();
+
+ virtual bool eventFilter( QObject *watched, QEvent *e );
+
+ virtual void keyPressEvent( QKeyEvent *e );
+
+ private:
+ static const int maxColumns = 256;
+ KBibTeX::DocumentWidget *m_docWidget;
+ BibTeX::File *m_bibtexFile;
+ KPopupMenu *m_contextMenu;
+ KPopupMenu *m_headerMenu;
+ KActionMenu *m_columnVisibleAction;
+ bool m_isReadOnly;
+ QValueList<DocumentListViewItem*> m_unreadItems;
+
+ QString m_filter;
+ BibTeX::Element::FilterType m_filterType;
+ BibTeX::EntryField::FieldType m_filterFieldType;
+ int m_newElementCounter;
+
+ void setItems();
+ QString selectedToBibTeXText();
+ QString selectedToBibTeXRefs();
+
+ void showColumn( int col, int colWidth = 0xffff );
+ void hideColumn( int col );
+ void buildColumns();
+ };
+}
+
+#endif
diff --git a/src/documentlistviewitem.cpp b/src/documentlistviewitem.cpp
new file mode 100644
index 0000000..7a71873
--- /dev/null
+++ b/src/documentlistviewitem.cpp
@@ -0,0 +1,151 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlistview.h>
+#include <qpainter.h>
+#include <qpen.h>
+
+#include <klocale.h>
+
+#include "documentlistviewitem.h"
+#include "entry.h"
+#include "comment.h"
+#include <preamble.h>
+#include "macro.h"
+
+namespace KBibTeX
+{
+ DocumentListViewItem::DocumentListViewItem( BibTeX::File *file, BibTeX::Element *element, DocumentListView *parent ) : KListViewItem( parent, parent->lastItem() ), m_element( element ), m_bibtexFile( file ), m_parent( parent ), m_unreadStatus( FALSE )
+ {
+ setTexts();
+ }
+
+ DocumentListViewItem::DocumentListViewItem( BibTeX::File *file, BibTeX::Element *element, DocumentListView *parent, QListViewItem *after ) : KListViewItem( parent, after ), m_element( element ), m_bibtexFile( file ), m_parent( parent )
+ {
+ setTexts();
+ }
+
+ DocumentListViewItem::~DocumentListViewItem()
+ {
+ // nothing
+ }
+
+ BibTeX::Element* DocumentListViewItem::element()
+ {
+ return m_element;
+ }
+
+ void DocumentListViewItem::updateItem()
+ {
+ setTexts();
+ }
+
+ void DocumentListViewItem::setUnreadStatus( bool unread )
+ {
+ m_unreadStatus = unread;
+ }
+
+ void DocumentListViewItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align )
+ {
+ if ( !p )
+ return ;
+
+ // make unread items bold
+ if ( m_unreadStatus )
+ {
+ QFont f = p->font();
+ f.setBold( TRUE );
+ p->setFont( f );
+ }
+
+ KListViewItem::paintCell( p, cg, column, width, align );
+ }
+
+
+ void DocumentListViewItem::setTexts()
+ {
+ BibTeX::Entry * entry = dynamic_cast<BibTeX::Entry*>( m_element );
+
+ if ( entry )
+ {
+ entry = new BibTeX::Entry( entry );
+ m_bibtexFile->completeReferencedFields( entry );
+
+ if ( entry->entryType() != BibTeX::Entry::etUnknown )
+ setText( 0, BibTeX::Entry::entryTypeToString( entry->entryType() ) );
+ else
+ setText( 0, entry->entryTypeString() );
+ setText( 1, entry->id() );
+
+ for ( int i = 2; i < m_parent->columns(); i++ )
+ {
+ BibTeX::EntryField::FieldType fieldType = ( BibTeX::EntryField::FieldType )( i - 2 + ( int ) BibTeX::EntryField::ftAbstract );
+ BibTeX::EntryField *field = entry->getField( fieldType );
+ BibTeX::Value *value = NULL;
+ if ( field != NULL && (( value = field->value() ) != NULL ) )
+ setText( i, value->text().replace( '{', "" ).replace( '}', "" ).replace( '~', "" ) );
+ else
+ setText( i, "" );
+ }
+
+ delete entry;
+ }
+ else
+ {
+ BibTeX::Comment *comment = dynamic_cast<BibTeX::Comment*>( m_element );
+ if ( comment )
+ {
+ setText( 0, i18n( "Comment" ) );
+ QString text = comment->text();
+ text.replace( '\n', ' ' );
+ setText(( int ) BibTeX::EntryField::ftTitle - ( int ) BibTeX::EntryField::ftAbstract + 2, text );
+ }
+ else
+ {
+ BibTeX::Macro * macro = dynamic_cast<BibTeX::Macro*>( m_element );
+ if ( macro )
+ {
+ setText( 0, i18n( "Macro" ) );
+ setText( 1, macro->key() );
+ BibTeX::Value *value = macro->value();
+ int i = ( int ) BibTeX::EntryField::ftTitle - ( int ) BibTeX::EntryField::ftAbstract + 2;
+ if ( value )
+ setText( i, macro->value() ->text() );
+ else
+ setText( i, "" );
+ }
+ else
+ {
+ BibTeX::Preamble *preamble = dynamic_cast<BibTeX::Preamble*>( m_element );
+ if ( preamble )
+ {
+ setText( 0, i18n( "Preamble" ) );
+ BibTeX::Value *value = preamble->value();
+ int i = ( int ) BibTeX::EntryField::ftTitle - ( int ) BibTeX::EntryField::ftAbstract + 2;
+ if ( value )
+ setText( i, preamble->value() ->text() );
+ else
+ setText( i, "" );
+ }
+
+ }
+ }
+ }
+ }
+}
diff --git a/src/documentlistviewitem.h b/src/documentlistviewitem.h
new file mode 100644
index 0000000..3462fd6
--- /dev/null
+++ b/src/documentlistviewitem.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef DOCUMENTLISTVIEWITEM_H
+#define DOCUMENTLISTVIEWITEM_H
+
+#include <klistview.h>
+
+#include <element.h>
+#include "documentlistview.h"
+
+namespace KBibTeX
+{
+ class DocumentListViewItem : public KListViewItem
+ {
+ public:
+ DocumentListViewItem( BibTeX::File *file, BibTeX::Element *element, DocumentListView *parent );
+ DocumentListViewItem( BibTeX::File *file, BibTeX::Element *element, DocumentListView *parent, QListViewItem *after );
+
+ ~DocumentListViewItem();
+
+ BibTeX::Element* element();
+ void updateItem();
+ void setUnreadStatus( bool unread );
+
+ protected:
+ void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align );
+
+ private:
+ BibTeX::Element *m_element;
+ BibTeX::File *m_bibtexFile;
+ DocumentListView *m_parent;
+ bool m_unreadStatus;
+
+ void setTexts();
+ };
+}
+
+#endif // DOCUMENTLISTVIEWITEM_H
diff --git a/src/documentsourceview.cpp b/src/documentsourceview.cpp
new file mode 100644
index 0000000..0edce91
--- /dev/null
+++ b/src/documentsourceview.cpp
@@ -0,0 +1,380 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qbuffer.h>
+#include <qlayout.h>
+#include <qfile.h>
+
+#include <klibloader.h>
+#include <kxmlguifactory.h>
+#include <kapplication.h>
+#include <klibloader.h>
+#include <kfinddialog.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <ktrader.h>
+#include <kmimetype.h>
+#include <kservice.h>
+#include <kprogress.h>
+#include <kparts/componentfactory.h>
+#include <ktexteditor/configinterface.h>
+#include <ktexteditor/editorchooser.h>
+#include <ktexteditor/undointerface.h>
+
+#include <fileexporterbibtex.h>
+#include <fileimporterbibtex.h>
+#include <settings.h>
+#include "documentsourceview.h"
+
+namespace KBibTeX
+{
+
+ DocumentSourceView::DocumentSourceView( KBibTeX::DocumentWidget *docWidget, bool isReadOnly, QWidget *parent, const char *name )
+ : QWidget( parent, name ), m_isReadOnly( isReadOnly ), m_docWidget( docWidget ), m_bibtexFile( NULL ), m_document( NULL ), m_view( NULL ), m_progDlg( NULL )
+ {
+ setupGUI();
+
+ readConfig();
+ }
+
+ DocumentSourceView::~DocumentSourceView()
+ {
+ kapp->config() ->sync();
+ }
+
+ /**
+ * Copy the selected text to the clipboard
+ */
+ void DocumentSourceView::copy()
+ {
+ KTextEditor::ClipboardInterface * clip = dynamic_cast<KTextEditor::ClipboardInterface*>( m_view );
+ if ( clip )
+ clip->copy();
+ }
+
+ /**
+ * Cut the selected text to the clipboard
+ */
+ void DocumentSourceView::cut()
+ {
+ KTextEditor::ClipboardInterface * clip = dynamic_cast<KTextEditor::ClipboardInterface*>( m_view );
+ if ( clip )
+ clip->cut();
+ }
+
+ /**
+ * Paste the clipboard's content into the document
+ */
+ bool DocumentSourceView::paste()
+ {
+ KTextEditor::ClipboardInterface * clip = dynamic_cast<KTextEditor::ClipboardInterface*>( m_view );
+ if ( clip )
+ {
+ clip->paste();
+ return TRUE;
+ }
+ else
+ return FALSE;
+ }
+
+ /**
+ * Paste a line of text into the document at the designated position
+ */
+ void DocumentSourceView::insertLines( const QString& text, int line )
+ {
+ m_editInterface->insertLine( line < 0 ? m_editInterface->numLines() : ( uint ) line, text );
+
+ KTextEditor::ViewCursorInterface * cursorIf = dynamic_cast<KTextEditor::ViewCursorInterface*>( m_view );
+ if ( cursorIf )
+ cursorIf->setCursorPosition( line < 0 ? m_editInterface->numLines() - 1 : ( uint ) line, 0 );
+ }
+
+ void DocumentSourceView::selectAll()
+ {
+ KTextEditor::SelectionInterface * selI = dynamic_cast<KTextEditor::SelectionInterface*>( m_view );
+ if ( selI )
+ selI->selectAll();
+ }
+
+ void DocumentSourceView::setReadOnly( bool isReadOnly )
+ {
+ m_isReadOnly = isReadOnly;
+ m_document->setReadWrite( !m_isReadOnly );
+ }
+
+ void DocumentSourceView::setFactory( KXMLGUIFactory *factory, KXMLGUIClient * client )
+ {
+ KTextEditor::PopupMenuInterface * popupInterface = dynamic_cast<KTextEditor::PopupMenuInterface*>( m_view );
+ popupInterface->installPopup(( QPopupMenu* )( factory ->container( "ktexteditor_popup", client ) ) );
+ }
+
+ void DocumentSourceView::configureEditor()
+ {
+ KTextEditor::ConfigInterface * conf = KTextEditor::configInterface( m_document );
+ if ( !conf )
+ {
+ kdDebug() << "*** No KTextEditor::ConfigInterface for part!" << endl;
+ return ;
+ }
+
+ // show the modal config dialog for this part if it has a ConfigInterface
+ conf->configDialog();
+ conf->writeConfig();
+ }
+
+ void DocumentSourceView::undo()
+ {
+ KTextEditor::UndoInterface * undoIf = dynamic_cast<KTextEditor::UndoInterface*>( m_document );
+ if ( undoIf != NULL )
+ undoIf->undo();
+ else
+ kdDebug() << "Cannot determine undo interface" << endl;
+ }
+
+ void DocumentSourceView::find()
+ {
+ KFindDialog dlg( TRUE, this );
+ dlg.setFindHistory( m_findHistory );
+ dlg.setHasSelection( FALSE );
+#if KDE_IS_VERSION(3,4,0)
+ dlg.setSupportsWholeWordsFind( FALSE );
+ dlg.setSupportsBackwardsFind( FALSE );
+ dlg.setSupportsCaseSensitiveFind( FALSE );
+ dlg.setSupportsRegularExpressionFind( FALSE );
+#endif
+ if ( dlg.exec() == QDialog::Accepted )
+ {
+ m_lastSearchTerm = dlg.pattern();
+ m_findHistory = dlg.findHistory();
+
+
+
+ KTextEditor::ViewCursorInterface * cursorIf = dynamic_cast<KTextEditor::ViewCursorInterface*>( m_view );
+
+ if ( cursorIf )
+ {
+ unsigned int fromLine = 0;
+ unsigned int fromCol = 0;
+ if ( dlg.options() && KFindDialog::FromCursor )
+ {
+ cursorIf->cursorPosition( &fromLine, &fromCol );
+ fromCol++;
+ }
+
+ search( fromLine, fromCol );
+ }
+ else
+ kdDebug() << "Failed to instantiate ViewCursorInterface, SearchInterface, or SelectionInterface" << endl;
+ }
+ }
+
+ void DocumentSourceView::findNext()
+ {
+ if ( m_lastSearchTerm.isEmpty() )
+ find();
+ else
+ {
+ KTextEditor::ViewCursorInterface * cursorIf = dynamic_cast<KTextEditor::ViewCursorInterface*>( m_view );
+
+ if ( cursorIf )
+ {
+ unsigned int fromLine = 0;
+ unsigned int fromCol = 0;
+ cursorIf->cursorPosition( &fromLine, &fromCol );
+
+ search( fromLine, fromCol );
+ }
+ else
+ kdDebug() << "Failed to instantiate ViewCursorInterface, SearchInterface, or SelectionInterface" << endl;
+ }
+ }
+
+ bool DocumentSourceView::setBibTeXFile( BibTeX::File *bibtexFile )
+ {
+ Settings * settings = Settings::self();
+
+ bool result = FALSE;
+ m_progDlg = new KProgressDialog( this, NULL, i18n( "Source View" ), i18n( "Converting BibTeX document to plain text ..." ), true );
+ m_progDlg->setAllowCancel( false );
+ kapp->processEvents();
+
+ QBuffer buffer;
+ buffer.open( IO_WriteOnly );
+ BibTeX::FileExporterBibTeX * exporter = new BibTeX::FileExporterBibTeX();
+ connect( exporter, SIGNAL( progress( int, int ) ), this, SLOT( updateProgress( int, int ) ) );
+ exporter->setStringDelimiter( settings->fileIO_BibtexStringOpenDelimiter, settings->fileIO_BibtexStringCloseDelimiter );
+ exporter->setKeywordCasing( settings->fileIO_KeywordCasing );
+ exporter->setEncoding( "latex" );
+ exporter->setEnclosingCurlyBrackets( settings->fileIO_EnclosingCurlyBrackets );
+ result = exporter->save( &buffer, bibtexFile );
+ delete exporter;
+ buffer.close();
+
+ if ( result )
+ {
+ kapp->processEvents();
+ buffer.open( IO_ReadOnly );
+ QTextStream in( &buffer );
+ in.setEncoding( QTextStream::UnicodeUTF8 );
+ QString text = in.read();
+ buffer.close();
+
+ if ( m_editInterface )
+ {
+ kapp->processEvents();
+ // very strange: to set the text, you have to set
+ // readwrite to TRUE...
+ m_document->setReadWrite( TRUE );
+ m_editInterface->setText( text );
+ m_document->setReadWrite( !m_isReadOnly );
+ }
+
+ m_bibtexFile = bibtexFile;
+ }
+
+ kapp->processEvents();
+ delete m_progDlg;
+
+ return result;
+ }
+
+ BibTeX::File* DocumentSourceView::getBibTeXFile()
+ {
+ if ( m_editInterface )
+ {
+ QBuffer buffer;
+
+ buffer.open( IO_WriteOnly );
+ QTextStream stream( &buffer );
+ stream.setEncoding( QTextStream::UnicodeUTF8 );
+ stream << m_editInterface->text();
+ buffer.close();
+
+ Settings * settings = Settings::self( m_bibtexFile );
+
+ buffer.open( IO_ReadOnly );
+ BibTeX::FileImporter *importer = new BibTeX::FileImporterBibTeX( settings->editing_FirstNameFirst );
+ BibTeX::File *result = importer->load( &buffer );
+ delete importer;
+ buffer.close();
+
+ return result;
+ }
+
+ return NULL;
+ }
+
+ void DocumentSourceView::focusInEvent( QFocusEvent* /*event*/ )
+ {
+ if ( m_view != NULL )
+ m_view->setFocus();
+ }
+
+ void DocumentSourceView::setupGUI()
+ {
+ // create the Kate::Document
+ m_document = Kate::createDocument( this, "Kate::Document" );
+
+ m_view = ( Kate::View * ) m_document->createView( this, 0L );
+ m_editInterface = editInterface( m_document );
+ m_document->setReadWrite( !m_isReadOnly );
+ if ( !m_isReadOnly )
+ connect( m_document, SIGNAL( textChanged() ), this, SIGNAL( modified() ) );
+ QBoxLayout * layout = new QVBoxLayout( this );
+ layout->addWidget( static_cast<QWidget*>( m_view ) );
+
+ int c = m_document->hlModeCount() ;
+ int hlIdx = -1;
+ for ( int i = 0; i < c; i++ )
+ if ( m_document->hlModeName( i ) .compare( "BibTeX" ) == 0 )
+ {
+ hlIdx = i;
+ break;
+ }
+ if ( hlIdx > -1 )
+ m_document-> setHlMode( hlIdx );
+ }
+
+ void DocumentSourceView::readConfig()
+ {
+ KConfig * config = kapp->config();
+ readConfig( config );
+ }
+
+ void DocumentSourceView::writeConfig()
+ {
+ KConfig * config = kapp->config();
+ writeConfig( config );
+ }
+
+ void DocumentSourceView::readConfig( KConfig *config )
+ {
+ if ( m_view )
+ {
+ KTextEditor::ConfigInterface * conf = KTextEditor::configInterface( m_document );
+ if ( conf )
+ conf->readConfig( config );
+ }
+ }
+
+ void DocumentSourceView::writeConfig( KConfig *config )
+ {
+ if ( m_view )
+ {
+ KTextEditor::ConfigInterface * conf = KTextEditor::configInterface( m_document );
+ if ( conf )
+ conf->writeConfig( config );
+ }
+ config->sync();
+ }
+
+ void DocumentSourceView::search( int fromLine, int fromCol )
+ {
+ unsigned int foundAtLine, foundAtCol, matchLen;
+
+ KTextEditor::SearchInterface * searchIf = KTextEditor::searchInterface( m_document );
+ KTextEditor::SelectionInterface *selectionIf = KTextEditor::selectionInterface( m_document );
+ KTextEditor::ViewCursorInterface * cursorIf = dynamic_cast<KTextEditor::ViewCursorInterface*>( m_view );
+
+ do
+ {
+ bool result = searchIf->searchText( fromLine, fromCol, m_lastSearchTerm, &foundAtLine, &foundAtCol, &matchLen, FALSE );
+ if ( result )
+ {
+ selectionIf->setSelection( foundAtLine, foundAtCol, foundAtLine, foundAtCol + matchLen );
+ cursorIf->setCursorPositionReal( foundAtLine, foundAtCol + matchLen );
+ break;
+ }
+
+ fromLine = 0;
+ fromCol = 0;
+ }
+ while ( KMessageBox::questionYesNo( this, QString( i18n( "Could not find text '%1' in the document.\nStart from the beginning?" ) ).arg( m_lastSearchTerm ), i18n( "Find text in source view" ), KGuiItem( i18n( "Restart search" ) ) ) == KMessageBox::Yes );
+ }
+
+ void DocumentSourceView::updateProgress( int current, int total )
+ {
+ m_progDlg->progressBar()->setTotalSteps( total );
+ m_progDlg->progressBar()->setValue( current );
+ kapp->processEvents();
+ }
+
+}
+#include "documentsourceview.moc"
diff --git a/src/documentsourceview.h b/src/documentsourceview.h
new file mode 100644
index 0000000..8edb23a
--- /dev/null
+++ b/src/documentsourceview.h
@@ -0,0 +1,96 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXDOCUMENTSOURCEVIEW_H
+#define KBIBTEXDOCUMENTSOURCEVIEW_H
+
+#include <qwidget.h>
+
+#include <file.h>
+
+#include <ktexteditor/editinterface.h>
+#include <kate/view.h>
+#include <kate/document.h>
+
+class KProgressDialog;
+
+namespace KBibTeX
+{
+ class DocumentWidget;
+
+ /**
+ * @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class DocumentSourceView : public QWidget
+ {
+ Q_OBJECT
+ public:
+ DocumentSourceView( KBibTeX::DocumentWidget *docWidget, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~DocumentSourceView();
+
+ bool setBibTeXFile( BibTeX::File *bibtexFile );
+ BibTeX::File* getBibTeXFile( );
+
+ void copy();
+ void cut();
+ bool paste();
+ void insertLines( const QString& text, int line = -1 );
+ void selectAll();
+
+ void setReadOnly( bool isReadOnly );
+ void setFactory( KXMLGUIFactory *factory, KXMLGUIClient *client );
+
+ public slots:
+ void configureEditor();
+ void undo();
+ void find();
+ void findNext();
+
+ signals:
+ void modified();
+
+ protected:
+ virtual void focusInEvent( QFocusEvent* event );
+
+ private:
+ bool m_isReadOnly;
+ KBibTeX::DocumentWidget *m_docWidget;
+ BibTeX::File *m_bibtexFile;
+ Kate::Document* m_document;
+ Kate::View* m_view;
+ KTextEditor::EditInterface* m_editInterface;
+ QString m_lastSearchTerm;
+ QStringList m_findHistory;
+ KProgressDialog *m_progDlg;
+
+ void setupGUI();
+ void readConfig();
+ void writeConfig();
+ void readConfig( KConfig *config );
+ void writeConfig( KConfig *config );
+
+ void search( int fromLine, int fromCol );
+
+ private slots:
+ void updateProgress(int current, int total);
+ };
+
+}
+
+#endif
diff --git a/src/documentwidget.cpp b/src/documentwidget.cpp
new file mode 100644
index 0000000..1a59434
--- /dev/null
+++ b/src/documentwidget.cpp
@@ -0,0 +1,1740 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <cmath>
+
+#include <qlayout.h>
+#include <qfile.h>
+#include <qdragobject.h>
+#include <qregexp.h>
+#include <qsplitter.h>
+#include <qurl.h>
+#include <qtextedit.h>
+#include <qprogressdialog.h>
+#include <qbuffer.h>
+#include <qtooltip.h>
+#include <qapplication.h>
+#include <qpushbutton.h>
+#include <qfileinfo.h>
+
+#include <kdebug.h>
+#include <klocale.h>
+#include <ktempfile.h>
+#include <kglobalsettings.h>
+#include <kurl.h>
+#include <kinputdialog.h>
+#include <kpopupmenu.h>
+#include <kiconloader.h>
+#include <kio/netaccess.h>
+#include <kstandarddirs.h>
+#include <kmessagebox.h>
+#include <kapplication.h>
+#include <klineedit.h>
+#include <kdebug.h>
+#include <ktextedit.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <searchbar.h>
+#include <sidebar.h>
+#include <documentlistview.h>
+#include <documentlistviewitem.h>
+#include <documentsourceview.h>
+#include <macrowidget.h>
+#include <preamblewidget.h>
+#include <commentwidget.h>
+#include <entrywidget.h>
+#include <fileimporterbibtex.h>
+#include <fileimporterbibutils.h>
+#include <fileimporterris.h>
+#include <fileexporterbibtex.h>
+#include <fileexporterbibutils.h>
+#include <fileexporterris.h>
+#include <fileexporterxml.h>
+#include <fileexporterrtf.h>
+#include <fileexporterdocbook5.h>
+#include <fileexporterpdf.h>
+#include <fileexporterps.h>
+#include <fileexporterxslt.h>
+#include <fileimporterexternal.h>
+#include <fileexporterexternal.h>
+#include <xsltransform.h>
+#include <entry.h>
+#include <entryfield.h>
+#include <comment.h>
+#include <macro.h>
+#include <preamble.h>
+#include <settings.h>
+#include <webquery.h>
+#include <mergeelements.h>
+#include <idsuggestions.h>
+
+#include "documentwidget.h"
+
+namespace KBibTeX
+{
+
+ DocumentWidget::DocumentWidget( bool isReadOnly, QWidget *parent, const char *name )
+ : QTabWidget( parent, name ), m_lineEditNewKeyword( NULL ), m_isReadOnly( isReadOnly ), m_filename( QString::null ), m_progressDialog( NULL ), m_newElementCounter( 1 ), m_editMode( emList ), m_viewDocumentActionMenu( NULL ), m_assignKeywordsActionMenu( NULL ), m_searchWebsitesActionMenu( NULL ), m_actionEditCut( NULL ), m_actionEditCopy( NULL ), m_actionEditCopyRef( NULL ), m_actionEditPaste( NULL ), m_actionEditSelectAll( NULL ), m_actionEditFind( NULL ), m_actionEditFindNext( NULL ), m_dirWatch( this )
+ {
+ m_bibtexfile = new BibTeX::File();
+
+ setupGUI();
+
+ m_listViewElements->setBibTeXFile( m_bibtexfile );
+ m_sourceView->setBibTeXFile( m_bibtexfile );
+ }
+
+ DocumentWidget::~DocumentWidget()
+ {
+ delete m_bibtexfile;
+ }
+
+ void DocumentWidget::setupGUI()
+ {
+ setAcceptDrops( TRUE );
+ setFocusPolicy( QWidget::ClickFocus );
+
+ // List view tab widget ===============================
+
+ m_container = new QWidget( this );
+ QVBoxLayout *layout = new QVBoxLayout( m_container, 0, 0 );
+ addTab( m_container, i18n( "L&ist view" ) );
+
+ m_searchBar = new SearchBar( m_container );
+ layout->addWidget( m_searchBar );
+
+ m_horSplitter = new QSplitter( Qt::Horizontal, m_container );
+ layout->addWidget( m_horSplitter );
+ m_horSplitter->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
+
+ m_sideBar = new SideBar( m_isReadOnly, m_horSplitter );
+ m_vertSplitter = new QSplitter( Qt::Vertical, m_horSplitter );
+ m_vertSplitter->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
+
+ m_listViewElements = new DocumentListView( this, m_isReadOnly, m_vertSplitter );
+
+ m_preview = new KTextEdit( m_vertSplitter );
+ m_preview->setReadOnly( TRUE );
+ m_preview->setAlignment( Qt::AlignTop && Qt::AlignLeft );
+
+ // Source view tab widget =============================
+
+ m_sourceView = new DocumentSourceView( this, m_isReadOnly, this , "source_view" );
+ addTab( m_sourceView, i18n( "So&urce view" ) );
+ m_sourceView->setFont( KGlobalSettings::fixedFont() );
+
+ // Setup actions
+ connect( m_searchBar, SIGNAL( onlineSearch() ), this, SLOT( onlineSearch() ) );
+ connect( m_searchBar, SIGNAL( doSearch( const QString&, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType ) ), m_listViewElements, SLOT( filter( const QString&, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType ) ) );
+ connect( m_listViewElements, SIGNAL( executed( DocumentListViewItem* ) ), this, SLOT( executeElement( DocumentListViewItem* ) ) );
+ connect( m_listViewElements, SIGNAL( selectionChanged() ), this, SLOT( slotSelectionChanged() ) );
+ connect( m_listViewElements, SIGNAL( currentChanged( QListViewItem* ) ), this, SLOT( slotPreviewElement( QListViewItem* ) ) );
+ connect( m_listViewElements, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( slotPreviewElement( QListViewItem* ) ) );
+ connect( this, SIGNAL( currentChanged( QWidget * ) ), this, SLOT( slotTabChanged( QWidget* ) ) );
+ connect( m_sourceView, SIGNAL( modified() ), this, SLOT( slotModified() ) );
+ connect( m_listViewElements, SIGNAL( modified() ), this, SLOT( slotModified() ) );
+ connect( m_sideBar, SIGNAL( valueRenamed() ), this, SLOT( slotModified() ) );
+ connect( m_sideBar, SIGNAL( valueRenamed() ), this, SLOT( refreshBibTeXFile() ) );
+ connect( m_sideBar, SIGNAL( selected( const QString&, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType ) ), m_searchBar, SLOT( setSearch( const QString&, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType ) ) );
+ connect( &m_dirWatch, SIGNAL( dirty( const QString& ) ), this, SLOT( slotFileGotDirty( const QString & ) ) );
+ }
+
+
+ bool DocumentWidget::open( const QString &fileName, bool mergeOnly )
+ {
+ bool result = FALSE;
+ if ( !mergeOnly )
+ m_dirWatch.removeFile( m_filename );
+
+ BibTeX::FileImporter *importer = fileImporterFactory( fileName );
+ if ( importer != NULL )
+ {
+ QFile file( fileName );
+ if ( file.open( IO_ReadOnly ) )
+ {
+ result = open( &file, mergeOnly, QString( i18n( "<qt>Loading file <b>%1</b></qt>" ) ).arg( fileName ), importer );
+ if ( result )
+ {
+ m_bibtexfile->fileName = fileName;
+ m_filename = fileName;
+ }
+ file.close();
+ }
+ else
+ kdDebug() << "Cannot open file " << fileName << endl;
+
+ delete importer;
+ }
+
+
+ if ( !mergeOnly )
+ m_dirWatch.addFile( m_filename );
+
+ return result;
+ }
+
+ bool DocumentWidget::open( QIODevice *iodevice, bool mergeOnly, const QString &label, BibTeX::FileImporter *importer )
+ {
+ bool result = FALSE;
+ setEnabled( FALSE );
+
+ bool usingDefaultImporter = importer == NULL;
+ if ( usingDefaultImporter )
+ {
+ Settings * settings = Settings::self( NULL );
+ importer = new BibTeX::FileImporterBibTeX( settings->editing_FirstNameFirst, settings->fileIO_Encoding );
+ }
+
+ startProgress( label, importer );
+ BibTeX::File *newFile = importer->load( iodevice );
+ endProgress( importer );
+
+ if ( usingDefaultImporter )
+ delete importer;
+
+ if ( newFile != NULL )
+ {
+ if ( mergeOnly )
+ {
+ for ( QValueList<BibTeX::Element*>::ConstIterator eit = newFile->constBegin(); eit != newFile->constEnd(); ++eit )
+ m_bibtexfile->appendElement(( *eit )->clone() );
+
+ if ( KMessageBox::questionYesNo( this, i18n( "Do you want to search for duplicates in the merged document?" ), i18n( "Find duplicates?" ), KGuiItem( i18n( "Find Duplicates" ) ) ) == KMessageBox::Yes )
+ {
+ MergeElements *me = new MergeElements( this );
+ me->mergeDuplicates( m_bibtexfile );
+ delete me;
+ }
+ delete newFile;
+ }
+ else
+ {
+ delete m_bibtexfile;
+ m_bibtexfile = newFile;
+ }
+
+ if ( currentPage() == m_sourceView )
+ m_sourceView->setBibTeXFile( m_bibtexfile );
+ else if ( currentPage() == m_container )
+ m_listViewElements->setBibTeXFile( m_bibtexfile );
+
+ Settings * settings = Settings::self( m_bibtexfile );
+ settings->addToCompletion( m_bibtexfile );
+ m_sideBar->refreshLists( m_bibtexfile );
+
+ result = TRUE;
+ }
+ else
+ {
+ kdDebug() << "Could not load bibliography file from io device" << endl;
+ result = FALSE;
+ }
+
+ setEnabled( TRUE );
+ return result;
+ }
+
+ bool DocumentWidget::save( const QString &fileName, QStringList *errorLog )
+ {
+ bool result = FALSE;
+ m_dirWatch.removeFile( m_filename );
+ Settings * settings = Settings::self( NULL );
+
+ BibTeX::File::FileFormat format = BibTeX::File::formatUndefined;
+ if ( fileName.endsWith( ".rtf", FALSE ) )
+ format = BibTeX::File::formatRTF;
+ else if ( fileName.endsWith( ".pdf", FALSE ) )
+ format = BibTeX::File::formatPDF;
+ else if ( fileName.endsWith( ".bib", FALSE ) )
+ format = BibTeX::File::formatBibTeX;
+ else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( fileName.endsWith( ".ref", FALSE ) || fileName.endsWith( ".refer", FALSE ) || fileName.endsWith( ".txt", FALSE ) || fileName.endsWith( ".rfr", FALSE ) ) )
+ format = BibTeX::File::formatEndNote;
+ else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( fileName.endsWith( ".isi", FALSE ) || fileName.endsWith( ".cgi", FALSE ) ) )
+ format = BibTeX::File::formatISI;
+ else if ( fileName.endsWith( ".ris", FALSE ) )
+ format = BibTeX::File::formatRIS;
+ else if ( fileName.endsWith( ".ps", FALSE ) )
+ format = BibTeX::File::formatPS;
+ else if ( fileName.endsWith( ".xml", FALSE ) )
+ {
+ QStringList options = QStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "DocBook5|MODS|internal XML" : "DocBook5|internal XML" ) );
+ bool ok = false;
+ QString answer = KInputDialog::getItem( i18n( "Choose file format" ), QString( i18n( "Choose file format of file '%1':" ) ).arg( fileName ), options, 0, false, &ok, this );
+ if ( ok && !answer.isNull() && answer == "DocBook5" )
+ format = BibTeX::File::formatDocBook5;
+ else if ( ok && !answer.isNull() && answer == "MODS" )
+ format = BibTeX::File::formatMODS;
+ else if ( ok && !answer.isNull() && answer == "internal XML" )
+ format = BibTeX::File::formatXML;
+ }
+ else if ( fileName.endsWith( ".html", FALSE ) || fileName.endsWith( ".xhtml", FALSE ) || fileName.endsWith( ".htm", FALSE ) )
+ format = BibTeX::File::formatHTML;
+
+ if ( format != BibTeX::File::formatUndefined )
+ {
+ QString usedFileName = fileName;
+ QFileInfo fi( fileName );
+ if ( !fi.readLink().isNull() && KMessageBox::questionYesNo( this, QString( i18n( "The selected filename \"%1\" is a symbolic link pointing to \"%2\".\nReplace the link with a new file or overwrite the existing file the link points to?" ) ).arg( usedFileName ).arg( Settings::resolveLink( fileName, fi.readLink() ) ), i18n( "Symbolic Link" ), KGuiItem( i18n( "Replace link" ) ), KGuiItem( i18n( "Overwrite file the link points to" ) ) ) == KMessageBox::No )
+ usedFileName = Settings::resolveLink( fileName, fi.readLink() );
+ QFile file( usedFileName );
+ if ( file.open( IO_WriteOnly ) )
+ {
+ result = save( &file, format, QString( i18n( "<qt>Writing file <b>%1</b></qt>" ) ).arg( fileName ), errorLog );
+ if ( result )
+ {
+ m_bibtexfile->fileName = fileName;
+ m_filename = fileName;
+ }
+ file.close();
+ }
+ else
+ kdDebug() << "Cannot write to file " << fileName << endl;
+ }
+ else
+ kdDebug() << "Unknown file format to save to (filename is " << fileName << ")" << endl;
+
+ m_dirWatch.addFile( m_filename );
+ return result;
+ }
+
+ bool DocumentWidget::save( QIODevice *iodevice, BibTeX::File::FileFormat format, const QString &label, QStringList *errorLog )
+ {
+ Settings * settings = Settings::self( m_bibtexfile );
+
+ bool result = FALSE;
+ setEnabled( FALSE );
+
+ updateFromGUI();
+
+ BibTeX::XSLTransform *transform = NULL;
+
+ BibTeX::FileExporter * exporter = NULL;
+ switch ( format )
+ {
+ case BibTeX::File::formatBibTeX:
+ {
+ BibTeX::FileExporterBibTeX * bibtexExporter = new BibTeX::FileExporterBibTeX();
+ bibtexExporter->setStringDelimiter( settings->fileIO_BibtexStringOpenDelimiter, settings->fileIO_BibtexStringCloseDelimiter );
+ bibtexExporter->setKeywordCasing( settings->fileIO_KeywordCasing );
+ bibtexExporter->setEncoding( settings->fileIO_Encoding );
+ bibtexExporter->setEnclosingCurlyBrackets( settings->fileIO_EnclosingCurlyBrackets );
+ exporter = bibtexExporter;
+ }
+ break;
+ case BibTeX::File::formatRIS:
+ if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && settings->fileIO_useBibUtils )
+ exporter = new BibTeX::FileExporterBibUtils( BibTeX::File::formatRIS );
+ else
+ exporter = new BibTeX::FileExporterRIS( );
+ break;
+ case BibTeX::File::formatEndNote:
+ case BibTeX::File::formatEndNoteXML:
+ case BibTeX::File::formatMODS:
+ case BibTeX::File::formatISI:
+ if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable )
+ exporter = new BibTeX::FileExporterBibUtils( format );
+ break;
+ case BibTeX::File::formatXML:
+ exporter = new BibTeX::FileExporterXML();
+ break;
+ case BibTeX::File::formatHTML:
+ switch ( settings->fileIO_ExporterHTML )
+ {
+ case BibTeX::FileExporterExternal::exporterNone:
+ case BibTeX::FileExporterExternal::exporterXSLT:
+ {
+ KStandardDirs * kstd = KGlobal::dirs();
+ QString resPath = kstd->findResource( "data", "kbibtexpart/xslt/html.xsl" );
+ if ( resPath != NULL )
+ transform = new BibTeX::XSLTransform( resPath );
+
+ if ( transform != NULL )
+ exporter = new BibTeX::FileExporterXSLT( transform );
+ else
+ {
+ kdDebug() << "XSLT for HTML export is not available" << endl;
+ }
+ }
+ break;
+ default:
+ {
+ exporter = new BibTeX::FileExporterExternal( settings->fileIO_ExporterHTML, BibTeX::File::formatHTML );
+ }
+ }
+ break;
+ case BibTeX::File::formatRTF:
+ {
+ if ( !settings->external_latex2rtfAvailable )
+ {
+ QString msg = i18n( "To export a BibTeX document to the Rich Text Format (RTF) KBibTeX requires the program 'latex2rtf'." ) ;
+ KMessageBox::information( this, msg );
+ errorLog->append( msg );
+ }
+ else
+ {
+ BibTeX::FileExporterRTF *rtfExporter = new BibTeX::FileExporterRTF();
+ rtfExporter->setLaTeXLanguage( settings->fileIO_ExportLanguage );
+ rtfExporter->setLaTeXBibliographyStyle( settings->fileIO_ExportBibliographyStyle );
+ exporter = rtfExporter;
+ }
+ }
+ break;
+ case BibTeX::File::formatDocBook5:
+ {
+ if ( settings->fileIO_bib2db5ClassPath == QString::null )
+ {
+ QString msg = i18n( "To export a BibTeX document to the DocBook5 format KBibTeX requires the program 'bib2db5'." ) ;
+ KMessageBox::information( this, msg );
+ errorLog->append( msg );
+ }
+ else
+ {
+ BibTeX::FileExporterDocBook5 *db5Exporter = new BibTeX::FileExporterDocBook5( settings->fileIO_bib2db5ClassPath );
+ exporter = db5Exporter;
+ }
+ }
+ break;
+ case BibTeX::File::formatPDF:
+ {
+ if ( settings->fileIO_EmbedFiles && !Settings::kpsewhich( "embedfile.sty" ) )
+ {
+ KMessageBox::sorry( this, i18n( "Embedding files into the PDF file is enabled, but the required file 'embedfile.sty' was not found. Embedding files will be disabled." ), i18n( "Embedding files disabled" ) );
+ settings->fileIO_EmbedFiles = FALSE;
+ }
+
+ BibTeX::FileExporterPDF *pdfExporter = new BibTeX::FileExporterPDF( settings->fileIO_EmbedFiles );
+ pdfExporter->setLaTeXLanguage( settings->fileIO_ExportLanguage );
+ pdfExporter->setLaTeXBibliographyStyle( settings->fileIO_ExportBibliographyStyle );
+ QStringList searchPaths;
+ for ( QStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it )
+ searchPaths.append( *it );
+ if ( m_bibtexfile->fileName != QString::null )
+ searchPaths.append( KURL( m_bibtexfile->fileName ).directory( FALSE, FALSE ) );
+ pdfExporter->setDocumentSearchPaths( searchPaths );
+ exporter = pdfExporter;
+ }
+ break;
+ case BibTeX::File::formatPS:
+ {
+ BibTeX::FileExporterPS *psExporter = new BibTeX::FileExporterPS();
+ psExporter->setLaTeXLanguage( settings->fileIO_ExportLanguage );
+ psExporter->setLaTeXBibliographyStyle( settings->fileIO_ExportBibliographyStyle );
+ exporter = psExporter;
+ }
+ break;
+ default:
+ kdDebug() << "Unsupported export format selected" << endl;
+ }
+
+ if ( exporter != NULL )
+ {
+ startProgress( label, exporter );
+ result = exporter->save( iodevice, m_bibtexfile, errorLog );
+ endProgress( exporter );
+
+ if ( transform != NULL )
+ delete transform;
+ delete exporter;
+ }
+
+ setEnabled( TRUE );
+ return result;
+ }
+
+ bool DocumentWidget::newElement( const QString& elementType )
+ {
+ Settings * settings = Settings::self( m_bibtexfile );
+
+ if ( m_editMode == emList )
+ {
+ if ( elementType.lower() == "macro" )
+ {
+ QString name = QString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewMacro%1" ) ).arg( m_newElementCounter++ );
+ BibTeX::Macro *macro = new BibTeX::Macro( name );
+ if ( MacroWidget::execute( macro, m_isReadOnly ) == QDialog::Accepted )
+ {
+ new DocumentListViewItem( m_bibtexfile, macro, m_listViewElements );
+ m_bibtexfile->appendElement( macro );
+ settings->addToCompletion( macro );
+ m_sideBar->refreshLists( m_bibtexfile );
+ return TRUE;
+ }
+ else
+ {
+ delete macro;
+ return FALSE;
+ }
+ }
+ else if ( elementType.lower() == "comment" )
+ {
+ BibTeX::Comment * comment = new BibTeX::Comment( i18n( "Put your comment here..." ) );
+ if ( CommentWidget::execute( comment, m_isReadOnly ) == QDialog::Accepted )
+ {
+ new DocumentListViewItem( m_bibtexfile, comment, m_listViewElements );
+ m_bibtexfile->appendElement( comment );
+ return TRUE;
+ }
+ else
+ {
+ delete comment;
+ return FALSE;
+ }
+ }
+ else if ( elementType.lower() == "preamble" )
+ {
+ BibTeX::Preamble * preamble = new BibTeX::Preamble( );
+ if ( PreambleWidget::execute( preamble, m_isReadOnly ) == QDialog::Accepted )
+ {
+ new DocumentListViewItem( m_bibtexfile, preamble, m_listViewElements );
+ m_bibtexfile->appendElement( preamble );
+ return TRUE;
+ }
+ else
+ {
+ delete preamble;
+ return FALSE;
+ }
+ }
+ else
+ {
+ QString name = nextNewEntry();
+ BibTeX::Entry *entry = new BibTeX::Entry( elementType, name );
+ m_dirWatch.stopScan();
+ if ( EntryWidget::execute( entry, m_bibtexfile, m_isReadOnly, TRUE ) == QDialog::Accepted )
+ {
+ new DocumentListViewItem( m_bibtexfile, entry, m_listViewElements );
+ m_bibtexfile->appendElement( entry );
+ settings->addToCompletion( entry );
+ m_sideBar->refreshLists( m_bibtexfile );
+ m_dirWatch.startScan();
+ return TRUE;
+ }
+ else
+ {
+ delete entry;
+ m_dirWatch.startScan();
+ return FALSE;
+ }
+ }
+ }
+ else if ( m_editMode == emSource )
+ {
+ if ( elementType.lower() == "macro" )
+ {
+ QString name = QString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewString%1" ) ).arg( m_newElementCounter++ );
+ m_sourceView->insertLines( QString( "@string{ %1 = \"%2\" }" ).arg( name ).arg( i18n( "No text yet" ) ) );
+ }
+ else if ( elementType.lower() == "comment" )
+ {
+ m_sourceView->insertLines( i18n( "@comment{ Put your comment here... }" ) );
+ }
+ else if ( elementType.lower() == "preamble" )
+ {
+ m_sourceView->insertLines( i18n( "@preamble{\"Put your preamble here using double quotes...\"}" ), 0 );
+ }
+ else
+ {
+ QString name = nextNewEntry();
+ BibTeX::Entry *entry = new BibTeX::Entry( elementType, name );
+
+ for ( int t = 0; t < 2; t++ )
+ for ( int i = ( int ) BibTeX::EntryField::ftAbstract; i <= ( int ) BibTeX::EntryField::ftYear; i++ )
+ {
+ BibTeX::EntryField::FieldType fieldType = ( BibTeX::EntryField::FieldType ) i;
+ BibTeX::Entry::FieldRequireStatus fieldRequireStatus = BibTeX::Entry::getRequireStatus( entry->entryType(), fieldType );
+
+ if (( t == 0 && fieldRequireStatus == BibTeX::Entry::frsRequired ) || ( t == 1 && fieldRequireStatus == BibTeX::Entry::frsOptional ) )
+ {
+ BibTeX::Value * value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText( fieldRequireStatus == BibTeX::Entry::frsRequired ? i18n( "REQUIRED" ) : i18n( "optional" ) ) );
+ BibTeX::EntryField *field = new BibTeX::EntryField( fieldType );
+ field->setValue( value );
+ entry->addField( field );
+ }
+ }
+
+ BibTeX::FileExporter * exporter = new BibTeX::FileExporterBibTeX( );
+ QBuffer buffer;
+ buffer.open( IO_WriteOnly );
+ bool result = exporter->save( &buffer, entry );
+ buffer.close();
+
+ if ( result )
+ {
+ buffer.open( IO_ReadOnly );
+ QTextStream textStream( &buffer );
+ textStream.setEncoding( QTextStream::UnicodeUTF8 );
+ QString text = textStream.read();
+ buffer.close();
+ QStringList lines = QStringList::split( '\n', text );
+ for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
+ m_sourceView->insertLines( *it );
+ }
+
+ delete exporter;
+ }
+
+ return TRUE;
+ }
+
+ return FALSE;
+ }
+
+ void DocumentWidget::updateViews()
+ {
+ m_listViewElements->updateVisiblity();
+ }
+
+ void DocumentWidget::showStatistics()
+ {
+ int n = m_bibtexfile->count();
+ KMessageBox::information( this, i18n( "This BibTeX file contains 1 element.", "This BibTeX file contains %n elements.", n ), i18n( "File Statistics" ) );
+ }
+
+ void DocumentWidget::refreshBibTeXFile()
+ {
+ if ( currentPage() == m_sourceView )
+ m_sourceView->setBibTeXFile( m_bibtexfile );
+ else if ( currentPage() == m_container )
+ m_listViewElements->setBibTeXFile( m_bibtexfile );
+ }
+
+ void DocumentWidget::setFactory( KXMLGUIFactory *factory, KXMLGUIClient *client )
+ {
+ m_searchBar->setFactory( factory, client );
+ m_listViewElements->setFactory( factory, client );
+ m_sourceView->setFactory( factory, client );
+
+ m_viewDocumentActionMenu = dynamic_cast<KActionMenu*>( client->action( "view_document" ) );
+ if ( m_viewDocumentActionMenu != NULL )
+ connect( m_viewDocumentActionMenu->popupMenu(), SIGNAL( activated( int ) ), this, SLOT( slotViewDocument( int ) ) );
+ m_assignKeywordsActionMenu = dynamic_cast<KActionMenu*>( client->action( "assign_keywords" ) );
+ if ( m_assignKeywordsActionMenu != NULL )
+ connect( m_assignKeywordsActionMenu->popupMenu(), SIGNAL( activated( int ) ), this, SLOT( slotAssignKeywords( int ) ) );
+
+ m_actionEditCut = client->action( "edit_cut" );
+ m_actionEditCopy = client->action( "edit_copy" );
+ m_actionEditCopyRef = client->action( "edit_copyref" );
+ m_actionEditPaste = client->action( "edit_paste" );
+ m_actionEditSelectAll = client->action( "edit_select_all" );
+ m_actionEditFind = client->action( "edit_find" );
+ m_actionEditFindNext = client->action( "edit_find_next" );
+ m_listViewElements->setViewShowColumnsMenu( dynamic_cast<KActionMenu*>( client->action( "view_showcolumns" ) ) );
+ m_searchWebsitesActionMenu = dynamic_cast<KActionMenu*>( client->action( "search_document_online" ) );
+ }
+
+ void DocumentWidget::updateViewDocumentMenu( )
+ {
+ if ( m_viewDocumentActionMenu == NULL )
+ {
+ kdDebug() << "FIXME: m_viewDocumentActionMenu is not set" << endl;
+ return;
+ }
+
+ KPopupMenu * popup = m_viewDocumentActionMenu->popupMenu();
+ popup->clear();
+ m_viewDocumentActionMenuURLs.clear();
+
+ BibTeX::Element * currentElement = NULL;
+
+ QListViewItem * item = m_listViewElements->selectedItem();
+ if ( item == NULL )
+ item = m_listViewElements->currentItem();
+ DocumentListViewItem * dlvi = dynamic_cast<DocumentListViewItem*>( item );
+ if ( dlvi )
+ currentElement = dlvi->element();
+
+ BibTeX::Entry *entry = NULL;
+ if ( currentElement != NULL )
+ entry = dynamic_cast<BibTeX::Entry*>( currentElement );
+
+ m_viewDocumentActionMenu->setEnabled( FALSE );
+ if ( entry != NULL )
+ {
+ KURL::List documentURLs = getEntryURLs( entry );
+ if ( !documentURLs.isEmpty() )
+ {
+ for ( KURL::List::Iterator i = documentURLs.begin(); i != documentURLs.end(); ++i )
+ {
+ QString prettyURL = ( *i ).prettyURL();
+ if ( prettyURL.endsWith( ".pdf", FALSE ) || prettyURL.find( "/pdf/" ) > 0 )
+ popup->insertItem( SmallIcon( "pdf" ), prettyURL );
+ else if ( prettyURL.endsWith( ".ps", FALSE ) )
+ popup->insertItem( SmallIcon( "postscript" ), prettyURL );
+ else if ( prettyURL.endsWith( ".html", FALSE ) || prettyURL.startsWith( "http://", FALSE ) )
+ popup->insertItem( SmallIcon( "html" ), prettyURL );
+ else
+ popup->insertItem( prettyURL );
+ m_viewDocumentActionMenuURLs.append( prettyURL );
+ }
+ m_viewDocumentActionMenu->setEnabled( TRUE );
+ }
+ }
+ }
+
+ void DocumentWidget::updateAssignKeywords()
+ {
+ if ( m_assignKeywordsActionMenu == NULL )
+ {
+ kdDebug() << "FIXME: m_assignKeywordsActionMenu is not set" << endl;
+ return;
+ }
+
+ KPopupMenu * popup = m_assignKeywordsActionMenu->popupMenu();
+ popup->clear();
+ m_assignKeywordsActionMenuURLs.clear();
+ QStringList entryKeywords;
+ QStringList fileKeywords;
+
+ /**
+ * Fetch keywords from selected entries into entryKeywords list
+ */
+ QValueList<BibTeX::Entry*> entryList;
+ for ( QListViewItemIterator it( m_listViewElements, QListViewItemIterator::Selected ); it.current(); ++it )
+ {
+ BibTeX::Element * currentElement = NULL;
+ DocumentListViewItem * dlvi = dynamic_cast<DocumentListViewItem*>( it.current() );
+ if ( dlvi && (( currentElement = dlvi->element() ) != NULL ) )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( currentElement );
+ if ( entry != NULL )
+ entryList << entry;
+ }
+ }
+
+ for ( QValueList<BibTeX::Entry*>::Iterator it = entryList.begin(); it != entryList.end(); ++it )
+ {
+ BibTeX::Entry *entry = *it;
+ BibTeX::EntryField *field = NULL;
+ BibTeX::Value *valueKeywords = NULL;
+ if (( field = entry->getField( BibTeX::EntryField::ftKeywords ) ) != NULL && ( valueKeywords = field->value() ) != NULL )
+ for ( QValueList<BibTeX::ValueItem*>::ConstIterator it = valueKeywords->items.begin();it != valueKeywords->items.end();++it )
+ {
+ BibTeX::KeywordContainer *container = dynamic_cast<BibTeX::KeywordContainer*>( *it );
+ if ( container != NULL )
+ for ( QValueList<BibTeX::Keyword*>::ConstIterator kit = container->keywords.begin();kit != container->keywords.end();++kit )
+ entryKeywords.append(( *kit )->text() );
+ }
+ }
+
+ /**
+ * Fetch all keywords from current file into fileKeywords
+ */
+ for ( QValueList<BibTeX::Element*>::ConstIterator eit = m_bibtexfile->constBegin(); eit != m_bibtexfile->constEnd(); ++eit )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *eit );
+ BibTeX::EntryField *field = NULL;
+ BibTeX::Value *value = NULL;
+ if ( entry != NULL && (( field = entry->getField( BibTeX::EntryField::ftKeywords ) ) != NULL ) && (( value = field->value() ) != NULL ) )
+ {
+ for ( QValueList<BibTeX::ValueItem*>::ConstIterator vit = value->items.constBegin(); vit != value->items.constEnd();++vit )
+ {
+ BibTeX::KeywordContainer *container = dynamic_cast<BibTeX::KeywordContainer *>( *vit );
+ for ( QValueList<BibTeX::Keyword*>::ConstIterator kit = container->keywords.constBegin(); kit != container->keywords.constEnd();++kit )
+ {
+ QString text = ( *kit )->text();
+ if ( !fileKeywords.contains( text ) )
+ fileKeywords.append( text );
+ }
+ }
+ }
+ }
+
+ /**
+ * Merge keyword lists
+ */
+ Settings * settings = Settings::self( m_bibtexfile );
+ QStringList allKeywords = QStringList( fileKeywords );
+ for ( QStringList::Iterator it = settings->keyword_GlobalList.begin(); it != settings->keyword_GlobalList.end(); ++it )
+ if ( !allKeywords.contains( *it ) )
+ allKeywords.append( *it );
+ allKeywords.sort();
+
+ /**
+ * Build menu
+ */
+ bool popupEmpty = FALSE;
+ if ( allKeywords.isEmpty() )
+ popupEmpty = TRUE;
+ else if ( allKeywords.count() < 24 )
+ {
+ for ( QStringList::Iterator it = allKeywords.begin(); it != allKeywords.end(); ++it )
+ {
+ int i = popup->insertItem( *it );
+ popup->setItemChecked( i, entryKeywords.contains( *it ) );
+ m_assignKeywordsActionMenuURLs[i] = *it;
+ }
+ }
+ else
+ {
+ int maxCountPerSubMenu = ( int )sqrt( allKeywords.count() ) + 1;
+ int countPerSubMenu = 0;
+ KPopupMenu *subMenu = new KPopupMenu( popup );
+ connect( subMenu, SIGNAL( activated( int ) ), this, SLOT( slotAssignKeywords( int ) ) );
+ QString startWord, endWord;
+ for ( QStringList::Iterator it = allKeywords.begin(); it != allKeywords.end(); ++it )
+ {
+ if ( countPerSubMenu == 0 )
+ startWord = *it;
+ endWord = *it;
+ int i = subMenu->insertItem( *it );
+ subMenu->setItemChecked( i, entryKeywords.contains( *it ) );
+ m_assignKeywordsActionMenuURLs[i] = *it;
+
+ ++countPerSubMenu;
+ if ( countPerSubMenu >= maxCountPerSubMenu )
+ {
+ popup->insertItem( QString( i18n( "%1 ... %2" ) ).arg( startWord ).arg( endWord ), subMenu );
+ subMenu = new KPopupMenu( popup );
+ connect( subMenu, SIGNAL( activated( int ) ), this, SLOT( slotAssignKeywords( int ) ) );
+ countPerSubMenu = 0;
+ }
+ }
+
+ if ( countPerSubMenu > 0 )
+ {
+ popup->insertItem( QString( i18n( "%1 ... %2" ) ).arg( startWord ).arg( endWord ), subMenu );
+ }
+ else
+ delete subMenu;
+ }
+
+ if ( !popupEmpty )
+ popup->insertSeparator();
+
+ QWidget *container = new QWidget( popup );
+ container->setBackgroundColor( KGlobalSettings::baseColor() );
+ QHBoxLayout *layout = new QHBoxLayout( container, 1, 1 );
+ QLabel *label = new QLabel( i18n( "New keyword:" ), container );
+ label->setBackgroundColor( KGlobalSettings::baseColor() );
+ layout->addWidget( label );
+ m_lineEditNewKeyword = new KLineEdit( container );
+ layout->addWidget( m_lineEditNewKeyword );
+ container->setFocusProxy( m_lineEditNewKeyword );
+ container->setFocusPolicy( QWidget::ClickFocus );
+ popup->insertItem( container );
+
+ connect( m_lineEditNewKeyword, SIGNAL( returnPressed() ), this, SLOT( slotAddKeyword() ) );
+ }
+
+ void DocumentWidget::deferredInitialization()
+ {
+ restoreState();
+ m_listViewElements->deferredInitialization();
+ }
+
+ void DocumentWidget::saveState()
+ {
+ Settings * settings = Settings::self( m_bibtexfile );
+ settings->editing_HorSplitterSizes = m_horSplitter->sizes();
+ settings->editing_VertSplitterSizes = m_vertSplitter->sizes();
+ }
+
+ void DocumentWidget::restoreState()
+ {
+ m_listViewElements->restoreState();
+ m_searchBar->restoreState();
+ m_sideBar->restoreState();
+
+ Settings * settings = Settings::self( m_bibtexfile );
+ m_horSplitter->setSizes( settings->editing_HorSplitterSizes );
+ m_vertSplitter->setSizes( settings->editing_VertSplitterSizes );
+
+ if ( m_searchWebsitesActionMenu != NULL )
+ {
+ KPopupMenu * popup = m_searchWebsitesActionMenu->popupMenu();
+ popup->clear();
+ int i = 0;
+ for ( QValueList<Settings::SearchURL*>::ConstIterator it = settings->searchURLs.begin(); it != settings->searchURLs.end(); ++it )
+ popup->insertItem(( *it ) ->description, ++i );
+ }
+
+ if ( settings->editing_UseSpecialFont )
+ m_preview->setFont( settings->editing_SpecialFont );
+ else
+ m_preview->setFont( KGlobalSettings::generalFont() );
+
+ }
+
+ void DocumentWidget::executeElement( DocumentListViewItem* item )
+ {
+ Settings * settings = Settings::self( m_bibtexfile );
+ bool openingDocumentOK = FALSE;
+
+ if ( settings->editing_MainListDoubleClickAction == 1 )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( item->element() );
+ if ( entry != NULL )
+ {
+ /** prefer local urls over remote urls, so first check for file:// and use other protocols only if no file:// was found */
+ QString protocol = "file";
+ KURL::List urls = getEntryURLs( entry );
+ KURL selected = KURL();
+ while ( !selected.isValid() && protocol != QString::null )
+ {
+ for ( KURL::List::Iterator it = urls.begin(); !selected.isValid() && it != urls.end(); ++it )
+ {
+ KURL url = *it;
+ if ( url.isValid() && ( !url.isLocalFile() || QFile::exists( url.path() ) ) && url.protocol().startsWith( protocol ) )
+ selected = url;
+ }
+ /** little trick setting protocol prefix in the first round to "file://", then to "", and setting to null to quit the loop */
+ if ( !protocol.isEmpty() ) protocol = "";
+ else protocol = QString::null;
+ }
+
+ if ( selected.isValid() )
+ openingDocumentOK = Settings::openUrl( selected, this );
+ }
+ }
+
+ if ( !openingDocumentOK )
+ editElement( item );
+ }
+
+ bool DocumentWidget::editElement()
+ {
+ bool result = false;
+ QListViewItem * item = m_listViewElements->selectedItem();
+ if ( item == NULL )
+ item = m_listViewElements->currentItem();
+ DocumentListViewItem * dlvi = dynamic_cast<DocumentListViewItem*>( item );
+ if ( dlvi )
+ result = editElement( dlvi );
+ return result;
+ }
+
+ bool DocumentWidget::editElement( DocumentListViewItem*item )
+ {
+ BibTeX::Element * element = item->element();
+ bool result = editElement( element );
+ if ( result )
+ {
+ item->updateItem();
+ slotPreviewElement( item );
+ }
+ return result;
+ }
+
+ bool DocumentWidget::editElement( BibTeX::Element*element )
+ {
+ m_dirWatch.stopScan();
+ bool result = editElementDialog( element );
+ m_dirWatch.startScan( );
+
+ Settings * settings = Settings::self( m_bibtexfile );
+ settings->addToCompletion( element );
+ m_sideBar->refreshLists( m_bibtexfile );
+
+ return result;
+ }
+
+ bool DocumentWidget::editElementDialog( BibTeX::Element *element )
+ {
+ QDialog::DialogCode dialogResult = QDialog::Rejected;
+ BibTeX::Entry * entry = dynamic_cast<BibTeX::Entry*>( element );
+ if ( entry )
+ dialogResult = KBibTeX::EntryWidget::execute( entry, m_bibtexfile, m_isReadOnly, FALSE );
+ else
+ {
+ BibTeX::Comment * comment = dynamic_cast<BibTeX::Comment*>( element );
+ if ( comment )
+ dialogResult = KBibTeX::CommentWidget::execute( comment, m_isReadOnly );
+ else
+ {
+ BibTeX::Macro* macro = dynamic_cast<BibTeX::Macro*>( element );
+ if ( macro )
+ dialogResult = KBibTeX::MacroWidget::execute( macro, m_isReadOnly );
+ else
+ {
+ BibTeX::Preamble* preamble = dynamic_cast<BibTeX::Preamble*>( element );
+ if ( preamble )
+ dialogResult = KBibTeX::PreambleWidget::execute( preamble, m_isReadOnly );
+ }
+ }
+ }
+
+ if ( dialogResult == QDialog::Accepted )
+ slotModified();
+
+ return dialogResult == QDialog::Accepted;
+ }
+
+ void DocumentWidget::deleteElements()
+ {
+ if ( !m_isReadOnly )
+ {
+ if ( m_editMode == emList )
+ {
+ m_listViewElements->deleteSelected();
+ slotModified();
+ }
+ }
+ }
+
+ void DocumentWidget::sendSelectedToLyx()
+ {
+ if ( m_editMode == emList )
+ {
+ QValueList<BibTeX::Element*> elements = m_listViewElements->selectedItems();
+ QString genericMsg = i18n( "\n\nEither LyX is not running or has not been correctly configured to send references to." );
+ QString title = i18n( "Error communicating with LyX" );
+
+ Settings * settings = Settings::self( m_bibtexfile );
+ QString lyxPipeFilename = settings->detectLyXInPipe();
+ kdDebug() << "sendSelectedToLyx: lyxPipeFilename= " << lyxPipeFilename << endl;
+
+ if ( lyxPipeFilename.isNull() )
+ KMessageBox::error( this, i18n( "Cannot determine how to send references to LyX." ).append( genericMsg ), title );
+ else
+ {
+ QFile pipe( lyxPipeFilename );
+ if ( !pipe.exists() )
+ KMessageBox::error( this, i18n( "The inpipe as configured in LyX does not exist." ).append( genericMsg ), title );
+ else
+ {
+ if ( !pipe.open( IO_WriteOnly ) )
+ KMessageBox::error( this, i18n( "Cannot open the inpipe as configured in LyX." ).append( genericMsg ), title );
+ else
+ {
+ QStringList refsToSend;
+ for ( QValueList<BibTeX::Element*>::Iterator it = elements.begin(); it != elements.end(); ++it )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( entry != NULL ) refsToSend.append( entry->id() );
+ }
+
+ QTextStream * writer = new QTextStream( &pipe );
+ QString msg = "LYXCMD:kbibtex:citation-insert:" + refsToSend.join( "," );
+ *writer << msg << endl;
+ delete writer;
+ pipe.close();
+ }
+ }
+ }
+ }
+ }
+
+ void DocumentWidget::cutElements()
+ {
+ if ( !m_isReadOnly )
+ {
+ if ( m_editMode == emList )
+ {
+ m_listViewElements->cut();
+ }
+ else if ( m_editMode == emSource )
+ {
+ m_sourceView->cut();
+ }
+ slotModified();
+ }
+ }
+
+ void DocumentWidget::copyElements()
+ {
+ if ( m_editMode == emList )
+ {
+ m_listViewElements->copy();
+ }
+ else if ( m_editMode == emSource )
+ {
+ m_sourceView->copy();
+ }
+ }
+
+ void DocumentWidget::copyRefElements()
+ {
+ if ( m_editMode == emList )
+ {
+ m_listViewElements->copyReferences();
+ }
+ else if ( m_editMode == emSource )
+ {
+// TODO: Get selected text, parse text into BibTeX::File and join list of entries' ids
+ }
+ }
+
+ void DocumentWidget::pasteElements()
+ {
+ if ( !m_isReadOnly )
+ {
+ if ( m_editMode == emList )
+ {
+ if ( m_listViewElements->paste() )
+ slotModified();
+ }
+ else if ( m_editMode == emSource )
+ {
+ if ( m_sourceView->paste() )
+ slotModified();
+ }
+ }
+ }
+
+ void DocumentWidget::selectAll()
+ {
+ if ( m_editMode == emList )
+ m_listViewElements->selectAll();
+ else if ( m_editMode == emSource )
+ m_sourceView->selectAll();
+ }
+
+ void DocumentWidget::setReadOnly( bool isReadOnly )
+ {
+ m_isReadOnly = isReadOnly;
+ m_listViewElements->setReadOnly( m_isReadOnly );
+ m_sourceView->setReadOnly( m_isReadOnly );
+ m_sideBar->setReadOnly( m_isReadOnly );
+ }
+
+ void DocumentWidget::configureEditor()
+ {
+ m_sourceView->configureEditor();
+ }
+
+ void DocumentWidget::undoEditor()
+ {
+ m_sourceView->undo();
+ }
+
+ void DocumentWidget::find()
+ {
+ if ( m_editMode == emSource )
+ m_sourceView->find();
+ }
+ void DocumentWidget::findNext()
+ {
+ if ( m_editMode == emSource )
+ m_sourceView->findNext();
+ }
+
+ void DocumentWidget::slotShowProgress( int current, int total )
+ {
+ if ( m_progressDialog != NULL )
+ {
+ m_progressDialog->setProgress( current, total );
+ qApp->processEvents();
+ }
+ }
+
+ void DocumentWidget::startProgress( const QString & label, QObject * progressFrom )
+ {
+ m_progressDialog = new QProgressDialog( this );
+ m_progressDialog->setLabelText( label );
+ connect( progressFrom, SIGNAL( progress( int, int ) ), this, SLOT( slotShowProgress( int, int ) ) );
+ connect( m_progressDialog, SIGNAL( canceled() ), progressFrom, SLOT( cancel( ) ) );
+ QApplication::setOverrideCursor( Qt::waitCursor );
+ }
+
+ void DocumentWidget::endProgress( QObject * progressFrom )
+ {
+ disconnect( progressFrom, SIGNAL( progress( int, int ) ), this, SLOT( slotShowProgress( int, int ) ) );
+ disconnect( m_progressDialog, SIGNAL( canceled() ), progressFrom, SLOT( cancel( ) ) );
+ delete m_progressDialog;
+ m_progressDialog = NULL;
+ QApplication::restoreOverrideCursor();
+ }
+
+ void DocumentWidget::searchWebsites( const QString& searchURL, bool includeAuthor )
+ {
+ DocumentListViewItem * item = dynamic_cast<DocumentListViewItem*>( m_listViewElements->selectedItem() );
+ if ( item == NULL )
+ item = dynamic_cast<DocumentListViewItem*>( m_listViewElements->currentItem() );
+
+ if ( item != NULL )
+ searchWebsites( item->element(), searchURL, includeAuthor );
+ }
+
+ void DocumentWidget::searchWebsites( BibTeX::Element * element, const QString& searchURL, bool includeAuthor )
+ {
+ QString queryString = QString::null;
+
+ BibTeX::Entry* entry = dynamic_cast<BibTeX::Entry*>( element );
+ if ( entry != NULL )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftTitle );
+ if ( field && field->value() )
+ queryString = field->value() ->text();
+ if ( includeAuthor )
+ {
+ field = entry->getField( BibTeX::EntryField::ftAuthor );
+ if ( field && field->value() )
+ {
+ BibTeX::PersonContainer *personContainer = dynamic_cast<BibTeX::PersonContainer*>( field->value()->items.first() );
+ if ( personContainer != NULL )
+ {
+ QValueList<BibTeX::Person*> list = personContainer->persons;
+ for ( QValueList<BibTeX::Person*>::ConstIterator it = list.begin(); it != list.end(); ++it )
+ queryString = queryString.append( " " ).append(( *it )->lastName() );
+
+ }
+ }
+ }
+ }
+ else
+ {
+ BibTeX::Comment * comment = dynamic_cast<BibTeX::Comment*>( element );
+ if ( comment != NULL )
+ queryString = comment->text();
+ else
+ {
+ BibTeX::Macro * macro = dynamic_cast<BibTeX::Macro*>( element );
+ if ( macro != NULL && macro->value() )
+ queryString = macro->value() ->text();
+ else
+ kdDebug() << "Not yet supported" << endl;
+ }
+ }
+
+ if ( queryString != QString::null )
+ {
+ queryString = queryString.stripWhiteSpace().replace( '$', "" ).replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ).replace( '{', "" ).replace( '}', "" );
+ KURL url( QString( searchURL ).arg( queryString ) );
+ Settings::openUrl( url, this );
+ }
+ }
+
+ void DocumentWidget::onlineSearch()
+ {
+ if ( !m_isReadOnly )
+ {
+ BibTeX::FileExporter * exporter = new BibTeX::FileExporterBibTeX( );
+ QValueList<BibTeX::Entry*> list;
+ if ( WebQueryWizard::execute( this, list ) == QDialog::Accepted )
+ {
+ Settings * settings = Settings::self( m_bibtexfile );
+ for ( QValueList<BibTeX::Entry*>::Iterator it = list.begin(); it != list.end(); ++it )
+ {
+ ( *it )->setId( IdSuggestions::resolveConflict( m_bibtexfile, ( *it )->id() ) );
+ if ( m_editMode == emList )
+ m_listViewElements->insertItem( new BibTeX::Entry( *it ) );
+ else
+ {
+ QBuffer buffer;
+ buffer.open( IO_WriteOnly );
+ bool result = exporter->save( &buffer, *it );
+ buffer.close();
+ if ( result )
+ {
+ buffer.open( IO_ReadOnly );
+ QTextStream textStream( &buffer );
+ textStream.setEncoding( QTextStream::UnicodeUTF8 );
+ QString text = textStream.read();
+ buffer.close();
+ QStringList lines = QStringList::split( '\n', text );
+ for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
+ m_sourceView->insertLines( *it );
+ m_sourceView->insertLines( "" );
+ }
+
+ }
+ settings->addToCompletion( *it );
+ }
+
+ slotModified();
+ }
+ delete exporter;
+ }
+ }
+
+ void DocumentWidget::findDuplicates()
+ {
+ MergeElements *me = new MergeElements( this );
+ if ( me->mergeDuplicates( m_bibtexfile ) == QDialog::Accepted )
+ {
+ refreshBibTeXFile();
+ slotModified();
+ }
+ delete me;
+ }
+
+ void DocumentWidget::updateFromGUI()
+ {
+ BibTeX::File * file = NULL;
+ if ( currentPage() == m_sourceView )
+ file = m_sourceView->getBibTeXFile();
+ else if ( currentPage() == m_container )
+ file = m_listViewElements->getBibTeXFile();
+
+ if ( file != NULL && file != m_bibtexfile )
+ {
+ delete m_bibtexfile;
+ m_bibtexfile = file;
+ }
+ }
+
+ QString DocumentWidget::nextNewEntry()
+ {
+ QString name = QString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewEntry%1" ) ).arg( m_newElementCounter++ );
+
+ while ( m_bibtexfile->containsKey( name ) != NULL )
+ {
+ ++m_newElementCounter;
+ name = QString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewEntry%1" ) ).arg( m_newElementCounter++ );
+ }
+
+ return name;
+ }
+
+ KURL::List DocumentWidget::getEntryURLs( BibTeX::Entry *entry )
+ {
+ QStringList urls = entry->urls();
+ KURL::List result;
+
+ for ( QStringList::Iterator it = urls.begin(); it != urls.end(); ++it )
+ {
+ KURL url = Settings::locateFile( *it, m_bibtexfile->fileName, this );
+ if ( url.isValid() )
+ result.append( url );
+ }
+
+ return result;
+ }
+
+ void DocumentWidget::slotSelectionChanged()
+ {
+ int numSelected = 0;
+ QListViewItemIterator it( m_listViewElements, QListViewItemIterator::Selected );
+ while ( it.current() && numSelected < 3 )
+ {
+ numSelected++;
+ it++;
+ }
+
+ emit listViewSelectionChanged( numSelected );
+ }
+
+ BibTeX::FileImporter *DocumentWidget::fileImporterFactory( const QString &fileName )
+ {
+ Settings * settings = Settings::self( NULL );
+ BibTeX::FileImporter * importer = NULL;
+ BibTeX::File::FileFormat format = BibTeX::File::formatUndefined;
+
+ if ( fileName.endsWith( ".bib", FALSE ) )
+ format = BibTeX::File::formatBibTeX;
+ else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( fileName.endsWith( ".ref", FALSE ) || fileName.endsWith( ".refer", FALSE ) || fileName.endsWith( ".txt", FALSE ) || fileName.endsWith( ".rfr", FALSE ) ) )
+ format = BibTeX::File::formatEndNote;
+ else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( fileName.endsWith( ".isi", FALSE ) || fileName.endsWith( ".cgi", FALSE ) ) )
+ format = BibTeX::File::formatISI;
+ else if ( fileName.endsWith( ".ris", FALSE ) )
+ format = BibTeX::File::formatRIS;
+ else if ( fileName.endsWith( ".xml", FALSE ) )
+ {
+ QStringList options = QStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "MODS|EndNote XML|internal XML" : "internal XML" ) );
+ bool ok = false;
+ QString answer = KInputDialog::getItem( i18n( "Choose file format" ), QString( i18n( "Choose file format of file '%1':" ) ).arg( fileName ), options, 0, false, &ok, this );
+ if ( ok && !answer.isNull() && answer == "DocBook5" )
+ format = BibTeX::File::formatDocBook5;
+ else if ( ok && !answer.isNull() && answer == "MODS" )
+ format = BibTeX::File::formatMODS;
+ else if ( ok && !answer.isNull() && answer == "EndNote XML" )
+ format = BibTeX::File::formatEndNoteXML;
+ else if ( ok && !answer.isNull() && answer == "internal XML" )
+ format = BibTeX::File::formatXML;
+ }
+ else
+ {
+ QStringList options = QStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "BibTeX|EndNote|ISI|RIS" : "BibTeX|RIS" ) );
+ bool ok = false;
+ QString answer = KInputDialog::getItem( i18n( "Choose file format" ), QString( i18n( "Choose file format of file '%1':" ) ).arg( fileName ), options, 0, false, &ok, this );
+ if ( ok && !answer.isNull() && answer == "BibTeX" )
+ format = BibTeX::File::formatBibTeX;
+ else if ( ok && !answer.isNull() && answer == "EndNote" )
+ format = BibTeX::File::formatEndNote;
+ else if ( ok && !answer.isNull() && answer == "ISI" )
+ format = BibTeX::File::formatISI;
+ else if ( ok && !answer.isNull() && answer == "RIS" )
+ format = BibTeX::File::formatRIS;
+ }
+
+ if ( format != BibTeX::File::formatUndefined )
+ {
+ Settings * settings = Settings::self( NULL );
+ switch ( format )
+ {
+ case BibTeX::File::formatBibTeX:
+ {
+ Settings * settings = Settings::self( NULL );
+ importer = new BibTeX::FileImporterBibTeX( settings->editing_FirstNameFirst, settings->fileIO_Encoding );
+ }
+ break;
+ case BibTeX::File::formatRIS:
+ {
+ if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && settings->fileIO_useBibUtils )
+ importer = new BibTeX::FileImporterBibUtils( BibTeX::File::formatRIS );
+ else
+ importer = new BibTeX::FileImporterRIS( );
+ break;
+ }
+ case BibTeX::File::formatEndNote:
+ case BibTeX::File::formatEndNoteXML:
+ case BibTeX::File::formatISI:
+ case BibTeX::File::formatMODS:
+ if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable )
+ importer = new BibTeX::FileImporterBibUtils( format );
+ break;
+ default:
+ {
+ KMessageBox::sorry( this, QString( i18n( "The file '%1' does not contain a known type of bibliography." ) ).arg( fileName ), i18n( "Unknown file format" ) );
+ }
+ }
+ }
+
+ return importer;
+ }
+
+ void DocumentWidget::slotPreviewElement( QListViewItem * item )
+ {
+ if ( item == NULL )
+ item = m_listViewElements->selectedItem();
+ if ( item == NULL )
+ item = m_listViewElements->currentItem();
+ if ( item != NULL )
+ {
+ DocumentListViewItem * dlvi = dynamic_cast<DocumentListViewItem*>( item );
+ if ( dlvi != NULL && m_listViewElements->isEnabled() )
+ {
+ BibTeX::Element *currentElement = dlvi->element()->clone();
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( currentElement );
+ if ( entry != NULL )
+ m_bibtexfile->completeReferencedFields( entry );
+
+ KStandardDirs * kstd = KGlobal::dirs();
+
+ BibTeX::XSLTransform *transform = new BibTeX::XSLTransform( kstd->findResource( "data", "kbibtexpart/xslt/html.xsl" ) );
+ if ( transform != NULL )
+ {
+ BibTeX::FileExporterXSLT * exporter = new BibTeX::FileExporterXSLT( transform );
+ QBuffer buffer;
+ buffer.open( IO_WriteOnly );
+ bool result = exporter->save( &buffer, currentElement );
+ buffer.close();
+
+ if ( result )
+ {
+ buffer.open( IO_ReadOnly );
+ QTextStream htmlTS( &buffer );
+ htmlTS.setEncoding( QTextStream::UnicodeUTF8 );
+ QString htmlText = htmlTS.read();
+ buffer.close();
+ QString text = htmlText.remove( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ).append( "</qt>" ).prepend( "<qt>" ).replace( QRegExp( "\\\\emph\\{([^}]+)\\}" ), "<em>\\1</em>" ).replace( QRegExp( "\\\\[A-Za-z0-9]+" ), "" ).replace( '{', "" ).replace( '}', "" );
+ m_preview->setText( text );
+ }
+ else
+ {
+ int i = ( int ) BibTeX::EntryField::ftTitle - ( int ) BibTeX::EntryField::ftAbstract + 2;
+ m_preview->setText( m_listViewElements->currentItem()->text( i ) );
+ }
+
+ delete exporter;
+ delete transform;
+ }
+ else
+ m_preview->setText( i18n( "No preview available" ) );
+
+ delete currentElement;
+ }
+ }
+ }
+
+ void DocumentWidget::slotTabChanged( QWidget *tab )
+ {
+ setEnabled( FALSE );
+ QApplication::setOverrideCursor( Qt::waitCursor );
+
+ BibTeX::File *bibTeXFile = NULL;
+ if ( m_editMode == emSource )
+ bibTeXFile = m_sourceView->getBibTeXFile();
+ else if ( m_editMode == emList )
+ bibTeXFile = m_listViewElements->getBibTeXFile();
+
+ if ( tab == m_sourceView && m_editMode != emSource )
+ {
+ // switching from list view to source view
+ if ( bibTeXFile != NULL )
+ {
+ // check whether the selected widget has changed the bibtex file
+ if ( bibTeXFile != m_bibtexfile )
+ {
+ delete m_bibtexfile;
+ m_bibtexfile = bibTeXFile;
+ }
+ m_sourceView->setBibTeXFile( m_bibtexfile );
+ }
+ m_editMode = emSource;
+
+ if ( m_actionEditCut && m_actionEditCopy && m_actionEditPaste )
+ {
+ m_actionEditCut->setEnabled( TRUE );
+ m_actionEditCopy->setEnabled( TRUE );
+ m_actionEditPaste->setEnabled( TRUE );
+ }
+ }
+ else if ( tab == m_container && m_editMode != emList )
+ {
+ // switching from source view to list view
+ if ( bibTeXFile != NULL )
+ {
+ // check whether the selected widget has changed the bibtex file
+ if ( bibTeXFile != m_bibtexfile )
+ {
+ delete m_bibtexfile;
+ m_bibtexfile = bibTeXFile;
+
+ Settings * settings = Settings::self( m_bibtexfile );
+ settings->addToCompletion( m_bibtexfile );
+ m_sideBar->refreshLists( m_bibtexfile );
+ }
+ m_listViewElements->setBibTeXFile( m_bibtexfile );
+ emit listViewSelectionChanged( 0 );
+ }
+ m_editMode = emList;
+ }
+
+ setEnabled( TRUE );
+
+ if ( tab == m_sourceView )
+ m_sourceView->setFocus();
+ else if ( tab == m_container )
+ m_listViewElements->setFocus();
+
+ if ( m_actionEditFind && m_actionEditFindNext )
+ {
+ m_actionEditFind->setEnabled( m_editMode == emSource );
+ m_actionEditFindNext->setEnabled( m_editMode == emSource );
+ }
+ if ( m_actionEditCopyRef )
+ m_actionEditCopyRef->setEnabled( m_editMode == emList );
+
+ QApplication::restoreOverrideCursor();
+
+ emit undoChanged( m_editMode == emSource );
+ }
+
+ void DocumentWidget::slotModified()
+ {
+ if ( isEnabled() )
+ {
+ m_sideBar->refreshLists( m_bibtexfile );
+ emit modified( );
+ }
+ }
+
+ void DocumentWidget::slotFileGotDirty( const QString& path )
+ {
+ if ( path == m_filename )
+ {
+ m_dirWatch.removeFile( m_filename );
+ QTimer::singleShot( 100, this, SLOT( slotRefreshDirtyFile( ) ) );
+ }
+ }
+
+ void DocumentWidget::slotRefreshDirtyFile()
+ {
+ if ( KMessageBox::questionYesNo( this, QString( i18n( "File '%1' has been modified. Reload file to import changes or ignore changes?" ) ).arg( m_filename ), i18n( "Reload file?" ), KGuiItem( i18n( "Reload" ), "reload" ), KGuiItem( i18n( "Ignore" ), "ignore" ) ) == KMessageBox::Yes )
+ open( m_filename, FALSE );
+ else
+ m_dirWatch.addFile( m_filename );
+ }
+
+ void DocumentWidget::slotViewDocument( int id )
+ {
+ Settings::openUrl( m_viewDocumentActionMenuURLs[ m_viewDocumentActionMenu->popupMenu() ->indexOf( id )], this );
+ }
+
+ void DocumentWidget::slotViewFirstDocument()
+ {
+ for ( QStringList::Iterator it = m_viewDocumentActionMenuURLs.begin(); it != m_viewDocumentActionMenuURLs.end(); ++it )
+ if (( *it ).endsWith( ".pdf" ) || ( *it ).endsWith( ".ps" ) || ( *it ).endsWith( ".djv" ) )
+ {
+ Settings::openUrl( *it, this );
+ break;
+ }
+ }
+
+ void DocumentWidget::slotViewFirstDocumentsOnlineRef()
+ {
+ for ( QStringList::Iterator it = m_viewDocumentActionMenuURLs.begin(); it != m_viewDocumentActionMenuURLs.end(); ++it )
+ if (( *it ).contains( "dx.doi.org" ) )
+ {
+ Settings::openUrl( *it, this );
+ break;
+ }
+ }
+
+ void DocumentWidget::slotAssignKeywords( int id )
+ {
+ QValueList<BibTeX::Entry*> entryList;
+
+ QListViewItem * item = m_listViewElements->selectedItem();
+ if ( item == NULL )
+ item = m_listViewElements->currentItem();
+ for ( QListViewItemIterator it( m_listViewElements, QListViewItemIterator::Selected ); it.current(); ++it )
+ {
+ BibTeX::Element * currentElement = NULL;
+ DocumentListViewItem * dlvi = dynamic_cast<DocumentListViewItem*>( it.current() );
+ if ( dlvi && (( currentElement = dlvi->element() ) != NULL ) )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( currentElement );
+ if ( entry != NULL )
+ entryList << entry;
+ }
+ }
+
+ for ( QValueList<BibTeX::Entry*>::Iterator it = entryList.begin(); it != entryList.end(); ++it )
+ {
+ BibTeX::Entry *entry = *it;
+ BibTeX::EntryField *field = NULL;
+ BibTeX::KeywordContainer *keywordContainer = NULL;
+ if (( field = entry->getField( BibTeX::EntryField::ftKeywords ) ) == NULL )
+ {
+ entry->addField( field = new BibTeX::EntryField( BibTeX::EntryField::ftKeywords ) );
+ }
+
+ BibTeX::Value *value = field->value();
+
+ if ( !value->items.isEmpty() )
+ keywordContainer = dynamic_cast<BibTeX::KeywordContainer*>( value->items.first() );
+
+ if ( keywordContainer == NULL )
+ value->items.append( keywordContainer = new BibTeX::KeywordContainer() );
+
+ if ( m_assignKeywordsActionMenu->popupMenu() ->isItemChecked( id ) )
+ keywordContainer->remove( m_assignKeywordsActionMenuURLs[ id ] );
+ else
+ keywordContainer->append( m_assignKeywordsActionMenuURLs[ id ] );
+
+ slotModified();
+ }
+ }
+
+ void DocumentWidget::slotAddKeyword()
+ {
+ QString newKeyword = m_lineEditNewKeyword->text();
+
+ QValueList<BibTeX::Entry*> entryList;
+ for ( QListViewItemIterator it( m_listViewElements, QListViewItemIterator::Selected ); it.current(); ++it )
+ {
+ BibTeX::Element * currentElement = NULL;
+ DocumentListViewItem * dlvi = dynamic_cast<DocumentListViewItem*>( it.current() );
+ if ( dlvi && (( currentElement = dlvi->element() ) != NULL ) )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( currentElement );
+ if ( entry != NULL )
+ entryList << entry;
+ }
+ }
+
+ for ( QValueList<BibTeX::Entry*>::Iterator it = entryList.begin(); it != entryList.end(); ++it )
+ {
+ BibTeX::Entry *entry = *it;
+ BibTeX::EntryField *field = entry->getField( BibTeX::EntryField::ftKeywords );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftKeywords );
+ entry->addField( field );
+ }
+
+ BibTeX::Value *value = field->value();
+ BibTeX::KeywordContainer *keywordContainer = NULL;
+
+ if ( !value->items.isEmpty() )
+ keywordContainer = dynamic_cast<BibTeX::KeywordContainer*>( value->items.first() );
+
+ if ( keywordContainer == NULL )
+ value->items.append( keywordContainer = new BibTeX::KeywordContainer() );
+
+ keywordContainer->append( newKeyword );
+ }
+
+ if ( !entryList.isEmpty() )
+ {
+ if ( m_lineEditNewKeyword->isVisible() &&
+ m_lineEditNewKeyword->parentWidget() &&
+ m_lineEditNewKeyword->parentWidget()->parentWidget() &&
+ m_lineEditNewKeyword->parentWidget()->parentWidget()->inherits( "QPopupMenu" ) )
+ m_lineEditNewKeyword->parentWidget()->parentWidget()->close();
+
+ slotModified();
+ }
+ }
+
+ void DocumentWidget::slotNormalizeIds()
+ {
+ Settings * settings = Settings::self();
+ QMap<BibTeX::Entry*, QString> entryToNewId;
+ QMap<BibTeX::Entry*, DocumentListViewItem*> entryToItem;
+ QStringList msgList;
+
+ if ( settings->idSuggestions_default < 0 )
+ {
+ KMessageBox::sorry( this, i18n( "You must set a default id suggestion in the settings dialog." ) );
+ return;
+ }
+
+ for ( QListViewItemIterator it( m_listViewElements, QListViewItemIterator::Selected ); it.current(); ++it )
+ {
+ BibTeX::Element * currentElement = NULL;
+ DocumentListViewItem * dlvi = dynamic_cast<DocumentListViewItem*>( it.current() );
+ if ( dlvi && (( currentElement = dlvi->element() ) != NULL ) )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( currentElement );
+ if ( entry != NULL )
+ {
+ QString newEntryId = IdSuggestions::createDefaultSuggestion( m_bibtexfile, entry );
+ entryToNewId[entry] = newEntryId;
+ entryToItem[entry] = dlvi;
+ msgList << "Replacing id of entry \"" + entry->id() + "\" with new id \"" + newEntryId + "\"";
+ }
+ }
+ }
+
+ if ( entryToNewId.isEmpty() )
+ KMessageBox::information( this, i18n( "No entries were selected." ) );
+ else if ( KMessageBox::questionYesNoList( this, i18n( "The following changes will be applied to the currently selected elements.\nConflicts with duplicate entry ids will be resolved when applying the new ids." ), msgList, i18n( "Normalize Entry Ids" ), KGuiItem( i18n( "Replace Entry Ids" ), "run" ), KGuiItem( i18n( "Cancel" ), "cancel" ) ) == KMessageBox::Yes )
+ {
+ QApplication::setOverrideCursor( Qt::waitCursor );
+ QMap<BibTeX::Entry*, DocumentListViewItem*>::Iterator itItem = entryToItem.begin();
+ for ( QMap<BibTeX::Entry*, QString>::Iterator it = entryToNewId.begin(); it != entryToNewId.end(); ++it, ++itItem )
+ {
+ BibTeX::Entry *entry = it.key();
+ QString newEntryId = it.data();
+ newEntryId = IdSuggestions::resolveConflict( m_bibtexfile, newEntryId, entry );
+ qDebug( "Replacing id of entry \"%s\" with new id \"%s\"", entry->id().latin1(), newEntryId.latin1() );
+ entry->setId( newEntryId );
+ itItem.data()->updateItem();
+ }
+ slotModified();
+ m_sideBar->refreshLists( m_bibtexfile );
+ QApplication::restoreOverrideCursor();
+ }
+ }
+
+ KDirWatch &DocumentWidget::dirWatch()
+ {
+ return m_dirWatch;
+ }
+
+}
+
+#include "documentwidget.moc"
diff --git a/src/documentwidget.h b/src/documentwidget.h
new file mode 100644
index 0000000..cc6e344
--- /dev/null
+++ b/src/documentwidget.h
@@ -0,0 +1,174 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXDOCUMENTWIDGET_H
+#define KBIBTEXDOCUMENTWIDGET_H
+
+#include <qtabwidget.h>
+
+#include <kdirwatch.h>
+
+#include <fileimporter.h>
+#include <file.h>
+#include <settings.h>
+
+class QIODevice;
+class QProgressDialog;
+class QListViewItem;
+class QWidget;
+class QSplitter;
+
+class KPopupMenu;
+class KActionMenu;
+class KURL;
+class KTextEdit;
+class KLineEdit;
+
+namespace KBibTeX
+{
+ class DocumentListView;
+ class DocumentListViewItem;
+ class DocumentSourceView;
+ class SearchBar;
+ class SideBar;
+ class WebQuery;
+
+ class DocumentWidget : public QTabWidget
+ {
+ Q_OBJECT
+ public:
+ DocumentWidget( bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~DocumentWidget();
+
+ bool open( const QString &fileName, bool mergeOnly = FALSE );
+ bool open( QIODevice *iodevice, bool mergeOnly = FALSE, const QString &label = QString::null, BibTeX::FileImporter *importer = NULL );
+ bool save( const QString &fileName, QStringList *errorLog = NULL );
+ bool save( QIODevice *iodevice, BibTeX::File::FileFormat format = BibTeX::File::formatBibTeX, const QString &label = QString::null, QStringList *errorLog = NULL );
+
+ bool newElement( const QString& elementType );
+ void searchWebsites( const QString& searchURL, bool includeAuthor );
+ void updateViews();
+ void showStatistics();
+
+ void setFactory( KXMLGUIFactory *factory, KXMLGUIClient *client );
+ void updateViewDocumentMenu( );
+ void updateAssignKeywords( );
+
+ void deferredInitialization();
+ void saveState();
+ void restoreState();
+
+ KDirWatch &dirWatch();
+
+ signals:
+ void modified();
+ void listViewSelectionChanged( int numSelected );
+ void undoChanged( bool undoAvailable );
+
+ public slots:
+ void executeElement( DocumentListViewItem* );
+ bool editElement();
+ bool editElement( DocumentListViewItem* );
+ bool editElement( BibTeX::Element* );
+ void deleteElements();
+ void sendSelectedToLyx();
+ void cutElements();
+ void copyElements();
+ void copyRefElements();
+ void pasteElements();
+ void selectAll();
+ void setReadOnly( bool isReadOnly );
+ void configureEditor();
+ void undoEditor();
+ void find();
+ void findNext();
+ void refreshBibTeXFile();
+ void onlineSearch();
+ void findDuplicates();
+ void slotViewFirstDocument();
+ void slotViewFirstDocumentsOnlineRef();
+ void slotNormalizeIds();
+
+ private:
+ enum EditMode
+ {
+ emList, emSource
+ };
+
+ KLineEdit *m_lineEditNewKeyword;
+ bool m_isReadOnly;
+ QSplitter *m_horSplitter;
+ QSplitter *m_vertSplitter;
+ QWidget *m_container;
+ SearchBar *m_searchBar;
+ DocumentListView *m_listViewElements;
+ KTextEdit * m_preview;
+ DocumentSourceView *m_sourceView;
+ SideBar* m_sideBar;
+ BibTeX::File *m_bibtexfile;
+ QString m_filename;
+ QProgressDialog *m_progressDialog;
+ int m_newElementCounter;
+ EditMode m_editMode;
+ KActionMenu *m_viewDocumentActionMenu;
+ KActionMenu *m_assignKeywordsActionMenu;
+ QStringList m_viewDocumentActionMenuURLs;
+ QMap<int, QString> m_assignKeywordsActionMenuURLs;
+ KActionMenu *m_searchWebsitesActionMenu;
+ KAction *m_actionEditCut;
+ KAction *m_actionEditCopy;
+ KAction *m_actionEditCopyRef;
+ KAction *m_actionEditPaste;
+ KAction *m_actionEditSelectAll;
+ KAction *m_actionEditFind;
+ KAction *m_actionEditFindNext;
+ KAction *m_actionNormalizeIds;
+ KDirWatch m_dirWatch;
+
+ void setupGUI();
+
+ void startProgress( const QString &label, QObject *progressFrom );
+ void endProgress( QObject *progressFrom );
+
+ void searchWebsites( BibTeX::Element *element, const QString& searchURL, bool includeAuthor );
+
+ bool editElementDialog( BibTeX::Element *element );
+ void updateFromGUI();
+ QString nextNewEntry();
+
+ KURL::List getEntryURLs( BibTeX::Entry *entry );
+
+ BibTeX::FileImporter *fileImporterFactory( const QString &fileName );
+
+ private slots:
+ void slotShowProgress( int current, int total );
+ void slotSelectionChanged();
+ void slotPreviewElement( QListViewItem * item = NULL );
+ void slotTabChanged( QWidget *tab );
+ void slotModified();
+ void slotFileGotDirty( const QString& path );
+ void slotRefreshDirtyFile();
+ void slotViewDocument( int id );
+ void slotAssignKeywords( int id );
+ void slotAddKeyword();
+ };
+
+}
+
+#endif
diff --git a/src/element.cpp b/src/element.cpp
new file mode 100644
index 0000000..73b3178
--- /dev/null
+++ b/src/element.cpp
@@ -0,0 +1,50 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qstring.h>
+
+#include <xsltransform.h>
+#include "element.h"
+
+namespace BibTeX
+{
+
+
+ Element::Element( )
+ {
+ // nothing
+ }
+
+ Element::~Element()
+ {
+ // nothing
+ }
+
+ bool Element::isSimpleString( const QString &text )
+ {
+ bool result = TRUE;
+ const QString goodChars = "abcdefghijklmnopqrstuvwxyz0123456789-_";
+
+ for ( unsigned int i = 0; result && i < text.length(); i++ )
+ result &= goodChars.contains( text.at( i ), FALSE );
+
+ return result;
+ }
+
+}
diff --git a/src/element.h b/src/element.h
new file mode 100644
index 0000000..1955383
--- /dev/null
+++ b/src/element.h
@@ -0,0 +1,49 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXELEMENT_H
+#define BIBTEXELEMENT_H
+
+#include <file.h>
+#include <entryfield.h>
+
+class QString;
+
+namespace BibTeX
+{
+
+ class Element
+ {
+ public:
+ enum FilterType {ftExact, ftEveryWord, ftAnyWord};
+
+ Element();
+ virtual ~Element();
+
+ virtual bool containsPattern( const QString& /* pattern */, BibTeX::EntryField::FieldType /* fieldType */, FilterType /* filterType */ = BibTeX::Element::ftExact, bool /* caseSensitive */ = false ) const = 0;
+ virtual Element* clone() = 0;
+ virtual QString text() const = 0;
+
+ static bool isSimpleString( const QString &text );
+
+ };
+
+}
+
+#endif
diff --git a/src/encoder.cpp b/src/encoder.cpp
new file mode 100644
index 0000000..394e7d0
--- /dev/null
+++ b/src/encoder.cpp
@@ -0,0 +1,25 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include "encoder.h"
+
+namespace BibTeX
+{
+// nothing
+}
diff --git a/src/encoder.h b/src/encoder.h
new file mode 100644
index 0000000..7997b8e
--- /dev/null
+++ b/src/encoder.h
@@ -0,0 +1,54 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXENCODER_H
+#define BIBTEXENCODER_H
+
+#include <entryfield.h>
+
+class QString;
+
+namespace BibTeX
+{
+
+ /**
+ @author Thomas Fischer
+ */
+ class Encoder
+ {
+ public:
+ virtual ~Encoder() { /* nothing */};
+
+ virtual QString decode( const QString & /*text*/ )
+ {
+ return QString::null;
+ };
+ virtual QString encode( const QString & /*text*/ )
+ {
+ return QString::null;
+ };
+ virtual QString encodeSpecialized( const QString & /*text*/, const EntryField::FieldType /*fieldType*/ = EntryField::ftUnknown )
+ {
+ return QString::null;
+ };
+ };
+
+}
+
+#endif
diff --git a/src/encoderlatex.cpp b/src/encoderlatex.cpp
new file mode 100644
index 0000000..f111848
--- /dev/null
+++ b/src/encoderlatex.cpp
@@ -0,0 +1,876 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qstring.h>
+#include <qapplication.h>
+#include <qregexp.h>
+
+#include "encoderlatex.h"
+
+namespace BibTeX
+{
+ EncoderLaTeX *EncoderLaTeX::encoderLaTeX = NULL;
+
+ static struct Decomposition
+ {
+ const char *latexCommand;
+ unsigned int unicode;
+ }
+ decompositions[] =
+ {
+ {"`", 0x0300},
+ {"'", 0x0301},
+ {"^", 0x0302},
+ {"~", 0x0303},
+ {"=", 0x0304},
+ /*{"x", 0x0305}, OVERLINE */
+ {"u", 0x0306},
+ {".", 0x0307},
+ /*{"x", 0x0309}, HOOK ABOVE */
+ {"r", 0x030a},
+ {"H", 0x030b},
+ {"v", 0x030c},
+ /*{"x", 0x030d}, VERTICAL LINE ABOVE */
+ /*{"x", 0x030e}, DOUBLE VERTICAL LINE ABOVE */
+ /*{"x", 0x030f}, DOUBLE GRAVE ACCENT */
+ /*{"x", 0x0310}, CANDRABINDU */
+ /*{"x", 0x0311}, INVERTED BREVE */
+ /*{"x", 0x0312}, TURNED COMMA ABOVE */
+ /*{"x", 0x0313}, COMMA ABOVE */
+ /*{"x", 0x0314}, REVERSED COMMA ABOVE */
+ /*{"x", 0x0315}, */
+ /*{"x", 0x0316}, */
+ /*{"x", 0x0317}, */
+ /*{"x", 0x0318}, */
+ /*{"x", 0x0319}, */
+ /*{"x", 0x031a}, */
+ /*{"x", 0x031b}, */
+ /*{"x", 0x031c}, */
+ /*{"x", 0x031d}, */
+ /*{"x", 0x031e}, */
+ /*{"x", 0x031f}, */
+ /*{"x", 0x0320}, */
+ /*{"x", 0x0321}, */
+ /*{"x", 0x0322}, */
+ {"d", 0x0323},
+ /*{"x", 0x0324}, */
+ /*{"x", 0x0325}, */
+ /*{"x", 0x0326}, */
+ {"d", 0x0327},
+ {"k", 0x0328},
+ /*{"x", 0x0329}, */
+ /*{"x", 0x032a}, */
+ /*{"x", 0x032b}, */
+ /*{"x", 0x032c}, */
+ /*{"x", 0x032d}, */
+ /*{"x", 0x032e}, */
+ /*{"x", 0x032f}, */
+ {"b", 0x0331},
+ {"t", 0x0361}
+ };
+
+ static const int decompositionscount = sizeof( decompositions ) / sizeof( decompositions[ 0 ] ) ;
+
+ static const struct EncoderLaTeXCommandMapping
+ {
+ const char *letters;
+ unsigned int unicode;
+ }
+ commandmappingdatalatex[] =
+ {
+ {"AA", 0x00C5},
+ {"AE", 0x00C6},
+ {"ss", 0x00DF},
+ {"aa", 0x00E5},
+ {"ae", 0x00E6},
+ {"OE", 0x0152},
+ {"oe", 0x0153},
+ {"ldots", 0x2026},
+ {"L", 0x0141},
+ {"l", 0x0142},
+ {"grqq", 0x201C},
+ {"glqq", 0x201E},
+ {"frqq", 0x00BB},
+ {"flqq", 0x00AB},
+
+// awk -F '[{}\\\\]+' '/DeclareUnicodeCharacter/ { print "{\""$4"\", 0x"$3"},"}' /usr/share/texmf-dist/tex/latex/base/t2aenc.dfu | grep '0x04' | sort -r -f
+ {"cyrzhdsc", 0x0497},
+ {"CYRZHDSC", 0x0496},
+ {"cyrzh", 0x0436},
+ {"CYRZH", 0x0416},
+ {"cyrzdsc", 0x0499},
+ {"CYRZDSC", 0x0498},
+ {"cyrz", 0x0437},
+ {"CYRZ", 0x0417},
+ {"cyryu", 0x044E},
+ {"CYRYU", 0x042E},
+ {"cyryo", 0x0451},
+ {"CYRYO", 0x0401},
+ {"cyryi", 0x0457},
+ {"CYRYI", 0x0407},
+ {"cyryhcrs", 0x04B1},
+ {"CYRYHCRS", 0x04B0},
+ {"cyrya", 0x044F},
+ {"CYRYA", 0x042F},
+ {"cyry", 0x04AF},
+ {"CYRY", 0x04AE},
+ {"cyrv", 0x0432},
+ {"CYRV", 0x0412},
+ {"cyrushrt", 0x045E},
+ {"CYRUSHRT", 0x040E},
+ {"cyru", 0x0443},
+ {"CYRU", 0x0423},
+ {"cyrtshe", 0x045B},
+ {"CYRTSHE", 0x040B},
+ {"cyrtdsc", 0x04AD},
+ {"CYRTDSC", 0x04AC},
+ {"cyrt", 0x0442},
+ {"CYRT", 0x0422},
+ {"cyrshha", 0x04BB},
+ {"CYRSHHA", 0x04BA},
+ {"cyrshch", 0x0449},
+ {"CYRSHCH", 0x0429},
+ {"cyrsh", 0x0448},
+ {"CYRSH", 0x0428},
+ {"cyrsftsn", 0x044C},
+ {"CYRSFTSN", 0x042C},
+ {"cyrsdsc", 0x04AB},
+ {"CYRSDSC", 0x04AA},
+ {"cyrschwa", 0x04D9},
+ {"CYRSCHWA", 0x04D8},
+ {"cyrs", 0x0441},
+ {"CYRS", 0x0421},
+ {"cyrr", 0x0440},
+ {"CYRR", 0x0420},
+ {"CYRpalochka", 0x04C0},
+ {"cyrp", 0x043F},
+ {"CYRP", 0x041F},
+ {"cyrotld", 0x04E9},
+ {"CYROTLD", 0x04E8},
+ {"cyro", 0x043E},
+ {"CYRO", 0x041E},
+ {"cyrnje", 0x045A},
+ {"CYRNJE", 0x040A},
+ {"cyrng", 0x04A5},
+ {"CYRNG", 0x04A4},
+ {"cyrndsc", 0x04A3},
+ {"CYRNDSC", 0x04A2},
+ {"cyrn", 0x043D},
+ {"CYRN", 0x041D},
+ {"cyrm", 0x043C},
+ {"CYRM", 0x041C},
+ {"cyrlje", 0x0459},
+ {"CYRLJE", 0x0409},
+ {"cyrl", 0x043B},
+ {"CYRL", 0x041B},
+ {"cyrkvcrs", 0x049D},
+ {"CYRKVCRS", 0x049C},
+ {"cyrkdsc", 0x049B},
+ {"CYRKDSC", 0x049A},
+ {"cyrk", 0x043A},
+ {"CYRK", 0x041A},
+ {"cyrje", 0x0458},
+ {"CYRJE", 0x0408},
+ {"cyrishrt", 0x0439},
+ {"CYRISHRT", 0x0419},
+ {"cyrii", 0x0456},
+ {"CYRII", 0x0406},
+ {"cyrie", 0x0454},
+ {"CYRIE", 0x0404},
+ {"cyri", 0x0438},
+ {"CYRI", 0x0418},
+ {"cyrhrdsn", 0x044A},
+ {"CYRHRDSN", 0x042A},
+ {"cyrhdsc", 0x04B3},
+ {"CYRHDSC", 0x04B2},
+ {"cyrh", 0x0445},
+ {"CYRH", 0x0425},
+ {"cyrgup", 0x0491},
+ {"CYRGUP", 0x0490},
+ {"cyrghcrs", 0x0493},
+ {"CYRGHCRS", 0x0492},
+ {"cyrg", 0x0433},
+ {"CYRG", 0x0413},
+ {"cyrf", 0x0444},
+ {"CYRF", 0x0424},
+ {"cyrery", 0x044B},
+ {"CYRERY", 0x042B},
+ {"cyrerev", 0x044D},
+ {"CYREREV", 0x042D},
+ {"cyre", 0x0435},
+ {"CYRE", 0x0415},
+ {"cyrdzhe", 0x045F},
+ {"CYRDZHE", 0x040F},
+ {"cyrdze", 0x0455},
+ {"CYRDZE", 0x0405},
+ {"cyrdje", 0x0452},
+ {"CYRDJE", 0x0402},
+ {"cyrd", 0x0434},
+ {"CYRD", 0x0414},
+ {"cyrchvcrs", 0x04B9},
+ {"CYRCHVCRS", 0x04B8},
+ {"cyrchrdsc", 0x04B7},
+ {"CYRCHRDSC", 0x04B6},
+ {"cyrch", 0x0447},
+ {"CYRCH", 0x0427},
+ {"cyrc", 0x0446},
+ {"CYRC", 0x0426},
+ {"cyrb", 0x0431},
+ {"CYRB", 0x0411},
+ {"cyrae", 0x04D5},
+ {"CYRAE", 0x04D4},
+ {"cyra", 0x0430},
+ {"CYRA", 0x0410}
+ };
+
+ static const int commandmappingdatalatexcount = sizeof( commandmappingdatalatex ) / sizeof( commandmappingdatalatex[ 0 ] ) ;
+
+ /** Command can be either
+ (1) {embraced}
+ (2) delimited by {},
+ (3) <space>, line end,
+ (4) \following_command (including \<space>, which must be maintained!),
+ (5) } (end of entry or group)
+ **/
+ const char *expansionsCmd[] = {"\\{\\\\%1\\}", "\\\\%1\\{\\}", "\\\\%1(\\n|\\r|\\\\|\\})", "\\\\%1\\s"};
+ static const int expansionscmdcount = sizeof( expansionsCmd ) / sizeof( expansionsCmd[0] );
+
+ static const struct EncoderLaTeXModCharMapping
+ {
+ const char *modifier;
+ const char *letter;
+ unsigned int unicode;
+ }
+ modcharmappingdatalatex[] =
+ {
+ {"\\\\`", "A", 0x00C0},
+ {"\\\\'", "A", 0x00C1},
+ {"\\\\\\^", "A", 0x00C2},
+ {"\\\\~", "A", 0x00C3},
+ {"\\\\\"", "A", 0x00C4},
+ {"\\\\r", "A", 0x00C5},
+ /** 0x00C6 */
+ {"\\\\c", "C", 0x00C7},
+ {"\\\\`", "E", 0x00C8},
+ {"\\\\'", "E", 0x00C9},
+ {"\\\\\\^", "E", 0x00CA},
+ {"\\\\\"", "E", 0x00CB},
+ {"\\\\`", "I", 0x00CC},
+ {"\\\\'", "I", 0x00CD},
+ {"\\\\\\^", "I", 0x00CE},
+ {"\\\\\"", "I", 0x00CF},
+ /** 0x00D0 */
+ {"\\\\~", "N", 0x00D1},
+ {"\\\\`", "O", 0x00D2},
+ {"\\\\'", "O", 0x00D3},
+ {"\\\\\\^", "O", 0x00D4},
+ /** 0x00D5 */
+ {"\\\\\"", "O", 0x00D6},
+ /** 0x00D7 */
+ {"\\\\", "O", 0x00D8},
+ {"\\\\`", "U", 0x00D9},
+ {"\\\\'", "U", 0x00DA},
+ {"\\\\\\^", "U", 0x00DB},
+ {"\\\\\"", "U", 0x00DC},
+ {"\\\\'", "Y", 0x00DD},
+ /** 0x00DE */
+ {"\\\\\"", "s", 0x00DF},
+ {"\\\\`", "a", 0x00E0},
+ {"\\\\'", "a", 0x00E1},
+ {"\\\\\\^", "a", 0x00E2},
+ {"\\\\~", "a", 0x00E3},
+ {"\\\\\"", "a", 0x00E4},
+ {"\\\\r", "a", 0x00E5},
+ /** 0x00E6 */
+ {"\\\\c", "c", 0x00E7},
+ {"\\\\`", "e", 0x00E8},
+ {"\\\\'", "e", 0x00E9},
+ {"\\\\\\^", "e", 0x00EA},
+ {"\\\\\"", "e", 0x00EB},
+ {"\\\\`", "i", 0x00EC},
+ {"\\\\'", "i", 0x00ED},
+ {"\\\\'", "\\\\i", 0x00ED},
+ {"\\\\\\^", "i", 0x00EE},
+ /** 0x00EF */
+ /** 0x00F0 */
+ {"\\\\~", "n", 0x00F1},
+ {"\\\\`", "o", 0x00F2},
+ {"\\\\'", "o", 0x00F3},
+ {"\\\\\\^", "o", 0x00F4},
+ /** 0x00F5 */
+ {"\\\\\"", "o", 0x00F6},
+ /** 0x00F7 */
+ {"\\\\", "o", 0x00F8},
+ {"\\\\`", "u", 0x00F9},
+ {"\\\\'", "u", 0x00FA},
+ {"\\\\\\^", "u", 0x00FB},
+ {"\\\\\"", "u", 0x00FC},
+ {"\\\\'", "y", 0x00FD},
+ /** 0x00FE */
+ /** 0x00FF */
+ /** 0x0100 */
+ /** 0x0101 */
+ {"\\\\u", "A", 0x0102},
+ {"\\\\u", "a", 0x0103},
+ /** 0x0104 */
+ /** 0x0105 */
+ {"\\\\'", "C", 0x0106},
+ {"\\\\'", "c", 0x0107},
+ /** 0x0108 */
+ /** 0x0109 */
+ /** 0x010A */
+ /** 0x010B */
+ {"\\\\v", "C", 0x010C},
+ {"\\\\v", "c", 0x010D},
+ {"\\\\v", "D", 0x010E},
+ /** 0x010F */
+ /** 0x0110 */
+ /** 0x0111 */
+ /** 0x0112 */
+ /** 0x0113 */
+ /** 0x0114 */
+ /** 0x0115 */
+ /** 0x0116 */
+ /** 0x0117 */
+ {"\\\\c", "E", 0x0118},
+ {"\\\\c", "e", 0x0119},
+ {"\\\\v", "E", 0x011A},
+ {"\\\\v", "e", 0x011B},
+ /** 0x011C */
+ /** 0x011D */
+ {"\\\\u", "G", 0x011E},
+ {"\\\\u", "g", 0x011F},
+ /** 0x0120 */
+ /** 0x0121 */
+ /** 0x0122 */
+ /** 0x0123 */
+ /** 0x0124 */
+ /** 0x0125 */
+ /** 0x0126 */
+ /** 0x0127 */
+ /** 0x0128 */
+ /** 0x0129 */
+ /** 0x012A */
+ /** 0x012B */
+ {"\\\\u", "I", 0x012C},
+ {"\\\\u", "i", 0x012D},
+ /** 0x012E */
+ /** 0x012F */
+ /** 0x0130 */
+ /** 0x0131 */
+ /** 0x0132 */
+ /** 0x0133 */
+ /** 0x0134 */
+ /** 0x0135 */
+ /** 0x0136 */
+ /** 0x0137 */
+ /** 0x0138 */
+ {"\\\\'", "L", 0x0139},
+ {"\\\\'", "l", 0x013A},
+ /** 0x013B */
+ /** 0x013C */
+ /** 0x013D */
+ /** 0x013E */
+ /** 0x013F */
+ /** 0x0140 */
+ /** 0x0141 */
+ /** 0x0142 */
+ {"\\\\'", "N", 0x0143},
+ {"\\\\'", "n", 0x0144},
+ /** 0x0145 */
+ /** 0x0146 */
+ {"\\\\v", "N", 0x0147},
+ {"\\\\v", "n", 0x0148},
+ /** 0x0149 */
+ /** 0x014A */
+ /** 0x014B */
+ /** 0x014C */
+ /** 0x014D */
+ {"\\\\u", "O", 0x014E},
+ {"\\\\u", "o", 0x014F},
+ {"\\\\H", "O", 0x0150},
+ {"\\\\H", "o", 0x0151},
+ /** 0x0152 */
+ /** 0x0153 */
+ {"\\\\'", "R", 0x0154},
+ {"\\\\'", "r", 0x0155},
+ /** 0x0156 */
+ /** 0x0157 */
+ {"\\\\v", "R", 0x0158},
+ {"\\\\v", "r", 0x0159},
+ {"\\\\'", "S", 0x015A},
+ {"\\\\'", "s", 0x015B},
+ /** 0x015C */
+ /** 0x015D */
+ {"\\\\c", "S", 0x015E},
+ {"\\\\c", "s", 0x015F},
+ {"\\\\v", "S", 0x0160},
+ {"\\\\v", "s", 0x0161},
+ /** 0x0162 */
+ /** 0x0163 */
+ {"\\\\v", "T", 0x0164},
+ /** 0x0165 */
+ /** 0x0166 */
+ /** 0x0167 */
+ /** 0x0168 */
+ /** 0x0169 */
+ /** 0x016A */
+ /** 0x016B */
+ {"\\\\u", "U", 0x016C},
+ {"\\\\u", "u", 0x016D},
+ {"\\\\r", "U", 0x016E},
+ {"\\\\r", "u", 0x016F},
+ /** 0x0170 */
+ /** 0x0171 */
+ /** 0x0172 */
+ /** 0x0173 */
+ /** 0x0174 */
+ /** 0x0175 */
+ /** 0x0176 */
+ /** 0x0177 */
+ {"\\\\\"", "Y", 0x0178},
+ {"\\\\'", "Z", 0x0179},
+ {"\\\\'", "z", 0x017A},
+ /** 0x017B */
+ /** 0x017C */
+ {"\\\\v", "Z", 0x017D},
+ {"\\\\v", "z", 0x017E},
+ /** 0x017F */
+ /** 0x0180 */
+ {"\\\\v", "A", 0x01CD},
+ {"\\\\v", "a", 0x01CE},
+ {"\\\\v", "G", 0x01E6},
+ {"\\\\v", "g", 0x01E7}
+ };
+
+ const char *expansionsMod1[] = {"\\{%1\\{%2\\}\\}", "\\{%1 %2\\}", "%1\\{%2\\}"};
+ static const int expansionsmod1count = sizeof( expansionsMod1 ) / sizeof( expansionsMod1[0] );
+ const char *expansionsMod2[] = {"\\{%1%2\\}", "%1%2\\{\\}", "%1%2"};
+ static const int expansionsmod2count = sizeof( expansionsMod2 ) / sizeof( expansionsMod2[0] );
+
+ static const int modcharmappingdatalatexcount = sizeof( modcharmappingdatalatex ) / sizeof( modcharmappingdatalatex[ 0 ] ) ;
+
+ static const struct EncoderLaTeXCharMapping
+ {
+ const char *regexp;
+ unsigned int unicode;
+ const char *latex;
+ }
+ charmappingdatalatex[] =
+ {
+ {"\\\\#", 0x0023, "\\#"},
+ {"\\\\&", 0x0026, "\\&"},
+ {"\\\\_", 0x005F, "\\_"},
+ {"!`", 0x00A1, "!`"},
+ {"\"<", 0x00AB, "\"<"},
+ {"\">", 0x00BB, "\">"},
+ {"[?]`", 0x00BF, "?`"},
+ {"--", 0x2013, "--"}
+ };
+
+ static const int charmappingdatalatexcount = sizeof( charmappingdatalatex ) / sizeof( charmappingdatalatex[ 0 ] ) ;
+
+ EncoderLaTeX::EncoderLaTeX()
+ {
+ buildCharMapping();
+ buildCombinedMapping();
+ }
+
+ EncoderLaTeX::~EncoderLaTeX()
+ {
+ // nothing
+ }
+
+ QString EncoderLaTeX::decode( const QString & text )
+ {
+ const QString splitMarker = "|KBIBTEX|";
+
+ /** start-stop marker ensures that each text starts and stops
+ * with plain text and not with an inline math environment.
+ * This invariant is exploited implicitly in the code below. */
+ const QString startStopMarker="|STARTSTOP|";
+ QString result = startStopMarker + text + startStopMarker;
+
+ /** Collect (all?) urls from the BibTeX file and store them in urls */
+ /** Problem is that the replace function below will replace
+ * character sequences in the URL rendering the URL invalid.
+ * Later, all URLs will be replaced back to their original
+ * in the hope nothing breaks ... */
+ QStringList urls;
+ QRegExp httpRegExp( "(ht|f)tp://[^\"} ]+" );
+ httpRegExp.setMinimal( false );
+ int pos = 0;
+ while ( pos >= 0 )
+ {
+ pos = httpRegExp.search( result, pos );
+ if ( pos >= 0 )
+ {
+ ++pos;
+ QString url = httpRegExp.cap( 0 );
+ urls << url;
+ }
+ }
+
+ decomposedUTF8toLaTeX( result );
+
+ /** split text into math and non-math regions */
+ QStringList intermediate = QStringList::split( '$', result, true );
+ QStringList::Iterator it = intermediate.begin();
+ while ( it != intermediate.end() )
+ {
+ /**
+ * Sometimes we split strings like "\$", which is not intended.
+ * So, we have to manually fix things by checking for strings
+ * ending with "\" and append both the removed dollar sign and
+ * the following string (which was never supposed to be an
+ * independent string). Finally, we remove the unnecessary
+ * string and continue.
+ */
+ if (( *it ).endsWith( "\\" ) )
+ {
+ QStringList::Iterator cur = it;
+ ++it;
+ ( *cur ).append( '$' ).append( *it );
+ intermediate.remove( it );
+ it = cur;
+ }
+ else
+ ++it;
+ }
+
+ qApp->processEvents();
+
+ result = "";
+ for ( QStringList::Iterator it = intermediate.begin(); it != intermediate.end(); ++it )
+ {
+ if ( !result.isEmpty() ) result.append( splitMarker );
+ result.append( *it );
+
+ ++it;
+ if ( it == intermediate.end() )
+ break;
+
+ if (( *it ).length() > 256 )
+ qDebug( "Very long math equation using $ found, maybe due to broken inline math: %s", ( *it ).left( 48 ).latin1() );
+ }
+
+ qApp->processEvents();
+
+ for ( QValueList<CharMappingItem>::ConstIterator cmit = m_charMapping.begin(); cmit != m_charMapping.end(); ++cmit )
+ result.replace(( *cmit ).regExp, ( *cmit ).unicode );
+
+ qApp->processEvents();
+
+ QStringList transformed = QStringList::split( splitMarker, result, true );
+
+ qApp->processEvents();
+
+ result = "";
+ for ( QStringList::Iterator itt = transformed.begin(), iti = intermediate.begin(); itt != transformed.end() && iti != intermediate.end(); ++itt, ++iti )
+ {
+ result.append( *itt );
+
+ ++iti;
+ if ( iti == intermediate.end() )
+ break;
+
+ result.append( "$" ).append( *iti ).append( "$" );
+ }
+
+ qApp->processEvents();
+
+ /** Reinserting original URLs as explained above */
+ pos = 0;
+ int idx = 0;
+ while ( pos >= 0 )
+ {
+ pos = httpRegExp.search( result, pos );
+ if ( pos >= 0 )
+ {
+ ++pos;
+ int len = httpRegExp.cap( 0 ).length();
+ result = result.left( pos - 1 ).append( urls[idx++] ).append( result.mid( pos + len - 1 ) );
+ }
+ }
+
+ return result.replace( startStopMarker,"" );
+ }
+
+ QString EncoderLaTeX::encode( const QString & text )
+ {
+ const QString splitMarker = "|KBIBTEX|";
+
+ /** start-stop marker ensures that each text starts and stops
+ * with plain text and not with an inline math environment.
+ * This invariant is exploited implicitly in the code below. */
+ const QString startStopMarker="|STARTSTOP|";
+ QString result = startStopMarker + text + startStopMarker;
+
+ /** Collect (all?) urls from the BibTeX file and store them in urls */
+ /** Problem is that the replace function below will replace
+ * character sequences in the URL rendering the URL invalid.
+ * Later, all URLs will be replaced back to their original
+ * in the hope nothing breaks ... */
+ QStringList urls;
+ QRegExp httpRegExp( "(ht|f)tp://[^\"} ]+" );
+ httpRegExp.setMinimal( false );
+ int pos = 0;
+ while ( pos >= 0 )
+ {
+ pos = httpRegExp.search( result, pos );
+ if ( pos >= 0 )
+ {
+ ++pos;
+ QString url = httpRegExp.cap( 0 );
+ urls << url;
+ }
+ }
+
+ /** split text into math and non-math regions */
+ QStringList intermediate = QStringList::split( '$', result, true );
+ QStringList::Iterator it = intermediate.begin();
+ while ( it != intermediate.end() )
+ {
+ /**
+ * Sometimes we split strings like "\$", which is not intended.
+ * So, we have to manually fix things by checking for strings
+ * ending with "\" and append both the removed dollar sign and
+ * the following string (which was never supposed to be an
+ * independent string). Finally, we remove the unnecessary
+ * string and continue.
+ */
+ if (( *it ).endsWith( "\\" ) )
+ {
+ QStringList::Iterator cur = it;
+ ++it;
+ ( *cur ).append( '$' ).append( *it );
+ intermediate.remove( it );
+ it = cur;
+ }
+ else
+ ++it;
+ }
+
+ qApp->processEvents();
+
+ result = "";
+ for ( QStringList::Iterator it = intermediate.begin(); it != intermediate.end(); ++it )
+ {
+ if ( !result.isEmpty() ) result.append( splitMarker );
+ result.append( *it );
+
+ ++it;
+ if ( it == intermediate.end() )
+ break;
+
+ if (( *it ).length() > 256 )
+ qDebug( "Very long math equation using $ found, maybe due to broken inline math: %s", ( *it ).left( 48 ).latin1() );
+ }
+
+ qApp->processEvents();
+
+ for ( QValueList<CharMappingItem>::ConstIterator cmit = m_charMapping.begin(); cmit != m_charMapping.end(); ++cmit )
+ result.replace(( *cmit ).unicode, ( *cmit ).latex );
+
+ qApp->processEvents();
+
+ QStringList transformed = QStringList::split( splitMarker, result, true );
+
+ qApp->processEvents();
+
+ result = "";
+ for ( QStringList::Iterator itt = transformed.begin(), iti = intermediate.begin(); itt != transformed.end() && iti != intermediate.end(); ++itt, ++iti )
+ {
+ result.append( *itt );
+
+ ++iti;
+ if ( iti == intermediate.end() )
+ break;
+
+ result.append( "$" ).append( *iti ).append( "$" );
+ }
+
+ qApp->processEvents();
+
+ /** \url accepts unquotet & and _
+ May introduce new problem tough */
+ if ( result.contains( "\\url{" ) )
+ result.replace( "\\&", "&" ).replace( "\\_", "_" ).replace( QChar( 0x2013 ), "--" ).replace( "\\#", "#" );
+
+ decomposedUTF8toLaTeX( result );
+
+ /** Reinserting original URLs as explained above */
+ pos = 0;
+ int idx = 0;
+ while ( pos >= 0 )
+ {
+ pos = httpRegExp.search( result, pos );
+ if ( pos >= 0 )
+ {
+ ++pos;
+ int len = httpRegExp.cap( 0 ).length();
+ result = result.left( pos - 1 ).append( urls[idx++] ).append( result.mid( pos + len - 1 ) );
+ }
+ }
+
+ return result.replace( startStopMarker,"" );
+ }
+
+ QString EncoderLaTeX::encode( const QString &text, const QChar &replace )
+ {
+ QString result = text;
+ for ( QValueList<CharMappingItem>::ConstIterator it = m_charMapping.begin(); it != m_charMapping.end(); ++it )
+ if (( *it ).unicode == replace )
+ result.replace(( *it ).unicode, ( *it ).latex );
+ return result;
+ }
+
+ QString EncoderLaTeX::encodeSpecialized( const QString & text, const EntryField::FieldType fieldType )
+ {
+ QString result = encode( text );
+
+ switch ( fieldType )
+ {
+ case EntryField::ftPages:
+ result.replace( QChar( 0x2013 ), "--" );
+ break;
+
+ case EntryField::ftURL:
+ result.replace( "\\&", "&" ).replace( "\\_", "_" ).replace( QChar( 0x2013 ), "--" ).replace( "\\#", "#" );
+ break;
+
+ default:
+ break;
+ }
+
+ return result;
+ }
+
+ QString& EncoderLaTeX::decomposedUTF8toLaTeX( QString &text )
+ {
+ for ( QValueList<CombinedMappingItem>::Iterator it = m_combinedMapping.begin(); it != m_combinedMapping.end(); ++it )
+ {
+ int i = ( *it ).regExp.search( text );
+ while ( i >= 0 )
+ {
+ QString a = ( *it ).regExp.cap( 1 );
+ text = text.left( i ) + "\\" + ( *it ).latex + "{" + a + "}" + text.mid( i + 2 );
+ i = ( *it ).regExp.search( text, i + 1 );
+ }
+ }
+
+ return text;
+ }
+
+ void EncoderLaTeX::buildCombinedMapping()
+ {
+ for ( int i = 0; i < decompositionscount; i++ )
+ {
+ CombinedMappingItem item;
+ item.regExp = QRegExp( "(.)" + QString( QChar( decompositions[i].unicode ) ) );
+ item.latex = decompositions[i].latexCommand;
+ m_combinedMapping.append( item );
+ }
+ }
+
+ void EncoderLaTeX::buildCharMapping()
+ {
+ /** encoding and decoding for digraphs such as -- or ?` */
+ for ( int i = 0; i < charmappingdatalatexcount; i++ )
+ {
+ CharMappingItem charMappingItem;
+ charMappingItem.regExp = QRegExp( charmappingdatalatex[ i ].regexp );
+ charMappingItem.unicode = QChar( charmappingdatalatex[ i ].unicode );
+ charMappingItem.latex = QString( charmappingdatalatex[ i ].latex );
+ m_charMapping.append( charMappingItem );
+ }
+
+ /** encoding and decoding for commands such as \AA or \ss */
+ for ( int i = 0; i < commandmappingdatalatexcount; ++i )
+ {
+ /** different types of writing such as {\AA} or \AA{} possible */
+ for ( int j = 0; j < expansionscmdcount; ++j )
+ {
+ CharMappingItem charMappingItem;
+ charMappingItem.regExp = QRegExp( QString( expansionsCmd[j] ).arg( commandmappingdatalatex[i].letters ) );
+ charMappingItem.unicode = QChar( commandmappingdatalatex[i].unicode );
+ if ( charMappingItem.regExp.numCaptures() > 0 )
+ charMappingItem.unicode += QString( "\\1" );
+ charMappingItem.latex = QString( "{\\%1}" ).arg( commandmappingdatalatex[i].letters );
+ m_charMapping.append( charMappingItem );
+ }
+ }
+
+ /** encoding and decoding for letters such as \"a */
+ for ( int i = 0; i < modcharmappingdatalatexcount; ++i )
+ {
+ QString modifierRegExp = QString( modcharmappingdatalatex[i].modifier );
+ QString modifier = modifierRegExp;
+ modifier.replace( "\\^", "^" ).replace( "\\\\", "\\" );
+
+ /** first batch of replacement rules, where no separator is required between modifier and character (e.g. \"a) */
+ if ( !modifierRegExp.at( modifierRegExp.length() - 1 ).isLetter() )
+ for ( int j = 0; j < expansionsmod2count; ++j )
+ {
+ CharMappingItem charMappingItem;
+ charMappingItem.regExp = QRegExp( QString( expansionsMod2[j] ).arg( modifierRegExp ).arg( modcharmappingdatalatex[i].letter ) );
+ charMappingItem.unicode = QChar( modcharmappingdatalatex[i].unicode );
+ charMappingItem.latex = QString( "{%1%2}" ).arg( modifier ).arg( modcharmappingdatalatex[i].letter );
+ m_charMapping.append( charMappingItem );
+ }
+
+ /** second batch of replacement rules, where a separator is required between modifier and character (e.g. \v{g}) */
+ for ( int j = 0; j < expansionsmod1count; ++j )
+ {
+ CharMappingItem charMappingItem;
+ charMappingItem.regExp = QRegExp( QString( expansionsMod1[j] ).arg( modifierRegExp ).arg( modcharmappingdatalatex[i].letter ) );
+ charMappingItem.unicode = QChar( modcharmappingdatalatex[i].unicode );
+ charMappingItem.latex = QString( "%1{%2}" ).arg( modifier ).arg( modcharmappingdatalatex[i].letter );
+ m_charMapping.append( charMappingItem );
+ }
+ }
+ }
+
+ EncoderLaTeX* EncoderLaTeX::currentEncoderLaTeX()
+ {
+ if ( encoderLaTeX == NULL )
+ encoderLaTeX = new EncoderLaTeX();
+
+ return encoderLaTeX;
+ }
+
+ void EncoderLaTeX::deleteCurrentEncoderLaTeX()
+ {
+ if ( encoderLaTeX != NULL )
+ {
+ delete encoderLaTeX;
+ encoderLaTeX = NULL;
+ }
+ }
+
+ char EncoderLaTeX::unicodeToASCII( unsigned int unicode )
+ {
+ if ( unicode < 128 ) return ( char )unicode;
+ for ( int i = 0; i < modcharmappingdatalatexcount; ++i )
+ if ( modcharmappingdatalatex[i].unicode == unicode )
+ return *modcharmappingdatalatex[i].letter;
+ return '?';
+ }
+
+}
diff --git a/src/encoderlatex.h b/src/encoderlatex.h
new file mode 100644
index 0000000..d301652
--- /dev/null
+++ b/src/encoderlatex.h
@@ -0,0 +1,78 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef ENCODERLATEX_H
+#define ENCODERLATEX_H
+
+#include <qvaluelist.h>
+#include <qregexp.h>
+
+#include <encoder.h>
+#include <entry.h>
+
+class QString;
+
+namespace BibTeX
+{
+
+ class EncoderLaTeX: public Encoder
+ {
+ public:
+ EncoderLaTeX();
+ ~EncoderLaTeX();
+
+ QString decode( const QString &text );
+ QString encode( const QString &text );
+ QString encode( const QString &text, const QChar &replace );
+ QString encodeSpecialized( const QString &text, const EntryField::FieldType fieldType = EntryField::ftUnknown );
+ QString& decomposedUTF8toLaTeX( QString &text );
+
+ static EncoderLaTeX *currentEncoderLaTeX();
+ static void deleteCurrentEncoderLaTeX();
+
+ static char unicodeToASCII( unsigned int unicode );
+
+ private:
+ static EncoderLaTeX *encoderLaTeX;
+
+ struct CombinedMappingItem
+ {
+ QRegExp regExp;
+ QString latex;
+ };
+
+ QValueList<CombinedMappingItem> m_combinedMapping;
+
+ void buildCombinedMapping();
+
+ struct CharMappingItem
+ {
+ QRegExp regExp;
+ QString unicode;
+ QString latex;
+ };
+
+ QValueList<CharMappingItem> m_charMapping;
+
+ void buildCharMapping();
+ };
+
+}
+
+#endif // ENCODERLATEX_H
diff --git a/src/encoderxml.cpp b/src/encoderxml.cpp
new file mode 100644
index 0000000..bbb76dd
--- /dev/null
+++ b/src/encoderxml.cpp
@@ -0,0 +1,127 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qregexp.h>
+
+#include "encoderxml.h"
+
+namespace BibTeX
+{
+ EncoderXML *encoderXML = NULL;
+
+ static const struct EncoderXMLCharMapping
+ {
+ const char *regexp;
+ unsigned int unicode;
+ const char *latex;
+ }
+ charmappingdataxml[] =
+ {
+ {"&amp;", 0x0026, "&amp;"},
+ {"&lt;", 0x003C, "&lt;"},
+ {"&gt;", 0x003E, "&gt;"}
+ };
+ static const int charmappingdataxmlcount = sizeof( charmappingdataxml ) / sizeof( charmappingdataxml[ 0 ] ) ;
+
+ EncoderXML::EncoderXML()
+ : Encoder()
+ {
+ buildCharMapping();
+ }
+
+
+ EncoderXML::~EncoderXML()
+ {
+ // nothing
+ }
+
+ QString EncoderXML::decode( const QString &text )
+ {
+ QString result = text;
+
+ for ( QValueList<CharMappingItem>::ConstIterator it = m_charMapping.begin(); it != m_charMapping.end(); ++it )
+ result.replace(( *it ).regExp, ( *it ).unicode );
+
+ /**
+ * Find and replace all characters written as hexadecimal number
+ */
+ int p = -1;
+ while (( p = result.find( "&#x", p + 1 ) ) >= 0 )
+ {
+ int p2 = result.find( ";", p + 1 );
+ if ( p2 < 0 ) break;
+ bool ok = FALSE;
+ int hex = result.mid( p + 3, p2 - p - 3 ).toInt( &ok, 16 );
+ if ( ok && hex > 0 )
+ result.replace( result.mid( p, p2 - p + 1 ), QChar( hex ) );
+ }
+
+ /**
+ * Find and replace all characters written as decimal number
+ */
+ p = -1;
+ while (( p = result.find( "&#", p + 1 ) ) >= 0 )
+ {
+ int p2 = result.find( ";", p + 1 );
+ if ( p2 < 0 ) break;
+ bool ok = FALSE;
+ int dec = result.mid( p + 2, p2 - p - 2 ).toInt( &ok, 10 );
+ if ( ok && dec > 0 )
+ result.replace( result.mid( p, p2 - p + 1 ), QChar( dec ) );
+ }
+
+ return result;
+ }
+
+ QString EncoderXML::encode( const QString &text )
+ {
+ QString result = text;
+
+ for ( QValueList<CharMappingItem>::ConstIterator it = m_charMapping.begin(); it != m_charMapping.end(); ++it )
+ result.replace(( *it ).unicode, ( *it ).latex );
+
+ return result;
+ }
+
+ QString EncoderXML::encodeSpecialized( const QString &text, const EntryField::FieldType /* fieldType */ )
+ {
+ return encode( text );
+ }
+
+ void EncoderXML::buildCharMapping()
+ {
+ for ( int i = 0; i < charmappingdataxmlcount; i++ )
+ {
+ CharMappingItem charMappingItem;
+ charMappingItem.regExp = QRegExp( charmappingdataxml[ i ].regexp );
+ charMappingItem.unicode = QChar( charmappingdataxml[ i ].unicode );
+ charMappingItem.latex = QString( charmappingdataxml[ i ].latex );
+ m_charMapping.append( charMappingItem );
+ }
+ }
+
+ EncoderXML *EncoderXML::currentEncoderXML()
+ {
+ if ( encoderXML == NULL )
+ encoderXML = new EncoderXML();
+
+ return encoderXML;
+ }
+
+}
diff --git a/src/encoderxml.h b/src/encoderxml.h
new file mode 100644
index 0000000..89e1be1
--- /dev/null
+++ b/src/encoderxml.h
@@ -0,0 +1,64 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXENCODERXML_H
+#define BIBTEXENCODERXML_H
+
+#include <qptrlist.h>
+#include <qregexp.h>
+
+#include <encoder.h>
+
+class QString;
+class QRegExp;
+
+namespace BibTeX
+{
+
+ /**
+ @author Thomas Fischer
+ */
+ class EncoderXML : public Encoder
+ {
+ public:
+ EncoderXML();
+ ~EncoderXML();
+
+ QString decode( const QString &text );
+ QString encode( const QString &text );
+ QString encodeSpecialized( const QString &text, const EntryField::FieldType fieldType = EntryField::ftUnknown );
+
+ static EncoderXML *currentEncoderXML();
+
+ private:
+ struct CharMappingItem
+ {
+ QRegExp regExp;
+ QChar unicode;
+ QString latex;
+ };
+
+ QValueList<CharMappingItem> m_charMapping;
+
+ void buildCharMapping();
+ };
+
+}
+
+#endif
diff --git a/src/entry.cpp b/src/entry.cpp
new file mode 100644
index 0000000..fcd81fd
--- /dev/null
+++ b/src/entry.cpp
@@ -0,0 +1,714 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qregexp.h>
+
+#include <entry.h>
+#include <file.h>
+#include <xsltransform.h>
+#include <entryfield.h>
+
+#define max(a,b) ((a)>(b)?(a):(b))
+
+namespace BibTeX
+{
+
+ Entry::Entry( )
+ : Element(), m_entryType( etUnknown ), m_entryTypeString( QString::null ), m_id( QString::null )
+ {
+ // nothing
+ }
+
+ Entry::Entry( const EntryType entryType, const QString &id )
+ : Element( ), m_entryType( entryType ), m_id( id )
+ {
+ m_entryTypeString = entryTypeToString( entryType );
+ }
+
+ Entry::Entry( const QString& entryTypeString, const QString& id ) : Element( ), m_entryTypeString( entryTypeString ), m_id( id )
+ {
+ m_entryType = entryTypeFromString( entryTypeString );
+ if ( m_entryType != etUnknown )
+ m_entryTypeString = entryTypeToString( m_entryType );
+ }
+
+ Entry::Entry( const Entry *other )
+ {
+ copyFrom( other );
+ }
+
+ Entry::~Entry()
+ {
+ for ( EntryFields::iterator it = m_fields.begin(); it != m_fields.end(); it++ )
+ {
+ delete( *it );
+ }
+ }
+
+ Element* Entry::clone()
+ {
+ return new Entry( this );
+ }
+
+ bool Entry::equals( const Entry &other )
+ {
+ if ( other.id().compare( id() ) != 0 )
+ return false;
+
+ for ( EntryFields::iterator it = m_fields.begin(); it != m_fields.end(); it++ )
+ {
+ EntryField *field1 = *it;
+ EntryField *field2 = other.getField( field1->fieldTypeName() );
+
+ if ( field2 == NULL || field1->value() == NULL || field2->value() == NULL || field1->value()->text().compare( field2->value()->text() ) != 0 )
+ return false;
+ }
+
+ return true;
+ }
+
+ QString Entry::text() const
+ {
+ QString result = "Id: ";
+ result.append( m_id ).append( " (" ).append( entryTypeString() ).append( ")\n" );
+
+ for ( EntryFields::ConstIterator it = m_fields.begin(); it != m_fields.end(); it++ )
+ {
+ result.append(( *it )->fieldTypeName() ).append( ": " );
+ result.append(( *it )->value()->text() ).append( "\n" );
+ }
+
+ return result;
+ }
+
+ void Entry::setEntryType( const EntryType entryType )
+ {
+ m_entryType = entryType;
+ m_entryTypeString = entryTypeToString( entryType );
+ }
+
+ void Entry::setEntryTypeString( const QString& entryTypeString )
+ {
+ m_entryTypeString = entryTypeString;
+ m_entryType = entryTypeFromString( entryTypeString );
+ }
+
+ Entry::EntryType Entry::entryType() const
+ {
+ return m_entryType;
+ }
+
+ QString Entry::entryTypeString() const
+ {
+ return m_entryTypeString;
+ }
+
+ void Entry::setId( const QString& id )
+ {
+ m_id = id;
+ }
+
+ QString Entry::id() const
+ {
+ return m_id;
+ }
+
+ bool Entry::containsPattern( const QString & pattern, EntryField::FieldType fieldType, BibTeX::Element::FilterType filterType, bool caseSensitive ) const
+ {
+ if ( filterType == ftExact )
+ {
+ /** check for exact match */
+ bool result = fieldType == EntryField::ftUnknown && m_id.contains( pattern, caseSensitive );
+
+ for ( EntryFields::ConstIterator it = m_fields.begin(); !result && it != m_fields.end(); it++ )
+ if ( fieldType == EntryField::ftUnknown || ( *it ) ->fieldType() == fieldType )
+ result |= ( *it ) ->value() ->containsPattern( pattern, caseSensitive );
+
+ return result;
+ }
+ else
+ {
+ /** for each word in the search pattern ... */
+ QStringList words = QStringList::split( QRegExp( "\\s+" ), pattern );
+ bool *hits = new bool[words.count()];
+ int i = 0;
+ for ( QStringList::Iterator wit = words.begin(); wit != words.end(); ++wit, ++i )
+ {
+ hits[i] = fieldType == EntryField::ftUnknown && m_id.contains( *wit, caseSensitive );
+
+ /** check if word is contained in any field */
+ for ( EntryFields::ConstIterator fit = m_fields.begin(); fit != m_fields.end(); ++fit )
+ if ( fieldType == EntryField::ftUnknown || ( *fit ) ->fieldType() == fieldType )
+ hits[i] |= ( *fit ) ->value() ->containsPattern( *wit, caseSensitive );
+ }
+
+ unsigned int hitCount = 0;
+ for ( i = words.count() - 1; i >= 0; --i )
+ if ( hits[i] ) ++hitCount;
+ delete[] hits;
+
+ /** return success depending on filter type and number of hits */
+ return (( filterType == ftAnyWord && hitCount > 0 ) || ( filterType == ftEveryWord && hitCount == words.count() ) );
+ }
+ }
+
+ QStringList Entry::urls() const
+ {
+ QStringList result;
+ const QString fieldNames[] = {"localfile", "pdf", "ps", "postscript", "doi", "url", "howpublished", "ee", "biburl", "note"};
+ const int fieldNamesCount = sizeof( fieldNames ) / sizeof( fieldNames[0] );
+
+ for ( int j = 1; j < 5 ; ++j ) /** there may be variants such as url3 or doi2 */
+ for ( int i = 0; i < fieldNamesCount; i++ )
+ {
+ QString fieldName = fieldNames[i];
+ /** field names should be like url, url2, url3, ... */
+ if ( j > 1 ) fieldName.append( QString::number( j ) );
+
+ EntryField * field = getField( fieldName );
+ if (( field && !field->value()->items.isEmpty() ) )
+ {
+ PlainText *plainText = dynamic_cast<PlainText*>( field->value()->items.first() );
+ if ( plainText != NULL )
+ {
+ QString plain = plainText->text();
+ int urlPos = plain.find( "\\url{", 0, FALSE );
+ if ( urlPos > -1 )
+ {
+ plain = plain.mid( urlPos + 5 );
+ urlPos = plain.find( "}", 0, FALSE );
+ if ( urlPos > 0 )
+ plain = plain.left( urlPos - 1 );
+ }
+
+ if ( fieldNames[ i ] == "doi" && !plain.startsWith( "http", FALSE ) )
+ plain.prepend( "http://dx.doi.org/" );
+
+ result.append( plain );
+ }
+ }
+ }
+
+ return result;
+ }
+
+ bool Entry::addField( EntryField * field )
+ {
+ m_fields.append( field );
+ return TRUE;
+ }
+
+ EntryField* Entry::getField( const EntryField::FieldType fieldType ) const
+ {
+ EntryField * result = NULL;
+
+ for ( EntryFields::ConstIterator it = m_fields.begin(); ( it != m_fields.end() ) && ( result == NULL ); it++ )
+ if (( *it ) ->fieldType() == fieldType ) result = *it;
+
+ return result;
+ }
+
+ EntryField* Entry::getField( const QString & fieldName ) const
+ {
+ EntryField * result = NULL;
+
+ for ( EntryFields::ConstIterator it = m_fields.begin(); ( it != m_fields.end() ) && ( result == NULL ); it++ )
+ if (( *it ) ->fieldTypeName().lower() == fieldName.lower() )
+ result = *it;
+
+ return result;
+ }
+
+ bool Entry::deleteField( const QString & fieldName )
+ {
+ for ( EntryFields::ConstIterator it = m_fields.begin(); it != m_fields.end(); it++ )
+ if (( *it ) ->fieldTypeName().lower() == fieldName.lower() )
+ {
+ delete( *it );
+ m_fields.remove( *it );
+ return TRUE;
+ }
+
+ return FALSE;
+ }
+
+ bool Entry::deleteField( const EntryField::FieldType fieldType )
+ {
+ for ( EntryFields::iterator it = m_fields.begin(); it != m_fields.end(); it++ )
+ if (( *it ) ->fieldType() == fieldType )
+ {
+ delete( *it );
+ m_fields.remove( it );
+ return TRUE;
+ }
+
+ return FALSE;
+ }
+
+ Entry::EntryFields::ConstIterator Entry::begin() const
+ {
+ return m_fields.constBegin();
+ }
+
+ Entry::EntryFields::ConstIterator Entry::end() const
+ {
+ return m_fields.constEnd();
+ }
+
+ int Entry::getFieldCount() const
+ {
+ return m_fields.count();
+ }
+
+ void Entry::clearFields()
+ {
+ for ( EntryFields::iterator it = m_fields.begin(); it != m_fields.end(); it++ )
+ delete( *it );
+ m_fields.clear();
+ }
+
+ void Entry::copyFrom( const Entry *other )
+ {
+ if ( other == NULL ) return;
+
+ m_entryType = other->m_entryType;
+ m_entryTypeString = other->m_entryTypeString;
+ m_id = other->m_id;
+ clearFields();
+ for ( EntryFields::ConstIterator it = other->m_fields.begin(); it != other->m_fields.end(); it++ )
+ m_fields.append( new EntryField( *it ) );
+ }
+
+ void Entry::merge( BibTeX::Entry *other, MergeSemantics mergeSemantics )
+ {
+ for ( EntryFields::iterator it = other->m_fields.begin(); it != other->m_fields.end(); it++ )
+ {
+ EntryField *otherField = new EntryField( *it );
+ EntryField::FieldType otherFieldType = otherField->fieldType();
+ QString otherFieldTypeName = otherField->fieldTypeName();
+ EntryField *thisField = otherFieldType != EntryField::ftUnknown ? getField( otherFieldType ) : getField( otherFieldTypeName );
+
+ if ( thisField == NULL )
+ {
+ m_fields.append( otherField );
+ }
+ else if ( otherField->value()->text() == thisField->value()->text() && mergeSemantics == msForceAdding )
+ {
+ otherFieldTypeName.prepend( "OPT" );
+ otherField->setFieldType( EntryField::ftUnknown, otherFieldTypeName );
+ m_fields.append( otherField );
+ }
+ }
+ }
+
+ QString Entry::entryTypeToString( const EntryType entryType )
+ {
+ switch ( entryType )
+ {
+ case etArticle:
+ return QString( "Article" );
+ case etBook:
+ return QString( "Book" );
+ case etBooklet:
+ return QString( "Booklet" );
+ case etCollection:
+ return QString( "Collection" );
+ case etElectronic:
+ return QString( "Electronic" );
+ case etInBook:
+ return QString( "InBook" );
+ case etInCollection:
+ return QString( "InCollection" );
+ case etInProceedings:
+ return QString( "InProceedings" );
+ case etManual:
+ return QString( "Manual" );
+ case etMastersThesis:
+ return QString( "MastersThesis" );
+ case etMisc:
+ return QString( "Misc" );
+ case etPhDThesis:
+ return QString( "PhDThesis" );
+ case etProceedings:
+ return QString( "Proceedings" );
+ case etTechReport:
+ return QString( "TechReport" );
+ case etUnpublished:
+ return QString( "Unpublished" );
+ default:
+ return QString( "Unknown" );
+ }
+ }
+
+ Entry::EntryType Entry::entryTypeFromString( const QString & entryTypeString )
+ {
+ QString entryTypeStringLower = entryTypeString.lower();
+ if ( entryTypeStringLower == "article" )
+ return etArticle;
+ else if ( entryTypeStringLower == "book" )
+ return etBook;
+ else if ( entryTypeStringLower == "booklet" )
+ return etBooklet;
+ else if ( entryTypeStringLower == "collection" )
+ return etCollection;
+ else if (( entryTypeStringLower == "electronic" ) || ( entryTypeStringLower == "online" ) || ( entryTypeStringLower == "internet" ) || ( entryTypeStringLower == "webpage" ) )
+ return etElectronic;
+ else if ( entryTypeStringLower == "inbook" )
+ return etInBook;
+ else if ( entryTypeStringLower == "incollection" )
+ return etInCollection;
+ else if (( entryTypeStringLower == "inproceedings" ) || ( entryTypeStringLower == "conference" ) )
+ return etInProceedings;
+ else if ( entryTypeStringLower == "manual" )
+ return etManual;
+ else if ( entryTypeStringLower == "mastersthesis" )
+ return etMastersThesis;
+ else if ( entryTypeStringLower == "misc" )
+ return etMisc;
+ else if ( entryTypeStringLower == "phdthesis" )
+ return etPhDThesis;
+ else if ( entryTypeStringLower == "proceedings" )
+ return etProceedings;
+ else if ( entryTypeStringLower == "techreport" )
+ return etTechReport;
+ else if ( entryTypeStringLower == "unpublished" )
+ return etUnpublished;
+ else
+ return etUnknown;
+ }
+
+ Entry::FieldRequireStatus Entry::getRequireStatus( Entry::EntryType entryType, EntryField::FieldType fieldType )
+ {
+ switch ( entryType )
+ {
+ case etArticle:
+ switch ( fieldType )
+ {
+ case EntryField::ftAuthor:
+ case EntryField::ftTitle:
+ case EntryField::ftJournal:
+ case EntryField::ftYear:
+ return Entry::frsRequired;
+ case EntryField::ftVolume:
+ case EntryField::ftMonth:
+ case EntryField::ftDoi:
+ case EntryField::ftNumber:
+ case EntryField::ftPages:
+ case EntryField::ftNote:
+ case EntryField::ftKey:
+ case EntryField::ftISSN:
+ case EntryField::ftURL:
+ case EntryField::ftLocalFile:
+ return Entry::frsOptional;
+ default:
+ return Entry::frsIgnored;
+ }
+ case etBook:
+ switch ( fieldType )
+ {
+ case EntryField::ftAuthor:
+ case EntryField::ftEditor:
+ case EntryField::ftTitle:
+ case EntryField::ftPublisher:
+ case EntryField::ftYear:
+ return Entry::frsRequired;
+ case EntryField::ftVolume:
+ case EntryField::ftNumber:
+ case EntryField::ftSeries:
+ case EntryField::ftAddress:
+ case EntryField::ftDoi:
+ case EntryField::ftEdition:
+ case EntryField::ftMonth:
+ case EntryField::ftNote:
+ case EntryField::ftKey:
+ case EntryField::ftISBN:
+ case EntryField::ftURL:
+ case EntryField::ftLocalFile:
+ return Entry::frsOptional;
+ default:
+ return Entry::frsIgnored;
+ }
+ case etBooklet:
+ switch ( fieldType )
+ {
+ case EntryField::ftTitle:
+ return Entry::frsRequired;
+ case EntryField::ftAuthor:
+ case EntryField::ftHowPublished:
+ case EntryField::ftAddress:
+ case EntryField::ftDoi:
+ case EntryField::ftMonth:
+ case EntryField::ftYear:
+ case EntryField::ftNote:
+ case EntryField::ftKey:
+ case EntryField::ftISBN:
+ case EntryField::ftURL:
+ case EntryField::ftLocalFile:
+ return Entry::frsOptional;
+ default:
+ return Entry::frsIgnored;
+ }
+ case etElectronic:
+ switch ( fieldType )
+ {
+ case EntryField::ftTitle:
+ case EntryField::ftURL:
+ return Entry::frsRequired;
+ case EntryField::ftAuthor:
+ case EntryField::ftHowPublished:
+ case EntryField::ftDoi:
+ case EntryField::ftMonth:
+ case EntryField::ftYear:
+ case EntryField::ftKey:
+ case EntryField::ftLocalFile:
+ return Entry::frsOptional;
+ default:
+ return Entry::frsIgnored;
+ }
+ case etInBook:
+ switch ( fieldType )
+ {
+ case EntryField::ftAuthor:
+ case EntryField::ftEditor:
+ case EntryField::ftTitle:
+ case EntryField::ftPages:
+ case EntryField::ftChapter:
+ case EntryField::ftPublisher:
+ case EntryField::ftYear:
+ return Entry::frsRequired;
+ case EntryField::ftVolume:
+ case EntryField::ftSeries:
+ case EntryField::ftAddress:
+ case EntryField::ftDoi:
+ case EntryField::ftEdition:
+ case EntryField::ftMonth:
+ case EntryField::ftNote:
+ case EntryField::ftCrossRef:
+ case EntryField::ftKey:
+ case EntryField::ftISBN:
+ case EntryField::ftURL:
+ case EntryField::ftLocalFile:
+ return Entry::frsOptional;
+ default:
+ return Entry::frsIgnored;
+ }
+ case etInCollection:
+ switch ( fieldType )
+ {
+ case EntryField::ftAuthor:
+ case EntryField::ftTitle:
+ case EntryField::ftBookTitle:
+ case EntryField::ftPublisher:
+ case EntryField::ftYear:
+ return Entry::frsRequired;
+ case EntryField::ftEditor:
+ case EntryField::ftPages:
+ case EntryField::ftOrganization:
+ case EntryField::ftAddress:
+ case EntryField::ftMonth:
+ case EntryField::ftLocation:
+ case EntryField::ftNote:
+ case EntryField::ftCrossRef:
+ case EntryField::ftDoi:
+ case EntryField::ftKey:
+ case EntryField::ftType:
+ case EntryField::ftISBN:
+ case EntryField::ftURL:
+ case EntryField::ftLocalFile:
+ return Entry::frsOptional;
+ default:
+ return Entry::frsIgnored;
+ }
+ case etInProceedings:
+ switch ( fieldType )
+ {
+ case EntryField::ftAuthor:
+ case EntryField::ftTitle:
+ case EntryField::ftYear:
+ case EntryField::ftBookTitle:
+ return Entry::frsRequired;
+ case EntryField::ftPages:
+ case EntryField::ftEditor:
+ case EntryField::ftVolume:
+ case EntryField::ftNumber:
+ case EntryField::ftSeries:
+ case EntryField::ftType:
+ case EntryField::ftChapter:
+ case EntryField::ftAddress:
+ case EntryField::ftDoi:
+ case EntryField::ftEdition:
+ case EntryField::ftLocation:
+ case EntryField::ftMonth:
+ case EntryField::ftNote:
+ case EntryField::ftCrossRef:
+ case EntryField::ftPublisher:
+ case EntryField::ftISBN:
+ case EntryField::ftURL:
+ case EntryField::ftLocalFile:
+ return Entry::frsOptional;
+ default:
+ return Entry::frsIgnored;
+ }
+ case etManual:
+ switch ( fieldType )
+ {
+ case EntryField::ftTitle:
+ return Entry::frsRequired;
+ case EntryField::ftAuthor:
+ case EntryField::ftOrganization:
+ case EntryField::ftAddress:
+ case EntryField::ftDoi:
+ case EntryField::ftEdition:
+ case EntryField::ftMonth:
+ case EntryField::ftYear:
+ case EntryField::ftNote:
+ case EntryField::ftISBN:
+ case EntryField::ftURL:
+ case EntryField::ftLocalFile:
+ return Entry::frsOptional;
+ default:
+ return Entry::frsIgnored;
+ }
+ case etMastersThesis:
+ switch ( fieldType )
+ {
+ case EntryField::ftAuthor:
+ case EntryField::ftTitle:
+ case EntryField::ftSchool:
+ case EntryField::ftYear:
+ return Entry::frsRequired;
+ case EntryField::ftAddress:
+ case EntryField::ftMonth:
+ case EntryField::ftDoi:
+ case EntryField::ftNote:
+ case EntryField::ftKey:
+ case EntryField::ftURL:
+ case EntryField::ftLocalFile:
+ return Entry::frsOptional;
+ default:
+ return Entry::frsIgnored;
+ }
+ case etMisc:
+ switch ( fieldType )
+ {
+ case EntryField::ftAuthor:
+ case EntryField::ftTitle:
+ case EntryField::ftHowPublished:
+ case EntryField::ftMonth:
+ case EntryField::ftYear:
+ case EntryField::ftDoi:
+ case EntryField::ftNote:
+ case EntryField::ftKey:
+ case EntryField::ftURL:
+ case EntryField::ftLocalFile:
+ return Entry::frsOptional;
+ default:
+ return Entry::frsIgnored;
+ }
+ case etPhDThesis:
+ switch ( fieldType )
+ {
+ case EntryField::ftAuthor:
+ case EntryField::ftTitle:
+ case EntryField::ftSchool:
+ case EntryField::ftYear:
+ return Entry::frsRequired;
+ case EntryField::ftAddress:
+ case EntryField::ftMonth:
+ case EntryField::ftNote:
+ case EntryField::ftDoi:
+ case EntryField::ftKey:
+ case EntryField::ftISBN:
+ case EntryField::ftURL:
+ case EntryField::ftLocalFile:
+ return Entry::frsOptional;
+ default:
+ return Entry::frsIgnored;
+ }
+ case etCollection:
+ case etProceedings:
+ switch ( fieldType )
+ {
+ case EntryField::ftTitle:
+ case EntryField::ftYear:
+ return Entry::frsRequired;
+ case EntryField::ftEditor:
+ case EntryField::ftPublisher:
+ case EntryField::ftOrganization:
+ case EntryField::ftAddress:
+ case EntryField::ftMonth:
+ case EntryField::ftLocation:
+ case EntryField::ftNote:
+ case EntryField::ftDoi:
+ case EntryField::ftKey:
+ case EntryField::ftSeries:
+ case EntryField::ftBookTitle:
+ case EntryField::ftISBN:
+ case EntryField::ftURL:
+ case EntryField::ftLocalFile:
+ return Entry::frsOptional;
+ default:
+ return Entry::frsIgnored;
+ }
+ case etTechReport:
+ switch ( fieldType )
+ {
+ case EntryField::ftAuthor:
+ case EntryField::ftTitle:
+ case EntryField::ftInstitution:
+ case EntryField::ftYear:
+ return Entry::frsRequired;
+ case EntryField::ftType:
+ case EntryField::ftDoi:
+ case EntryField::ftNumber:
+ case EntryField::ftAddress:
+ case EntryField::ftMonth:
+ case EntryField::ftNote:
+ case EntryField::ftKey:
+ case EntryField::ftURL:
+ case EntryField::ftLocalFile:
+ case EntryField::ftISSN:
+ return Entry::frsOptional;
+ default:
+ return Entry::frsIgnored;
+ }
+ case etUnpublished:
+ switch ( fieldType )
+ {
+ case EntryField::ftAuthor:
+ case EntryField::ftTitle:
+ case EntryField::ftNote:
+ return Entry::frsRequired;
+ case EntryField::ftMonth:
+ case EntryField::ftYear:
+ case EntryField::ftDoi:
+ case EntryField::ftKey:
+ case EntryField::ftURL:
+ case EntryField::ftLocalFile:
+ return Entry::frsOptional;
+ default:
+ return Entry::frsIgnored;
+ }
+ default:
+ return Entry::frsOptional;
+ }
+ }
+}
diff --git a/src/entry.h b/src/entry.h
new file mode 100644
index 0000000..6a8633c
--- /dev/null
+++ b/src/entry.h
@@ -0,0 +1,92 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXBIBTEXENTRY_H
+#define BIBTEXBIBTEXENTRY_H
+
+#include <qvaluelist.h>
+#include <qstringlist.h>
+
+#include <element.h>
+#include <entryfield.h>
+
+class QString;
+class QStringList;
+
+namespace BibTeX
+{
+
+ class Entry : public Element
+ {
+ public:
+ typedef QValueList<BibTeX::EntryField*> EntryFields;
+
+ enum EntryType {etArticle, etBook, etBooklet, etCollection, etElectronic, etInBook, etInCollection, etInProceedings, etManual, etMastersThesis, etMisc, etPhDThesis, etProceedings, etTechReport, etUnpublished, etUnknown};
+
+ enum FieldRequireStatus {frsRequired, frsOptional, frsIgnored};
+
+ enum MergeSemantics {msAddNew, msForceAdding};
+
+ Entry( );
+ Entry( const EntryType entryType, const QString &id );
+ Entry( const QString& entryTypeString, const QString& id );
+ Entry( const Entry *other );
+ virtual ~Entry();
+ Element* clone();
+ bool equals( const Entry &other );
+ QString text() const;
+
+ void setEntryType( const EntryType elementType );
+ void setEntryTypeString( const QString& elementTypeString );
+ EntryType entryType() const;
+ QString entryTypeString() const;
+ void setId( const QString& id );
+ QString id() const;
+
+ bool containsPattern( const QString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, BibTeX::Element::FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const;
+ QStringList urls() const;
+
+ bool addField( EntryField *field );
+ BibTeX::EntryField* getField( const EntryField::FieldType fieldType ) const;
+ BibTeX::EntryField* getField( const QString& fieldName ) const;
+ bool deleteField( const BibTeX::EntryField::FieldType fieldType );
+ bool deleteField( const QString &fieldName );
+
+ EntryFields::const_iterator begin() const;
+ EntryFields::const_iterator end() const;
+ int getFieldCount() const;
+ void clearFields();
+
+ void copyFrom( const BibTeX::Entry *other );
+ void merge( BibTeX::Entry *other, MergeSemantics mergeSemantics );
+
+ static QString entryTypeToString( const EntryType entryType );
+ static EntryType entryTypeFromString( const QString &entryTypeString );
+ static Entry::FieldRequireStatus getRequireStatus( Entry::EntryType entryType, EntryField::FieldType fieldType );
+
+ private:
+ EntryType m_entryType;
+ QString m_entryTypeString;
+ QString m_id;
+ EntryFields m_fields;
+ };
+
+}
+
+#endif
diff --git a/src/entryfield.cpp b/src/entryfield.cpp
new file mode 100644
index 0000000..bb7cb9d
--- /dev/null
+++ b/src/entryfield.cpp
@@ -0,0 +1,227 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include "entryfield.h"
+
+namespace BibTeX
+{
+
+ EntryField::EntryField( FieldType fieldType ) : m_fieldType( fieldType )
+ {
+ m_fieldTypeName = fieldTypeToString( m_fieldType );
+ m_value = new Value();
+ }
+
+ EntryField::EntryField( const QString &fieldTypeName ) : m_fieldTypeName( fieldTypeName )
+ {
+ m_fieldType = fieldTypeFromString( m_fieldTypeName );
+ m_value = new Value();
+ }
+
+ EntryField::EntryField( BibTeX::EntryField *other ) : m_fieldType( other->m_fieldType ), m_fieldTypeName( other->m_fieldTypeName ), m_value( NULL )
+ {
+ setValue( other->m_value );
+ }
+
+ EntryField::~EntryField()
+ {
+ delete m_value;
+ }
+
+ QString EntryField::fieldTypeName() const
+ {
+ return m_fieldTypeName;
+ }
+
+ void EntryField::setFieldType( FieldType fieldType, const QString& fieldTypeName )
+ {
+ m_fieldType = fieldType;
+ m_fieldTypeName = fieldTypeName;
+ }
+
+ EntryField::FieldType EntryField::fieldType() const
+ {
+ return m_fieldType;
+ }
+
+ QString EntryField::fieldTypeToString( const FieldType fieldType )
+ {
+ switch ( fieldType )
+ {
+ case ftAbstract:
+ return QString( "abstract" );
+ case ftAddress:
+ return QString( "address" );
+ case ftAnnote:
+ return QString( "annote" );
+ case ftAuthor:
+ return QString( "author" );
+ case ftBookTitle:
+ return QString( "booktitle" );
+ case ftChapter:
+ return QString( "chapter" );
+ case ftCrossRef:
+ return QString( "crossref" );
+ case ftDoi:
+ return QString( "doi" );
+ case ftEdition:
+ return QString( "edition" );
+ case ftEditor:
+ return QString( "editor" );
+ case ftHowPublished:
+ return QString( "howpublished" );
+ case ftInstitution:
+ return QString( "institution" );
+ case ftISBN:
+ return QString( "isbn" );
+ case ftISSN:
+ return QString( "issn" );
+ case ftJournal:
+ return QString( "journal" );
+ case ftKey:
+ return QString( "key" );
+ case ftKeywords:
+ return QString( "keywords" );
+ case ftLocalFile:
+ return QString( "localfile" );
+ case ftLocation:
+ return QString( "location" );
+ case ftMonth:
+ return QString( "month" );
+ case ftNote:
+ return QString( "note" );
+ case ftNumber:
+ return QString( "number" );
+ case ftOrganization:
+ return QString( "organization" );
+ case ftPages:
+ return QString( "pages" );
+ case ftPublisher:
+ return QString( "publisher" );
+ case ftSeries:
+ return QString( "series" );
+ case ftSchool:
+ return QString( "school" );
+ case ftTitle:
+ return QString( "title" );
+ case ftType:
+ return QString( "type" );
+ case ftURL:
+ return QString( "url" );
+ case ftVolume:
+ return QString( "volume" );
+ case ftYear:
+ return QString( "year" );
+ default:
+ return QString( "unknown" );
+ }
+ }
+
+ EntryField::FieldType EntryField::fieldTypeFromString( const QString & fieldTypeString )
+ {
+ QString fieldTypeStringLower = fieldTypeString.lower();
+
+ if ( fieldTypeStringLower == "abstract" )
+ return ftAbstract;
+ else if ( fieldTypeStringLower == "address" )
+ return ftAddress;
+ else if ( fieldTypeStringLower == "annote" )
+ return ftAnnote;
+ else if ( fieldTypeStringLower == "author" )
+ return ftAuthor;
+ else if ( fieldTypeStringLower == "booktitle" )
+ return ftBookTitle;
+ else if ( fieldTypeStringLower == "chapter" )
+ return ftChapter;
+ else if ( fieldTypeStringLower == "crossref" )
+ return ftCrossRef;
+ else if ( fieldTypeStringLower == "doi" )
+ return ftDoi;
+ else if ( fieldTypeStringLower == "edition" )
+ return ftEdition;
+ else if ( fieldTypeStringLower == "editor" )
+ return ftEditor;
+ else if ( fieldTypeStringLower == "howpublished" )
+ return ftHowPublished;
+ else if ( fieldTypeStringLower == "institution" )
+ return ftInstitution;
+ else if ( fieldTypeStringLower == "isbn" )
+ return ftISBN;
+ else if ( fieldTypeStringLower == "issn" )
+ return ftISSN;
+ else if ( fieldTypeStringLower == "journal" )
+ return ftJournal;
+ else if ( fieldTypeStringLower == "key" )
+ return ftKey;
+ else if ( fieldTypeStringLower == "keywords" )
+ return ftKeywords;
+ else if ( fieldTypeStringLower == "localfile" )
+ return ftLocalFile;
+ else if ( fieldTypeStringLower == "location" )
+ return ftLocation;
+ else if ( fieldTypeStringLower == "month" )
+ return ftMonth;
+ else if ( fieldTypeStringLower == "note" )
+ return ftNote;
+ else if ( fieldTypeStringLower == "number" )
+ return ftNumber;
+ else if ( fieldTypeStringLower == "organization" )
+ return ftOrganization;
+ else if ( fieldTypeStringLower == "pages" )
+ return ftPages;
+ else if ( fieldTypeStringLower == "publisher" )
+ return ftPublisher;
+ else if ( fieldTypeStringLower == "series" )
+ return ftSeries;
+ else if ( fieldTypeStringLower == "school" )
+ return ftSchool;
+ else if ( fieldTypeStringLower == "title" )
+ return ftTitle;
+ else if ( fieldTypeStringLower == "type" )
+ return ftType;
+ else if ( fieldTypeStringLower == "url" )
+ return ftURL;
+ else if ( fieldTypeStringLower == "volume" )
+ return ftVolume;
+ else if ( fieldTypeStringLower == "year" )
+ return ftYear;
+ else
+ return ftUnknown;
+ }
+
+ Value *EntryField::value()
+ {
+ return m_value;
+ }
+
+ void EntryField::setValue( const Value *value )
+ {
+ if ( value != m_value )
+ {
+ delete m_value;
+
+ if ( value != NULL )
+ {
+ m_value = new Value( value );
+ }
+ else
+ m_value = new Value();
+ }
+ }
+}
diff --git a/src/entryfield.h b/src/entryfield.h
new file mode 100644
index 0000000..6b3af30
--- /dev/null
+++ b/src/entryfield.h
@@ -0,0 +1,57 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXBIBTEXENTRYFIELD_H
+#define BIBTEXBIBTEXENTRYFIELD_H
+
+#include <qstring.h>
+
+#include <value.h>
+
+namespace BibTeX
+{
+ class EntryField
+ {
+ public:
+ enum FieldType {ftAbstract, ftAddress, ftAnnote, ftAuthor, ftBookTitle, ftChapter, ftCrossRef, ftDoi, ftEdition, ftEditor, ftHowPublished, ftInstitution, ftISBN, ftISSN, ftJournal, ftKey, ftKeywords, ftLocalFile, ftLocation, ftMonth, ftNote, ftNumber, ftOrganization, ftPages, ftPublisher, ftSchool, ftSeries, ftTitle, ftType, ftURL, ftVolume, ftYear, ftUnknown = -1};
+
+ EntryField( FieldType fieldType );
+ EntryField( const QString &fieldTypeName );
+ EntryField( BibTeX::EntryField *other );
+ ~EntryField();
+
+ QString fieldTypeName() const;
+ FieldType fieldType() const;
+ void setFieldType( FieldType fieldType, const QString& fieldTypeName );
+
+ static QString fieldTypeToString( const FieldType fieldType );
+ static FieldType fieldTypeFromString( const QString &fieldTypeString );
+
+ BibTeX::Value *value();
+ void setValue( const BibTeX::Value *value );
+
+ private:
+ FieldType m_fieldType;
+ QString m_fieldTypeName;
+ Value *m_value;
+ };
+
+}
+
+#endif
diff --git a/src/entrywidget.cpp b/src/entrywidget.cpp
new file mode 100644
index 0000000..cb4c7ff
--- /dev/null
+++ b/src/entrywidget.cpp
@@ -0,0 +1,677 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlayout.h>
+#include <qcheckbox.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qlistview.h>
+#include <qlabel.h>
+#include <qregexp.h>
+#include <qpushbutton.h>
+#include <qpopupmenu.h>
+#include <qtabwidget.h>
+#include <qcombobox.h>
+#include <qtimer.h>
+#include <qlineedit.h>
+
+#include <klocale.h>
+#include <kdebug.h>
+#include <kiconloader.h>
+#include <kmessagebox.h>
+#include <kapplication.h>
+#include <kconfig.h>
+#include <kwin.h>
+
+#include <entry.h>
+#include <entryfield.h>
+#include <file.h>
+#include <settings.h>
+#include <entrywidgettab.h>
+#include <entrywidgettitle.h>
+#include <entrywidgetauthor.h>
+#include <entrywidgetkeyword.h>
+#include <entrywidgetpublication.h>
+#include <entrywidgetmisc.h>
+#include <entrywidgetexternal.h>
+#include <entrywidgetuserdefined.h>
+#include <entrywidgetother.h>
+#include <entrywidgetwarningsitem.h>
+#include <fieldlistview.h>
+#include <idsuggestions.h>
+#include <webqueryarxiv.h>
+#include "entrywidget.h"
+
+namespace KBibTeX
+{
+ QDialog::DialogCode EntryWidget::execute( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, QWidget *parent, const char *name )
+ {
+ EntryWidgetDialog *dlg = new EntryWidgetDialog( parent, name, TRUE, i18n( "Edit BibTeX Entry" ), KDialogBase::Ok | KDialogBase::Cancel );
+ EntryWidget *entryWidget = new EntryWidget( entry, bibtexfile, isReadOnly, isNew, dlg, "entryWidget" );
+ dlg->setMainWidget( entryWidget );
+
+ QDialog::DialogCode result = ( QDialog::DialogCode ) dlg->exec();
+
+ delete entryWidget;
+ delete dlg;
+
+ return result;
+ }
+
+ EntryWidget::EntryWidget( BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, QDialog *parent, const char *name )
+ : QWidget( parent, name ), m_originalEntry( NULL ), m_bibtexfile( bibtexfile ), m_isReadOnly( isReadOnly ), m_isNew( isNew ), m_lastPage( NULL ), m_dlgParent( parent ), m_wqa( new WebQueryArXiv( NULL ) )
+ {
+ setupGUI( parent, FALSE );
+
+ Settings * settings = Settings::self();
+ m_checkBoxEnableAll->setChecked( settings->editing_EnableAllFields );
+ m_defaultIdSuggestionAvailable = settings->idSuggestions_default >= 0;
+ m_pushButtonForceDefaultIdSuggestion->setEnabled( !m_isReadOnly && m_defaultIdSuggestionAvailable );
+ m_pushButtonIdSuggestions->setEnabled( !m_isReadOnly );
+
+ connect( m_wqa, SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, SLOT( useExternalEntry( BibTeX::Entry*, bool ) ) );
+ connect( m_wqa, SIGNAL( endSearch( WebQuery::Status ) ), this, SLOT( endExternalSearch( WebQuery::Status ) ) );
+ }
+
+ EntryWidget::EntryWidget( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, QDialog *parent, const char *name )
+ : QWidget( parent, name ), m_originalEntry( entry ), m_bibtexfile( bibtexfile ), m_isReadOnly( isReadOnly ), m_isNew( isNew ), m_lastPage( NULL ), m_dlgParent( parent ), m_wqa( new WebQueryArXiv( NULL ) )
+ {
+ setupGUI( parent );
+
+ Settings * settings = Settings::self();
+ m_checkBoxEnableAll->setChecked( settings->editing_EnableAllFields );
+ m_defaultIdSuggestionAvailable = settings->idSuggestions_default >= 0;
+ m_pushButtonForceDefaultIdSuggestion->setEnabled( !m_isReadOnly && m_defaultIdSuggestionAvailable );
+ m_pushButtonIdSuggestions->setEnabled( !m_isReadOnly );
+
+ reset();
+
+ connect( m_wqa, SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, SLOT( useExternalEntry( BibTeX::Entry*, bool ) ) );
+ connect( m_wqa, SIGNAL( endSearch( WebQuery::Status ) ), this, SLOT( endExternalSearch( WebQuery::Status ) ) );
+ }
+
+ EntryWidget::~EntryWidget()
+ {
+ m_updateWarningsTimer->stop();
+ delete m_updateWarningsTimer;
+
+ delete m_wqa;
+
+ KConfig * config = kapp->config();
+ config->setGroup( "EntryWidget" );
+ saveWindowSize( config );
+ }
+
+ void EntryWidget::showEvent( QShowEvent *showev )
+ {
+ QWidget::showEvent( showev );
+ EntryWidgetTitle *ewt = dynamic_cast<EntryWidgetTitle*>( m_tabWidget->page( 0 ) );
+ if ( ewt != NULL )
+ ewt->m_fieldLineEditTitle->setFocus();
+
+ KConfig * config = kapp->config();
+ config->setGroup( "EntryWidget" );
+ restoreWindowSize( config );
+ }
+
+ bool EntryWidget::queryClose()
+ {
+ bool isModified = m_lineEditID->isModified();
+
+ for ( QValueList<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); !isModified && it != m_internalEntryWidgets.end(); ++it )
+ isModified = ( *it ) ->isModified();
+ isModified |= m_sourcePage->isModified();
+
+ KGuiItem discardBtn = KGuiItem( i18n( "Discard" ), "editshred" );
+ return !isModified || KMessageBox::warningContinueCancel( this, i18n( "The current entry has been modified. Do you want do discard your changes?" ), i18n( "Discard changes" ), discardBtn ) == KMessageBox::Continue;
+ }
+
+ void EntryWidget::apply()
+ {
+ if ( !m_isReadOnly )
+ {
+ apply( m_originalEntry );
+ m_originalEntry->setId( IdSuggestions::resolveConflict( m_bibtexfile, m_originalEntry->id(), m_originalEntry ) );
+
+ Settings * settings = Settings::self();
+ settings->addToCompletion( m_originalEntry );
+ }
+ }
+
+ void EntryWidget::apply( BibTeX::Entry *entry )
+ {
+ internalApply( entry );
+ if ( m_tabWidget->currentPage() == m_sourcePage )
+ m_sourcePage->apply( entry );
+ else
+ {
+ for ( QValueList<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it )
+ ( *it ) ->apply( entry );
+ }
+ }
+
+ void EntryWidget::internalApply( BibTeX::Entry *entry )
+ {
+ BibTeX::Entry::EntryType entryType = BibTeX::Entry::entryTypeFromString( m_comboBoxEntryType->currentText() );
+ if ( entryType == BibTeX::Entry::etUnknown )
+ entry->setEntryTypeString( m_comboBoxEntryType->currentText() );
+ else
+ entry->setEntryType( entryType );
+
+ entry->setId( m_lineEditID->text() );
+ }
+
+ void EntryWidget::reset()
+ {
+ reset( m_originalEntry );
+ }
+
+ void EntryWidget::reset( BibTeX::Entry *entry )
+ {
+ internalReset( entry );
+ m_sourcePage->reset( entry );
+ for ( QValueList<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it )
+ ( *it ) ->reset( entry );
+
+ updateGUI();
+ }
+
+ void EntryWidget::internalReset( BibTeX::Entry *entry )
+ {
+ m_lineEditID->setText( entry->id() );
+ Settings * settings = Settings::self();
+ m_pushButtonForceDefaultIdSuggestion->setOn( m_defaultIdSuggestionAvailable && settings->idSuggestions_forceDefault && m_isNew );
+ m_pushButtonForceDefaultIdSuggestion->setEnabled( !m_isReadOnly && m_defaultIdSuggestionAvailable );
+
+ bool foundEntryType = FALSE;
+ for ( int i = 0; !foundEntryType && i < m_comboBoxEntryType->count(); i++ )
+ if (( BibTeX::Entry::EntryType ) i + BibTeX::Entry::etArticle == entry->entryType() )
+ {
+ m_comboBoxEntryType->setCurrentItem( i );
+ foundEntryType = TRUE;
+ }
+ if ( !foundEntryType )
+ m_comboBoxEntryType->setCurrentText( entry->entryTypeString() );
+ }
+
+ void EntryWidget::slotEnableAllFields( )
+ {
+ updateGUI();
+ }
+
+ void EntryWidget::slotForceDefaultIdSuggestion()
+ {
+ m_isNew = FALSE;
+ m_lineEditID->setEnabled( !m_pushButtonForceDefaultIdSuggestion->isOn() );
+ m_pushButtonIdSuggestions->setEnabled( !m_pushButtonForceDefaultIdSuggestion->isOn() && !m_isReadOnly );
+ updateWarnings();
+ }
+
+ void EntryWidget::slotEntryTypeChanged( )
+ {
+ updateGUI();
+ }
+
+ void EntryWidget::slotCurrentPageChanged( QWidget* newPage )
+ {
+ BibTeX::Entry temporaryEntry;
+
+ if ( newPage == m_sourcePage )
+ {
+ // switching to source tab
+ m_updateWarningsTimer->stop();
+ internalApply( &temporaryEntry );
+ for ( QValueList<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it )
+ ( *it ) ->apply( &temporaryEntry );
+ m_sourcePage->reset( &temporaryEntry );
+
+ m_comboBoxEntryType->setEnabled( FALSE );
+ m_lineEditID->setEnabled( FALSE );
+ m_pushButtonIdSuggestions->setEnabled( FALSE );
+ m_pushButtonForceDefaultIdSuggestion->setEnabled( FALSE );
+ }
+ else if ( m_lastPage == m_sourcePage )
+ {
+ // switching from source tab away
+ bool doApply = true;
+ bool doChange = true;
+ if ( !m_sourcePage->containsValidText() )
+ {
+ if ( KMessageBox::warningYesNo( this, i18n( "The source code does not contain valid BibTeX code.\n\nRestore previous version or continue editing?" ), i18n( "Invalid BibTeX code" ), KGuiItem( i18n( "Restore" ) ), KGuiItem( i18n( "Edit" ) ) ) == KMessageBox::No )
+ {
+ QString text = m_sourcePage->text();
+ m_tabWidget->showPage( m_sourcePage );
+ m_sourcePage->setText( text );
+ doChange = false;
+ newPage = m_sourcePage;
+ }
+ else
+ doApply = false;
+ }
+
+ if ( doChange )
+ {
+ if ( doApply )
+ {
+ m_sourcePage->apply( &temporaryEntry );
+ internalReset( &temporaryEntry );
+ for ( QValueList<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it )
+ ( *it ) ->reset( &temporaryEntry );
+ updateWarnings();
+ }
+
+ m_comboBoxEntryType->setEnabled( TRUE );
+ m_lineEditID->setEnabled( !m_defaultIdSuggestionAvailable || !m_pushButtonForceDefaultIdSuggestion->isOn() );
+ m_pushButtonIdSuggestions->setEnabled(( !m_defaultIdSuggestionAvailable || !m_pushButtonForceDefaultIdSuggestion->isOn() ) && !m_isReadOnly );
+ m_pushButtonForceDefaultIdSuggestion->setEnabled( !m_isReadOnly && m_defaultIdSuggestionAvailable );
+ if ( !m_isReadOnly )
+ m_updateWarningsTimer->start( 500 );
+ }
+ }
+
+ m_lastPage = newPage;
+ }
+
+ void EntryWidget::warningsExecute( QListViewItem* item )
+ {
+ EntryWidgetWarningsItem * ewwi = dynamic_cast<KBibTeX::EntryWidgetWarningsItem*>( item );
+ if ( ewwi != NULL && ewwi->widget() != NULL )
+ {
+ ewwi->widget() ->setFocus();
+ // find and activate corresponding tab page
+ QObject *parent = ewwi->widget();
+ KBibTeX::EntryWidgetTab *ewt = dynamic_cast<KBibTeX::EntryWidgetTab*>( parent );
+ while ( ewt == NULL && parent != NULL )
+ {
+ parent = parent->parent();
+ ewt = dynamic_cast<KBibTeX::EntryWidgetTab*>( parent );
+ }
+ m_tabWidget->setCurrentPage( m_tabWidget-> indexOf( ewt ) );
+ }
+ }
+
+ void EntryWidget::setupGUI( QWidget *parent, bool showWarnings )
+ {
+ QGridLayout * layout = new QGridLayout( this, 4, 6, 0, KDialog::spacingHint() );
+
+ // in the top row on the left, put an entry type label and combobox
+ QLabel *label = new QLabel( i18n( "E&ntry Type:" ), this );
+ layout->addWidget( label, 0, 0 );
+ m_comboBoxEntryType = new QComboBox( TRUE, this, "m_comboBoxEntryType" );
+ label->setBuddy( m_comboBoxEntryType );
+ m_comboBoxEntryType->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed );
+ m_comboBoxEntryType->setEnabled( !m_isReadOnly );
+ layout->addWidget( m_comboBoxEntryType, 0, 1 );
+ setupEntryTypes();
+
+ // in the top row on the left, put an identifier label and combobox
+ label = new QLabel( i18n( "&Identifier" ), this );
+ layout->addWidget( label, 0, 2 );
+ m_lineEditID = new QLineEdit( this, "m_lineEditID" );
+ label->setBuddy( m_lineEditID );
+ m_lineEditID->setReadOnly( m_isReadOnly );
+ m_lineEditID->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed );
+ layout->addWidget( m_lineEditID, 0, 3 );
+
+ m_pushButtonIdSuggestions = new QPushButton( QIconSet( BarIcon( "wizard" ) ), "", this, "m_pushButtonIdSuggestions" );
+ m_menuIdSuggestions = new QPopupMenu( m_pushButtonIdSuggestions );
+ connect( m_menuIdSuggestions, SIGNAL( activated( int ) ), this, SLOT( insertIdSuggestion( int ) ) );
+ m_pushButtonIdSuggestions->setPopup( m_menuIdSuggestions );
+ layout->addWidget( m_pushButtonIdSuggestions, 0, 4 );
+
+ m_pushButtonForceDefaultIdSuggestion = new QPushButton( QIconSet( BarIcon( "favorites" ) ), "", this, "m_pushButtonForceDefaultIdSuggestion" );
+ m_pushButtonForceDefaultIdSuggestion->setToggleButton( TRUE );
+ layout->addWidget( m_pushButtonForceDefaultIdSuggestion, 0, 5 );
+ QToolTip::add( m_pushButtonForceDefaultIdSuggestion, i18n( "Use the default id suggestion to set the entry id" ) );
+ QWhatsThis::add( m_pushButtonForceDefaultIdSuggestion, i18n( "Use the default id suggestion to set the entry id.\nYou can edit and select the default id suggestion in the configuration dialog." ) );
+
+ // central tab widget for all the tabs
+ m_tabWidget = new QTabWidget( this );
+ layout->addMultiCellWidget( m_tabWidget, 1, 1, 0, 5 );
+ addTabWidgets();
+
+ // a check box if the user want to edit all fields
+ m_checkBoxEnableAll = new QCheckBox( i18n( "Enable all &fields for editing" ), this );
+ layout->addMultiCellWidget( m_checkBoxEnableAll, 2, 2, 0, 4 );
+
+ m_pushButtonRefetch = new QPushButton( KGlobal::iconLoader() ->loadIconSet( "reload", KIcon::Small ), i18n( "Refetch" ), this );
+ layout->addWidget( m_pushButtonRefetch, 2, 5 );
+ connect( m_pushButtonRefetch, SIGNAL( clicked() ), this, SLOT( refreshFromURL() ) );
+
+ if ( showWarnings )
+ {
+ // list view for warnings, errors and suggestions
+ m_listViewWarnings = new QListView( this );
+ m_listViewWarnings->addColumn( i18n( "Message" ) );
+ m_listViewWarnings->setAllColumnsShowFocus( true );
+ layout->addMultiCellWidget( m_listViewWarnings, 3, 3, 0, 5 );
+ connect( m_listViewWarnings, SIGNAL( doubleClicked( QListViewItem*, const QPoint&, int ) ), this, SLOT( warningsExecute( QListViewItem* ) ) );
+ }
+ else
+ m_listViewWarnings = NULL;
+
+ connect( m_checkBoxEnableAll, SIGNAL( toggled( bool ) ), this, SLOT( slotEnableAllFields( ) ) );
+ connect( m_comboBoxEntryType, SIGNAL( activated( int ) ), this, SLOT( slotEntryTypeChanged( ) ) );
+ connect( m_pushButtonForceDefaultIdSuggestion, SIGNAL( toggled( bool ) ), this, SLOT( slotForceDefaultIdSuggestion() ) );
+ connect( m_comboBoxEntryType, SIGNAL( textChanged( const QString & ) ), this, SLOT( slotEntryTypeChanged() ) );
+ connect( m_tabWidget, SIGNAL( currentChanged( QWidget* ) ), this, SLOT( slotCurrentPageChanged( QWidget* ) ) );
+ connect( parent, SIGNAL( okClicked() ), this, SLOT( apply() ) );
+ connect( m_menuIdSuggestions, SIGNAL( aboutToShow() ), this, SLOT( updateIdSuggestionsMenu() ) );
+
+ m_updateWarningsTimer = new QTimer( this );
+ connect( m_updateWarningsTimer, SIGNAL( timeout() ), this, SLOT( updateWarnings() ) );
+ if ( !m_isReadOnly )
+ m_updateWarningsTimer->start( 500 );
+ }
+
+ void EntryWidget::addTabWidgets()
+ {
+ addTabWidget( new KBibTeX::EntryWidgetTitle( m_bibtexfile, m_isReadOnly, m_tabWidget, "EntryWidgetTitle" ), i18n( "Title" ) );
+ addTabWidget( new KBibTeX::EntryWidgetAuthor( m_bibtexfile, m_isReadOnly, m_tabWidget, "EntryWidgetAuthor" ), i18n( "Author/Editor" ) );
+ addTabWidget( new KBibTeX::EntryWidgetPublication( m_bibtexfile, m_isReadOnly, m_tabWidget, "EntryWidgetPublication" ), i18n( "Publication" ) );
+ addTabWidget( new KBibTeX::EntryWidgetMisc( m_bibtexfile, m_isReadOnly, m_tabWidget, "EntryWidgetMisc" ), i18n( "Misc" ) );
+ addTabWidget( new KBibTeX::EntryWidgetKeyword( m_bibtexfile, m_isReadOnly, m_tabWidget, "EntryWidgetKeyword" ), i18n( "Keywords" ) );
+ addTabWidget( new KBibTeX::EntryWidgetExternal( m_bibtexfile, m_isReadOnly, m_tabWidget, "EntryWidgetExternal" ), i18n( "External" ) );
+ addTabWidget( new KBibTeX::EntryWidgetUserDefined( m_bibtexfile, m_isReadOnly, m_tabWidget, "EntryWidgetUserDefined" ), i18n( "User Defined" ) );
+ addTabWidget( new KBibTeX::EntryWidgetOther( m_bibtexfile, m_isReadOnly, m_tabWidget, "EntryWidgetOther" ), i18n( "Other Fields" ) );
+
+ m_sourcePage = new KBibTeX::EntryWidgetSource( m_bibtexfile, m_isReadOnly, m_tabWidget, "EntryWidgetSource" );
+ m_tabWidget->insertTab( m_sourcePage, i18n( "Source" ) );
+ }
+
+ void EntryWidget::addTabWidget( EntryWidgetTab *widget, const QString& title )
+ {
+ m_tabWidget->insertTab( widget, title );
+ m_internalEntryWidgets.append( widget );
+ }
+
+ void EntryWidget::setupEntryTypes()
+ {
+ int i = ( int ) BibTeX::Entry::etArticle;
+ BibTeX::Entry::EntryType entryType = ( BibTeX::Entry::EntryType ) i;
+ while ( entryType != BibTeX::Entry::etUnknown )
+ {
+ QString currentString = BibTeX::Entry::entryTypeToString( entryType );
+ m_comboBoxEntryType->insertItem( currentString );
+ entryType = ( BibTeX::Entry::EntryType ) ++i;
+ }
+ }
+
+ void EntryWidget::updateGUI()
+ {
+ BibTeX::Entry::EntryType entryType = BibTeX::Entry::entryTypeFromString( m_comboBoxEntryType->currentText() );
+ for ( QValueList<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it )
+ ( *it ) ->updateGUI( entryType, m_checkBoxEnableAll->isChecked() );
+ updateWarnings( );
+ }
+
+ void EntryWidget::updateWarnings()
+ {
+ if ( m_listViewWarnings == NULL )
+ return;
+
+ m_listViewWarnings->clear();
+
+ int p = 0;
+ if ( m_defaultIdSuggestionAvailable && m_pushButtonForceDefaultIdSuggestion->isOn() )
+ {
+ BibTeX::Entry temporaryEntry;
+ apply( &temporaryEntry );
+ QString id = IdSuggestions::createDefaultSuggestion( m_bibtexfile, &temporaryEntry );
+ if ( id.isNull() || id.isEmpty() )
+ new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, i18n( "Please supply more fields to use the default id" ), m_pushButtonForceDefaultIdSuggestion, m_listViewWarnings );
+ else
+ {
+ new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlInformation, QString( i18n( "Using '%1' as entry id" ) ).arg( id ), m_pushButtonForceDefaultIdSuggestion, m_listViewWarnings );
+ m_lineEditID->setText( id );
+ }
+ }
+ else if ( m_lineEditID->text().isEmpty() )
+ new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlError, i18n( "An entry has to have an identifier" ), m_lineEditID, m_listViewWarnings );
+ else if (( p = m_lineEditID->text().find( Settings::noIdChars ) ) > 0 )
+ new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlError, QString( i18n( "The identifier contains invalid characters at position %1" ) ).arg( p + 1 ), m_lineEditID, m_listViewWarnings );
+
+ BibTeX::Entry::EntryType entryType = BibTeX::Entry::entryTypeFromString( m_comboBoxEntryType->currentText() );
+ for ( QValueList<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it )
+ ( *it ) ->updateWarnings( entryType, m_listViewWarnings );
+
+ QString text = m_lineEditID->text();
+ for ( unsigned int i = 0; i < text.length(); i++ )
+ if ( text.at( i ).unicode() > 127 )
+ {
+ new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, QString( i18n( "The identifier contains non-ascii characters, first one is '%1'" ) ).arg( text.at( i ) ), m_lineEditID, m_listViewWarnings );
+ break;
+ }
+
+ BibTeX::Entry temporaryEntry;
+ /** fetch data from GUI elements */
+ for ( QValueList<KBibTeX::EntryWidgetTab*>::iterator it( m_internalEntryWidgets.begin() ); it != m_internalEntryWidgets.end(); ++it )
+ ( *it ) ->apply( &temporaryEntry );
+ internalApply( &temporaryEntry );
+
+ /** check if entry with same id already exists */
+ QString id = temporaryEntry.id();
+ if ( m_bibtexfile != NULL && !id.isEmpty() )
+ {
+ BibTeX::Entry *nameMatched = dynamic_cast<BibTeX::Entry*>( m_bibtexfile->containsKey( id ) );
+ if ( nameMatched != NULL && nameMatched != m_originalEntry )
+ new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlError, QString( i18n( "This BibTeX file already contains an entry with id '%1'." ) ).arg( id ), m_lineEditID, m_listViewWarnings );
+ }
+
+ BibTeX::Entry *crossRefEntry = NULL;
+ QString crossRefText = "";
+ BibTeX::EntryField *crossRef = temporaryEntry.getField( BibTeX::EntryField::ftCrossRef );
+ if ( crossRef != NULL && m_bibtexfile != NULL )
+ {
+ crossRefText = crossRef->value()->text();
+ crossRefEntry = dynamic_cast<BibTeX::Entry*>( m_bibtexfile->containsKey( crossRefText ) );
+ }
+
+ switch ( temporaryEntry.entryType() )
+ {
+ case BibTeX::Entry::etProceedings:
+ if ( temporaryEntry.getField( BibTeX::EntryField::ftEditor ) == NULL && temporaryEntry.getField( BibTeX::EntryField::ftOrganization ) == NULL && temporaryEntry.getField( BibTeX::EntryField::ftKey ) == NULL )
+ {
+ new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, i18n( "Require either 'Editor', 'Organization', or 'Key'" ), NULL, m_listViewWarnings );
+ }
+ break;
+ case BibTeX::Entry::etInProceedings:
+ {
+ if ( crossRefEntry != NULL )
+ {
+ if ( crossRefEntry->getField( BibTeX::EntryField::ftEditor ) == NULL && crossRefEntry->getField( BibTeX::EntryField::ftKey ) == NULL && crossRefEntry->getField( BibTeX::EntryField::ftBookTitle ) == NULL )
+ {
+ new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, QString( i18n( "Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Book Title'" ) ).arg( crossRefText ), NULL, m_listViewWarnings );
+ }
+ }
+ }
+ break;
+ case BibTeX::Entry::etInBook:
+ {
+ if ( crossRefEntry != NULL )
+ {
+ if ( crossRefEntry->getField( BibTeX::EntryField::ftVolume ) == NULL )
+ new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, QString( i18n( "Cross referenced entry '%1' must contain 'Volume'" ) ).arg( crossRefText ), NULL, m_listViewWarnings );
+ if ( crossRefEntry->getField( BibTeX::EntryField::ftEditor ) == NULL && crossRefEntry->getField( BibTeX::EntryField::ftKey ) == NULL && crossRefEntry->getField( BibTeX::EntryField::ftSeries ) == NULL )
+ {
+ new KBibTeX::EntryWidgetWarningsItem( KBibTeX::EntryWidgetWarningsItem::wlWarning, QString( i18n( "Cross referenced entry '%1' must contain either 'Editor', 'Key', or 'Series'" ) ).arg( crossRefText ), NULL, m_listViewWarnings );
+ }
+ }
+ }
+ break;
+ default:
+ {
+// nothing
+ }
+ }
+ }
+
+ void EntryWidget::updateIdSuggestionsMenu()
+ {
+ BibTeX::Entry temporaryEntry;
+ m_menuIdSuggestions->clear();
+ m_idToSuggestion.clear();
+
+ apply( &temporaryEntry );
+ QStringList suggestions = IdSuggestions::createSuggestions( m_bibtexfile, &temporaryEntry );
+ for ( QStringList::ConstIterator it = suggestions.begin(); it != suggestions.end(); ++it )
+ m_idToSuggestion.insert( m_menuIdSuggestions->insertItem( *it ), *it );
+
+ if ( m_idToSuggestion.count() == 0 )
+ m_menuIdSuggestions->setItemEnabled( m_menuIdSuggestions->insertItem( i18n( "No suggestions available" ) ), FALSE );
+ }
+
+ void EntryWidget::insertIdSuggestion( int id )
+ {
+ m_lineEditID->setText( m_idToSuggestion[id] );
+ }
+
+ /* This function was taken form KMainWindow of KDE 3.5 and modified to fit KBibTeX */
+ void EntryWidget::saveWindowSize( KConfig *config ) const
+ {
+ int scnum = QApplication::desktop()->screenNumber( parentWidget() );
+ QRect desk = QApplication::desktop()->screenGeometry( scnum );
+ int w, h;
+#if defined Q_WS_X11
+ // save maximalization as desktop size + 1 in that direction
+ KWin::WindowInfo info = KWin::windowInfo( m_dlgParent->winId(), NET::WMState );
+ w = info.state() & NET::MaxHoriz ? desk.width() + 1 : m_dlgParent->width();
+ h = info.state() & NET::MaxVert ? desk.height() + 1 : m_dlgParent->height();
+#else
+ if ( isMaximized() )
+ {
+ w = desk.width() + 1;
+ h = desk.height() + 1;
+ }
+ //TODO: add "Maximized" property instead "+1" hack
+#endif
+ QRect size( desk.width(), w, desk.height(), h );
+ bool defaultSize = false;//( size == d->defaultWindowSize );
+ QString widthString = QString::fromLatin1( "Width %1" ).arg( desk.width() );
+ QString heightString = QString::fromLatin1( "Height %1" ).arg( desk.height() );
+ if ( !config->hasDefault( widthString ) && defaultSize )
+ config->revertToDefault( widthString );
+ else
+ config->writeEntry( widthString, w );
+
+ if ( !config->hasDefault( heightString ) && defaultSize )
+ config->revertToDefault( heightString );
+ else
+ config->writeEntry( heightString, h );
+ }
+
+ /* This function was taken form KMainWindow of KDE 3.5 and modified to fit KBibTeX */
+ void EntryWidget::restoreWindowSize( KConfig *config )
+ {
+ // restore the size
+ int scnum = QApplication::desktop()->screenNumber( parentWidget() );
+ QRect desk = QApplication::desktop()->screenGeometry( scnum );
+// if ( d->defaultWindowSize.isNull() ) // only once
+// d->defaultWindowSize = QRect( desk.width(), width(), desk.height(), height() ); // store default values
+ QSize size( config->readNumEntry( QString::fromLatin1( "Width %1" ).arg( desk.width() ), 0 ),
+ config->readNumEntry( QString::fromLatin1( "Height %1" ).arg( desk.height() ), 0 ) );
+ if ( size.isEmpty() )
+ {
+ // try the KDE 2.0 way
+ size = QSize( config->readNumEntry( QString::fromLatin1( "Width" ), 0 ),
+ config->readNumEntry( QString::fromLatin1( "Height" ), 0 ) );
+ if ( !size.isEmpty() )
+ {
+ // make sure the other resolutions don't get old settings
+ config->writeEntry( QString::fromLatin1( "Width" ), 0 );
+ config->writeEntry( QString::fromLatin1( "Height" ), 0 );
+ }
+ }
+ if ( !size.isEmpty() )
+ {
+#ifdef Q_WS_X11
+ int state = ( size.width() > desk.width() ? NET::MaxHoriz : 0 )
+ | ( size.height() > desk.height() ? NET::MaxVert : 0 );
+ if (( state & NET::Max ) == NET::Max )
+ ; // no resize
+ else if (( state & NET::MaxHoriz ) == NET::MaxHoriz )
+ m_dlgParent->resize( width(), size.height() );
+ else if (( state & NET::MaxVert ) == NET::MaxVert )
+ m_dlgParent->resize( size.width(), height() );
+ else
+ m_dlgParent->resize( size );
+ // QWidget::showMaximized() is both insufficient and broken
+ KWin::setState( m_dlgParent->winId(), state );
+#else
+ if ( size.width() > desk.width() || size.height() > desk.height() )
+ m_dlgParent->setWindowState( WindowMaximized );
+ else
+ m_dlgParent->resize( size );
+#endif
+ }
+ }
+
+ void EntryWidget::refreshFromURL()
+ {
+ BibTeX::Entry *entry = new BibTeX::Entry();
+ apply( entry );
+ m_oldId = entry->id();
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftURL );
+ KURL url = field != NULL ? KURL( field->value()->text().lower() ) : KURL();
+
+ if ( url.isValid() && url.prettyURL().contains( "arxiv.org/abs/" ) )
+ {
+ m_pushButtonRefetch->setEnabled( false );
+ qDebug( "Refetching from url %s", url.prettyURL().latin1() );
+ m_wqa->fetchFromAbstract( url );
+ }
+ else
+ {
+ KMessageBox::information( this, i18n( "Currently only refetching from ArXiv sources is supported.\n\nThis requires that the URL field points to an \"abstract\" page (i.e. the URL contains \"arxiv.org/abs/\")." ), i18n( "Refetching entry" ) );
+ m_pushButtonRefetch->setEnabled( true );
+ }
+ }
+
+ void EntryWidget::useExternalEntry( BibTeX::Entry* entry, bool )
+ {
+ if ( entry != NULL )
+ {
+ BibTeX::Entry *oldEntry = new BibTeX::Entry();
+ apply( oldEntry );
+
+ entry->setId( m_oldId );
+ for ( BibTeX::Entry::EntryFields::ConstIterator it = oldEntry->begin(); it != oldEntry->end(); ++it )
+ {
+ BibTeX::EntryField *oldField = *it;
+ BibTeX::EntryField *field = entry->getField( oldField->fieldTypeName() );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( oldField->fieldTypeName() );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( oldField->value() ) );
+ }
+ }
+ reset( entry );
+ }
+ else
+ KMessageBox::error( this, i18n( "Fetching updated bibliographic data failed." ), i18n( "Refetching entry" ) );
+ }
+
+ void EntryWidget::endExternalSearch( WebQuery::Status )
+ {
+ m_pushButtonRefetch->setEnabled( true );
+ }
+
+}
+#include "entrywidget.moc"
diff --git a/src/entrywidget.h b/src/entrywidget.h
new file mode 100644
index 0000000..10dfd13
--- /dev/null
+++ b/src/entrywidget.h
@@ -0,0 +1,158 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXENTRYWIDGET_H
+#define KBIBTEXENTRYWIDGET_H
+
+#include <qwidget.h>
+#include <qdialog.h>
+#include <qvaluelist.h>
+#include <qmap.h>
+
+#include <kdialogbase.h>
+
+#include <entry.h>
+#include <entrywidgetsource.h>
+#include <webquery.h>
+
+class QComboBox;
+class QLineEdit;
+class QCheckBox;
+class QTabWidget;
+class QString;
+class QTimer;
+class QListView;
+
+class KConfig;
+
+namespace KBibTeX
+{
+ class EntryWidgetTab;
+ class WebQueryArXiv;
+
+ class EntryWidget : public QWidget
+ {
+ Q_OBJECT
+
+ friend class EntryWidgetDialog;
+
+ public:
+ ~EntryWidget();
+
+ static QDialog::DialogCode execute( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, QWidget *parent = 0, const char *name = 0 );
+
+ protected:
+ EntryWidget( BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, QDialog *parent, const char *name = 0 );
+ void showEvent( QShowEvent * );
+ bool queryClose();
+
+ private slots:
+ void apply();
+ void reset();
+ void apply( BibTeX::Entry *entry );
+ void reset( BibTeX::Entry *entry );
+ void slotEnableAllFields();
+ void slotForceDefaultIdSuggestion();
+ void slotEntryTypeChanged();
+ void slotCurrentPageChanged( QWidget* newPage );
+ void warningsExecute( QListViewItem* item );
+ void updateWarnings();
+ void insertIdSuggestion( int id );
+ void updateIdSuggestionsMenu();
+ void refreshFromURL();
+ void useExternalEntry( BibTeX::Entry*, bool );
+ void endExternalSearch( WebQuery::Status );
+
+ signals:
+ void updateTabs( BibTeX::Entry::EntryType entryType, bool enableAll, bool isReadOnly );
+
+ private:
+ EntryWidget( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, QDialog *parent, const char *name = 0 );
+ BibTeX::Entry *m_originalEntry;
+ BibTeX::File *m_bibtexfile;
+ bool m_isReadOnly;
+ bool m_isNew;
+ bool m_defaultIdSuggestionAvailable;
+
+ QComboBox *m_comboBoxEntryType;
+ QLineEdit *m_lineEditID;
+ QPushButton *m_pushButtonForceDefaultIdSuggestion;
+ QPushButton *m_pushButtonIdSuggestions;
+ QPopupMenu *m_menuIdSuggestions;
+ QMap<int, QString> m_idToSuggestion;
+ QCheckBox *m_checkBoxEnableAll;
+ QPushButton *m_pushButtonRefetch;
+ QListView *m_listViewWarnings;
+ QTabWidget *m_tabWidget;
+ KBibTeX::EntryWidgetSource *m_sourcePage;
+ QValueList<KBibTeX::EntryWidgetTab*> m_internalEntryWidgets;
+ QWidget *m_lastPage;
+ QTimer *m_updateWarningsTimer;
+ QDialog *m_dlgParent;
+ WebQueryArXiv *m_wqa;
+ QString m_oldId;
+
+ void setupGUI( QWidget *parent, bool showWarnings = TRUE );
+ void addTabWidgets();
+ void addTabWidget( EntryWidgetTab *widget, const QString& title );
+ void setupEntryTypes();
+ void updateGUI();
+ void internalApply( BibTeX::Entry *entry );
+ void internalReset( BibTeX::Entry *entry );
+ void restoreWindowSize( KConfig *config );
+ void saveWindowSize( KConfig *config ) const;
+ };
+
+ class EntryWidgetDialog: public KDialogBase
+ {
+ Q_OBJECT
+ public:
+ EntryWidgetDialog( QWidget *parent = 0, const char *name = 0, bool modal = true, const QString &caption = QString::null, int buttonMask = Ok | Apply | Cancel ) : KDialogBase( parent, name, modal, caption, buttonMask ) {/* nothing */};
+ ~EntryWidgetDialog() {/* nothing */};
+ void setMainWidget( EntryWidget *widget )
+ {
+ KDialogBase::setMainWidget( widget );
+ m_widget = widget;
+ };
+
+ protected:
+ void closeEvent( QCloseEvent * e )
+ {
+ if ( m_widget->queryClose() ) e->accept();
+ else e->ignore();
+ }
+
+ protected slots:
+ void slotCancel()
+ {
+ if ( m_widget->queryClose() ) QDialog::done( Cancel );
+ }
+
+ void slotClose()
+ {
+ if ( m_widget->queryClose() ) QDialog::done( Cancel );
+ }
+
+ private:
+ EntryWidget *m_widget;
+ };
+
+}
+
+#endif
diff --git a/src/entrywidgetauthor.cpp b/src/entrywidgetauthor.cpp
new file mode 100644
index 0000000..32e2e18
--- /dev/null
+++ b/src/entrywidgetauthor.cpp
@@ -0,0 +1,114 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlayout.h>
+#include <qlabel.h>
+
+#include <kdialog.h>
+#include <klocale.h>
+
+#include <fieldlistview.h>
+#include <entrywidgetwarningsitem.h>
+#include "entrywidgetauthor.h"
+
+namespace KBibTeX
+{
+
+ EntryWidgetAuthor::EntryWidgetAuthor( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ : EntryWidgetTab( bibtexfile, isReadOnly, parent, name )
+ {
+ setupGUI();
+ }
+
+ EntryWidgetAuthor::~EntryWidgetAuthor()
+ {
+ // nothing
+ }
+
+ bool EntryWidgetAuthor::isModified()
+ {
+ return m_fieldListViewAuthor->isModified() || m_fieldListViewEditor->isModified();
+ }
+
+ void EntryWidgetAuthor::updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll )
+ {
+ bool enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftAuthor ) != BibTeX::Entry::frsIgnored;
+ m_fieldListViewAuthor->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftEditor ) != BibTeX::Entry::frsIgnored;
+ m_fieldListViewEditor->setEnabled( enableWidget );
+ }
+
+ void EntryWidgetAuthor::apply( BibTeX::Entry *entry )
+ {
+ BibTeX::Value * value = m_fieldListViewAuthor->value();
+ setValue( entry, BibTeX::EntryField::ftAuthor, value );
+ if ( value != NULL ) delete value;
+
+ value = m_fieldListViewEditor->value();
+ setValue( entry, BibTeX::EntryField::ftEditor, value );
+ if ( value != NULL ) delete value;
+ }
+
+ void EntryWidgetAuthor::reset( BibTeX::Entry *entry )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftAuthor );
+ m_fieldListViewAuthor->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftEditor );
+ m_fieldListViewEditor->setValue( field != NULL ? field->value() : NULL );
+ }
+
+ void EntryWidgetAuthor::updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings )
+ {
+ if ( entryType == BibTeX::Entry::etBook || entryType == BibTeX::Entry::etInBook )
+ {
+ if ( m_fieldListViewAuthor->isEmpty() && m_fieldListViewEditor->isEmpty() )
+ new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlWarning, i18n( "The fields 'Author' or 'Editor' are required, but both are missing" ), m_fieldListViewAuthor, listViewWarnings, "warning" );
+ }
+ else
+ {
+ addMissingWarning( entryType, BibTeX::EntryField::ftAuthor, m_fieldListViewAuthor->caption(), !m_fieldListViewAuthor->isEmpty(), m_fieldListViewAuthor, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftEditor, m_fieldListViewEditor->caption(), !m_fieldListViewEditor->isEmpty(), m_fieldListViewEditor, listViewWarnings );
+ }
+ }
+
+ void EntryWidgetAuthor::setupGUI()
+ {
+ QGridLayout * gridLayout = new QGridLayout( this, 2, 3, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ gridLayout->setColSpacing( 1, KDialog::spacingHint() * 4 );
+
+ QLabel *label = new QLabel( QString( "%1:" ).arg( i18n( "Author" ) ), this );
+ gridLayout->addWidget( label, 0, 0 );
+ m_fieldListViewAuthor = new KBibTeX::FieldListView( i18n( "Author" ), i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewAuthor" ), m_isReadOnly, this );
+ m_fieldListViewAuthor->setFieldType( BibTeX::EntryField::ftAuthor );
+ gridLayout->addWidget( m_fieldListViewAuthor, 1, 0 );
+ label->setBuddy( m_fieldListViewAuthor );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Editor" ) ), this );
+ gridLayout->addWidget( label, 0, 2 );
+ m_fieldListViewEditor = new KBibTeX::FieldListView( i18n( "Editor" ), i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewEditor" ), m_isReadOnly, this );
+ m_fieldListViewEditor->setFieldType( BibTeX::EntryField::ftEditor );
+ gridLayout->addWidget( m_fieldListViewEditor, 1, 2 );
+ label->setBuddy( m_fieldListViewEditor );
+ }
+
+}
+#include "entrywidgetauthor.moc"
diff --git a/src/entrywidgetauthor.h b/src/entrywidgetauthor.h
new file mode 100644
index 0000000..1986614
--- /dev/null
+++ b/src/entrywidgetauthor.h
@@ -0,0 +1,60 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXENTRYWIDGETAUTHOR_H
+#define KBIBTEXENTRYWIDGETAUTHOR_H
+
+#include <entrywidgettab.h>
+
+class QWidget;
+class QScrollView;
+
+namespace KBibTeX
+{
+ class FieldListView;
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class EntryWidgetAuthor : public EntryWidgetTab
+ {
+ Q_OBJECT
+ public:
+ EntryWidgetAuthor( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~EntryWidgetAuthor();
+
+ bool isModified();
+
+ public slots:
+ void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
+ void apply( BibTeX::Entry *entry );
+ void reset( BibTeX::Entry *entry );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+
+ private:
+ FieldListView *m_fieldListViewAuthor;
+ FieldListView *m_fieldListViewEditor;
+
+ void setupGUI();
+
+ };
+
+}
+
+#endif
diff --git a/src/entrywidgetexternal.cpp b/src/entrywidgetexternal.cpp
new file mode 100644
index 0000000..a672e25
--- /dev/null
+++ b/src/entrywidgetexternal.cpp
@@ -0,0 +1,297 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qtooltip.h>
+
+#include <kpushbutton.h>
+#include <kdialog.h>
+#include <klocale.h>
+#include <kfiledialog.h>
+#include <kurl.h>
+#include <kurllabel.h>
+#include <kiconloader.h>
+#include <kpopupmenu.h>
+
+#include <fieldlineedit.h>
+#include <settings.h>
+#include "entrywidgetexternal.h"
+
+namespace KBibTeX
+{
+
+ const int EntryWidgetExternal::m_menuIdCurrentDirectory = 8192;
+ const int EntryWidgetExternal::m_menuIdPreviousDirectory = 8191;
+ QString EntryWidgetExternal::m_previousDirectory = QString::null;
+
+ EntryWidgetExternal::EntryWidgetExternal( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ : EntryWidgetTab( bibtexfile, isReadOnly, parent, name )
+ {
+ setupGUI();
+ }
+
+ EntryWidgetExternal::~EntryWidgetExternal()
+ {
+ // nothing
+ }
+
+ bool EntryWidgetExternal::isModified()
+ {
+ return m_fieldLineEditURL->isModified() || m_fieldLineEditDoi->isModified() || m_fieldLineEditLocalFile->isModified();
+ }
+
+ void EntryWidgetExternal::updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll )
+ {
+ bool enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftURL ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditURL->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftDoi ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditDoi->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftLocalFile ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditLocalFile->setEnabled( enableWidget );
+ m_pushButtonBrowseLocalFile->setEnabled( !m_isReadOnly && enableWidget );
+
+ updateGUI();
+ }
+
+ void EntryWidgetExternal::apply( BibTeX::Entry *entry )
+ {
+ BibTeX::Value * value = m_fieldLineEditURL->value();
+ setValue( entry, BibTeX::EntryField::ftURL, value );
+ delete value;
+
+ value = m_fieldLineEditDoi->value();
+ setValue( entry, BibTeX::EntryField::ftDoi, value );
+ delete value;
+
+ value = m_fieldLineEditLocalFile->value();
+ setValue( entry, BibTeX::EntryField::ftLocalFile, value );
+ delete value;
+ }
+
+ void EntryWidgetExternal::reset( BibTeX::Entry *entry )
+ {
+ disconnect( m_fieldLineEditURL, SIGNAL( textChanged() ), this, SLOT( updateGUI() ) );
+ disconnect( m_fieldLineEditDoi, SIGNAL( textChanged() ), this, SLOT( updateGUI() ) );
+ disconnect( m_fieldLineEditLocalFile, SIGNAL( textChanged() ), this, SLOT( updateGUI() ) );
+
+
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftURL );
+ m_fieldLineEditURL->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftDoi );
+ m_fieldLineEditDoi->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftLocalFile );
+ m_fieldLineEditLocalFile->setValue( field != NULL ? field->value() : NULL );
+
+ updateGUI();
+
+ connect( m_fieldLineEditURL, SIGNAL( textChanged() ), this, SLOT( updateGUI() ) );
+ connect( m_fieldLineEditDoi, SIGNAL( textChanged() ), this, SLOT( updateGUI() ) );
+ connect( m_fieldLineEditLocalFile, SIGNAL( textChanged() ), this, SLOT( updateGUI() ) );
+ }
+
+ void EntryWidgetExternal::updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings )
+ {
+ addMissingWarning( entryType, BibTeX::EntryField::ftURL, m_fieldLineEditURL->caption(), !m_fieldLineEditURL->isEmpty(), m_fieldLineEditURL, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftDoi, m_fieldLineEditDoi->caption(), !m_fieldLineEditDoi->isEmpty(), m_fieldLineEditDoi, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftLocalFile, m_fieldLineEditDoi->caption(), !m_fieldLineEditDoi->isEmpty(), m_fieldLineEditLocalFile, listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditURL, m_fieldLineEditURL->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditDoi, m_fieldLineEditDoi->caption(), listViewWarnings );
+
+ updateGUI();
+ }
+
+ void EntryWidgetExternal::openURL()
+ {
+ BibTeX::Value * value = m_fieldLineEditURL->value();
+ KURL url = Settings::locateFile( value->text(), m_bibtexfile->fileName, this );
+ if ( url.isValid() )
+ Settings::openUrl( url, this );
+ else
+ m_pushButtonOpenURL->setEnabled( FALSE );
+ }
+
+ void EntryWidgetExternal::openURL( const QString &url )
+ {
+ Settings::openUrl( KURL( url ), this );
+ }
+
+ void EntryWidgetExternal::openDoi()
+ {
+ BibTeX::Value * value = m_fieldLineEditDoi->value();
+ KURL url = Settings::doiURL( value->text() );
+ if ( url.isValid() )
+ Settings::openUrl( url, this );
+ else
+ m_pushButtonOpenDoi->setEnabled( FALSE );
+ }
+
+ void EntryWidgetExternal::openLocalFile()
+ {
+ BibTeX::Value * value = m_fieldLineEditLocalFile->value();
+ KURL url = Settings::locateFile( value->text(), m_bibtexfile->fileName, this );
+ if ( url.isValid() )
+ Settings::openUrl( url, this );
+ else
+ m_pushButtonOpenLocalFile->setEnabled( FALSE );
+ }
+
+ void EntryWidgetExternal::browseLocalFile( int id )
+ {
+ Settings * settings = Settings::self();
+ QString startDir = QString::null;
+ if ( id == m_menuIdPreviousDirectory && m_previousDirectory != QString::null )
+ startDir = m_previousDirectory;
+ else if ( settings->editing_DocumentSearchPaths.size() > ( unsigned int )id )
+ startDir = *settings->editing_DocumentSearchPaths.at( id );
+ else
+ startDir = QDir::currentDirPath();
+ QString filename = KFileDialog::getOpenFileName( startDir );
+
+ if ( !filename.isEmpty() )
+ {
+ /** if the user started browsing for files from a search path,
+ * remove this search path prefix from the absolute path returned
+ * by the file open dialog. */
+ if ( id >= 0 && filename.startsWith( startDir ) )
+ {
+ int len = startDir.length();
+ if ( startDir == "/" )
+ len = 0;
+ else if ( !startDir.endsWith( "/" ) )
+ ++len;
+ filename = filename.mid( len );
+ }
+
+ BibTeX::Value * value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText( filename ) );
+ m_fieldLineEditLocalFile->setValue( value );
+
+ if ( m_previousDirectory == QString::null )
+ {
+ QPopupMenu *menu = m_pushButtonBrowseLocalFile->popup();
+ menu->insertItem( QIconSet( SmallIcon( "favorite" ) ), i18n( "Previously used directory" ), m_menuIdPreviousDirectory, 2 );
+ }
+ QFileInfo fileInfo( filename );
+ m_previousDirectory = fileInfo.dirPath( true );
+ }
+ }
+
+ void EntryWidgetExternal::updateGUI()
+ {
+ BibTeX::Value * value = m_fieldLineEditURL->value();
+ m_pushButtonOpenURL->setEnabled( value != NULL && Settings::locateFile( value->text(), m_bibtexfile->fileName, this ).isValid() );
+
+ value = m_fieldLineEditLocalFile->value();
+ m_pushButtonOpenLocalFile->setEnabled( value != NULL && Settings::locateFile( value->text(), m_bibtexfile->fileName, this ).isValid() );
+
+ value = m_fieldLineEditDoi->value();
+ m_pushButtonOpenDoi->setEnabled( value != NULL && Settings::doiURL( value->text() ).isValid() );
+ }
+
+ void EntryWidgetExternal::setupGUI()
+ {
+ Settings * settings = Settings::self();
+
+ QGridLayout * gridLayout = new QGridLayout( this, 5, 3, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ gridLayout->setRowStretch( 4, 10 );
+
+ QLabel *label = new QLabel( QString( "%1:" ).arg( i18n( "URL" ) ), this );
+ gridLayout->addWidget( label, 0, 0 );
+ m_fieldLineEditURL = new KBibTeX::FieldLineEdit( i18n( "URL" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditURL" );
+ m_fieldLineEditURL->setFieldType( BibTeX::EntryField::ftURL );
+ gridLayout->addWidget( m_fieldLineEditURL, 0, 1 );
+ label->setBuddy( m_fieldLineEditURL );
+ connect( m_fieldLineEditURL, SIGNAL( textChanged() ), this, SLOT( updateGUI() ) );
+
+ m_pushButtonOpenURL = new KPushButton( this );
+ gridLayout->addWidget( m_pushButtonOpenURL, 0, 2 );
+ m_pushButtonOpenURL->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
+ m_pushButtonOpenURL->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+ QToolTip::add( m_pushButtonOpenURL, QString( i18n( "Open %1" ) ).arg( i18n( "URL" ) ) );
+ connect( m_pushButtonOpenURL, SIGNAL( clicked() ), this, SLOT( openURL() ) );
+
+ KURLLabel *urllabel = new KURLLabel( "http://www.doi.org/", QString( "%1:" ).arg( i18n( "DOI" ) ), this );
+ QToolTip::add( urllabel, i18n( "Digital Object Identifier" ) );
+ urllabel->setFocusPolicy( QWidget::NoFocus );
+ gridLayout->addWidget( urllabel, 1, 0 );
+ m_fieldLineEditDoi = new KBibTeX::FieldLineEdit( i18n( "DOI" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditDoi" );
+ m_fieldLineEditDoi->setFieldType( BibTeX::EntryField::ftDoi );
+ gridLayout->addWidget( m_fieldLineEditDoi, 1, 1 );
+ urllabel->setBuddy( m_fieldLineEditDoi );
+ connect( m_fieldLineEditDoi, SIGNAL( textChanged() ), this, SLOT( updateGUI() ) );
+ connect( urllabel, SIGNAL( leftClickedURL( const QString& ) ), this, SLOT( openURL( const QString& ) ) );
+
+ m_pushButtonOpenDoi = new KPushButton( this );
+ gridLayout->addWidget( m_pushButtonOpenDoi, 1, 2 );
+ m_pushButtonOpenDoi->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
+ m_pushButtonOpenDoi->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+ QToolTip::add( m_pushButtonOpenDoi, i18n( "Open DOI" ) );
+ connect( m_pushButtonOpenDoi, SIGNAL( clicked() ), this, SLOT( openDoi() ) );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Local File" ) ), this );
+ gridLayout->addWidget( label, 2, 0 );
+ m_fieldLineEditLocalFile = new KBibTeX::FieldLineEdit( i18n( "Local File" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditLocalFile" );
+ m_fieldLineEditLocalFile->setFieldType( BibTeX::EntryField::ftLocalFile );
+ gridLayout->addWidget( m_fieldLineEditLocalFile, 2, 1 );
+ label->setBuddy( m_fieldLineEditLocalFile );
+ connect( m_fieldLineEditLocalFile, SIGNAL( textChanged() ), this, SLOT( updateGUI() ) );
+
+ m_pushButtonOpenLocalFile = new KPushButton( this );
+ gridLayout->addWidget( m_pushButtonOpenLocalFile, 2, 2 );
+ m_pushButtonOpenLocalFile->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
+ m_pushButtonOpenLocalFile->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+ QToolTip::add( m_pushButtonOpenLocalFile, QString( i18n( "Open %1" ) ).arg( i18n( "Local File" ) ) );
+ connect( m_pushButtonOpenLocalFile, SIGNAL( clicked() ), this, SLOT( openLocalFile() ) );
+
+ QWidget *container = new QWidget( this );
+ QHBoxLayout *containerLayout = new QHBoxLayout( container );
+ gridLayout->addWidget( container, 3, 1 );
+ m_pushButtonBrowseLocalFile = new KPushButton( i18n( "&Browse..." ), container );
+ QToolTip::add( m_pushButtonBrowseLocalFile, i18n( "Browse for a local file" ) );
+ m_pushButtonBrowseLocalFile->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+ containerLayout->addWidget( m_pushButtonBrowseLocalFile );
+ containerLayout->addStretch( 10 );
+ m_pushButtonBrowseLocalFile->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
+
+ KPopupMenu *menu = new KPopupMenu( m_pushButtonBrowseLocalFile );
+ menu->insertTitle( i18n( "Select base directory" ) );
+ menu->insertItem( QIconSet( SmallIcon( "favorite" ) ), i18n( "Current directory" ), m_menuIdCurrentDirectory );
+ if ( m_previousDirectory != QString::null )
+ menu->insertItem( QIconSet( SmallIcon( "favorite" ) ), i18n( "Previously used directory" ), m_menuIdPreviousDirectory );
+ if ( !settings->editing_DocumentSearchPaths.isEmpty() )
+ {
+ menu->insertSeparator();
+ int i = 0;
+ for ( QStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it, ++i )
+ menu->insertItem( QIconSet( SmallIcon( "folder" ) ), *it, i );
+ }
+ m_pushButtonBrowseLocalFile->setPopup( menu );
+ connect( menu, SIGNAL( activated( int ) ), this, SLOT( browseLocalFile( int ) ) );
+ }
+}
+#include "entrywidgetexternal.moc"
diff --git a/src/entrywidgetexternal.h b/src/entrywidgetexternal.h
new file mode 100644
index 0000000..16cb608
--- /dev/null
+++ b/src/entrywidgetexternal.h
@@ -0,0 +1,76 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXENTRYWIDGETEXTERNAL_H
+#define KBIBTEXENTRYWIDGETEXTERNAL_H
+
+#include <entrywidgettab.h>
+
+class KPushButton;
+class KURL;
+
+namespace KBibTeX
+{
+
+ class FieldLineEdit;
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class EntryWidgetExternal : public EntryWidgetTab
+ {
+ Q_OBJECT
+ public:
+ EntryWidgetExternal( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~EntryWidgetExternal();
+
+ bool isModified();
+
+ public slots:
+ void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
+ void apply( BibTeX::Entry *entry );
+ void reset( BibTeX::Entry *entry );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+
+ private slots:
+ void openURL();
+ void openURL( const QString & );
+ void openDoi();
+ void openLocalFile();
+ void browseLocalFile( int id );
+ void updateGUI();
+
+ private:
+ FieldLineEdit *m_fieldLineEditURL;
+ KPushButton *m_pushButtonOpenURL;
+ FieldLineEdit *m_fieldLineEditDoi;
+ KPushButton *m_pushButtonOpenDoi;
+ FieldLineEdit *m_fieldLineEditLocalFile;
+ KPushButton *m_pushButtonOpenLocalFile;
+ KPushButton *m_pushButtonBrowseLocalFile;
+
+ static QString m_previousDirectory;
+ static const int m_menuIdCurrentDirectory, m_menuIdPreviousDirectory;
+
+ void setupGUI();
+ };
+
+}
+
+#endif
diff --git a/src/entrywidgetkeyword.cpp b/src/entrywidgetkeyword.cpp
new file mode 100644
index 0000000..b61acc0
--- /dev/null
+++ b/src/entrywidgetkeyword.cpp
@@ -0,0 +1,283 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlayout.h>
+#include <qregexp.h>
+#include <qpushbutton.h>
+#include <qtooltip.h>
+#include <qtimer.h>
+#include <qlabel.h>
+
+#include <kdialog.h>
+#include <klocale.h>
+#include <kiconloader.h>
+#include <kdialogbase.h>
+#include <kmessagebox.h>
+#include <klistview.h>
+#include <kguiitem.h>
+#include <kdebug.h>
+
+#include <settings.h>
+#include "entrywidgetkeyword.h"
+
+namespace KBibTeX
+{
+ KeywordListViewItem::KeywordListViewItem( KListView * parent, const QString & text, bool global ) : QCheckListItem( parent, text, QCheckListItem::CheckBox )
+ {
+ setGlobal( global );
+ }
+
+ KeywordListViewItem::~KeywordListViewItem()
+ {
+// nothing
+ }
+
+ void KeywordListViewItem::setGlobal( bool global )
+ {
+ m_isGlobal = global;
+ if ( m_isGlobal )
+ {
+ setText( 1, i18n( "Global" ) );
+ setPixmap( 1, SmallIcon( "package" ) );
+ }
+ else
+ {
+ setText( 1, i18n( "In this file only" ) );
+ setPixmap( 1, SmallIcon( "editcopy" ) );
+ }
+ }
+
+ EntryWidgetKeyword::EntryWidgetKeyword( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name ) : EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_bibtexfile( bibtexfile ), m_isModified( FALSE ), m_numKeywords( 0 )
+ {
+ setupGUI();
+ }
+
+ EntryWidgetKeyword::~EntryWidgetKeyword()
+ {
+ // nothing
+ }
+
+ bool EntryWidgetKeyword::isModified()
+ {
+ return m_isModified;
+ }
+
+ void EntryWidgetKeyword::updateGUI( BibTeX::Entry::EntryType /*entryType*/, bool /*enableAll*/ )
+ {
+ // nothing
+ }
+
+ void EntryWidgetKeyword::apply( BibTeX::Entry *entry )
+ {
+ readListView();
+
+ /**
+ * Update entry
+ */
+ if ( m_usedKeywords.empty() )
+ entry->deleteField( BibTeX::EntryField::ftKeywords );
+ else
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftKeywords );
+ BibTeX::Value *value = NULL;
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftKeywords );
+ entry->addField( field );
+ }
+ value = field->value();
+ value->items.clear();
+ BibTeX::KeywordContainer *keywordContainer = new BibTeX::KeywordContainer( m_usedKeywords );
+ value->items.append( keywordContainer );
+ }
+
+ /**
+ * Update global keyword list
+ */
+ KBibTeX::Settings * settings = KBibTeX::Settings::self();
+ settings->keyword_GlobalList = m_globalKeywords;
+ }
+
+ void EntryWidgetKeyword::reset( BibTeX::Entry *entry )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftKeywords );
+ BibTeX::KeywordContainer *keywordContainer = NULL;
+ if ( field != NULL && ( keywordContainer = dynamic_cast<BibTeX::KeywordContainer*>( field->value()->items.first() ) ) != NULL )
+ for ( QValueList<BibTeX::Keyword*>::Iterator it = keywordContainer->keywords.begin(); it != keywordContainer->keywords.end(); ++it )
+ m_usedKeywords.append(( *it )->text() );
+
+ if ( m_bibtexfile != NULL )
+ m_fileKeywords = m_bibtexfile->getAllValuesAsStringList( BibTeX::EntryField::ftKeywords );
+
+ KBibTeX::Settings * settings = KBibTeX::Settings::self();
+ m_globalKeywords = settings->keyword_GlobalList;
+
+ m_availableKeywords = QStringList( m_globalKeywords );
+ for ( QStringList::Iterator it = m_fileKeywords.begin(); it != m_fileKeywords.end(); ++it )
+ if ( !m_availableKeywords.contains( *it ) )
+ m_availableKeywords.append( *it );
+ for ( QStringList::Iterator it = m_usedKeywords.begin(); it != m_usedKeywords.end(); ++it )
+ if ( !m_availableKeywords.contains( *it ) )
+ m_availableKeywords.append( *it );
+
+ setListView();
+ }
+
+ void EntryWidgetKeyword::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, QListView */*listViewWarnings*/ )
+ {
+ // nothing
+ }
+
+ void EntryWidgetKeyword::slotSelectionChanged()
+ {
+ bool hasCurrent = m_listviewKeywords->selectedItem() != NULL;
+
+ m_buttonEdit->setEnabled( hasCurrent );
+ m_buttonToggleGlobal->setEnabled( hasCurrent );
+ }
+
+ void EntryWidgetKeyword::slotKeywordRenamed( QListViewItem * item, const QString & text, int /*col*/ )
+ {
+ KeywordListViewItem *kwlvi = dynamic_cast<KeywordListViewItem*>( item );
+ if ( text.isEmpty() )
+ {
+ item->setText( 0, m_beforeRenaming );
+ kwlvi->setOn( FALSE );
+ }
+ else if ( text != m_beforeRenaming )
+ {
+ if ( m_availableKeywords.contains( text ) )
+ {
+ item->setText( 0, m_beforeRenaming );
+ KMessageBox::error( this, QString( i18n( "The keyword '%1' does already exist in the list of keywords.\nThe old name has been restored." ) ).arg( text ), i18n( "Renaming keyword failed" ) );
+ }
+ else
+ {
+ m_availableKeywords.remove( m_beforeRenaming );
+ m_availableKeywords.append( text );
+ if ( kwlvi->isGlobal() )
+ {
+ m_globalKeywords.remove( m_beforeRenaming );
+ m_globalKeywords.append( text );
+ }
+ else
+ {
+ m_fileKeywords.remove( m_beforeRenaming );
+ m_fileKeywords.append( text );
+ }
+ QCheckListItem *checkedItem = dynamic_cast<QCheckListItem*>( item );
+ if ( checkedItem != NULL )
+ checkedItem->setOn( TRUE );
+ }
+ }
+ }
+
+ void EntryWidgetKeyword::slotNewKeyword()
+ {
+ KeywordListViewItem * item = new KeywordListViewItem( m_listviewKeywords, QString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewKeyword%1" ) ).arg( ++m_numKeywords ), FALSE );
+ m_listviewKeywords->setSelected( item, TRUE );
+ QTimer::singleShot( 100, this, SLOT( slotEditKeyword() ) );
+ }
+
+ void EntryWidgetKeyword::slotEditKeyword()
+ {
+ QListViewItem * item = m_listviewKeywords->selectedItem();
+ if ( item != NULL )
+ {
+ m_beforeRenaming = item->text( 0 );
+ m_listviewKeywords->rename( item, 0 );
+ }
+ }
+
+ void EntryWidgetKeyword::slotToggleGlobal()
+ {
+ KeywordListViewItem *item = dynamic_cast<KeywordListViewItem*>( m_listviewKeywords->selectedItem() );
+ if ( item != NULL )
+ {
+ bool isGlobal = item->isGlobal();
+ if ( isGlobal )
+ m_globalKeywords.remove( item->text( 0 ) );
+ else
+ m_globalKeywords.append( item->text( 0 ) );
+
+ item->setGlobal( !isGlobal );
+ }
+ }
+
+ void EntryWidgetKeyword::setupGUI()
+ {
+ QGridLayout * gridLayout = new QGridLayout( this, 6, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ gridLayout->setRowStretch( 4, 1 );
+
+ m_listviewKeywords = new KListView( this );
+ m_listviewKeywords->setEnabled( !m_isReadOnly );
+ m_listviewKeywords->addColumn( i18n( "Keyword" ) );
+ m_listviewKeywords->addColumn( i18n( "Origin" ) );
+ gridLayout->addMultiCellWidget( m_listviewKeywords, 0, 4, 0, 0 );
+ m_listviewKeywords->setAllColumnsShowFocus( TRUE );
+ connect( m_listviewKeywords, SIGNAL( currentChanged( QListViewItem* ) ), this, SLOT( slotSelectionChanged() ) );
+ connect( m_listviewKeywords, SIGNAL( clicked( QListViewItem * ) ), this, SLOT( slotSelectionChanged() ) );
+ connect( m_listviewKeywords, SIGNAL( itemRenamed( QListViewItem*, const QString&, int ) ), this, SLOT( slotKeywordRenamed( QListViewItem*, const QString&, int ) ) );
+
+ m_buttonNew = new QPushButton( i18n( "keyword", "New" ), this );
+ m_buttonNew->setEnabled( !m_isReadOnly );
+ m_buttonNew->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+ QToolTip::add( m_buttonNew, i18n( "Add a new keyword to the list" ) );
+ gridLayout->addWidget( m_buttonNew, 0, 1 );
+ connect( m_buttonNew, SIGNAL( clicked() ), this, SLOT( slotNewKeyword() ) );
+
+ m_buttonEdit = new QPushButton( i18n( "keyword", "Edit" ), this );
+ m_buttonEdit->setIconSet( QIconSet( SmallIcon( "edit" ) ) );
+ QToolTip::add( m_buttonEdit, i18n( "Edit the selected keyword" ) );
+ gridLayout->addWidget( m_buttonEdit, 1, 1 );
+ m_buttonEdit->setEnabled( FALSE );
+ connect( m_buttonEdit, SIGNAL( clicked() ), this, SLOT( slotEditKeyword() ) );
+
+ m_buttonToggleGlobal = new QPushButton( i18n( "keyword", "Toggle &global" ), this );
+ m_buttonToggleGlobal->setIconSet( QIconSet( SmallIcon( "package" ) ) );
+ QToolTip::add( m_buttonToggleGlobal, i18n( "Add or remove the selected keyword to or from the global list" ) );
+ gridLayout->addWidget( m_buttonToggleGlobal, 2, 1 );
+ m_buttonToggleGlobal->setEnabled( FALSE );
+ connect( m_buttonToggleGlobal, SIGNAL( clicked() ), this, SLOT( slotToggleGlobal() ) );
+
+ QLabel *label = new QLabel( i18n( "There is no need to delete keywords. Simply uncheck unwanted keywords and make them non-global.\nGlobal keywords can also be edited in the settings dialog." ), this );
+ label->setAlignment( QLabel::WordBreak | QLabel::AlignTop );
+ gridLayout->addMultiCellWidget( label, 5, 5, 0, 1 );
+ }
+
+ void EntryWidgetKeyword::setListView()
+ {
+ m_availableKeywords.sort();
+ m_listviewKeywords->clear();
+ for ( QStringList::Iterator it = m_availableKeywords.begin(); it != m_availableKeywords.end(); ++it )
+ {
+ KeywordListViewItem *item = new KeywordListViewItem( m_listviewKeywords, *it, m_globalKeywords.contains( *it ) );
+ if ( m_usedKeywords.contains( *it ) )
+ item->setOn( TRUE );
+ }
+ }
+
+ void EntryWidgetKeyword::readListView()
+ {
+ m_usedKeywords.clear();
+ for ( QListViewItemIterator it = QListViewItemIterator( m_listviewKeywords, QListViewItemIterator::Checked ); it.current() != NULL; ++it )
+ m_usedKeywords.append(( *it ) ->text( 0 ) );
+ }
+}
+#include "entrywidgetkeyword.moc"
diff --git a/src/entrywidgetkeyword.h b/src/entrywidgetkeyword.h
new file mode 100644
index 0000000..88eae61
--- /dev/null
+++ b/src/entrywidgetkeyword.h
@@ -0,0 +1,93 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXENTRYWIDGETKEYWORD_H
+#define KBIBTEXENTRYWIDGETKEYWORD_H
+
+#include <entrywidgettab.h>
+
+class QPushButton;
+class KListView;
+
+namespace KBibTeX
+{
+ class KeywordListViewItem: public QCheckListItem
+ {
+ public:
+ KeywordListViewItem( KListView * parent, const QString & text, bool isGlobal );
+ ~KeywordListViewItem();
+
+ bool isGlobal()
+ {
+ return m_isGlobal;
+ };
+ void setGlobal( bool global );
+
+ protected:
+ bool m_isGlobal;
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class EntryWidgetKeyword : public EntryWidgetTab
+ {
+ Q_OBJECT
+ public:
+ EntryWidgetKeyword( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~EntryWidgetKeyword();
+
+ bool isModified();
+
+ public slots:
+ void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
+ void apply( BibTeX::Entry *entry );
+ void reset( BibTeX::Entry *entry );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+
+ private slots:
+ void slotSelectionChanged();
+ void slotKeywordRenamed( QListViewItem * item, const QString & text, int col );
+ void slotNewKeyword();
+ void slotEditKeyword();
+ void slotToggleGlobal();
+
+ private:
+ BibTeX::File *m_bibtexfile;
+ QStringList m_availableKeywords;
+ QStringList m_globalKeywords;
+ QStringList m_fileKeywords;
+ QStringList m_usedKeywords;
+ bool m_isModified;
+ KListView *m_listviewKeywords;
+ QPushButton *m_buttonNew;
+ QPushButton *m_buttonEdit;
+ QPushButton *m_buttonToggleGlobal;
+ int m_numKeywords;
+ QString m_beforeRenaming;
+
+ void setupGUI();
+ void setListView();
+ void readListView();
+ bool editKeywords( QStringList *keywords );
+ };
+
+}
+
+#endif
diff --git a/src/entrywidgetmisc.cpp b/src/entrywidgetmisc.cpp
new file mode 100644
index 0000000..f2e4f5e
--- /dev/null
+++ b/src/entrywidgetmisc.cpp
@@ -0,0 +1,172 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlayout.h>
+#include <qlabel.h>
+
+#include <kdialog.h>
+#include <klocale.h>
+
+#include <fieldlineedit.h>
+#include <value.h>
+#include <entryfield.h>
+#include "entrywidgetmisc.h"
+
+namespace KBibTeX
+{
+
+ EntryWidgetMisc::EntryWidgetMisc( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ : EntryWidgetTab( bibtexfile, isReadOnly, parent, name )
+ {
+ setupGUI();
+ }
+
+ EntryWidgetMisc::~EntryWidgetMisc()
+ {
+ // nothing
+ }
+
+ bool EntryWidgetMisc::isModified()
+ {
+ return m_fieldLineEditType->isModified() || m_fieldLineEditKey->isModified() || m_fieldLineEditNote->isModified() || m_fieldLineEditAnnote->isModified() || m_fieldLineEditAbstract->isModified();
+ }
+
+ void EntryWidgetMisc::updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll )
+ {
+ bool enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftType ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditType->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftKey ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditKey->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftNote ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditNote->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftAnnote ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditAnnote->setEnabled( enableWidget );
+ }
+
+ void EntryWidgetMisc::apply( BibTeX::Entry *entry )
+ {
+ BibTeX::Value * value = m_fieldLineEditType->value();
+ setValue( entry, BibTeX::EntryField::ftType, value );
+ delete value;
+
+ value = m_fieldLineEditKey-> value();
+ setValue( entry, BibTeX::EntryField::ftKey, value );
+ delete value;
+
+ value = m_fieldLineEditNote-> value();
+ setValue( entry, BibTeX::EntryField::ftNote, value );
+ delete value;
+
+ value = m_fieldLineEditAnnote-> value();
+ setValue( entry, BibTeX::EntryField::ftAnnote, value );
+ delete value;
+
+ value = m_fieldLineEditAbstract-> value();
+ setValue( entry, BibTeX::EntryField::ftAbstract, value );
+ delete value;
+ }
+
+ void EntryWidgetMisc::reset( BibTeX::Entry *entry )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftType );
+ m_fieldLineEditType->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftKey );
+ m_fieldLineEditKey->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftNote );
+ m_fieldLineEditNote->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftAnnote );
+ m_fieldLineEditAnnote->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftAbstract );
+ m_fieldLineEditAbstract->setValue( field != NULL ? field->value() : NULL );
+ }
+
+ void EntryWidgetMisc::updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings )
+ {
+ addMissingWarning( entryType, BibTeX::EntryField::ftType, m_fieldLineEditType->caption(), !m_fieldLineEditType->isEmpty(), m_fieldLineEditType, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftKey, m_fieldLineEditKey->caption(), !m_fieldLineEditKey->isEmpty(), m_fieldLineEditKey, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftNote, m_fieldLineEditNote->caption(), !m_fieldLineEditNote->isEmpty(), m_fieldLineEditNote, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftAnnote, m_fieldLineEditAnnote->caption(), !m_fieldLineEditAnnote->isEmpty(), m_fieldLineEditAnnote, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftAbstract, m_fieldLineEditAbstract->caption(), !m_fieldLineEditAbstract->isEmpty(), m_fieldLineEditAbstract, listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditType, m_fieldLineEditType->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditKey, m_fieldLineEditKey->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditNote, m_fieldLineEditNote->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditAnnote, m_fieldLineEditAnnote->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditAbstract, m_fieldLineEditAbstract->caption(), listViewWarnings );
+ }
+
+ void EntryWidgetMisc::setupGUI()
+ {
+ QGridLayout * gridLayout = new QGridLayout( this, 5, 5, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ gridLayout->setColSpacing( 2, KDialog::spacingHint() * 4 );
+ gridLayout->setRowStretch( 4, 1 );
+
+ QLabel *label = new QLabel( QString( "%1:" ).arg( i18n( "Type" ) ), this );
+ gridLayout->addWidget( label, 0, 0 );
+ m_fieldLineEditType = new KBibTeX::FieldLineEdit( i18n( "Type" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditType" );
+ m_fieldLineEditType->setFieldType( BibTeX::EntryField::ftType );
+ label->setBuddy( m_fieldLineEditType );
+ gridLayout->addWidget( m_fieldLineEditType, 0, 1 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Key" ) ), this );
+ gridLayout->addWidget( label, 0, 3 );
+ m_fieldLineEditKey = new KBibTeX::FieldLineEdit( i18n( "Key" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditKey" );
+ m_fieldLineEditKey->setFieldType( BibTeX::EntryField::ftKey );
+ label->setBuddy( m_fieldLineEditKey );
+ gridLayout->addWidget( m_fieldLineEditKey, 0, 4 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Note" ) ), this );
+ gridLayout->addWidget( label, 1, 0 );
+ m_fieldLineEditNote = new KBibTeX::FieldLineEdit( i18n( "Note" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditNote" );
+ m_fieldLineEditNote->setFieldType( BibTeX::EntryField::ftNote );
+ label->setBuddy( m_fieldLineEditNote );
+ gridLayout->addMultiCellWidget( m_fieldLineEditNote, 1, 1, 1, 4 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Annote" ) ), this );
+ gridLayout->addWidget( label, 2, 0 );
+ m_fieldLineEditAnnote = new KBibTeX::FieldLineEdit( i18n( "Annote" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditAnnote" );
+ m_fieldLineEditAnnote->setFieldType( BibTeX::EntryField::ftAnnote );
+ label->setBuddy( m_fieldLineEditAnnote );
+ gridLayout->addMultiCellWidget( m_fieldLineEditAnnote, 2, 2, 1, 4 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Abstract" ) ), this );
+ gridLayout->addWidget( label, 3, 0 );
+ m_fieldLineEditAbstract = new KBibTeX::FieldLineEdit( i18n( "Abstract" ), KBibTeX::FieldLineEdit::itMultiLine, m_isReadOnly, this, "m_fieldLineEditAbstract" );
+ m_fieldLineEditAbstract->setFieldType( BibTeX::EntryField::ftAbstract );
+ label->setBuddy( m_fieldLineEditAbstract );
+ gridLayout->addMultiCellWidget( m_fieldLineEditAbstract, 3, 4, 1, 4 );
+ }
+
+}
+#include "entrywidgetmisc.moc"
diff --git a/src/entrywidgetmisc.h b/src/entrywidgetmisc.h
new file mode 100644
index 0000000..5cb99b2
--- /dev/null
+++ b/src/entrywidgetmisc.h
@@ -0,0 +1,57 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXENTRYWIDGETMISC_H
+#define KBIBTEXENTRYWIDGETMISC_H
+
+#include <entrywidgettab.h>
+
+namespace KBibTeX
+{
+ class FieldLineEdit;
+
+ class EntryWidgetMisc : public EntryWidgetTab
+ {
+ Q_OBJECT
+ public:
+ EntryWidgetMisc( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~EntryWidgetMisc();
+
+ bool isModified();
+
+ public slots:
+ void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
+ void apply( BibTeX::Entry *entry );
+ void reset( BibTeX::Entry *entry );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+
+ private:
+ FieldLineEdit *m_fieldLineEditType;
+ FieldLineEdit *m_fieldLineEditKey;
+ FieldLineEdit *m_fieldLineEditNote;
+ FieldLineEdit *m_fieldLineEditAnnote;
+ FieldLineEdit *m_fieldLineEditAbstract;
+
+ void setupGUI();
+
+ };
+
+}
+
+#endif
diff --git a/src/entrywidgetother.cpp b/src/entrywidgetother.cpp
new file mode 100644
index 0000000..1c5d13b
--- /dev/null
+++ b/src/entrywidgetother.cpp
@@ -0,0 +1,319 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qstringlist.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qlabel.h>
+#include <qwhatsthis.h>
+
+#include <kdialog.h>
+#include <kapplication.h>
+#include <klistview.h>
+#include <klocale.h>
+#include <kiconloader.h>
+#include <kio/netaccess.h>
+#include <kpushbutton.h>
+#include <klineedit.h>
+
+#include <fieldlineedit.h>
+#include <settings.h>
+#include "entrywidgetother.h"
+
+namespace KBibTeX
+{
+
+ EntryWidgetOther::EntryWidgetOther( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ : EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_isModified( FALSE )
+ {
+ setupGUI();
+ }
+
+ EntryWidgetOther::~EntryWidgetOther()
+ {
+ m_listViewFields->clear();
+ }
+
+ bool EntryWidgetOther::isModified()
+ {
+ return m_isModified;
+ }
+
+ void EntryWidgetOther::updateGUI( BibTeX::Entry::EntryType /*entryType*/, bool /*enableAll*/ )
+ {
+ // nothing
+ }
+
+ void EntryWidgetOther::apply( BibTeX::Entry *entry )
+ {
+ Settings * settings = Settings::self();
+ QStringList toBeDeleted;
+ for ( QValueList<BibTeX::EntryField*>::ConstIterator it = entry->begin(); it != entry->end(); it++ )
+ {
+ BibTeX::EntryField *field = *it;
+ bool doDel = field->fieldType() == BibTeX::EntryField::ftUnknown;
+ if ( !doDel ) continue;
+
+ QString ftn = field->fieldTypeName().lower();
+ for ( unsigned int i = 0; doDel && i < settings->userDefinedInputFields.count(); ++i )
+ doDel &= settings->userDefinedInputFields[i]->name.lower() != ftn;
+
+ if ( doDel )
+ toBeDeleted.append( ftn );
+ }
+ for ( QStringList::ConstIterator it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it )
+ entry->deleteField( *it );
+
+ for ( QListViewItemIterator it( m_listViewFields ); it.current(); it++ )
+ {
+ ValueListViewItem *vlvi = dynamic_cast<KBibTeX::ValueListViewItem*>( it.current() );
+ if ( vlvi != NULL )
+ {
+ BibTeX::EntryField * field = new BibTeX::EntryField( vlvi->title() );
+ field->setValue( vlvi->value() );
+ entry->addField( field );
+ }
+ }
+
+ m_isModified = FALSE;
+ }
+
+ void EntryWidgetOther::reset( BibTeX::Entry *entry )
+ {
+ m_listViewFields->clear();
+
+ Settings * settings = Settings::self();
+ for ( QValueList<BibTeX::EntryField*>::ConstIterator it = entry->begin(); it != entry->end(); it++ )
+ {
+ BibTeX::EntryField *field = *it;
+ bool doAdd = field->fieldType() == BibTeX::EntryField::ftUnknown;
+ if ( !doAdd ) continue;
+
+ QString ftn = field->fieldTypeName().lower();
+ for ( unsigned int i = 0; doAdd && i < settings->userDefinedInputFields.count(); ++i )
+ doAdd &= settings->userDefinedInputFields[i]->name.lower() != ftn;
+
+ if ( doAdd )
+ new ValueListViewItem( field->fieldTypeName(), field->value(), m_listViewFields );
+ }
+
+ m_isModified = FALSE;
+ }
+
+ void EntryWidgetOther::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, QListView * /*listViewWarnings*/ )
+ {
+ // no warnings neccessary for user fields
+ }
+
+ void EntryWidgetOther::setupGUI()
+ {
+ QGridLayout * gridLayout = new QGridLayout( this, 5, 3, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+
+ m_lineEditKey = new KLineEdit( this, "m_lineEditKey" );
+ m_lineEditKey->setReadOnly( m_isReadOnly );
+ gridLayout->addWidget( m_lineEditKey, 0, 1 );
+ QToolTip::add( m_lineEditKey, i18n( "Name of the user-defined field" ) );
+ QWhatsThis::add( m_lineEditKey, i18n( "The name of the user-defined field. Should only contain letters and numbers." ) );
+ QLabel *label = new QLabel( i18n( "&Name:" ), this );
+ label->setBuddy( m_lineEditKey );
+ gridLayout->addWidget( label, 0, 0 );
+
+ m_pushButtonAdd = new KPushButton( i18n( "&Add" ), this, "m_pushButtonAdd" );
+ gridLayout->addWidget( m_pushButtonAdd, 0, 2 );
+ m_pushButtonAdd->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+
+ m_fieldLineEditValue = new KBibTeX::FieldLineEdit( i18n( "Value" ), KBibTeX::FieldLineEdit::itMultiLine, m_isReadOnly, this, "m_fieldLineEditValue" );
+ gridLayout->addMultiCellWidget( m_fieldLineEditValue, 1, 2, 1, 2 );
+ QToolTip::add( m_fieldLineEditValue, i18n( "Content of the user-defined field" ) );
+ QWhatsThis::add( m_fieldLineEditValue, i18n( "The content of the user-defined field. May contain any text." ) );
+ label = new QLabel( i18n( "&Content:" ), this );
+ label->setBuddy( m_fieldLineEditValue );
+ gridLayout->addWidget( label, 1, 0 );
+
+ QSpacerItem* spacer = new QSpacerItem( 20, 110, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ gridLayout->addItem( spacer, 2, 0 );
+
+ m_listViewFields = new KListView( this, "m_listViewFields" );
+ m_listViewFields->addColumn( i18n( "Key" ) );
+ m_listViewFields->addColumn( i18n( "Value" ) );
+ m_listViewFields->setAllColumnsShowFocus( true );
+ m_listViewFields->setFullWidth( TRUE );
+ gridLayout->addMultiCellWidget( m_listViewFields, 3, 5, 1, 1 );
+
+ label = new QLabel( i18n( "&List:" ), this );
+ label->setBuddy( m_listViewFields );
+ label->setAlignment( Qt::AlignTop );
+ gridLayout->addWidget( label, 3, 0 );
+
+ m_pushButtonDelete = new KPushButton( i18n( "&Delete" ), this, "m_pushButtonDelete" );
+ gridLayout->addWidget( m_pushButtonDelete, 3, 2 );
+ m_pushButtonDelete->setIconSet( QIconSet( SmallIcon( "delete" ) ) );
+
+ m_pushButtonOpen = new KPushButton( i18n( "Op&en" ), this, "m_pushButtonOpen" );
+ gridLayout->addWidget( m_pushButtonOpen, 4, 2 );
+ m_pushButtonOpen->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
+
+ spacer = new QSpacerItem( 20, 110, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ gridLayout->addItem( spacer, 5, 2 );
+
+ m_pushButtonOpen->setEnabled( FALSE );
+ m_pushButtonAdd->setEnabled( FALSE );
+ m_pushButtonDelete->setEnabled( FALSE );
+
+ connect( m_listViewFields, SIGNAL( clicked( QListViewItem*, const QPoint&, int ) ), this, SLOT( fieldExecute( QListViewItem* ) ) );
+ connect( m_lineEditKey, SIGNAL( textChanged( const QString& ) ), this, SLOT( updateGUI() ) );
+ connect( m_fieldLineEditValue, SIGNAL( textChanged( ) ), this, SLOT( updateGUI() ) );
+ connect( m_pushButtonAdd, SIGNAL( clicked( ) ), this, SLOT( addClicked( ) ) );
+ connect( m_pushButtonDelete, SIGNAL( clicked( ) ), this, SLOT( deleteClicked( ) ) );
+ connect( m_pushButtonOpen, SIGNAL( clicked() ), this, SLOT( openClicked() ) );
+ }
+
+ void EntryWidgetOther::updateGUI()
+ {
+ QString text = m_lineEditKey->text();
+ QListViewItem * item = m_listViewFields->findItem( text, 0 ) ;
+ bool contains = item != NULL;
+ bool isUnknown = BibTeX::EntryField::fieldTypeFromString( text ) == BibTeX::EntryField::ftUnknown;
+
+ if ( contains )
+ m_listViewFields->setSelected( item, TRUE );
+ else
+ m_listViewFields->clearSelection();
+
+ m_pushButtonDelete->setEnabled( !m_isReadOnly && contains );
+ m_pushButtonAdd->setEnabled( !m_isReadOnly && !text.isEmpty() && !m_fieldLineEditValue->isEmpty() && isUnknown );
+ m_pushButtonAdd->setText( contains ? i18n( "&Apply" ) : i18n( "&Add" ) );
+ m_pushButtonAdd->setIconSet( QIconSet( SmallIcon( contains ? "apply" : "fileopen" ) ) );
+
+ bool validURL = FALSE;
+ if ( contains )
+ {
+ KURL url = Settings::locateFile( item->text( 1 ), m_bibtexfile->fileName, this );
+ validURL = url.isValid();
+ m_internalURL = url;
+ }
+ m_pushButtonOpen->setEnabled( validURL );
+ }
+
+ void EntryWidgetOther::fieldExecute( QListViewItem * item )
+ {
+ ValueListViewItem * vlvi = dynamic_cast<KBibTeX::ValueListViewItem*>( item );
+ if ( vlvi != NULL )
+ {
+ m_lineEditKey->setText( vlvi->title() );
+ m_fieldLineEditValue->setValue( vlvi->value() );
+ }
+ }
+
+ void EntryWidgetOther::addClicked()
+ {
+ QString key = m_lineEditKey->text();
+ QListViewItem * item = m_listViewFields->findItem( key, 0 ) ;
+ ValueListViewItem * vlvi = item != NULL ? dynamic_cast<KBibTeX::ValueListViewItem*>( item ) : NULL;
+
+ if ( vlvi != NULL )
+ vlvi->setValue( m_fieldLineEditValue->value() );
+ else
+ new ValueListViewItem( key, m_fieldLineEditValue->value(), m_listViewFields );
+
+ updateGUI();
+
+ m_isModified = TRUE;
+ }
+
+ void EntryWidgetOther::deleteClicked()
+ {
+ QListViewItem * item = m_listViewFields->findItem( m_lineEditKey->text(), 0 );
+
+ if ( item != NULL )
+ {
+ delete item;
+ m_lineEditKey->setText( "" );
+ m_fieldLineEditValue->setValue( new BibTeX::Value() );
+ updateGUI();
+ }
+
+ m_isModified = TRUE;
+ }
+
+ void EntryWidgetOther::openClicked()
+ {
+ if ( m_internalURL.isValid() )
+ {
+ BibTeX::Value * value = m_fieldLineEditValue->value();
+ Settings::openUrl( m_internalURL, this );
+ delete value;
+ }
+ else
+ m_fieldLineEditValue->setEnabled( FALSE );
+ }
+
+ ValueListViewItem::ValueListViewItem( const QString& title, BibTeX::Value *value, QListView *parent )
+ : QListViewItem( parent ), m_title( title )
+ {
+ m_value = new BibTeX::Value( value );
+ setTexts( m_title );
+ }
+
+ ValueListViewItem::~ValueListViewItem()
+ {
+ delete m_value;
+ }
+
+ const BibTeX::Value *ValueListViewItem::value()
+ {
+ return m_value;
+ }
+
+ QString ValueListViewItem::title()
+ {
+ return m_title;
+ }
+
+ void ValueListViewItem::setValue( BibTeX::Value *value )
+ {
+ if ( value != m_value )
+ {
+ if ( m_value != NULL )
+ delete m_value;
+
+ if ( value != NULL )
+ m_value = new BibTeX::Value( value );
+ else
+ m_value = new BibTeX::Value();
+
+ }
+ setTexts( m_title );
+ }
+
+ void ValueListViewItem::setTitle( const QString &title )
+ {
+ m_title = title;
+ setTexts( title );
+ }
+
+ void ValueListViewItem::setTexts( const QString& title )
+ {
+ setText( 0, title );
+ if ( m_value != NULL )
+ setText( 1, m_value->text() );
+ }
+
+}
+#include "entrywidgetother.moc"
diff --git a/src/entrywidgetother.h b/src/entrywidgetother.h
new file mode 100644
index 0000000..1119214
--- /dev/null
+++ b/src/entrywidgetother.h
@@ -0,0 +1,96 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXENTRYWIDGETOTHER_H
+#define KBIBTEXENTRYWIDGETOTHER_H
+
+#include <kurl.h>
+
+#include <entrywidgettab.h>
+
+class QPushButton;
+class KListView;
+class QLineEdit;
+
+namespace KBibTeX
+{
+
+ class ValueListViewItem;
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class EntryWidgetOther : public EntryWidgetTab
+ {
+ Q_OBJECT
+ public:
+ EntryWidgetOther( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~EntryWidgetOther();
+
+ bool isModified();
+
+ public slots:
+ void updateGUI( BibTeX::Entry::EntryType /*entryType*/, bool enableAll );
+ void apply( BibTeX::Entry *entry );
+ void reset( BibTeX::Entry *entry );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, QListView * /*listViewWarnings*/ );
+
+ private:
+ bool m_isModified;
+
+ QPushButton *m_pushButtonAdd;
+ QPushButton *m_pushButtonDelete;
+ QPushButton *m_pushButtonOpen;
+ QLineEdit *m_lineEditKey;
+ FieldLineEdit *m_fieldLineEditValue;
+ KListView *m_listViewFields;
+ KURL m_internalURL;
+
+ void setupGUI();
+
+ private slots:
+ void updateGUI();
+ void fieldExecute( QListViewItem * item );
+ void addClicked();
+ void deleteClicked();
+ void openClicked();
+
+ };
+
+ class ValueListViewItem : public QListViewItem
+ {
+ public:
+ ValueListViewItem( const QString& title, BibTeX::Value *value, QListView *parent );
+ ~ValueListViewItem();
+
+ const BibTeX::Value *value();
+ QString title();
+ void setValue( BibTeX::Value *value );
+ void setTitle( const QString &title );
+
+ private:
+ QString m_title;
+ BibTeX::Value *m_value;
+
+ void setTexts( const QString& title );
+ };
+
+}
+
+#endif
diff --git a/src/entrywidgetpublication.cpp b/src/entrywidgetpublication.cpp
new file mode 100644
index 0000000..d1dfd14
--- /dev/null
+++ b/src/entrywidgetpublication.cpp
@@ -0,0 +1,563 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qregexp.h>
+#include <qpushbutton.h>
+#include <qpopupmenu.h>
+#include <qtooltip.h>
+
+#include <kurl.h>
+#include <kiconloader.h>
+#include <kdialog.h>
+#include <klocale.h>
+
+#include <settings.h>
+#include <fieldlineedit.h>
+#include <entrywidgetwarningsitem.h>
+#include "entrywidgetpublication.h"
+
+namespace KBibTeX
+{
+
+ EntryWidgetPublication::EntryWidgetPublication( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ : EntryWidgetTab( bibtexfile, isReadOnly, parent, name )
+ {
+ setupGUI();
+ }
+
+
+ EntryWidgetPublication::~EntryWidgetPublication()
+ {
+ // nothing
+ }
+
+ bool EntryWidgetPublication::isModified()
+ {
+ return m_fieldLineEditOrganization->isModified() || m_fieldLineEditPublisher->isModified() || m_fieldLineEditSchool->isModified() || m_fieldLineEditInstitution->isModified() || m_fieldLineEditLocation->isModified() || m_fieldLineEditAddress->isModified() || m_fieldLineEditJournal->isModified() || m_fieldLineEditPages->isModified() || m_fieldLineEditEdition->isModified() || m_fieldLineEditChapter->isModified() || m_fieldLineEditVolume->isModified() || m_fieldLineEditNumber->isModified() || m_fieldLineEditMonth->isModified() || m_fieldLineEditYear->isModified() || m_fieldLineEditISBN->isModified() || m_fieldLineEditISSN->isModified() || m_fieldLineEditCrossRef->isModified() || m_fieldLineEditHowPublished->isModified();
+ }
+
+ void EntryWidgetPublication::updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll )
+ {
+ bool enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftOrganization ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditOrganization->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftPublisher ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditPublisher->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftSchool ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditSchool->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftInstitution ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditInstitution->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftLocation ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditLocation->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftAddress ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditAddress->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftJournal ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditJournal->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftEdition ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditEdition->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftVolume ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditVolume->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftNumber ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditNumber->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftMonth ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditMonth->setEnabled( enableWidget );
+ m_pushButtonMonths->setEnabled( enableWidget && !m_isReadOnly );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftYear ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditYear->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftISBN ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditISBN->setEnabled( enableWidget );
+ int len = isbn().length();
+ m_pushButtonISBN->setEnabled( len == 10 || len == 13 );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftISSN ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditISSN->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftCrossRef ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditCrossRef->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftHowPublished ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditHowPublished->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftChapter ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditChapter->setEnabled( enableWidget );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftPages ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditPages->setEnabled( enableWidget );
+ }
+
+ void EntryWidgetPublication::apply( BibTeX::Entry *entry )
+ {
+ BibTeX::Value * value = m_fieldLineEditHowPublished->value();
+ setValue( entry, BibTeX::EntryField::ftHowPublished, value );
+ delete value;
+
+ value = m_fieldLineEditPublisher->value();
+ setValue( entry, BibTeX::EntryField::ftPublisher, value );
+ delete value;
+
+ value = m_fieldLineEditOrganization->value();
+ setValue( entry, BibTeX::EntryField::ftOrganization, value );
+ delete value;
+
+ value = m_fieldLineEditInstitution->value();
+ setValue( entry, BibTeX::EntryField::ftInstitution, value );
+ delete value;
+
+ value = m_fieldLineEditSchool->value();
+ setValue( entry, BibTeX::EntryField::ftSchool, value );
+ delete value;
+
+ value = m_fieldLineEditLocation->value();
+ setValue( entry, BibTeX::EntryField::ftLocation, value );
+ delete value;
+
+ value = m_fieldLineEditAddress->value();
+ setValue( entry, BibTeX::EntryField::ftAddress, value );
+ delete value;
+
+ value = m_fieldLineEditJournal->value();
+ setValue( entry, BibTeX::EntryField::ftJournal, value );
+ delete value;
+
+ value = m_fieldLineEditPages->value();
+ if ( value != NULL && value->items.first() != NULL )
+ {
+ BibTeX::PlainText *plainText = dynamic_cast<BibTeX::PlainText*>( value->items.first() );
+ if ( plainText != NULL )
+ plainText->setText( plainText->text().replace( QRegExp( "\\s*--?\\s*" ), QChar( 0x2013 ) ) );
+ }
+ setValue( entry, BibTeX::EntryField::ftPages, value );
+ delete value;
+
+ value = m_fieldLineEditEdition->value();
+ setValue( entry, BibTeX::EntryField::ftEdition, value );
+ delete value;
+
+ value = m_fieldLineEditChapter->value();
+ setValue( entry, BibTeX::EntryField::ftChapter, value );
+ delete value;
+
+ value = m_fieldLineEditVolume->value();
+ setValue( entry, BibTeX::EntryField::ftVolume, value );
+ delete value;
+
+ value = m_fieldLineEditNumber->value();
+ setValue( entry, BibTeX::EntryField::ftNumber, value );
+ delete value;
+
+ value = m_fieldLineEditMonth->value();
+ setValue( entry, BibTeX::EntryField::ftMonth, value );
+ delete value;
+
+ value = m_fieldLineEditYear->value();
+ setValue( entry, BibTeX::EntryField::ftYear, value );
+ delete value;
+
+ value = m_fieldLineEditISBN->value();
+ setValue( entry, BibTeX::EntryField::ftISBN, value );
+ delete value;
+
+ value = m_fieldLineEditISSN->value();
+ setValue( entry, BibTeX::EntryField::ftISSN, value );
+ delete value;
+
+ value = m_fieldLineEditCrossRef->value();
+ setValue( entry, BibTeX::EntryField::ftCrossRef, value );
+ delete value;
+ }
+
+ void EntryWidgetPublication::reset( BibTeX::Entry *entry )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftHowPublished );
+ m_fieldLineEditHowPublished->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftPublisher );
+ m_fieldLineEditPublisher->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftOrganization );
+ m_fieldLineEditOrganization->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftInstitution );
+ m_fieldLineEditInstitution->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftSchool );
+ m_fieldLineEditSchool->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftLocation );
+ m_fieldLineEditLocation->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftAddress );
+ m_fieldLineEditAddress->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftJournal );
+ m_fieldLineEditJournal->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftPages );
+ m_fieldLineEditPages->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftEdition );
+ m_fieldLineEditEdition->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftChapter );
+ m_fieldLineEditChapter->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftVolume );
+ m_fieldLineEditVolume->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftNumber );
+ m_fieldLineEditNumber->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftMonth );
+ m_fieldLineEditMonth->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftYear );
+ m_fieldLineEditYear->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftISBN );
+ m_fieldLineEditISBN->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftISSN );
+ m_fieldLineEditISSN->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftCrossRef );
+ m_fieldLineEditCrossRef->setValue( field != NULL ? field->value() : NULL );
+ slotSetCrossRefEntry();
+ }
+
+ void EntryWidgetPublication::updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings )
+ {
+ bool crossRefValid = FALSE;
+ BibTeX::Value *value = NULL;
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftHowPublished, m_fieldLineEditHowPublished->caption(), !m_fieldLineEditHowPublished->isEmpty(), m_fieldLineEditHowPublished, listViewWarnings );
+
+ crossRefValid = m_crossRefEntry != NULL && m_crossRefEntry->getField( BibTeX::EntryField::ftPublisher ) != NULL;
+ addMissingWarning( entryType, BibTeX::EntryField::ftPublisher, m_fieldLineEditPublisher->caption(), !m_fieldLineEditPublisher->isEmpty() || crossRefValid, m_fieldLineEditPublisher, listViewWarnings );
+ if ( crossRefValid && m_fieldLineEditPublisher->isEmpty() )
+ addCrossRefInfo( m_fieldLineEditPublisher->caption(), m_fieldLineEditPublisher, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftOrganization, m_fieldLineEditOrganization->caption(), !m_fieldLineEditOrganization->isEmpty(), m_fieldLineEditOrganization, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftInstitution, m_fieldLineEditInstitution->caption(), !m_fieldLineEditInstitution->isEmpty(), m_fieldLineEditInstitution, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftSchool, m_fieldLineEditSchool->caption(), !m_fieldLineEditSchool->isEmpty(), m_fieldLineEditSchool, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftLocation, m_fieldLineEditLocation->caption(), !m_fieldLineEditLocation->isEmpty(), m_fieldLineEditLocation, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftAddress, m_fieldLineEditAddress->caption(), !m_fieldLineEditAddress->isEmpty(), m_fieldLineEditAddress, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftJournal, m_fieldLineEditJournal->caption(), !m_fieldLineEditJournal->isEmpty(), m_fieldLineEditJournal, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftEdition, m_fieldLineEditEdition->caption(), !m_fieldLineEditEdition->isEmpty(), m_fieldLineEditEdition, listViewWarnings );
+
+ crossRefValid = m_crossRefEntry != NULL && m_crossRefEntry->getField( BibTeX::EntryField::ftVolume ) != NULL;
+ addMissingWarning( entryType, BibTeX::EntryField::ftVolume, m_fieldLineEditVolume->caption(), !m_fieldLineEditVolume->isEmpty() || crossRefValid, m_fieldLineEditVolume, listViewWarnings );
+ if ( crossRefValid && m_fieldLineEditVolume->isEmpty() )
+ addCrossRefInfo( m_fieldLineEditVolume->caption(), m_fieldLineEditVolume, listViewWarnings );
+
+ crossRefValid = m_crossRefEntry != NULL && m_crossRefEntry->getField( BibTeX::EntryField::ftNumber ) != NULL;
+ addMissingWarning( entryType, BibTeX::EntryField::ftNumber, m_fieldLineEditNumber->caption(), !m_fieldLineEditNumber->isEmpty() || crossRefValid, m_fieldLineEditNumber, listViewWarnings );
+ if ( crossRefValid && m_fieldLineEditNumber->isEmpty() )
+ addCrossRefInfo( m_fieldLineEditNumber->caption(), m_fieldLineEditNumber, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftMonth, m_fieldLineEditMonth->caption(), !m_fieldLineEditMonth->isEmpty(), m_fieldLineEditMonth, listViewWarnings );
+
+ crossRefValid = m_crossRefEntry != NULL && m_crossRefEntry->getField( BibTeX::EntryField::ftYear ) != NULL;
+ addMissingWarning( entryType, BibTeX::EntryField::ftYear, m_fieldLineEditYear->caption(), !m_fieldLineEditYear->isEmpty() || crossRefValid, m_fieldLineEditYear, listViewWarnings );
+ if ( crossRefValid && m_fieldLineEditYear->isEmpty() )
+ addCrossRefInfo( m_fieldLineEditYear->caption(), m_fieldLineEditYear, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftISBN, m_fieldLineEditISBN->caption(), !m_fieldLineEditISBN->isEmpty(), m_fieldLineEditISBN, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftISSN, m_fieldLineEditISSN->caption(), !m_fieldLineEditISSN->isEmpty(), m_fieldLineEditISSN, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftCrossRef, m_fieldLineEditCrossRef->caption(), !m_fieldLineEditCrossRef->isEmpty(), m_fieldLineEditCrossRef, listViewWarnings );
+
+ if ( entryType == BibTeX::Entry::etInBook )
+ {
+ if ( m_fieldLineEditChapter->isEmpty() && m_fieldLineEditPages->isEmpty() )
+ new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlWarning, i18n( "The fields 'Chapter' or 'Pages' are required, but both are missing" ), m_fieldLineEditPages, listViewWarnings, "warning" );
+ }
+ else
+ {
+ addMissingWarning( entryType, BibTeX::EntryField::ftPages, m_fieldLineEditPages->caption(), !m_fieldLineEditPages->isEmpty(), m_fieldLineEditPages, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftChapter, m_fieldLineEditChapter->caption(), !m_fieldLineEditChapter->isEmpty(), m_fieldLineEditChapter, listViewWarnings );
+ }
+
+ value = m_fieldLineEditJournal->value();
+ if ( value != NULL && !value->items.isEmpty() )
+ {
+ BibTeX::MacroKey *key = dynamic_cast<BibTeX::MacroKey*>( value->items[0] );
+ if ( key != NULL )
+ {
+ QString jourText = key->text();
+ if ( !jourText.isEmpty() && !m_bibtexfile->containsKey( jourText ) )
+ new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlWarning, i18n( "The field 'Journal' refers to a not existing entry" ), m_fieldLineEditJournal, listViewWarnings, "warning" );
+ }
+ }
+
+ addFieldLineEditWarning( m_fieldLineEditHowPublished, m_fieldLineEditHowPublished->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditPublisher, m_fieldLineEditPublisher->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditOrganization, m_fieldLineEditOrganization->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditInstitution, m_fieldLineEditInstitution->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditSchool, m_fieldLineEditSchool->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditLocation, m_fieldLineEditLocation->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditAddress, m_fieldLineEditAddress->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditJournal, m_fieldLineEditJournal->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditPages, m_fieldLineEditPages->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditEdition, m_fieldLineEditEdition->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditChapter, m_fieldLineEditChapter->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditVolume, m_fieldLineEditVolume->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditNumber, m_fieldLineEditNumber->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditMonth, m_fieldLineEditMonth->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditYear, m_fieldLineEditYear->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditISBN, m_fieldLineEditISBN->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditISSN, m_fieldLineEditISSN->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditCrossRef, m_fieldLineEditCrossRef->caption(), listViewWarnings );
+
+ /** misusing this function to enable/disable ISBN button */
+ int len = isbn().length();
+ m_pushButtonISBN->setEnabled( len == 10 || len == 13 );
+ }
+
+ void EntryWidgetPublication::slotSetMonth( int month )
+ {
+ BibTeX::MacroKey *item = new BibTeX::MacroKey( BibTeX::MonthsTriple[ month ] );
+ BibTeX::Value * value = new BibTeX::Value();
+ value->items.append( item );
+ m_fieldLineEditMonth->setValue( value );
+ delete value;
+ }
+
+ void EntryWidgetPublication::slotSetCrossRefEntry()
+ {
+ m_crossRefEntry = NULL;
+ if ( m_fieldLineEditCrossRef->value() != NULL && m_bibtexfile != NULL )
+ {
+ QString crossRefText = m_fieldLineEditCrossRef->value() ->text();
+ if ( !crossRefText.isEmpty() )
+ m_crossRefEntry = dynamic_cast<BibTeX::Entry*>( m_bibtexfile->containsKey( crossRefText ) );
+ }
+ }
+
+ void EntryWidgetPublication::slotOpenISBN()
+ {
+ KURL url = KURL( QString( i18n( "http://en.wikipedia.org/w/index.php?title=Special:Booksources&isbn=%1" ) ).arg( isbn() ) );
+ Settings::openUrl( url, this );
+ }
+
+ /**
+ *
+ */
+ void EntryWidgetPublication::setupGUI()
+ {
+ QGridLayout * gridLayout = new QGridLayout( this, 10, 5, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ gridLayout->setColSpacing( 2, KDialog::spacingHint() * 4 );
+ gridLayout->setRowStretch( 9, 1 );
+
+ QLabel *label = new QLabel( QString( "%1:" ).arg( i18n( "Journal" ) ), this );
+ gridLayout->addWidget( label, 0, 0 );
+ m_fieldLineEditJournal = new KBibTeX::FieldLineEdit( i18n( "Journal" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditJournal" );
+ m_fieldLineEditJournal ->setFieldType( BibTeX::EntryField::ftJournal );
+ label->setBuddy( m_fieldLineEditJournal );
+ gridLayout->addWidget( m_fieldLineEditJournal, 0, 1 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Volume" ) ), this );
+ gridLayout->addWidget( label, 1, 0 );
+ m_fieldLineEditVolume = new KBibTeX::FieldLineEdit( i18n( "Volume" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditVolume" );
+ m_fieldLineEditVolume->setFieldType( BibTeX::EntryField::ftVolume );
+ label->setBuddy( m_fieldLineEditVolume );
+ gridLayout->addWidget( m_fieldLineEditVolume, 1, 1 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Number" ) ), this );
+ gridLayout->addWidget( label, 2, 0 );
+ m_fieldLineEditNumber = new KBibTeX::FieldLineEdit( i18n( "Number" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditNumber" );
+ m_fieldLineEditNumber ->setFieldType( BibTeX::EntryField::ftNumber );
+ label->setBuddy( m_fieldLineEditNumber );
+ gridLayout->addWidget( m_fieldLineEditNumber, 2, 1 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Month" ) ), this );
+ gridLayout->addWidget( label, 3, 0 );
+ QHBoxLayout *innerLayout = new QHBoxLayout();
+ gridLayout->addLayout( innerLayout, 3, 1 );
+ m_pushButtonMonths = new QPushButton( this, "m_pushButtonMonths" );
+ m_pushButtonMonths->setIconSet( QIconSet( SmallIcon( "vcalendar" ) ) );
+ m_pushButtonMonths->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum );
+ m_pushButtonMonths->setEnabled( !m_isReadOnly );
+ innerLayout->addWidget( m_pushButtonMonths );
+ m_fieldLineEditMonth = new KBibTeX::FieldLineEdit( i18n( "Month" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditMonth" );
+ m_fieldLineEditMonth->setFieldType( BibTeX::EntryField::ftMonth );
+ label->setBuddy( m_fieldLineEditMonth );
+ innerLayout->addWidget( m_fieldLineEditMonth );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Year" ) ), this );
+ gridLayout->addWidget( label, 4, 0 );
+ m_fieldLineEditYear = new KBibTeX::FieldLineEdit( i18n( "Year" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditYear" );
+ m_fieldLineEditYear->setFieldType( BibTeX::EntryField::ftYear );
+ label->setBuddy( m_fieldLineEditYear );
+ gridLayout->addWidget( m_fieldLineEditYear, 4, 1 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Pages" ) ), this );
+ gridLayout->addWidget( label, 5, 0 );
+ m_fieldLineEditPages = new KBibTeX::FieldLineEdit( i18n( "Pages" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditPages" );
+ m_fieldLineEditPages->setFieldType( BibTeX::EntryField::ftPages );
+ label->setBuddy( m_fieldLineEditPages );
+ gridLayout->addWidget( m_fieldLineEditPages, 5, 1 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Edition" ) ), this );
+ gridLayout->addWidget( label, 6, 0 );
+ m_fieldLineEditEdition = new KBibTeX::FieldLineEdit( i18n( "Edition" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditEdition" );
+ m_fieldLineEditEdition->setFieldType( BibTeX::EntryField::ftEdition );
+ label->setBuddy( m_fieldLineEditEdition );
+ gridLayout->addWidget( m_fieldLineEditEdition, 6, 1 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Chapter" ) ), this );
+ gridLayout->addWidget( label, 7, 0 );
+ m_fieldLineEditChapter = new KBibTeX::FieldLineEdit( i18n( "Chapter" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditChapter" );
+ m_fieldLineEditChapter ->setFieldType( BibTeX::EntryField::ftChapter );
+ label->setBuddy( m_fieldLineEditChapter );
+ gridLayout->addWidget( m_fieldLineEditChapter, 7, 1 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Cross Reference" ) ), this );
+ gridLayout->addWidget( label, 8, 0 );
+ m_fieldLineEditCrossRef = new KBibTeX::FieldLineEdit( i18n( "Cross Reference" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditCrossRef" );
+ m_fieldLineEditCrossRef->setFieldType( BibTeX::EntryField::ftCrossRef );
+ label->setBuddy( m_fieldLineEditCrossRef );
+ gridLayout->addWidget( m_fieldLineEditCrossRef, 8, 1 );
+ connect( m_fieldLineEditCrossRef, SIGNAL( textChanged() ), this, SLOT( slotSetCrossRefEntry() ) );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Organization" ) ), this );
+ gridLayout->addWidget( label, 0, 3 );
+ m_fieldLineEditOrganization = new KBibTeX::FieldLineEdit( i18n( "Organization" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditOrganization" );
+ m_fieldLineEditOrganization->setFieldType( BibTeX::EntryField::ftOrganization );
+ label->setBuddy( m_fieldLineEditOrganization );
+ gridLayout->addWidget( m_fieldLineEditOrganization, 0, 4 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Publisher" ) ), this );
+ gridLayout->addWidget( label, 1, 3 );
+ m_fieldLineEditPublisher = new KBibTeX::FieldLineEdit( i18n( "Publisher" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditPublisher" );
+ m_fieldLineEditPublisher->setFieldType( BibTeX::EntryField::ftPublisher );
+ label->setBuddy( m_fieldLineEditPublisher );
+ gridLayout->addWidget( m_fieldLineEditPublisher, 1, 4 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "School" ) ), this );
+ gridLayout->addWidget( label, 2, 3 );
+ m_fieldLineEditSchool = new KBibTeX::FieldLineEdit( i18n( "School" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditSchool" );
+ m_fieldLineEditSchool->setFieldType( BibTeX::EntryField::ftSchool );
+ label->setBuddy( m_fieldLineEditSchool );
+ gridLayout->addWidget( m_fieldLineEditSchool, 2, 4 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Institution" ) ), this );
+ gridLayout->addWidget( label, 3, 3 );
+ m_fieldLineEditInstitution = new KBibTeX::FieldLineEdit( i18n( "Institution" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditInstitution" );
+ m_fieldLineEditInstitution->setFieldType( BibTeX::EntryField::ftInstitution );
+ label->setBuddy( m_fieldLineEditInstitution );
+ gridLayout->addWidget( m_fieldLineEditInstitution, 3, 4 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Location" ) ), this );
+ gridLayout->addWidget( label, 4, 3 );
+ m_fieldLineEditLocation = new KBibTeX::FieldLineEdit( i18n( "Location" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditLocation" );
+ m_fieldLineEditLocation->setFieldType( BibTeX::EntryField::ftLocation );
+ label->setBuddy( m_fieldLineEditLocation );
+ gridLayout->addWidget( m_fieldLineEditLocation, 4, 4 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Address" ) ), this );
+ gridLayout->addWidget( label, 5, 3 );
+ m_fieldLineEditAddress = new KBibTeX::FieldLineEdit( i18n( "Address" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditAddress" );
+ m_fieldLineEditAddress->setFieldType( BibTeX::EntryField::ftAddress );
+ label->setBuddy( m_fieldLineEditAddress );
+ gridLayout->addWidget( m_fieldLineEditAddress, 5, 4 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "ISBN" ) ), this );
+ gridLayout->addWidget( label, 6, 3 );
+ innerLayout = new QHBoxLayout();
+ gridLayout->addLayout( innerLayout, 6, 4 );
+ m_pushButtonISBN = new QPushButton( this, "m_pushButtonMonths" );
+ m_pushButtonISBN->setIconSet( QIconSet( SmallIcon( "find" ) ) );
+ m_pushButtonISBN->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum );
+ QToolTip::add( m_pushButtonISBN, i18n( "Lookup ISBN number in Wikipedia" ) );
+ innerLayout->addWidget( m_pushButtonISBN );
+ m_fieldLineEditISBN = new KBibTeX::FieldLineEdit( i18n( "ISBN" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditISBN" );
+ m_fieldLineEditISBN ->setFieldType( BibTeX::EntryField::ftISBN );
+ label->setBuddy( m_fieldLineEditISBN );
+ innerLayout->addWidget( m_fieldLineEditISBN );
+ connect( m_pushButtonISBN, SIGNAL( clicked() ), this, SLOT( slotOpenISBN() ) );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "ISSN" ) ), this );
+ gridLayout->addWidget( label, 7, 3 );
+ m_fieldLineEditISSN = new KBibTeX::FieldLineEdit( i18n( "ISSN" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditISSN" );
+ m_fieldLineEditISSN->setFieldType( BibTeX::EntryField::ftISSN );
+ label->setBuddy( m_fieldLineEditISSN );
+ gridLayout->addWidget( m_fieldLineEditISSN, 7, 4 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "How Published" ) ), this );
+ gridLayout->addWidget( label, 8, 3 );
+ m_fieldLineEditHowPublished = new KBibTeX::FieldLineEdit( i18n( "How Published" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditHowPublished" );
+ m_fieldLineEditHowPublished->setFieldType( BibTeX::EntryField::ftHowPublished );
+ label->setBuddy( m_fieldLineEditHowPublished );
+ gridLayout->addWidget( m_fieldLineEditHowPublished, 8, 4 );
+
+ QPopupMenu *menuMonths = new QPopupMenu( this, "menuMonths" );
+ for ( int i = 0; i < 12; i++ )
+ menuMonths->insertItem( BibTeX::Months[ i ], i );
+ m_pushButtonMonths->setPopup( menuMonths );
+ connect( menuMonths, SIGNAL( activated( int ) ), this, SLOT( slotSetMonth( int ) ) );
+ }
+
+ QString EntryWidgetPublication::isbn() const
+ {
+ BibTeX::Value *value = m_fieldLineEditISBN->value();
+ if ( value == NULL )
+ return "";
+
+ return value->text().replace( QRegExp( "[^0-9X]" ), "" );
+ }
+}
+#include "entrywidgetpublication.moc"
diff --git a/src/entrywidgetpublication.h b/src/entrywidgetpublication.h
new file mode 100644
index 0000000..e0e21ca
--- /dev/null
+++ b/src/entrywidgetpublication.h
@@ -0,0 +1,80 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXENTRYWIDGETPUBLICATION_H
+#define KBIBTEXENTRYWIDGETPUBLICATION_H
+
+#include <entrywidgettab.h>
+
+class QPushButton;
+
+namespace KBibTeX
+{
+ class FieldLineEdit;
+
+ class EntryWidgetPublication : public EntryWidgetTab
+ {
+ Q_OBJECT
+ public:
+ EntryWidgetPublication( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~EntryWidgetPublication();
+
+ bool isModified();
+
+ public slots:
+ void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
+ void apply( BibTeX::Entry *entry );
+ void reset( BibTeX::Entry *entry );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+
+ private slots:
+ void slotSetMonth( int month );
+ void slotSetCrossRefEntry();
+ void slotOpenISBN();
+
+ private:
+ KBibTeX::FieldLineEdit *m_fieldLineEditOrganization;
+ KBibTeX::FieldLineEdit *m_fieldLineEditPublisher;
+ KBibTeX::FieldLineEdit *m_fieldLineEditSchool;
+ KBibTeX::FieldLineEdit *m_fieldLineEditInstitution;
+ KBibTeX::FieldLineEdit *m_fieldLineEditLocation;
+ KBibTeX::FieldLineEdit *m_fieldLineEditAddress;
+ KBibTeX::FieldLineEdit *m_fieldLineEditJournal;
+ KBibTeX::FieldLineEdit *m_fieldLineEditPages;
+ KBibTeX::FieldLineEdit *m_fieldLineEditEdition;
+ KBibTeX::FieldLineEdit *m_fieldLineEditChapter;
+ KBibTeX::FieldLineEdit *m_fieldLineEditVolume;
+ KBibTeX::FieldLineEdit *m_fieldLineEditNumber;
+ KBibTeX::FieldLineEdit *m_fieldLineEditMonth;
+ QPushButton *m_pushButtonMonths;
+ KBibTeX::FieldLineEdit *m_fieldLineEditYear;
+ KBibTeX::FieldLineEdit *m_fieldLineEditISBN;
+ QPushButton *m_pushButtonISBN;
+ KBibTeX::FieldLineEdit *m_fieldLineEditISSN;
+ KBibTeX::FieldLineEdit *m_fieldLineEditCrossRef;
+ KBibTeX::FieldLineEdit *m_fieldLineEditHowPublished;
+
+ void setupGUI();
+ QString isbn() const;
+
+ };
+
+}
+
+#endif
diff --git a/src/entrywidgetsource.cpp b/src/entrywidgetsource.cpp
new file mode 100644
index 0000000..27d95a6
--- /dev/null
+++ b/src/entrywidgetsource.cpp
@@ -0,0 +1,161 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlayout.h>
+#include <qtextedit.h>
+#include <qbuffer.h>
+
+#include <kdialog.h>
+#include <kpushbutton.h>
+#include <klocale.h>
+#include <kglobalsettings.h>
+
+#include <fileexporterbibtex.h>
+#include <fileimporterbibtex.h>
+#include <entry.h>
+#include <settings.h>
+#include "entrywidgetsource.h"
+
+namespace KBibTeX
+{
+
+ EntryWidgetSource::EntryWidgetSource( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ : EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_entry( NULL )
+ {
+ setupGUI();
+ }
+
+ EntryWidgetSource::~EntryWidgetSource()
+ {
+ if ( m_entry != NULL ) delete m_entry;
+ }
+
+ bool EntryWidgetSource::isModified()
+ {
+ return m_textEditSource->isModified();
+ }
+
+ bool EntryWidgetSource::containsValidText()
+ {
+ BibTeX::Entry dummy( BibTeX::Entry::etArticle, "iaKWjDMVuB2vQDuYRK49Y85tyxa9" );
+ apply( &dummy );
+ return dummy.id().compare( "iaKWjDMVuB2vQDuYRK49Y85tyxa9" ) != 0;
+ }
+
+ QString EntryWidgetSource::text()
+ {
+ return m_textEditSource->text();
+ }
+
+ void EntryWidgetSource::setText( const QString& text )
+ {
+ m_textEditSource->setText( text );
+ }
+
+ void EntryWidgetSource::updateGUI( BibTeX::Entry::EntryType /*entryType*/, bool /*enableAll*/ )
+ {
+ // nothing
+ }
+
+ void EntryWidgetSource::apply( BibTeX::Entry *entry )
+ {
+ Settings * settings = Settings::self();
+ QBuffer buffer;
+ BibTeX::FileImporterBibTeX importer( settings->editing_FirstNameFirst );
+
+ buffer.open( IO_WriteOnly );
+ QTextStream ts( &buffer );
+ ts.setEncoding( QTextStream::UnicodeUTF8 );
+ ts << m_textEditSource->text() << endl;
+ buffer.close();
+
+ buffer.open( IO_ReadOnly );
+ BibTeX::File *bibtexFile = importer.load( &buffer );
+ buffer.close();
+
+ if ( bibtexFile != NULL )
+ {
+ if ( bibtexFile->count() == 1 )
+ {
+ BibTeX::Entry * parsedEntry = dynamic_cast<BibTeX::Entry*>( bibtexFile->at( 0 ) );
+ if ( parsedEntry != NULL )
+ {
+ entry->copyFrom( parsedEntry );
+ settings->addToCompletion( parsedEntry );
+ }
+ }
+ delete bibtexFile;
+ }
+ }
+
+ void EntryWidgetSource::reset( BibTeX::Entry *entry )
+ {
+ if ( m_entry != entry )
+ {
+ if ( m_entry != NULL ) m_entry->copyFrom( entry ); else m_entry = new BibTeX::Entry( entry );
+ }
+
+ Settings * settings = Settings::self();
+
+ QBuffer buffer;
+ BibTeX::FileExporterBibTeX exporter;
+ exporter.setEncoding( "latex" );
+ exporter.setStringDelimiter( settings->fileIO_BibtexStringOpenDelimiter, settings->fileIO_BibtexStringCloseDelimiter );
+ exporter.setKeywordCasing( settings->fileIO_KeywordCasing );
+ exporter.setEnclosingCurlyBrackets( settings->fileIO_EnclosingCurlyBrackets );
+
+ buffer.open( IO_WriteOnly );
+ exporter.save( &buffer, entry );
+ buffer.close();
+
+ buffer.open( IO_ReadOnly );
+ QTextStream ts( &buffer );
+ ts.setEncoding( QTextStream::UnicodeUTF8 );
+ m_textEditSource->setText( ts.read() );
+ buffer.close();
+ }
+
+ void EntryWidgetSource::restore()
+ {
+ reset( m_entry );
+ }
+
+ void EntryWidgetSource::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, QListView * /*listViewWarnings*/ )
+ {
+ // nothing
+ }
+
+ void EntryWidgetSource::setupGUI()
+ {
+ QGridLayout * gridLayout = new QGridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ gridLayout->setRowStretch( 0, 5 );
+ gridLayout->setColStretch( 0, 5 );
+
+ m_textEditSource = new QTextEdit( this );
+ gridLayout->addMultiCellWidget( m_textEditSource, 0, 0, 0, 1 );
+ m_textEditSource->setFont( KGlobalSettings::fixedFont() );
+ m_textEditSource->setReadOnly( m_isReadOnly );
+
+ KPushButton *btnReset = new KPushButton( i18n( "Restore" ), this );
+ gridLayout->addWidget( btnReset, 1, 1 );
+ connect( btnReset, SIGNAL( clicked() ), this, SLOT( restore() ) );
+ }
+
+}
+#include "entrywidgetsource.moc"
diff --git a/src/entrywidgetsource.h b/src/entrywidgetsource.h
new file mode 100644
index 0000000..77b98e2
--- /dev/null
+++ b/src/entrywidgetsource.h
@@ -0,0 +1,61 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXENTRYWIDGETSOURCE_H
+#define KBIBTEXENTRYWIDGETSOURCE_H
+
+#include <entrywidgettab.h>
+
+class QTextEdit;
+
+namespace KBibTeX
+{
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class EntryWidgetSource : public EntryWidgetTab
+ {
+ Q_OBJECT
+ public:
+ EntryWidgetSource( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~EntryWidgetSource();
+
+ bool isModified();
+ bool containsValidText();
+ QString text();
+ void setText( const QString& text );
+
+ public slots:
+ void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
+ void apply( BibTeX::Entry *entry );
+ void reset( BibTeX::Entry *entry );
+ void restore();
+ void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+
+ private:
+ QTextEdit *m_textEditSource;
+ BibTeX::Entry *m_entry;
+
+ void setupGUI();
+ };
+
+}
+
+#endif
diff --git a/src/entrywidgettab.cpp b/src/entrywidgettab.cpp
new file mode 100644
index 0000000..c4efc51
--- /dev/null
+++ b/src/entrywidgettab.cpp
@@ -0,0 +1,91 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <klocale.h>
+
+#include <entry.h>
+#include <entrywidgetwarningsitem.h>
+#include <fieldlineedit.h>
+#include "entrywidgettab.h"
+
+namespace KBibTeX
+{
+ BibTeX::Entry *EntryWidgetTab::m_crossRefEntry = NULL;
+
+ EntryWidgetTab::EntryWidgetTab(BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ : QWidget( parent, name ), m_isReadOnly( isReadOnly ), m_bibtexfile( bibtexfile )
+ {
+ // nothing
+ }
+
+ EntryWidgetTab::~EntryWidgetTab()
+ {
+ // nothing
+ }
+
+ void EntryWidgetTab::setValue( BibTeX::Entry *entry, const BibTeX::EntryField::FieldType fieldType, BibTeX::Value *value )
+ {
+ BibTeX::EntryField * field = entry->getField( fieldType );
+
+ if ( value != NULL )
+ {
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( fieldType );
+ entry->addField( field );
+ }
+ field->setValue( value );
+ }
+ else
+ {
+ if ( field != NULL )
+ entry->deleteField( fieldType );
+ }
+ }
+
+ void EntryWidgetTab::addMissingWarning( BibTeX::Entry::EntryType entryType, BibTeX::EntryField::FieldType fieldType, const QString& label, bool valid, QWidget *widget, QListView *listView )
+ {
+ if ( BibTeX::Entry::getRequireStatus( entryType, fieldType ) == BibTeX::Entry::frsRequired && !valid )
+ new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlWarning, QString( i18n( "The field '%1' is required, but missing" ) ).arg( label ), widget, listView, "warning" );
+ }
+
+ void EntryWidgetTab::addCrossRefInfo( const QString& label, QWidget *widget, QListView *listView )
+ {
+ QString crossRefId = m_crossRefEntry != NULL ? m_crossRefEntry->id() : "???";
+ new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlInformation, QString( i18n( "Using cross referenced entry '%1' for field '%2'" ) ).arg( crossRefId ).arg( label ), widget, listView, "information" );
+ }
+
+ void EntryWidgetTab::addFieldLineEditWarning( FieldLineEdit *fieldLineEdit, const QString& label, QListView *listView )
+ {
+ switch ( fieldLineEdit->error() )
+ {
+ case FieldLineEdit::etInvalidStringKey:
+ new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlError, QString( i18n( "The field '%1' contains string keys with invalid characters" ) ).arg( label ), fieldLineEdit, listView, "error" );
+ break;
+ case FieldLineEdit::etNoError:
+ {
+ // nothing
+ }
+ break;
+ default:
+ new EntryWidgetWarningsItem( EntryWidgetWarningsItem::wlError, QString( i18n( "The field '%1' contains some unknown error" ) ).arg( label ), fieldLineEdit, listView, "error" );
+ }
+ }
+}
+#include "entrywidgettab.moc"
diff --git a/src/entrywidgettab.h b/src/entrywidgettab.h
new file mode 100644
index 0000000..8e63252
--- /dev/null
+++ b/src/entrywidgettab.h
@@ -0,0 +1,62 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXENTRYWIDGETTAB_H
+#define KBIBTEXENTRYWIDGETTAB_H
+
+#include <qwidget.h>
+
+#include <entry.h>
+#include <file.h>
+
+class QListView;
+
+namespace KBibTeX
+{
+ class FieldLineEdit;
+
+ class EntryWidgetTab : public QWidget
+ {
+ Q_OBJECT
+ public:
+ EntryWidgetTab( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~EntryWidgetTab();
+
+ virtual bool isModified() = 0;
+
+ public slots:
+ virtual void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll ) = 0;
+ virtual void apply( BibTeX::Entry *entry ) = 0;
+ virtual void reset( BibTeX::Entry *entry ) = 0;
+ virtual void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings ) = 0;
+
+ protected:
+ void setValue( BibTeX::Entry *entry, const BibTeX::EntryField::FieldType fieldType, BibTeX::Value *value );
+ void addMissingWarning( BibTeX::Entry::EntryType entryType, BibTeX::EntryField::FieldType fieldType, const QString& label, bool valid, QWidget *widget, QListView *listView );
+ void addCrossRefInfo( const QString& label, QWidget *widget, QListView *listView );
+ void addFieldLineEditWarning( FieldLineEdit *fieldLineEdit, const QString& label, QListView *listView );
+
+ bool m_isReadOnly;
+ static BibTeX::Entry *m_crossRefEntry;
+ BibTeX::File *m_bibtexfile;
+ };
+
+}
+
+#endif
diff --git a/src/entrywidgettitle.cpp b/src/entrywidgettitle.cpp
new file mode 100644
index 0000000..f72bb71
--- /dev/null
+++ b/src/entrywidgettitle.cpp
@@ -0,0 +1,136 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlayout.h>
+#include <qlabel.h>
+#include <kdialog.h>
+#include <klocale.h>
+
+#include <fieldlineedit.h>
+#include <value.h>
+#include <entryfield.h>
+#include "entrywidgettitle.h"
+
+namespace KBibTeX
+{
+
+ EntryWidgetTitle::EntryWidgetTitle( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ : EntryWidgetTab( bibtexfile, isReadOnly, parent, name )
+ {
+ setupGUI();
+ }
+
+ EntryWidgetTitle::~EntryWidgetTitle()
+ {
+ // nothing
+ }
+
+ bool EntryWidgetTitle::isModified()
+ {
+ return m_fieldLineEditTitle->isModified() || m_fieldLineEditBookTitle->isModified() || m_fieldLineEditSeries->isModified();
+ }
+
+ void EntryWidgetTitle::updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll )
+ {
+ bool enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftTitle ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditTitle->setEnabled( enableWidget );
+ m_fieldLineEditTitle->setFieldType( BibTeX::EntryField::ftTitle );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftBookTitle ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditBookTitle->setEnabled( enableWidget );
+ m_fieldLineEditBookTitle->setFieldType( BibTeX::EntryField::ftBookTitle );
+
+ enableWidget = enableAll || BibTeX::Entry::getRequireStatus( entryType, BibTeX::EntryField::ftSeries ) != BibTeX::Entry::frsIgnored;
+ m_fieldLineEditSeries->setEnabled( enableWidget );
+ m_fieldLineEditSeries->setFieldType( BibTeX::EntryField::ftSeries );
+ }
+
+ void EntryWidgetTitle::apply(BibTeX::Entry *entry )
+ {
+ BibTeX::Value * value = m_fieldLineEditTitle->value();
+ setValue( entry, BibTeX::EntryField::ftTitle, value );
+ delete value;
+
+ value = m_fieldLineEditBookTitle->value();
+ setValue( entry, BibTeX::EntryField::ftBookTitle, value );
+ delete value;
+
+ value = m_fieldLineEditSeries->value();
+ setValue( entry, BibTeX::EntryField::ftSeries, value );
+ delete value;
+ }
+
+ void EntryWidgetTitle::reset(BibTeX::Entry *entry )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftTitle );
+ m_fieldLineEditTitle->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftBookTitle );
+ m_fieldLineEditBookTitle->setValue( field != NULL ? field->value() : NULL );
+
+ field = entry->getField( BibTeX::EntryField::ftSeries );
+ m_fieldLineEditSeries->setValue( field != NULL ? field->value() : NULL );
+ }
+
+ void EntryWidgetTitle::updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings )
+ {
+ bool crossRefValid = FALSE;
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftTitle, m_fieldLineEditTitle->caption(), !m_fieldLineEditTitle->isEmpty(), m_fieldLineEditTitle, listViewWarnings );
+
+ crossRefValid = m_crossRefEntry != NULL && m_crossRefEntry->getField( BibTeX::EntryField::ftTitle ) != NULL;
+ addMissingWarning( entryType, BibTeX::EntryField::ftBookTitle, m_fieldLineEditBookTitle->caption(), !m_fieldLineEditBookTitle->isEmpty() || crossRefValid, m_fieldLineEditBookTitle, listViewWarnings );
+ if ( crossRefValid && m_fieldLineEditBookTitle->isEmpty() )
+ addCrossRefInfo( m_fieldLineEditBookTitle->caption(), m_fieldLineEditBookTitle, listViewWarnings );
+
+ addMissingWarning( entryType, BibTeX::EntryField::ftSeries, m_fieldLineEditSeries->caption(), !m_fieldLineEditSeries->isEmpty(), m_fieldLineEditSeries, listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditTitle, m_fieldLineEditTitle->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditBookTitle, m_fieldLineEditBookTitle->caption(), listViewWarnings );
+
+ addFieldLineEditWarning( m_fieldLineEditSeries, m_fieldLineEditSeries->caption(), listViewWarnings );
+ }
+
+ void EntryWidgetTitle::setupGUI()
+ {
+ QGridLayout * gridLayout = new QGridLayout( this, 4, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ gridLayout->setRowStretch( 3, 1 );
+
+ QLabel *label = new QLabel( QString( "%1:" ).arg( i18n( "Title" ) ), this );
+ gridLayout->addWidget( label, 0, 0 );
+ m_fieldLineEditTitle = new KBibTeX::FieldLineEdit( i18n( "Title" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditTitle" );
+ label->setBuddy( m_fieldLineEditTitle );
+ gridLayout->addWidget( m_fieldLineEditTitle, 0, 1 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Book Title" ) ), this );
+ gridLayout->addWidget( label, 1, 0 );
+ m_fieldLineEditBookTitle = new KBibTeX::FieldLineEdit( i18n( "Book Title" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditBookTitle" );
+ label->setBuddy( m_fieldLineEditBookTitle );
+ gridLayout->addWidget( m_fieldLineEditBookTitle, 1, 1 );
+
+ label = new QLabel( QString( "%1:" ).arg( i18n( "Series" ) ), this );
+ gridLayout->addWidget( label, 2, 0 );
+ m_fieldLineEditSeries = new KBibTeX::FieldLineEdit( i18n( "Series" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditSeries" );
+ label->setBuddy( m_fieldLineEditSeries );
+ gridLayout->addWidget( m_fieldLineEditSeries, 2, 1 );
+ }
+
+}
+#include "entrywidgettitle.moc"
diff --git a/src/entrywidgettitle.h b/src/entrywidgettitle.h
new file mode 100644
index 0000000..c43bb57
--- /dev/null
+++ b/src/entrywidgettitle.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXENTRYWIDGETTITLE_H
+#define KBIBTEXENTRYWIDGETTITLE_H
+
+#include <entrywidgettab.h>
+
+namespace KBibTeX
+{
+ class FieldLineEdit;
+
+ class EntryWidgetTitle : public EntryWidgetTab
+ {
+ Q_OBJECT
+ public:
+ EntryWidgetTitle( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~EntryWidgetTitle();
+
+ bool isModified();
+
+ public slots:
+ void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
+ void apply( BibTeX::Entry *entry );
+ void reset( BibTeX::Entry *entry );
+ void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+
+ private:
+ friend class EntryWidget;
+ KBibTeX::FieldLineEdit *m_fieldLineEditTitle;
+ KBibTeX::FieldLineEdit *m_fieldLineEditBookTitle;
+ KBibTeX::FieldLineEdit *m_fieldLineEditSeries;
+
+ void setupGUI();
+ };
+
+}
+
+#endif
diff --git a/src/entrywidgetuserdefined.cpp b/src/entrywidgetuserdefined.cpp
new file mode 100644
index 0000000..6479f73
--- /dev/null
+++ b/src/entrywidgetuserdefined.cpp
@@ -0,0 +1,144 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qlayout.h>
+#include <qlabel.h>
+
+#include <kdebug.h>
+#include <kdialog.h>
+#include <kiconloader.h>
+#include <klocale.h>
+
+#include <settings.h>
+#include "entrywidgetuserdefined.h"
+
+namespace KBibTeX
+{
+
+ EntryWidgetUserDefined::EntryWidgetUserDefined( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name ) : EntryWidgetTab( bibtexfile, isReadOnly, parent, name )
+ {
+ setupGUI();
+ }
+
+ EntryWidgetUserDefined::~EntryWidgetUserDefined()
+ {
+ // nothing
+ }
+
+ bool EntryWidgetUserDefined::isModified()
+ {
+ bool result = FALSE;
+ for ( QValueList<FieldLineEdit*>::iterator it = m_widgets.begin(); !FALSE && it != m_widgets.end(); ++it )
+ result |= ( *it )->isModified();
+ return result;
+ }
+
+ void EntryWidgetUserDefined::updateGUI( BibTeX::Entry::EntryType /*entryType*/, bool /*enableAll*/ )
+ {
+// nothing
+ }
+
+ void EntryWidgetUserDefined::apply( BibTeX::Entry *entry )
+ {
+ Settings * settings = Settings::self();
+ for ( unsigned int i = 0; i < settings->userDefinedInputFields.count(); ++i )
+ {
+ FieldLineEdit *widget = m_widgets[i];
+ Settings::UserDefinedInputFields *udif = settings->userDefinedInputFields[i];
+
+ BibTeX::Value * value = widget->value();
+ if ( value == NULL )
+ entry->deleteField( udif->name );
+ else
+ {
+ if ( value->text().isEmpty() )
+ entry->deleteField( udif->name );
+ else
+ {
+ BibTeX::EntryField * field = entry->getField( udif->name );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( udif->name );
+ entry->addField( field );
+ }
+ field->setValue( value );
+ }
+ delete value;
+ }
+ }
+ }
+
+ void EntryWidgetUserDefined::reset( BibTeX::Entry *entry )
+ {
+ Settings * settings = Settings::self();
+ for ( unsigned int i = 0; i < settings->userDefinedInputFields.count(); ++i )
+ {
+ FieldLineEdit *widget = m_widgets[i];
+ Settings::UserDefinedInputFields *udif = settings->userDefinedInputFields[i];
+
+ BibTeX::EntryField * field = entry->getField( udif->name );
+ widget->setValue( field != NULL ? field->value() : NULL );
+ }
+ }
+
+ void EntryWidgetUserDefined::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, QListView */*listViewWarnings*/ )
+ {
+// nothing
+ }
+
+ void EntryWidgetUserDefined::setupGUI()
+ {
+ Settings * settings = Settings::self();
+ int rows = settings->userDefinedInputFields.count() + 1;
+ if ( rows < 2 ) rows = 2;
+ QGridLayout *gridLayout = new QGridLayout( this, rows, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ gridLayout->setRowStretch( rows - 1, 1 );
+
+ if ( settings->userDefinedInputFields.count() > 0 )
+ for ( unsigned int i = 0; i < settings->userDefinedInputFields.count(); ++i )
+ {
+ QLabel *label = new QLabel( settings->userDefinedInputFields[i]->label, this );
+ gridLayout->addWidget( label, i, 0 );
+ if ( settings->userDefinedInputFields[i]->inputType == FieldLineEdit::itMultiLine )
+ label->setAlignment( Qt::AlignTop );
+
+ FieldLineEdit *widget = new FieldLineEdit( settings->userDefinedInputFields[i]->label, settings->userDefinedInputFields[i]->inputType, m_isReadOnly, this );
+ gridLayout->addWidget( widget, i, 1 );
+
+ label->setBuddy( widget );
+ m_widgets << widget;
+ }
+ else
+ {
+ gridLayout->setColStretch( 0, 0 );
+ gridLayout->setColStretch( 1, 1 );
+
+ QLabel *label = new QLabel( this );
+ gridLayout->addWidget( label, 0, 0 );
+ label->setPixmap( BarIcon( "messagebox_info" ) );
+ label->setAlignment( Qt::AlignVCenter | Qt::AlignLeft | Qt::WordBreak );
+
+ label = new QLabel( i18n( "Please use the settings dialog to add user-defined fields here." ), this );
+ label->setAlignment( Qt::AlignVCenter | Qt::AlignLeft | Qt::WordBreak );
+ gridLayout->addWidget( label, 0, 1 );
+ }
+ }
+
+}
+#include "entrywidgetuserdefined.moc"
diff --git a/src/entrywidgetuserdefined.h b/src/entrywidgetuserdefined.h
new file mode 100644
index 0000000..bc5e238
--- /dev/null
+++ b/src/entrywidgetuserdefined.h
@@ -0,0 +1,54 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXENTRYWIDGETUSERDEFINED_H
+#define KBIBTEXENTRYWIDGETUSERDEFINED_H
+
+#include <entrywidgettab.h>
+
+namespace KBibTeX
+{
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class EntryWidgetUserDefined : public EntryWidgetTab
+ {
+ Q_OBJECT
+ public:
+ EntryWidgetUserDefined( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~EntryWidgetUserDefined();
+
+ bool isModified();
+
+ public slots:
+ void updateGUI( BibTeX::Entry::EntryType entryType, bool enableAll );
+ void apply(BibTeX::Entry *entry);
+ void reset(BibTeX::Entry *entry);
+ void updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings );
+
+ private:
+ QValueList<FieldLineEdit*> m_widgets;
+ void setupGUI();
+
+ };
+
+}
+
+#endif
diff --git a/src/entrywidgetwarningsitem.cpp b/src/entrywidgetwarningsitem.cpp
new file mode 100644
index 0000000..741d1a0
--- /dev/null
+++ b/src/entrywidgetwarningsitem.cpp
@@ -0,0 +1,62 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <kiconloader.h>
+#include <klocale.h>
+
+#include "entrywidgetwarningsitem.h"
+
+namespace KBibTeX
+{
+
+ EntryWidgetWarningsItem::EntryWidgetWarningsItem( WarningLevel level, const QString &message, QWidget *widget, QListView *parent, const char* name )
+ : QListViewItem( parent, name ), m_widget( widget )
+ {
+ KIconLoader * loader = KGlobal::instance() ->iconLoader();
+ switch ( level )
+ {
+ case wlInformation:
+ setPixmap( 0, loader->loadIcon( "messagebox_info", KIcon::NoGroup, KIcon::SizeSmall ) );
+ break;
+ case wlWarning:
+ setPixmap( 0, loader->loadIcon( "messagebox_warning", KIcon::NoGroup, KIcon::SizeSmall ) );
+ break;
+ case wlError:
+ setPixmap( 0, loader->loadIcon( "messagebox_critical", KIcon::NoGroup, KIcon::SizeSmall ) );
+ break;
+ default:
+ {
+ // nothing
+ }
+ }
+ setText( 0, message );
+ }
+
+
+ EntryWidgetWarningsItem::~EntryWidgetWarningsItem()
+ {
+ // nothing
+ }
+
+ QWidget *EntryWidgetWarningsItem::widget()
+ {
+ return m_widget;
+ }
+
+}
diff --git a/src/entrywidgetwarningsitem.h b/src/entrywidgetwarningsitem.h
new file mode 100644
index 0000000..2aa2044
--- /dev/null
+++ b/src/entrywidgetwarningsitem.h
@@ -0,0 +1,46 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXENTRYWIDGETWARNINGSITEM_H
+#define KBIBTEXENTRYWIDGETWARNINGSITEM_H
+
+#include <qlistview.h>
+
+class QString;
+
+namespace KBibTeX
+{
+
+ class EntryWidgetWarningsItem : public QListViewItem
+ {
+ public:
+ enum WarningLevel {wlInformation = 1, wlWarning = 2, wlError = 3};
+
+ EntryWidgetWarningsItem( WarningLevel level, const QString &message, QWidget *widget, QListView *parent, const char* name = NULL );
+ ~EntryWidgetWarningsItem();
+
+ QWidget *widget();
+
+ private:
+ QWidget *m_widget;
+ };
+
+}
+
+#endif
diff --git a/src/fieldlineedit.cpp b/src/fieldlineedit.cpp
new file mode 100644
index 0000000..ba36fe7
--- /dev/null
+++ b/src/fieldlineedit.cpp
@@ -0,0 +1,369 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qtextedit.h>
+
+#include <kdialog.h>
+#include <klocale.h>
+#include <kiconloader.h>
+#include <klineedit.h>
+
+#include <element.h>
+#include <entry.h>
+#include <settings.h>
+#include <value.h>
+#include <valuewidget.h>
+#include "fieldlineedit.h"
+
+namespace KBibTeX
+{
+ FieldLineEdit::FieldLineEdit( const QString& caption, InputType inputType, bool isReadOnly, QWidget *parent, const char *name )
+ : QWidget( parent, name ), m_value( new BibTeX::Value() ), m_caption( caption ), m_lineEdit( NULL ), m_textEdit( NULL ), m_isReadOnly( isReadOnly ), m_enabled( TRUE ), m_inputType( inputType ), m_isModified( FALSE ), m_fieldType( BibTeX::EntryField::ftUnknown ), m_completion( NULL )
+ {
+ setupGUI( name );
+ }
+
+
+ FieldLineEdit::~FieldLineEdit()
+ {
+ delete m_value;
+ }
+
+ void FieldLineEdit::setValue( const BibTeX::Value *value )
+ {
+ delete m_value;
+
+ if ( value != NULL )
+ m_value = new BibTeX::Value( value );
+ else
+ m_value = new BibTeX::Value();
+
+ updateGUI();
+ m_isModified = FALSE;
+ }
+
+ BibTeX::Value *FieldLineEdit::value()
+ {
+ if ( m_value->items.isEmpty() )
+ return NULL;
+ else
+ return new BibTeX::Value( m_value );
+ }
+
+ void FieldLineEdit::setEnabled( bool enabled )
+ {
+ m_enabled = enabled;
+ updateGUI();
+ }
+
+ void FieldLineEdit::setFieldType( BibTeX::EntryField::FieldType fieldType )
+ {
+ m_fieldType = fieldType;
+ Settings * settings = Settings::self();
+ m_completion = settings->completion( m_fieldType );
+
+ if ( m_lineEdit != NULL )
+ {
+ if ( !m_pushButtonString->isOn() )
+ m_lineEdit->setCompletionObject( m_completion );
+ else
+ m_lineEdit->setCompletionObject( settings->completionMacro );
+ QToolTip::add( m_lineEdit, QString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
+ QWhatsThis::add( m_lineEdit, QString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
+ }
+ else if ( m_textEdit != NULL )
+ {
+ QToolTip::add( m_textEdit, QString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
+ QWhatsThis::add( m_textEdit, QString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
+ }
+
+ }
+
+ QString FieldLineEdit::caption()
+ {
+ return m_caption;
+ }
+
+ bool FieldLineEdit::isEmpty()
+ {
+ return m_value->items.isEmpty();
+ }
+
+ bool FieldLineEdit::isModified()
+ {
+ return m_isModified;
+ }
+
+ FieldLineEdit::ErrorType FieldLineEdit::error()
+ {
+ ErrorType result = etNoError;
+ for ( QValueList<BibTeX::ValueItem*>::ConstIterator it = m_value->items.begin(); result == etNoError && it != m_value->items.end(); ++it )
+ {
+ BibTeX::MacroKey *macroKey = dynamic_cast<BibTeX::MacroKey*>( *it );
+ result = ( macroKey != NULL && !macroKey->isValid() ) ? etInvalidStringKey : etNoError;
+ }
+
+ return result;
+ }
+
+ void FieldLineEdit::slotTextChanged( )
+ {
+ QString text;
+ switch ( m_inputType )
+ {
+ case itSingleLine:
+ text = m_lineEdit->text();
+ break;
+ case itMultiLine:
+ text = m_textEdit->text();
+ break;
+ }
+
+ if ( m_value->items.count() <= 1 )
+ {
+ m_value->items.clear();
+ if ( !text.isEmpty() )
+ {
+ if ( m_pushButtonString->isOn() )
+ m_value->items.append( new BibTeX::MacroKey( text ) );
+ else
+ m_value->items.append( new BibTeX::PlainText( text ) );
+ }
+ m_isModified = TRUE;
+ }
+
+ updateGUI();
+
+ emit textChanged();
+ }
+
+ void FieldLineEdit::slotStringToggled()
+ {
+ if ( m_value->items.count() == 1 )
+ {
+ QString text = m_value->items.first()->text();
+ if ( m_pushButtonString->isOn() )
+ {
+ BibTeX::PlainText *plainText = dynamic_cast<BibTeX::PlainText*>( m_value->items.first() );
+ if ( plainText != NULL )
+ {
+ m_value->items.clear();
+ m_value->items.append( new BibTeX::MacroKey( text ) );
+ }
+ }
+ else
+ {
+ BibTeX::MacroKey *macroKey = dynamic_cast<BibTeX::MacroKey*>( m_value->items.first() );
+ if ( macroKey != NULL )
+ {
+ m_value->items.clear();
+ m_value->items.append( new BibTeX::PlainText( text ) );
+ }
+ }
+ }
+
+ if ( m_lineEdit != NULL )
+ {
+ if ( m_pushButtonString->isOn() )
+ {
+ Settings * settings = Settings::self();
+ m_lineEdit->setCompletionObject( settings->completionMacro );
+ }
+ else
+ m_lineEdit->setCompletionObject( m_completion );
+ }
+
+ updateGUI();
+ emit textChanged();
+ m_isModified = TRUE;
+ }
+
+ void FieldLineEdit::slotComplexClicked()
+ {
+ if ( ValueWidget::execute( m_caption, m_fieldType, m_value, m_isReadOnly, this ) == QDialog::Accepted )
+ {
+ updateGUI();
+ emit textChanged();
+ m_isModified = TRUE;
+ }
+ }
+
+ void FieldLineEdit::setupGUI( const char *name )
+ {
+ Settings * settings = Settings::self();
+
+ char * subname = NULL;
+ if ( name != NULL )
+ subname = new char[ strlen( name ) + 20 ];
+
+ if ( subname != NULL )
+ {
+ strcpy( subname, name );
+ strcat( subname, "_pbstring" );
+ }
+ m_pushButtonString = new QPushButton( this, subname );
+ m_pushButtonString->setIconSet( QIconSet( SmallIcon( "flag" ) ) );
+ m_pushButtonString->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+ m_pushButtonString->setToggleButton( TRUE );
+ QToolTip::add( m_pushButtonString, QString( i18n( "Set '%1' to be a string key" ) ).arg( m_caption ) );
+ m_pushButtonString->setEnabled( !m_isReadOnly );
+ connect( m_pushButtonString, SIGNAL( clicked() ), this, SLOT( slotStringToggled() ) );
+
+ if ( subname != NULL )
+ {
+ strcpy( subname, name );
+ strcat( subname, "_pbcomplex" );
+ }
+ m_pushButtonComplex = new QPushButton( this, subname );
+ m_pushButtonComplex->setIconSet( QIconSet( SmallIcon( "leftjust" ) ) );
+ m_pushButtonComplex->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+ QToolTip::add( m_pushButtonComplex, QString( i18n( "Edit '%1' as a concatenated value" ) ).arg( m_caption ) );
+ connect( m_pushButtonComplex, SIGNAL( clicked() ), this, SLOT( slotComplexClicked() ) );
+
+ QGridLayout * layout = NULL;
+ switch ( m_inputType )
+ {
+ case itSingleLine:
+ {
+ layout = new QGridLayout( this, 2, 3, 0, KDialog::spacingHint() );
+ if ( subname != NULL )
+ {
+ strcpy( subname, name );
+ strcat( subname, "_lineedit" );
+ }
+ m_lineEdit = new KLineEdit( this, subname );
+ m_lineEdit->setReadOnly( m_isReadOnly );
+ if ( settings->editing_UseSpecialFont )
+ m_lineEdit->setFont( settings->editing_SpecialFont );
+ layout->addWidget( m_lineEdit, 0, 0 );
+ setFocusProxy( m_lineEdit );
+ layout->addWidget( m_pushButtonString, 0, 1 );
+ layout->addWidget( m_pushButtonComplex, 0, 2 );
+ QWidget::setTabOrder( m_lineEdit, m_pushButtonString );
+ }
+ break;
+ case itMultiLine:
+ {
+ layout = new QGridLayout( this, 3, 2, 0, KDialog::spacingHint() );
+ layout->setRowStretch( 2, 1 );
+ if ( subname != NULL )
+ {
+ strcpy( subname, name );
+ strcat( subname, "_textedit" );
+ }
+ m_textEdit = new QTextEdit( this, subname );
+ m_textEdit->setReadOnly( m_isReadOnly );
+ if ( settings->editing_UseSpecialFont )
+ m_textEdit->setFont( settings->editing_SpecialFont );
+ layout->addMultiCellWidget( m_textEdit, 0, 2, 0, 0 );
+ setFocusProxy( m_textEdit );
+ layout->addWidget( m_pushButtonString, 0, 1 );
+ layout->addWidget( m_pushButtonComplex, 1, 1 );
+ QWidget::setTabOrder( m_textEdit, m_pushButtonString );
+ }
+ break;
+ }
+
+ QWidget::setTabOrder( m_pushButtonString, m_pushButtonComplex );
+ layout->setRowStretch( layout->numRows() - 1, 1 );
+
+ if ( subname != NULL )
+ delete[] subname;
+
+ enableSignals( TRUE );
+ }
+
+ void FieldLineEdit::updateGUI()
+ {
+ enableSignals( FALSE );
+
+ bool inputEnable = ( m_value->items.count() <= 1 ) && m_enabled;
+ m_pushButtonString->setEnabled( inputEnable && !m_isReadOnly );
+ bool isComplex = !inputEnable && m_value->items.count() > 1;
+
+ if ( m_value->items.count() == 1 )
+ {
+ BibTeX::ValueItem * item = m_value->items.first();
+ m_pushButtonString->setOn( dynamic_cast<BibTeX::MacroKey*>( m_value->items.first() ) != NULL );
+ switch ( m_inputType )
+ {
+ case itSingleLine:
+ if ( QString::compare( m_lineEdit->text(), item->text() ) != 0 )
+ m_lineEdit->setText( item->text() );
+ break;
+ case itMultiLine:
+ if ( QString::compare( m_textEdit->text(), item->text() ) != 0 )
+ m_textEdit->setText( item->text() );
+ break;
+ }
+ }
+ else
+ {
+ switch ( m_inputType )
+ {
+ case itSingleLine:
+ m_lineEdit->setText( isComplex ? i18n( "Concatenated value" ) : "" );
+ break;
+ case itMultiLine:
+ m_textEdit->setText( isComplex ? i18n( "Concatenated value" ) : "" );
+ break;
+ }
+ }
+
+ m_pushButtonComplex->setEnabled( m_enabled );
+
+ switch ( m_inputType )
+ {
+ case itSingleLine:
+ m_lineEdit->setEnabled( inputEnable );
+ m_lineEdit->setReadOnly( m_isReadOnly );
+ break;
+ case itMultiLine:
+ m_textEdit->setEnabled( inputEnable );
+ m_textEdit->setReadOnly( m_isReadOnly );
+ break;
+ }
+
+ enableSignals( TRUE );
+ }
+
+ void FieldLineEdit::enableSignals( bool enabled )
+ {
+ switch ( m_inputType )
+ {
+ case itSingleLine:
+ if ( enabled )
+ connect( m_lineEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( ) ) );
+ else
+ disconnect( m_lineEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( ) ) );
+ break;
+ case itMultiLine:
+ if ( enabled )
+ connect( m_textEdit, SIGNAL( textChanged( ) ), this, SLOT( slotTextChanged( ) ) );
+ else
+ disconnect( m_textEdit, SIGNAL( textChanged( ) ), this, SLOT( slotTextChanged( ) ) );
+ break;
+ }
+ }
+}
+#include "fieldlineedit.moc"
diff --git a/src/fieldlineedit.h b/src/fieldlineedit.h
new file mode 100644
index 0000000..e17dde1
--- /dev/null
+++ b/src/fieldlineedit.h
@@ -0,0 +1,106 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXFIELDLINEEDIT_H
+#define KBIBTEXFIELDLINEEDIT_H
+
+#include <qwidget.h>
+
+#include <entryfield.h>
+#include <value.h>
+
+class KLineEdit;
+class QTextEdit;
+class QPushButton;
+class KCompletion;
+
+namespace KBibTeX
+{
+ class FieldLineEdit : public QWidget
+ {
+ Q_OBJECT
+ public:
+ enum InputType {itSingleLine, itMultiLine};
+ enum ErrorType {etNoError, etInvalidStringKey};
+
+ FieldLineEdit( const QString& caption, InputType inputType = itSingleLine, bool readOnly = FALSE, QWidget *parent = 0, const char *name = 0 );
+ ~FieldLineEdit();
+
+ /**
+ * Set the widget to use this value. The widget will make
+ * a deep copy internally and not modify the parameter.
+ * If NULL is passed to this function, the widget will be
+ * initialized with an empty BibTeXValue internally.
+ */
+ void setValue( const BibTeX::Value *value );
+
+ /**
+ * Return the BibTeXValue of this widget. The returned
+ * variable is a deep copy of the widget's internal state.
+ * The returned variable must be delete later by the
+ * function caller.
+ * The function will return NULL if no data is set by the
+ * user for this widget.
+ */
+ BibTeX::Value *value();
+
+ void setEnabled( bool enabled );
+
+ void setFieldType( BibTeX::EntryField::FieldType fieldType );
+
+ QString caption();
+
+ bool isEmpty();
+
+ bool isModified();
+
+ ErrorType error();
+
+ signals:
+ void textChanged( );
+
+ protected slots:
+ void updateGUI();
+
+ private slots:
+ void slotTextChanged();
+ void slotStringToggled();
+ void slotComplexClicked();
+
+ private:
+ BibTeX::Value *m_value;
+ QString m_caption;
+ KLineEdit *m_lineEdit;
+ QTextEdit *m_textEdit;
+ QPushButton *m_pushButtonString;
+ QPushButton *m_pushButtonComplex;
+ bool m_isReadOnly;
+ bool m_enabled;
+ InputType m_inputType;
+ bool m_isModified;
+ BibTeX::EntryField::FieldType m_fieldType;
+ KCompletion *m_completion;
+
+ void setupGUI( const char *name );
+ void enableSignals( bool enabled );
+ };
+
+}
+
+#endif
diff --git a/src/fieldlistview.cpp b/src/fieldlistview.cpp
new file mode 100644
index 0000000..62ba8a6
--- /dev/null
+++ b/src/fieldlistview.cpp
@@ -0,0 +1,455 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qstring.h>
+#include <qregexp.h>
+#include <qlayout.h>
+#include <qheader.h>
+#include <qtimer.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qpushbutton.h>
+#include <qcheckbox.h>
+
+#include <klistview.h>
+#include <klineedit.h>
+#include <kdialog.h>
+#include <klocale.h>
+#include <kdebug.h>
+#include <kiconloader.h>
+
+#include <value.h>
+#include <valuewidget.h>
+#include <settings.h>
+#include "fieldlistview.h"
+
+namespace KBibTeX
+{
+
+ FieldListView::FieldListView( const QString& caption, const QString& prefixNew, bool isReadOnly, QWidget *parent, const char *name )
+ : QWidget( parent, name ), m_value( new BibTeX::Value() ), m_caption( caption ), m_prefixNew( prefixNew ), m_isReadOnly( isReadOnly ), m_enabled( TRUE ), m_isComplex( FALSE ), m_isModified( FALSE ), m_newValueCounter( 0 ), m_fieldType( BibTeX::EntryField::ftUnknown )
+ {
+ setupGUI();
+ m_listViewElements->installEventFilter( this );
+ m_listViewElements->renameLineEdit() ->installEventFilter( this );
+
+ m_value = new BibTeX::Value();
+ }
+
+
+ FieldListView::~FieldListView()
+ {
+ delete m_value;
+ }
+
+ void FieldListView::setValue( const BibTeX::Value *value )
+ {
+ if ( value != m_value )
+ {
+ if ( m_value != NULL )
+ delete m_value;
+
+ if ( value != NULL )
+ m_value = new BibTeX::Value( value );
+ else
+ m_value = new BibTeX::Value( );
+
+ reset();
+ updateGUI();
+
+ m_isModified = FALSE;
+ }
+ }
+
+ BibTeX::Value *FieldListView::value()
+ {
+ if ( m_value->items.isEmpty() )
+ return NULL;
+ else
+ return new BibTeX::Value( m_value );
+ }
+
+ void FieldListView::setEnabled( bool enabled )
+ {
+ m_enabled = enabled;
+ updateGUI();
+ }
+
+ void FieldListView::setFieldType( BibTeX::EntryField::FieldType fieldType )
+ {
+ m_fieldType = fieldType;
+
+ Settings * settings = Settings::self();
+ m_listViewElements->renameLineEdit() ->setCompletionObject( settings->completion( m_fieldType ) );
+ QToolTip::add( m_listViewElements, QString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
+ QWhatsThis::add( m_listViewElements, QString( i18n( "BibTeX field '%1'" ) ).arg( BibTeX::EntryField::fieldTypeToString( fieldType ) ) );
+
+ m_value->items.clear();
+ }
+
+ QString FieldListView::caption()
+ {
+ return m_caption;
+ }
+
+ bool FieldListView::isEmpty()
+ {
+ return m_value != NULL ? m_value->items.isEmpty() : TRUE;
+ }
+
+ bool FieldListView::isModified()
+ {
+ return m_isModified;
+ }
+
+ bool FieldListView::eventFilter( QObject *o, QEvent * e )
+ {
+ if ( o == m_listViewElements->renameLineEdit() )
+ {
+ if ( e->type() == QEvent::Hide )
+ itemRenameDone();
+ }
+ else if ( e->type() == QEvent::AccelOverride )
+ {
+ QKeyEvent * ke = static_cast<QKeyEvent*>( e );
+ //override delete action
+ if ( ke->key() == Key_Delete && ke->state() == NoButton )
+ {
+ slotDelete();
+ ke->accept();
+ return true;
+ }
+ else if ( ke->key() == Key_F2 && ke->state() == NoButton )
+ {
+ slotEdit();
+ ke->accept();
+ return true;
+ }
+ else if ( ke->key() == Key_A && ke->state() == ControlButton )
+ {
+ slotAdd();
+ ke->accept();
+ return true;
+ }
+ else if ( ke->key() == Key_Up && ke->state() == ControlButton )
+ {
+ slotUp();
+ ke->accept();
+ return true;
+ }
+ else if ( ke->key() == Key_Down && ke->state() == ControlButton )
+ {
+ slotDown();
+ ke->accept();
+ return true;
+ }
+ else if ( ke->key() == Key_C && ke->state() == ( ControlButton | AltButton ) )
+ {
+ slotComplex();
+ ke->accept();
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ void FieldListView::updateGUI()
+ {
+ disconnect( m_checkBoxEtAl, SIGNAL( toggled( bool ) ), this, SLOT( apply() ) );
+ if ( m_value != NULL && !m_isComplex )
+ {
+ bool isElementSelected = m_listViewElements->selectedItem() != NULL;
+ m_pushButtonAdd->setEnabled( !m_isReadOnly );
+ m_pushButtonEdit->setEnabled( !m_isReadOnly && isElementSelected );
+ m_pushButtonDelete->setEnabled( !m_isReadOnly && isElementSelected );
+ m_pushButtonUp->setEnabled( !m_isReadOnly && isElementSelected && m_listViewElements->selectedItem() != m_listViewElements->firstChild() );
+ m_pushButtonDown->setEnabled( !m_isReadOnly && isElementSelected && m_listViewElements->selectedItem() != m_listViewElements->lastItem() );
+ m_listViewElements->setEnabled( !m_isReadOnly );
+ m_checkBoxEtAl->setEnabled( !m_isReadOnly );
+ }
+ else
+ {
+ m_pushButtonAdd->setEnabled( FALSE );
+ m_pushButtonEdit->setEnabled( FALSE );
+ m_pushButtonDelete->setEnabled( FALSE );
+ m_pushButtonUp->setEnabled( FALSE );
+ m_pushButtonDown->setEnabled( FALSE );
+ m_listViewElements->setEnabled( FALSE );
+ m_checkBoxEtAl->setEnabled( FALSE );
+ }
+ connect( m_checkBoxEtAl, SIGNAL( toggled( bool ) ), this, SLOT( apply() ) );
+ }
+
+ void FieldListView::slotAdd()
+ {
+ if ( isSimple() )
+ {
+ KListViewItem * item = new KListViewItem( m_listViewElements, m_listViewElements->lastItem(), QString( "%1%2" ).arg( m_prefixNew ).arg( ++m_newValueCounter ) );
+ m_listViewElements->setSelected( item, TRUE );
+ updateGUI();
+ QTimer::singleShot( 100, this, SLOT( slotEdit() ) );
+ }
+ }
+
+ void FieldListView::slotEdit()
+ {
+ if ( isSimple() )
+ {
+ KListViewItem * item = static_cast<KListViewItem*>( m_listViewElements->selectedItem() );
+ if ( item != NULL )
+ m_listViewElements->rename( item, 0 );
+ }
+ }
+
+ void FieldListView::slotDelete()
+ {
+ QListViewItem * item = m_listViewElements->selectedItem();
+ if ( isSimple() && item != NULL )
+ {
+ delete item;
+ apply();
+ updateGUI();
+
+ m_isModified = TRUE;
+ }
+ }
+
+ void FieldListView::slotUp()
+ {
+ QListViewItem * item = m_listViewElements->selectedItem();
+ if ( isSimple() && !m_listViewElements->isRenaming() && item != NULL && item -> itemAbove() != NULL )
+ {
+ item->itemAbove() ->moveItem( item );
+ apply();
+ updateGUI();
+
+ m_isModified = TRUE;
+ }
+ }
+
+ void FieldListView::slotDown()
+ {
+ QListViewItem * item = m_listViewElements->selectedItem();
+ if ( isSimple() && !m_listViewElements->isRenaming() && item != NULL && item -> itemBelow() != NULL )
+ {
+ item->moveItem( item->itemBelow() );
+ apply();
+ updateGUI();
+
+ m_isModified = TRUE;
+ }
+ }
+
+ void FieldListView::slotComplex()
+ {
+ if ( !m_listViewElements->isRenaming() && ValueWidget::execute( m_caption, m_fieldType, m_value, m_isReadOnly, this ) == QDialog::Accepted )
+ {
+ reset();
+ updateGUI();
+
+ m_isModified = TRUE;
+ }
+ }
+
+ void FieldListView::slotListViewDoubleClicked( QListViewItem * lvi )
+ {
+ if ( lvi == NULL )
+ slotAdd();
+ }
+
+ void FieldListView::slotItemRenamed( QListViewItem * item, int /*col*/, const QString & text )
+ {
+ if ( text.isEmpty() && isSimple() && item != NULL )
+ {
+ delete item;
+ updateGUI();
+ }
+
+ apply();
+ m_isModified = TRUE;
+ }
+
+ void FieldListView::setupGUI()
+ {
+ Settings * settings = Settings::self();
+
+ QGridLayout * layout = new QGridLayout( this, 8, 2, 0, KDialog::spacingHint() );
+ layout->setRowStretch( 5, 1 );
+
+ m_listViewElements = new KListView( this );
+ layout->addMultiCellWidget( m_listViewElements, 0, 6, 0, 0 );
+ m_listViewElements->renameLineEdit() ->setCompletionObject( settings->completion( m_fieldType ) );
+ m_listViewElements->renameLineEdit() ->setCompletionMode( KGlobalSettings::CompletionPopup );
+ m_listViewElements->renameLineEdit() ->completionObject() ->setIgnoreCase( true );
+ m_listViewElements->setDefaultRenameAction( QListView::Accept );
+ m_listViewElements->addColumn( m_caption );
+ m_listViewElements->setSorting( -1, TRUE );
+ m_listViewElements->setItemsRenameable( TRUE );
+ if ( settings->editing_UseSpecialFont )
+ m_listViewElements->setFont( settings->editing_SpecialFont );
+ m_listViewElements->header() ->setFont( KGlobalSettings::generalFont() );
+
+ m_listViewElements->header() ->setClickEnabled( FALSE );
+ m_listViewElements->header() ->setStretchEnabled( TRUE, 0 );
+ connect( m_listViewElements, SIGNAL( selectionChanged() ), this, SLOT( updateGUI() ) );
+ connect( m_listViewElements, SIGNAL( clicked( QListViewItem * ) ), this, SLOT( updateGUI() ) );
+ connect( m_listViewElements, SIGNAL( doubleClicked( QListViewItem * ) ), this, SLOT( slotListViewDoubleClicked( QListViewItem * ) ) );
+ connect( m_listViewElements, SIGNAL( currentChanged( QListViewItem * ) ), this, SLOT( updateGUI() ) );
+ connect( m_listViewElements, SIGNAL( itemRenamed( QListViewItem*, int, const QString& ) ), this, SLOT( slotItemRenamed( QListViewItem*, int, const QString& ) ) );
+
+ m_pushButtonAdd = new QPushButton( i18n( "Add" ), this );
+ layout->addWidget( m_pushButtonAdd, 0, 1 );
+ m_pushButtonAdd->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+ connect( m_pushButtonAdd, SIGNAL( clicked() ), this, SLOT( slotAdd() ) );
+ QToolTip::add( m_pushButtonAdd, QString( i18n( "Add new '%1' item (Ctrl+A)" ) ).arg( m_caption ) );
+
+ m_pushButtonEdit = new QPushButton( i18n( "Edit" ), this );
+ layout->addWidget( m_pushButtonEdit, 1, 1 );
+ m_pushButtonEdit->setIconSet( QIconSet( SmallIcon( "edit" ) ) );
+ connect( m_pushButtonEdit, SIGNAL( clicked() ), this, SLOT( slotEdit() ) );
+ QToolTip::add( m_pushButtonEdit, QString( i18n( "Edit current '%1' item (F2)" ) ).arg( m_caption ) );
+
+ m_pushButtonDelete = new QPushButton( i18n( "Delete" ), this );
+ layout->addWidget( m_pushButtonDelete, 2, 1 );
+ m_pushButtonDelete->setIconSet( QIconSet( SmallIcon( "editdelete" ) ) );
+ connect( m_pushButtonDelete, SIGNAL( clicked() ), this, SLOT( slotDelete() ) );
+ QToolTip::add( m_pushButtonDelete, QString( i18n( "Delete current '%1' item (Del)" ) ).arg( m_caption ) );
+
+ m_pushButtonUp = new QPushButton( i18n( "Up" ), this );
+ layout->addWidget( m_pushButtonUp, 3, 1 );
+ m_pushButtonUp->setIconSet( QIconSet( SmallIcon( "up" ) ) );
+ connect( m_pushButtonUp, SIGNAL( clicked() ), this, SLOT( slotUp() ) );
+ QToolTip::add( m_pushButtonUp, QString( i18n( "Move current '%1' item up (Ctrl+Up)" ) ).arg( m_caption ) );
+
+ m_pushButtonDown = new QPushButton( i18n( "Down" ), this );
+ layout->addWidget( m_pushButtonDown, 4, 1 );
+ m_pushButtonDown->setIconSet( QIconSet( SmallIcon( "down" ) ) );
+ connect( m_pushButtonDown, SIGNAL( clicked() ), this, SLOT( slotDown() ) );
+ QToolTip::add( m_pushButtonDown, QString( i18n( "Move current '%1' item down (Ctrl+Down)" ) ).arg( m_caption ) );
+
+ m_pushButtonComplexEdit = new QPushButton( i18n( "Complex..." ), this );
+ layout->addWidget( m_pushButtonComplexEdit, 6, 1 );
+ m_pushButtonComplexEdit->setIconSet( QIconSet( SmallIcon( "leftjust" ) ) );
+ connect( m_pushButtonComplexEdit, SIGNAL( clicked() ), this, SLOT( slotComplex() ) );
+ QToolTip::add( m_pushButtonComplexEdit, QString( i18n( "Edit current '%1' item as a concatenated string (Ctrl+Alt+C)" ) ).arg( m_caption ) );
+
+ m_checkBoxEtAl = new QCheckBox( i18n( "... and others (et al.)" ), this );
+ layout->addMultiCellWidget( m_checkBoxEtAl, 7, 7, 0, 1 );
+ connect( m_checkBoxEtAl, SIGNAL( toggled( bool ) ), this, SLOT( apply() ) );
+ }
+
+ void FieldListView::apply()
+ {
+ QStringList elements;
+ Settings * settings = Settings::self();
+
+ m_value->items.clear();
+
+ for ( QListViewItemIterator it( m_listViewElements ); it.current(); it++ )
+ {
+ QString text = it.current() ->text( 0 );
+ elements.append( text );
+ }
+
+ if ( elements.count() > 0 )
+ {
+ m_value->items.clear();
+ BibTeX::PersonContainer *container = new BibTeX::PersonContainer( settings->editing_FirstNameFirst );
+
+ switch ( m_fieldType )
+ {
+ case BibTeX::EntryField::ftAuthor:
+ case BibTeX::EntryField::ftEditor:
+ {
+ for ( QStringList::ConstIterator it = elements.constBegin(); it != elements.constEnd(); ++it )
+ {
+ BibTeX::Person *person = new BibTeX::Person( *it, settings->editing_FirstNameFirst );
+ container->persons.append( person );
+ }
+ }
+ break;
+ default:
+ kdDebug() << "Don't know how to handle entries of type " << BibTeX::EntryField::fieldTypeToString( m_fieldType ) << endl;
+ }
+
+ if ( m_checkBoxEtAl->isChecked() )
+ container->persons.append( new BibTeX::Person( "others", settings->editing_FirstNameFirst ) );
+
+ if ( !container->persons.isEmpty() )
+ m_value->items.append( container );
+ else
+ delete container;
+
+ settings->addToCompletion( m_value, m_fieldType );
+ }
+ }
+
+ void FieldListView::reset()
+ {
+ disconnect( m_checkBoxEtAl, SIGNAL( toggled( bool ) ), this, SLOT( apply() ) );
+ m_listViewElements->clear();
+ m_checkBoxEtAl->setChecked( FALSE );
+
+ m_isComplex = FALSE;
+ for ( QValueList<BibTeX::ValueItem*>::ConstIterator it = m_value->items.constBegin(); !m_isComplex && it != m_value->items.constEnd(); ++it )
+ {
+ BibTeX::MacroKey *macroKey = dynamic_cast<BibTeX::MacroKey *>( *it );
+ m_isComplex = macroKey != NULL;
+ }
+
+ if ( !m_isComplex )
+ switch ( m_fieldType )
+ {
+ case BibTeX::EntryField::ftAuthor:
+ case BibTeX::EntryField::ftEditor:
+ {
+ for ( QValueList<BibTeX::ValueItem*>::ConstIterator it = m_value->items.constBegin(); it != m_value->items.constEnd(); ++it )
+ {
+ BibTeX::PersonContainer *container = dynamic_cast<BibTeX::PersonContainer *>( *it );
+ if ( container != NULL )
+ for ( QValueList<BibTeX::Person*>::ConstIterator pit = container->persons.constBegin(); pit != container->persons.constEnd(); ++pit )
+ {
+ QString text = ( *pit )->text();
+ if ( text == "others" )
+ m_checkBoxEtAl->setChecked( TRUE );
+ else
+ new QListViewItem( m_listViewElements, m_listViewElements->lastItem(), text );
+ }
+ }
+ }
+ break;
+ default:
+ kdDebug() << "Don't know how to handle entries of type " << BibTeX::EntryField::fieldTypeToString( m_fieldType ) << endl;
+ }
+
+ connect( m_checkBoxEtAl, SIGNAL( toggled( bool ) ), this, SLOT( apply() ) );
+ }
+
+ bool FieldListView::isSimple()
+ {
+ return m_value->items.count() == 0 || ( m_value->items.count() == 1 && dynamic_cast<BibTeX::MacroKey*>( m_value->items.first() ) == NULL );
+ }
+
+ void FieldListView::itemRenameDone()
+ {
+ apply();
+ }
+}
+#include "fieldlistview.moc"
diff --git a/src/fieldlistview.h b/src/fieldlistview.h
new file mode 100644
index 0000000..f8a3baa
--- /dev/null
+++ b/src/fieldlistview.h
@@ -0,0 +1,101 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXFIELDLISTVIEW_H
+#define KBIBTEXFIELDLISTVIEW_H
+
+#include <qwidget.h>
+
+#include <value.h>
+#include <entryfield.h>
+
+class QString;
+class KListView;
+class QListViewItem;
+class QPushButton;
+class QCheckBox;
+
+namespace KBibTeX
+{
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class FieldListView : public QWidget
+ {
+ Q_OBJECT
+ public:
+ FieldListView( const QString& caption, const QString& prefixNew, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~FieldListView();
+
+ void setValue( const BibTeX::Value *value );
+ BibTeX::Value *value();
+
+ void setEnabled( bool enabled );
+
+ void setFieldType( BibTeX::EntryField::FieldType fieldType );
+
+ QString caption();
+
+ bool isEmpty();
+
+ bool isModified();
+
+ virtual bool eventFilter( QObject *o, QEvent * e );
+
+ private slots:
+ void updateGUI();
+ void slotAdd();
+ void slotEdit();
+ void slotDelete();
+ void slotUp();
+ void slotDown();
+ void slotComplex();
+ void slotListViewDoubleClicked( QListViewItem * );
+ void slotItemRenamed( QListViewItem * item, int col, const QString & text );
+ void apply();
+
+ private:
+ BibTeX::Value *m_value;
+ QString m_caption;
+ QString m_prefixNew;
+ bool m_isReadOnly;
+ bool m_enabled;
+ bool m_isComplex;
+ bool m_isModified;
+ int m_newValueCounter;
+ BibTeX::EntryField::FieldType m_fieldType;
+ KListView *m_listViewElements;
+ QPushButton *m_pushButtonAdd;
+ QPushButton *m_pushButtonEdit;
+ QPushButton *m_pushButtonDelete;
+ QPushButton *m_pushButtonUp;
+ QPushButton *m_pushButtonDown;
+ QPushButton *m_pushButtonComplexEdit;
+ QCheckBox *m_checkBoxEtAl;
+
+ void setupGUI();
+ void reset();
+ void itemRenameDone();
+ bool isSimple();
+ };
+
+}
+
+#endif
diff --git a/src/file.cpp b/src/file.cpp
new file mode 100644
index 0000000..8b6106e
--- /dev/null
+++ b/src/file.cpp
@@ -0,0 +1,402 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qiodevice.h>
+#include <qstringlist.h>
+#include <qregexp.h>
+
+#include <settings.h>
+#include <file.h>
+#include <entry.h>
+#include <element.h>
+#include <macro.h>
+#include <comment.h>
+#include <fileexporter.h>
+
+namespace BibTeX
+{
+
+ File::File( ) : QObject( ), fileName( QString::null )
+ {
+ // nothing
+ }
+
+ File::~File()
+ {
+ for ( ElementList::iterator it = elements.begin(); it != elements.end(); it++ )
+ delete * it;
+ }
+
+ unsigned int File::count() const
+ {
+ return elements.count();
+ }
+
+ Element* File::at( const unsigned int index )
+ {
+ return *( elements.at( index ) );
+ }
+
+ void File::append( const File *other, const Element *after )
+ {
+ for ( ElementList::ConstIterator it = other->constBegin(); it != other->constEnd(); it++ )
+ appendElement( cloneElement( *it ), after );
+ }
+
+ void File::appendElement( Element *element, const Element *after )
+ {
+ if ( after == NULL )
+ elements.append( element );
+ else
+ {
+ for ( ElementList::iterator it = elements.begin() ; it != elements.end(); it++ )
+ if (( *it ) == after )
+ {
+ elements.insert( ++it, element );
+ break;
+ }
+ }
+ }
+
+ void File::deleteElement( Element *element )
+ {
+ bool found = false;
+ for ( ElementList::iterator it = elements.begin(); it != elements.end(); it++ )
+ if ( ( found = ( *it == element ) ) )
+ {
+ elements.remove( it );
+ delete element;
+ break;
+ }
+
+ if ( !found )
+ qDebug( "BibTeX::File got told to delete an element which is not in this file." );
+ }
+
+ Element* File::cloneElement( Element *element )
+ {
+ Entry * entry = dynamic_cast<Entry*>( element );
+ if ( entry )
+ return new Entry( entry );
+ else
+ {
+ Macro *macro = dynamic_cast<Macro*>( element );
+ if ( macro )
+ return new Macro( macro );
+ else
+ {
+ Comment *comment = dynamic_cast<Comment*>( element );
+ if ( comment )
+ return new Comment( comment );
+ else
+ return NULL;
+ }
+ }
+ }
+
+ Element *File::containsKey( const QString &key )
+ {
+ for ( ElementList::iterator it = elements.begin(); it != elements.end(); it++ )
+ {
+ Entry* entry = dynamic_cast<Entry*>( *it );
+ if ( entry != NULL )
+ {
+ if ( entry->id() == key )
+ return entry;
+ }
+ else
+ {
+ Macro* macro = dynamic_cast<Macro*>( *it );
+ if ( macro != NULL )
+ {
+ if ( macro->key() == key )
+ return macro;
+ }
+ }
+ }
+
+ return NULL;
+ }
+
+ const Element *File::containsKeyConst( const QString &key ) const
+ {
+ for ( ElementList::const_iterator it = elements.begin(); it != elements.end(); it++ )
+ {
+ Entry* entry = dynamic_cast<Entry*>( *it );
+ if ( entry != NULL )
+ {
+ if ( entry->id() == key )
+ return entry;
+ }
+ else
+ {
+ Macro* macro = dynamic_cast<Macro*>( *it );
+ if ( macro != NULL )
+ {
+ if ( macro->key() == key )
+ return macro;
+ }
+ }
+ }
+
+ return NULL;
+ }
+
+ QStringList File::allKeys()
+ {
+ QStringList result;
+
+ for ( ElementList::iterator it = elements.begin(); it != elements.end(); it++ )
+ {
+ Entry* entry = dynamic_cast<Entry*>( *it );
+ if ( entry != NULL )
+ result.append( entry->id() );
+ else
+ {
+ Macro* macro = dynamic_cast<Macro*>( *it );
+ if ( macro != NULL )
+ result.append( macro->key() );
+ }
+ }
+
+ return result;
+ }
+
+ QString File::text()
+ {
+ QString result;
+
+ for ( ElementList::iterator it = elements.begin(); it != elements.end(); it++ )
+ {
+ result.append(( *it )->text() );
+ result.append( "\n" );
+ }
+
+ return result;
+ }
+
+ File::ElementList::iterator File::begin()
+ {
+ return elements.begin();
+ }
+
+ File::ElementList::iterator File::end()
+ {
+ return elements.end();
+ }
+
+ File::ElementList::ConstIterator File::constBegin() const
+ {
+ return elements.constBegin();
+ }
+
+ File::ElementList::ConstIterator File::constEnd() const
+ {
+ return elements.constEnd();
+ }
+
+ QStringList File::getAllValuesAsStringList( const EntryField::FieldType fieldType ) const
+ {
+ QStringList result;
+ for ( ElementList::ConstIterator eit = elements.constBegin(); eit != elements.constEnd(); ++eit )
+ {
+ Entry* entry = dynamic_cast<Entry*>( *eit );
+ EntryField * field = NULL;
+ if ( entry != NULL && ( field = entry->getField( fieldType ) ) != NULL )
+ {
+ QValueList<ValueItem*> valueItems = field->value()->items;
+ for ( QValueList<ValueItem*>::ConstIterator vit = valueItems.begin(); vit != valueItems.end(); ++vit )
+ {
+ switch ( fieldType )
+ {
+ case EntryField::ftKeywords :
+ {
+ KeywordContainer *container = dynamic_cast<KeywordContainer*>( *vit );
+ if ( container != NULL )
+ for ( QValueList<Keyword*>::ConstIterator kit = container->keywords.constBegin(); kit != container->keywords.constEnd(); ++kit )
+ {
+ QString text = ( *kit )->text();
+ if ( !result.contains( text ) )
+ result.append( text );
+ }
+ }
+ break;
+ case EntryField::ftEditor :
+ case EntryField::ftAuthor :
+ {
+ PersonContainer *container = dynamic_cast<PersonContainer*>( *vit );
+ if ( container != NULL )
+ for ( QValueList<Person*>::ConstIterator pit = container->persons.constBegin(); pit != container->persons.constEnd(); ++pit )
+ {
+ QString text = ( *pit )->text();
+ if ( !result.contains( text ) )
+ result.append( text );
+ }
+ }
+ break;
+ default:
+ {
+ QString text = ( *vit )->text();
+ if ( !result.contains( text ) )
+ result.append( text );
+ }
+ }
+ }
+ }
+ }
+
+ result.sort();
+ return result;
+ }
+
+ QMap<QString, int> File::getAllValuesAsStringListWithCount( const EntryField::FieldType fieldType ) const
+ {
+ QMap<QString, int> result;
+ for ( ElementList::ConstIterator eit = elements.begin(); eit != elements.end(); ++eit )
+ {
+ Entry* entry = dynamic_cast<Entry*>( *eit );
+ EntryField * field = NULL;
+ if ( entry != NULL && ( field = entry->getField( fieldType ) ) != NULL )
+ {
+ QValueList<ValueItem*> valueItems = field->value()->items;
+ for ( QValueList<ValueItem*>::ConstIterator vit = valueItems.begin(); vit != valueItems.end(); ++vit )
+ {
+ switch ( fieldType )
+ {
+ case EntryField::ftKeywords :
+ {
+ KeywordContainer *container = dynamic_cast<KeywordContainer*>( *vit );
+ if ( container != NULL )
+ for ( QValueList<Keyword*>::ConstIterator kit = container->keywords.constBegin(); kit != container->keywords.constEnd(); ++kit )
+ {
+ QString text = ( *kit )->text();
+ if ( !result.contains( text ) )
+ result[text] = 1;
+ else
+ result[text] += 1;
+ }
+ }
+ break;
+ case EntryField::ftEditor :
+ case EntryField::ftAuthor :
+ {
+ PersonContainer *container = dynamic_cast<PersonContainer*>( *vit );
+ if ( container != NULL )
+ for ( QValueList<Person*>::ConstIterator pit = container->persons.constBegin(); pit != container->persons.constEnd(); ++pit )
+ {
+ QString text = ( *pit )->text();
+ if ( !result.contains( text ) )
+ result[text] = 1;
+ else
+ result[text] += 1;
+ }
+ }
+ break;
+ default:
+ {
+ QString text = ( *vit )->text();
+ if ( !result.contains( text ) )
+ result[text] = 1;
+ else
+ result[text] += 1;
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ void File::replaceValue( const QString& oldText, const QString& newText, const EntryField::FieldType fieldType )
+ {
+ qDebug( "Renaming all occurrences of '%s' to '%s' for fields of type '%s'", oldText.latin1(), newText.latin1(), EntryField::fieldTypeToString( fieldType ).latin1() );
+
+ for ( ElementList::ConstIterator it = elements.begin(); it != elements.end(); it++ )
+ {
+ Entry* entry = dynamic_cast<Entry*>( *it );
+ if ( entry != NULL )
+ {
+ if ( fieldType != EntryField::ftUnknown )
+ {
+ EntryField * field = entry->getField( fieldType );
+ if ( field != NULL )
+ field->value() ->replace( oldText, newText );
+ }
+ }
+ }
+ }
+
+ BibTeX::Entry *File::completeReferencedFieldsConst( const BibTeX::Entry *entry ) const
+ {
+ BibTeX::Entry *myEntry = new BibTeX::Entry( entry );
+ completeReferencedFields( myEntry );
+ return myEntry;
+ }
+
+ void File::completeReferencedFields( BibTeX::Entry *entry ) const
+ {
+ BibTeX::EntryField *crossRefField = entry->getField( BibTeX::EntryField::ftCrossRef );
+ const BibTeX::Entry *parent = NULL;
+ if ( crossRefField != NULL && ( parent = dynamic_cast<const BibTeX::Entry*>( containsKeyConst( crossRefField->value()->text() ) ) ) != NULL )
+ {
+ for ( int ef = ( int )BibTeX::EntryField::ftAbstract; ef <= ( int )BibTeX::EntryField::ftYear; ++ef )
+ {
+ BibTeX::EntryField *entryField = entry->getField(( BibTeX::EntryField::FieldType ) ef );
+ if ( entryField == NULL )
+ {
+ BibTeX::EntryField *parentEntryField = parent->getField(( BibTeX::EntryField::FieldType ) ef );
+ if ( parentEntryField != NULL )
+ {
+ entryField = new BibTeX::EntryField(( BibTeX::EntryField::FieldType )ef );
+ entryField->setValue( parentEntryField->value() );
+ entry->addField( entryField );
+ }
+ }
+ }
+
+ BibTeX::EntryField *entryField = entry->getField( EntryField::ftBookTitle );
+ BibTeX::EntryField *parentEntryField = parent->getField( EntryField::ftTitle );
+ if (( entry->entryType() == Entry::etInProceedings || entry->entryType() == Entry::etInBook ) && entryField == NULL && parentEntryField != NULL )
+ {
+ entryField = new BibTeX::EntryField( EntryField::ftBookTitle );
+ entryField->setValue( parentEntryField->value() );
+ entry->addField( entryField );
+ }
+ }
+
+ for ( int ef = ( int )BibTeX::EntryField::ftAbstract; ef <= ( int )BibTeX::EntryField::ftYear; ++ef )
+ {
+ BibTeX::EntryField *entryField = entry->getField(( BibTeX::EntryField::FieldType ) ef );
+ if ( entryField != NULL && entryField->value() != NULL && !entryField->value()->items.isEmpty() )
+ {
+ MacroKey *macroKey = dynamic_cast<MacroKey*>( entryField->value()->items.first() );
+ const Macro *macro = NULL;
+ if ( macroKey != NULL && ( macro = dynamic_cast<const Macro*>( containsKeyConst( macroKey->text() ) ) ) != NULL )
+ entryField->setValue( macro->value() );
+ }
+ }
+ }
+
+}
+
+#include "file.moc"
+
diff --git a/src/file.h b/src/file.h
new file mode 100644
index 0000000..fcb797a
--- /dev/null
+++ b/src/file.h
@@ -0,0 +1,108 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILE_H
+#define BIBTEXFILE_H
+
+#include <qobject.h>
+#include <qvaluelist.h>
+
+#include <entryfield.h>
+
+class QDir;
+class QString;
+class QChar;
+class QStringList;
+class QWaitCondition;
+class QProcess;
+class QIODevice;
+
+namespace BibTeX
+{
+ class Element;
+ class Entry;
+ class String;
+ class FileExporter;
+
+ static const QString Months[] =
+ {
+ QString( "January" ), QString( "February" ), QString( "March" ), QString( "April" ), QString( "May" ), QString( "June" ), QString( "July" ), QString( "August" ), QString( "September" ), QString( "October" ), QString( "November" ), QString( "December" )
+ };
+
+ static const QString MonthsTriple[] =
+ {
+ QString( "jan" ), QString( "feb" ), QString( "mar" ), QString( "apr" ), QString( "may" ), QString( "jun" ), QString( "jul" ), QString( "aug" ), QString( "sep" ), QString( "oct" ), QString( "nov" ), QString( "dec" )
+ };
+
+ class File : public QObject
+ {
+ Q_OBJECT
+
+ friend class FileExporterXML;
+ friend class FileExporterBibTeX;
+ friend class FileExporterRIS;
+ friend class FileExporter;
+ friend class FileParser;
+
+ public:
+ typedef QValueList<Element*> ElementList;
+
+ enum FileFormat { formatUndefined = 0, formatBibTeX = 1, formatXML = 2, formatHTML = 3, formatPDF = 4, formatPS = 5, formatRTF = 6, formatRIS = 7, formatEndNote = 8, formatISI = 9, formatDocBook5 = 10, formatMODS = 11, formatWordBib = 12, formatAds = 13, formatEndNoteXML = 14 };
+ enum Encoding {encImplicit = 0, encLaTeX = 1, encUTF8 = 2};
+ enum StringProtection { spNone, spParanthesis, spQuote, spBoth };
+
+ File( );
+ ~File();
+
+ unsigned int count() const;
+ Element* at( const unsigned int index );
+ void append( const File *other, const Element *after = NULL );
+ void appendElement( Element *element, const Element *after = NULL );
+ void deleteElement( Element *element );
+ static Element* cloneElement( Element *element );
+
+ Element *containsKey( const QString &key );
+ const Element *containsKeyConst( const QString &key ) const;
+ QStringList allKeys();
+ QString text();
+
+ ElementList::iterator begin();
+ ElementList::iterator end();
+ ElementList::const_iterator constBegin() const;
+ ElementList::const_iterator constEnd() const;
+
+ QStringList getAllValuesAsStringList( const EntryField::FieldType fieldType ) const;
+ QMap<QString, int> getAllValuesAsStringListWithCount( const EntryField::FieldType fieldType ) const;
+ void replaceValue( const QString& oldText, const QString& newText, const EntryField::FieldType fieldType );
+ BibTeX::Entry *completeReferencedFieldsConst( const BibTeX::Entry *entry ) const;
+ void completeReferencedFields( BibTeX::Entry *entry ) const;
+
+ QString fileName;
+
+ protected:
+ ElementList elements;
+
+ private:
+ void clearElements();
+
+ };
+
+}
+
+#endif
diff --git a/src/fileexporter.cpp b/src/fileexporter.cpp
new file mode 100644
index 0000000..b5fe73b
--- /dev/null
+++ b/src/fileexporter.cpp
@@ -0,0 +1,36 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include "fileexporter.h"
+
+namespace BibTeX
+{
+
+ FileExporter::FileExporter() : QObject()
+ {
+ // nothing
+ }
+
+ FileExporter::~FileExporter()
+ {
+ // nothing
+ }
+
+}
+#include "fileexporter.moc"
diff --git a/src/fileexporter.h b/src/fileexporter.h
new file mode 100644
index 0000000..cc60ac0
--- /dev/null
+++ b/src/fileexporter.h
@@ -0,0 +1,63 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILEEXPORTER_H
+#define BIBTEXFILEEXPORTER_H
+
+#include <qobject.h>
+#include <qmutex.h>
+
+#include <file.h>
+
+class QIODevice;
+
+namespace BibTeX
+{
+ class File;
+ class Element;
+
+ /**
+ @author Thomas Fischer
+ */
+ class FileExporter : public QObject
+ {
+ Q_OBJECT
+ public:
+ FileExporter();
+ ~FileExporter();
+
+ virtual bool save( QIODevice *iodevice, const File *bibtexfile, QStringList *errorLog = NULL ) = 0;
+ virtual bool save( QIODevice *iodevice, const Element* element, QStringList *errorLog = NULL ) = 0;
+
+ signals:
+ void progress( int current, int total );
+
+ public slots:
+ virtual void cancel()
+ {
+ // nothing
+ };
+
+ protected:
+ QMutex m_mutex;
+ };
+
+}
+
+#endif
diff --git a/src/fileexporterbibtex.cpp b/src/fileexporterbibtex.cpp
new file mode 100644
index 0000000..240754d
--- /dev/null
+++ b/src/fileexporterbibtex.cpp
@@ -0,0 +1,491 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <file.h>
+#include <element.h>
+#include <entry.h>
+#include <macro.h>
+#include <preamble.h>
+#include <value.h>
+#include <comment.h>
+#include <encoderlatex.h>
+
+#include "fileexporterbibtex.h"
+
+namespace BibTeX
+{
+
+ FileExporterBibTeX::FileExporterBibTeX() : FileExporter(),
+ m_iconvBufferSize( 16384 ), m_stringOpenDelimiter( '"' ), m_stringCloseDelimiter( '"' ), m_keywordCasing( kcCamelCase ), m_encoding( "latex" ), m_protectCasing( FALSE ), cancelFlag( FALSE )
+ {
+ m_iconvBuffer = new char[m_iconvBufferSize];
+ }
+
+ FileExporterBibTeX::~FileExporterBibTeX()
+ {
+ delete[] m_iconvBuffer;
+ }
+
+ bool FileExporterBibTeX::save( QIODevice* iodevice, const File* bibtexfile, QStringList * /*errorLog*/ )
+ {
+ m_mutex.lock();
+ bool result = TRUE;
+
+ /**
+ * Categorize elements from the bib file into four groups,
+ * to ensure that BibTeX finds all connected elements
+ * in the correct order.
+ */
+
+ QValueList<Comment*> parameterCommentsList;
+ QValueList<Preamble*> preambleList;
+ QValueList<Macro*> macroList;
+ QValueList<Entry*> crossRefingEntryList;
+ QValueList<Element*> remainingList;
+
+ for ( File::ElementList::const_iterator it = bibtexfile->elements.begin(); it != bibtexfile->elements.end() && result && !cancelFlag; it++ )
+ {
+ Preamble *preamble = dynamic_cast<Preamble*>( *it );
+ if ( preamble != NULL )
+ preambleList.append( preamble );
+ else
+ {
+ Macro *macro = dynamic_cast<Macro*>( *it );
+ if ( macro != NULL )
+ macroList.append( macro );
+ else
+ {
+ Entry *entry = dynamic_cast<Entry*>( *it );
+ if (( entry != NULL ) && ( entry->getField( EntryField::ftCrossRef ) != NULL ) )
+ crossRefingEntryList.append( entry );
+ else
+ {
+ Comment *comment = dynamic_cast<Comment*>( *it );
+ QString commentText = QString::null;
+ /** check if this file requests a special encoding */
+ if ( comment != NULL && comment->useCommand() && (( commentText = comment->text().lower() ) ).startsWith( "x-kbibtex-encoding=" ) )
+ {
+ m_encoding = commentText.mid( 19 );
+ qDebug( "Switching encoding to <%s>", m_encoding.latin1() );
+ parameterCommentsList.append( comment );
+ }
+ else
+ remainingList.append( *it );
+ }
+ }
+ }
+ }
+
+ int totalElements = ( int ) bibtexfile->count();
+ int currentPos = 0;
+
+ const char *encodingTo = m_encoding == "latex" ? "utf-8\0" : m_encoding.append( "\0" ).ascii();
+ m_iconvHandle = iconv_open( encodingTo, "utf-8" );
+
+ /** before anything else, write parameter comments */
+ for ( QValueList<Comment*>::iterator it = parameterCommentsList.begin(); it != parameterCommentsList.end() && result && !cancelFlag; it++ )
+ {
+ result &= writeComment( *iodevice, *it );
+ emit progress( ++currentPos, totalElements );
+ }
+
+ /** first, write preambles and strings (macros) at the beginning */
+ for ( QValueList<Preamble*>::iterator it = preambleList.begin(); it != preambleList.end() && result && !cancelFlag; it++ )
+ {
+ result &= writePreamble( *iodevice, *it );
+ emit progress( ++currentPos, totalElements );
+ }
+
+ for ( QValueList<Macro*>::iterator it = macroList.begin(); it != macroList.end() && result && !cancelFlag; it++ )
+ {
+ result &= writeMacro( *iodevice, *it );
+ emit progress( ++currentPos, totalElements );
+ }
+
+ /** second, write cross-referencing elements */
+ for ( QValueList<Entry*>::iterator it = crossRefingEntryList.begin(); it != crossRefingEntryList.end() && result && !cancelFlag; it++ )
+ {
+ result &= writeEntry( *iodevice, *it );
+ emit progress( ++currentPos, totalElements );
+ }
+
+ /** third, write remaining elements */
+ for ( QValueList<Element*>::iterator it = remainingList.begin(); it != remainingList.end() && result && !cancelFlag; it++ )
+ {
+ Entry *entry = dynamic_cast<Entry*>( *it );
+ if ( entry != NULL )
+ result &= writeEntry( *iodevice, entry );
+ else
+ {
+ Comment *comment = dynamic_cast<Comment*>( *it );
+ if ( comment != NULL )
+ result &= writeComment( *iodevice, comment );
+ }
+ emit progress( ++currentPos, totalElements );
+ }
+
+ iconv_close( m_iconvHandle );
+ m_mutex.unlock();
+ return result && !cancelFlag;
+ }
+
+ bool FileExporterBibTeX::save( QIODevice* iodevice, const Element* element, QStringList * /*errorLog*/ )
+ {
+ m_mutex.lock();
+ bool result = FALSE;
+
+ const char *encodingTo = m_encoding == "latex" ? "utf-8\0" : m_encoding.append( "\0" ).ascii();
+ m_iconvHandle = iconv_open( encodingTo, "utf-8" );
+
+ const Entry *entry = dynamic_cast<const Entry*>( element );
+ if ( entry != NULL )
+ result |= writeEntry( *iodevice, entry );
+ else
+ {
+ const Macro * macro = dynamic_cast<const Macro*>( element );
+ if ( macro != NULL )
+ result |= writeMacro( *iodevice, macro );
+ else
+ {
+ const Comment * comment = dynamic_cast<const Comment*>( element );
+ if ( comment != NULL )
+ result |= writeComment( *iodevice, comment );
+ else
+ {
+ const Preamble * preamble = dynamic_cast<const Preamble*>( element );
+ if ( preamble != NULL )
+ result |= writePreamble( *iodevice, preamble );
+ }
+ }
+ }
+
+ iconv_close( m_iconvHandle );
+ m_mutex.unlock();
+ return result && !cancelFlag;
+ }
+
+ void FileExporterBibTeX::cancel()
+ {
+ cancelFlag = TRUE;
+ }
+
+ bool FileExporterBibTeX::writeEntry( QIODevice &device, const Entry* entry )
+ {
+ writeString( device, QString( "@%1{ %2" ).arg( applyKeywordCasing( entry->entryTypeString() ) ).arg( entry->id() ) );
+
+ for ( Entry::EntryFields::ConstIterator it = entry->begin(); it != entry->end(); ++it )
+ {
+ EntryField *field = *it;
+ QString text = valueToString( field->value(), field->fieldType(), field->fieldTypeName() );
+ if ( m_protectCasing && dynamic_cast<BibTeX::PlainText*>( field->value()->items.first() ) != NULL && ( field->fieldType() == EntryField::ftTitle || field->fieldType() == EntryField::ftBookTitle || field->fieldType() == EntryField::ftSeries ) )
+ addProtectiveCasing( text );
+ writeString( device, QString( ",\n\t%1 = %2" ).arg( field->fieldTypeName() ).arg( text ) );
+ }
+ writeString( device, "\n}\n\n" );
+ return TRUE;
+ }
+
+ bool FileExporterBibTeX::writeMacro( QIODevice &device, const Macro *macro )
+ {
+ QString text = valueToString( macro->value() );
+ if ( m_protectCasing )
+ addProtectiveCasing( text );
+
+ writeString( device, QString( "@%1{ %2 = %3 }\n\n" ).arg( applyKeywordCasing( "String" ) ).arg( macro->key() ).arg( text ) );
+
+ return TRUE;
+ }
+
+ bool FileExporterBibTeX::writeComment( QIODevice &device, const Comment *comment )
+ {
+ if ( !comment->useCommand() )
+ {
+ QString text = comment->text() ;
+
+ if ( m_encoding == "latex" )
+ text = EncoderLaTeX::currentEncoderLaTeX() ->encode( text );
+
+ QStringList commentLines = QStringList::split( '\n', text );
+ for ( QStringList::Iterator it = commentLines.begin(); it != commentLines.end(); it++ )
+ {
+ writeString( device, ( *it ).append( "\n" ) );
+ }
+ writeString( device, "\n" );
+ }
+ else
+ {
+ QString text = comment->text() ;
+
+ if ( m_encoding == "latex" )
+ text = EncoderLaTeX::currentEncoderLaTeX() ->encode( text );
+
+ writeString( device, QString( "@%1{%2}\n\n" ).arg( applyKeywordCasing( "Comment" ) ).arg( text ) );
+ }
+ return TRUE;
+ }
+
+ bool FileExporterBibTeX::writePreamble( QIODevice &device, const Preamble* preamble )
+ {
+ writeString( device, QString( "@%1{%2}\n\n" ).arg( applyKeywordCasing( "Preamble" ) ).arg( valueToString( preamble->value() ) ) );
+
+ return TRUE;
+ }
+
+ bool FileExporterBibTeX::writeString( QIODevice &device, const QString& text )
+ {
+ size_t utf8datasize = 1;
+ QCString utf8 = text.utf8();
+ char *utf8data = utf8.data();
+ utf8datasize = utf8.length();
+ char *outputdata = m_iconvBuffer;
+ size_t outputdatasize = m_iconvBufferSize;
+
+ size_t result = iconv( m_iconvHandle, &utf8data, &utf8datasize, &outputdata, &outputdatasize );
+ if ( result != 0 )
+ {
+ qWarning( "Cannot convert string using iconv" );
+ return false;
+ }
+
+ if ( device.writeBlock( m_iconvBuffer, m_iconvBufferSize - outputdatasize ) != ( int )( m_iconvBufferSize - outputdatasize ) )
+ {
+ qWarning( "Cannot write string to device" );
+ return false;
+ }
+
+ return true;
+ }
+
+ void FileExporterBibTeX::setStringDelimiter( const QChar& stringOpenDelimiter, const QChar& stringCloseDelimiter )
+ {
+ m_stringOpenDelimiter = stringOpenDelimiter;
+ m_stringCloseDelimiter = stringCloseDelimiter;
+ }
+
+ void FileExporterBibTeX::setKeywordCasing( const KeywordCasing keywordCasing )
+ {
+ m_keywordCasing = keywordCasing;
+ }
+
+ void FileExporterBibTeX::setEncoding( const QString& encoding )
+ {
+ m_encoding = encoding;
+ }
+
+ void FileExporterBibTeX::setEnclosingCurlyBrackets( bool protectCasing )
+ {
+ m_protectCasing = protectCasing;
+ }
+
+ QString FileExporterBibTeX::valueToString( const Value *value, const EntryField::FieldType fieldType, const QString &fieldTypeName )
+ {
+ if ( value == NULL )
+ return "";
+
+ QString result;
+ bool isFirst = TRUE;
+ EncoderLaTeX *encoder = EncoderLaTeX::currentEncoderLaTeX();
+
+ for ( QValueList<ValueItem*>::ConstIterator it = value->items.begin(); it != value->items.end(); ++it )
+ {
+ if ( !isFirst )
+ result.append( " # " );
+ else
+ isFirst = FALSE;
+
+ MacroKey *macroKey = dynamic_cast<MacroKey*>( *it );
+ if ( macroKey != NULL )
+ result.append( macroKey->text() );
+ else
+ {
+ QString text;
+ BibTeX::PersonContainer *personContainer = dynamic_cast<BibTeX::PersonContainer*>( *it );
+ BibTeX::PlainText *plainText = dynamic_cast<BibTeX::PlainText*>( *it );
+ BibTeX::KeywordContainer *keywordContainer = dynamic_cast<BibTeX::KeywordContainer*>( *it );
+
+ if ( plainText != NULL )
+ text = plainText->text();
+ else if ( keywordContainer != NULL )
+ {
+ bool first = TRUE;
+ for ( QValueList<Keyword*>::Iterator it = keywordContainer->keywords.begin(); it != keywordContainer->keywords.end(); ++it )
+ {
+ if ( !first )
+ text.append( ", " );
+ else
+ first = FALSE;
+ text.append(( *it )->text() );
+ }
+ }
+ else if ( personContainer != NULL )
+ {
+ bool first = TRUE;
+ for ( QValueList<Person*>::Iterator it = personContainer->persons.begin(); it != personContainer->persons.end(); ++it )
+ {
+ if ( !first )
+ text.append( " and " );
+ else
+ first = FALSE;
+
+ QString v = ( *it )->firstName();
+ if ( !v.isEmpty() )
+ {
+ bool requiresQuoting = requiresPersonQuoting( v, FALSE );
+ if ( requiresQuoting ) text.append( "{" );
+ text.append( v );
+ if ( requiresQuoting ) text.append( "}" );
+ text.append( " " );
+ }
+
+ v = ( *it )->lastName();
+ if ( !v.isEmpty() )
+ {
+ /** Multi-part surnames (such as "Garcia Marquez") have to be enquoted.
+ * However, "von"-Parts (as in "von Hofmannsthal") must _not_ be enquoted.
+ * Examples:
+ * -- Robson de Souza
+ * -- Hartmann von der Tann
+ * -- Ronaldo de {Assis Moreira} ("Ronaldo de Assis Moreira" works as well)
+ * -- Ailton {Goncalves da Silva}
+ * -- Gloria von {Thurn und Taxis}
+ * Thus we split the von-Parts from the surname (= everything after the first upcase char).
+ * FIXME: Make the personContainer aware of von-Parts and jr-Parts, instead.
+ */
+ QStringList list = QStringList::split( " ", v );
+ QString von;
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ {
+ QString str = *it;
+ if ( str != "others" && str[0].category() == QChar::Letter_Lowercase )
+ {
+ von += *it;
+ von += " ";
+ }
+ else
+ break;
+ }
+ if ( !von.isEmpty() )
+ {
+ text.append( von );
+ v = v.right( v.length() - von.length() );
+ }
+ bool requiresQuoting = requiresPersonQuoting( v, TRUE );
+ if ( requiresQuoting ) text.append( "{" );
+ text.append( v );
+ if ( requiresQuoting ) text.append( "}" );
+ }
+ }
+ }
+
+ if ( m_encoding == "latex" )
+ text = encoder->encodeSpecialized( text, fieldType );
+
+ if ( fieldType == EntryField::ftURL || fieldType == EntryField::ftDoi || ( fieldType == EntryField::ftUnknown && fieldTypeName.lower() == "slaccitation" ) )
+ removeBackslashQuoting( text );
+
+ /** if the text to save contains a quote char ("),
+ * force string delimiters to be curly brackets,
+ * as quote chars as string delimiters would result
+ * in parser failures
+ */
+ QChar stringOpenDelimiter = m_stringOpenDelimiter;
+ QChar stringCloseDelimiter = m_stringCloseDelimiter;
+ if ( text.contains( '"' ) && ( m_stringOpenDelimiter == '"' || m_stringCloseDelimiter == '"' ) )
+ {
+ stringOpenDelimiter = '{';
+ stringCloseDelimiter = '}';
+ }
+
+ result.append( stringOpenDelimiter ).append( text ).append( stringCloseDelimiter );
+ }
+ }
+
+ return result;
+ }
+
+ void FileExporterBibTeX::removeBackslashQuoting( QString &text )
+ {
+ text.replace( "\\&", "&" ).replace( "\\#", "#" ).replace( "\\_", "_" ).replace( "\\%", "%" );
+ }
+
+ QString FileExporterBibTeX::applyKeywordCasing( const QString &keyword )
+ {
+ switch ( m_keywordCasing )
+ {
+ case kcLowerCase: return keyword.lower();
+ case kcInitialCapital: return keyword.at( 0 ) + keyword.lower().mid( 1 );
+ case kcCapital: return keyword.upper();
+ default: return keyword;
+ }
+ }
+
+ bool FileExporterBibTeX::requiresPersonQuoting( const QString &text, bool isLastName )
+ {
+ if ( isLastName && !text.contains( " " ) )
+ /** Last name contains NO spaces, no quoting necessary */
+ return FALSE;
+ else if ( isLastName && text[0].category() == QChar::Letter_Lowercase )
+ /** Last name starts with lower case character (e.g. as in "van der Linden") */
+ return FALSE;
+ else if ( !isLastName && !text.contains( " and " ) )
+ /** First name contains no " and " no quoting necessary */
+ return FALSE;
+ else if ( text[0] != '{' || text[text.length()-1] != '}' )
+ /** as either last name contains spaces or first name contains " and " and there is no protective quoting yet, there must be a protective quoting added */
+ return TRUE;
+
+ /** check for cases like "{..}..{..}", which must be surrounded with a protective quoting, too */
+ int bracketCounter = 0;
+ for ( int i = text.length() - 1; i >= 0; --i )
+ {
+ if ( text[i] == '{' )
+ ++bracketCounter;
+ else if ( text[i] == '}' )
+ --bracketCounter;
+ if ( bracketCounter == 0 && i > 0 )
+ return TRUE;
+ }
+ return FALSE;
+ }
+
+ void FileExporterBibTeX::addProtectiveCasing( QString &text )
+ {
+ if (( text[0] != '"' || text[text.length()-1] != '"' ) && ( text[0] != '{' || text[text.length()-1] != '}' ) )
+ {
+ /** nothing to protect, as this is no text string */
+ return;
+ }
+
+ bool addBrackets = TRUE;
+
+ if ( text[1] == '{' && text[text.length() - 2] == '}' )
+ {
+ addBrackets = FALSE;
+ int count = 0;
+ for ( int i = text.length() - 2; !addBrackets && i >= 1; --i )
+ if ( text[i] == '{' )++count;
+ else if ( text[i] == '}' )--count;
+ else if ( count == 0 ) addBrackets = TRUE;
+ }
+
+ if ( addBrackets )
+ text.insert( 1, '{' ).insert( text.length(), '}' );
+ }
+
+}
diff --git a/src/fileexporterbibtex.h b/src/fileexporterbibtex.h
new file mode 100644
index 0000000..6606283
--- /dev/null
+++ b/src/fileexporterbibtex.h
@@ -0,0 +1,88 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILEEXPORTERBIBTEX_H
+#define BIBTEXFILEEXPORTERBIBTEX_H
+
+#include <iconv.h>
+
+#include <element.h>
+#include <entryfield.h>
+#include <fileexporter.h>
+
+class QChar;
+
+namespace BibTeX
+{
+ class Comment;
+ class Preamble;
+ class Macro;
+
+ /**
+ @author Thomas Fischer
+ */
+
+ class FileExporterBibTeX : public FileExporter
+ {
+ public:
+ enum KeywordCasing {kcLowerCase, kcInitialCapital, kcCamelCase, kcCapital};
+
+ FileExporterBibTeX();
+ ~FileExporterBibTeX();
+
+ bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
+ bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+
+ void setStringDelimiter( const QChar& stringOpenDelimiter, const QChar& stringCloseDelimiter );
+ void setKeywordCasing( const KeywordCasing keywordCasing );
+ void setEncoding( const QString& encoding );
+ void setEnclosingCurlyBrackets( bool protectCasing );
+
+ public slots:
+ void cancel();
+
+ private:
+ iconv_t m_iconvHandle;
+ char *m_iconvBuffer;
+ const int m_iconvBufferSize;
+
+ QChar m_stringOpenDelimiter;
+ QChar m_stringCloseDelimiter;
+ KeywordCasing m_keywordCasing;
+ QString m_encoding;
+ bool m_protectCasing;
+ bool cancelFlag;
+
+ bool writeEntry( QIODevice &device, const Entry* entry );
+ bool writeMacro( QIODevice &device, const Macro *macro );
+ bool writeComment( QIODevice &device, const Comment *comment );
+ bool writePreamble( QIODevice &device, const Preamble* preamble );
+ bool writeString( QIODevice &device, const QString& text );
+
+ QString valueToString( const Value *value, const EntryField::FieldType fieldType = EntryField::ftUnknown, const QString &fieldTypeName = QString::null );
+
+ void removeBackslashQuoting( QString &text );
+ QString applyKeywordCasing( const QString &keyword );
+ bool requiresPersonQuoting( const QString &text, bool isLastName );
+ void addProtectiveCasing( QString &text );
+ };
+
+}
+
+#endif
diff --git a/src/fileexporterbibutils.cpp b/src/fileexporterbibutils.cpp
new file mode 100644
index 0000000..4de7aeb
--- /dev/null
+++ b/src/fileexporterbibutils.cpp
@@ -0,0 +1,259 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qfile.h>
+#include <qdir.h>
+#include <qstringlist.h>
+#include <qapplication.h>
+#include <qbuffer.h>
+#include <qprocess.h>
+#include <qwaitcondition.h>
+
+#include <fileexporterbibtex.h>
+#include "fileexporterbibutils.h"
+
+namespace BibTeX
+{
+
+ FileExporterBibUtils::FileExporterBibUtils( BibTeX::File::FileFormat outputFormat )
+ : FileExporter(), m_outputFormat( outputFormat ), m_bibTeXExporter( new FileExporterBibTeX() )
+ {
+ m_bibTeXExporter->setEncoding( "utf-8" );
+ m_processBuffer = new QBuffer();
+ }
+
+ FileExporterBibUtils::~FileExporterBibUtils()
+ {
+ delete m_processBuffer;
+ delete m_bibTeXExporter;
+ }
+
+ bool FileExporterBibUtils::save( QIODevice* iodevice, const Element* element, QStringList* errorLog )
+ {
+ m_cancelFlag = false;
+ QBuffer bibBuffer;
+ if ( !toBuffer( element, &bibBuffer, errorLog ) )
+ return false;
+ if ( !bufferToXMLbuffer( &bibBuffer ) || m_cancelFlag )
+ return false;
+ return !m_cancelFlag && xmlBufferToIOdevice( iodevice );
+ }
+
+ bool FileExporterBibUtils::save( QIODevice* iodevice, const File* bibtexfile, QStringList* errorLog )
+ {
+ emit progress( 0, 3 );
+ m_cancelFlag = false;
+ QBuffer bibBuffer;
+ if ( !toBuffer( bibtexfile, &bibBuffer, errorLog ) )
+ return false;
+ emit progress( 1, 3 );
+ if ( m_cancelFlag || !bufferToXMLbuffer( &bibBuffer ) )
+ return false;
+ emit progress( 2, 3 );
+ if ( m_cancelFlag || !xmlBufferToIOdevice( iodevice ) )
+ return false;
+ emit progress( 3, 3 );
+ return !m_cancelFlag;
+ }
+
+ void FileExporterBibUtils::cancel()
+ {
+ m_bibTeXExporter->cancel();
+ m_cancelFlag = true;
+ }
+
+ bool FileExporterBibUtils::toBuffer( const File *bibFile, QBuffer *buffer, QStringList* errorLog )
+ {
+ buffer->open( IO_WriteOnly );
+ bool result = m_bibTeXExporter->save( buffer, bibFile, errorLog );
+ buffer->close();
+ return result;
+ }
+
+ bool FileExporterBibUtils::toBuffer( const Element *bibElement, QBuffer *buffer, QStringList* errorLog )
+ {
+ buffer->open( IO_WriteOnly );
+ bool result = m_bibTeXExporter->save( buffer, bibElement, errorLog );
+ buffer->close();
+ return result;
+ }
+
+ bool FileExporterBibUtils::bufferToXMLbuffer( QBuffer *bibBuffer )
+ {
+ QWaitCondition wc;
+
+ m_processBuffer->open( IO_WriteOnly );
+ m_waiting = true;
+ m_process = new QProcess( QStringList::split( ' ', "bib2xml -i utf8" ) );
+ connect( m_process, SIGNAL( processExited() ), this, SLOT( wakeUp() ) );
+ connect( m_process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadyStdout() ) );
+ connect( m_process, SIGNAL( readyReadStderr() ), this, SLOT( slotReadyStderr() ) );
+
+ m_process->start();
+ if ( m_process->isRunning() )
+ {
+ bibBuffer->open( IO_ReadOnly );
+ m_process->writeToStdin( bibBuffer->readAll() );
+ qApp->processEvents();
+ m_process->closeStdin();
+ bibBuffer->close();
+
+ int nothingHappens = 20;
+ while ( m_waiting )
+ {
+ wc.wait( 250 );
+ qApp->processEvents();
+ --nothingHappens;
+ }
+
+ if ( nothingHappens <= 0 )
+ m_process->kill();
+
+ if ( !m_process->normalExit() )
+ {
+ qDebug( "%s did not exit in a clean fashion", m_process->arguments()[0].latin1() );
+ delete m_process;
+ return false;
+ }
+ }
+ else
+ {
+ qDebug( "%s did not start", m_process->arguments()[0].latin1() );
+ delete m_process;
+ return false;
+ }
+
+ m_processBuffer->close();
+
+ delete m_process;
+ return true;
+ }
+
+ bool FileExporterBibUtils::xmlBufferToIOdevice( QIODevice *iodevice )
+ {
+ QWaitCondition wc;
+ m_waiting = true;
+
+ m_process = NULL;
+ switch ( m_outputFormat )
+ {
+ case BibTeX::File::formatISI:
+ m_process = new QProcess( QStringList::split( ' ', "xml2isi" ) );
+ break;
+ case BibTeX::File::formatWordBib:
+ m_process = new QProcess( QStringList::split( ' ', "xml2wordbib" ) );
+ break;
+ case BibTeX::File::formatAds:
+ m_process = new QProcess( QStringList::split( ' ', "xml2ads" ) );
+ break;
+ case BibTeX::File::formatEndNote:
+ m_process = new QProcess( QStringList::split( ' ', "xml2end" ) );
+ break;
+ case BibTeX::File::formatRIS:
+ m_process = new QProcess( QStringList::split( ' ', "xml2ris" ) );
+ break;
+ case BibTeX::File::formatMODS:
+ /* m_process = NULL; */
+ break;
+ default:
+ qDebug( "Cannot handle output format %i", m_outputFormat );
+ return false;
+ }
+
+ if ( m_process != NULL )
+ {
+ connect( m_process, SIGNAL( processExited() ), this, SLOT( wakeUp() ) );
+ connect( m_process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadyStdout() ) );
+ connect( m_process, SIGNAL( readyReadStderr() ), this, SLOT( slotReadyStderr() ) );
+
+ if ( m_process->start() )
+ {
+ QBuffer *tempBuffer = m_processBuffer;
+ m_processBuffer = new QBuffer();
+
+ tempBuffer->open( IO_ReadOnly );
+ m_process->writeToStdin( tempBuffer->readAll() );
+ qApp->processEvents();
+ m_process->closeStdin();
+ tempBuffer->close();
+
+ m_processBuffer->open( IO_WriteOnly );
+ int nothingHappens = 20;
+ while ( m_waiting )
+ {
+ wc.wait( 250 );
+ qApp->processEvents();
+ --nothingHappens;
+ }
+ m_processBuffer->close();
+
+ delete tempBuffer;
+
+ if ( nothingHappens <= 0 )
+ m_process->kill();
+
+ if ( ! m_process->normalExit() )
+ {
+ delete m_process;
+ return false;
+ }
+
+ m_processBuffer->open( IO_ReadOnly );
+ iodevice->writeBlock( m_processBuffer->buffer() );
+ m_processBuffer->close();
+
+ delete m_process;
+ }
+ else
+ {
+ qDebug( "%s did not start", m_process->arguments()[0].latin1() );
+ delete m_process;
+ return false;
+ }
+ }
+ else
+ {
+ m_processBuffer->open( IO_ReadOnly );
+ iodevice->writeBlock( m_processBuffer->buffer() );
+ m_processBuffer->close();
+ }
+
+ return true;
+ }
+
+ void FileExporterBibUtils::wakeUp()
+ {
+ m_waiting = false;
+ }
+
+ void FileExporterBibUtils::slotReadyStdout()
+ {
+ m_processBuffer->writeBlock( m_process->readStdout() );
+ }
+
+ void FileExporterBibUtils::slotReadyStderr()
+ {
+ QByteArray ba = m_process->readStderr();
+ QTextStream bats( ba, IO_ReadOnly );
+ bats.setEncoding( QTextStream::UnicodeUTF8 );
+ qDebug( "%s", bats.read().latin1() );
+ }
+
+}
+#include "fileexporterbibutils.moc"
diff --git a/src/fileexporterbibutils.h b/src/fileexporterbibutils.h
new file mode 100644
index 0000000..978a92d
--- /dev/null
+++ b/src/fileexporterbibutils.h
@@ -0,0 +1,70 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef BIBTEXFILEEXPORTERBIBUTILS_H
+#define BIBTEXFILEEXPORTERBIBUTILS_H
+
+#include <fileexporter.h>
+
+class QProcess;
+class QBuffer;
+
+namespace BibTeX
+{
+ class FileExporterBibTeX;
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class FileExporterBibUtils : public FileExporter
+ {
+ Q_OBJECT
+ public:
+ FileExporterBibUtils( BibTeX::File::FileFormat outputFormat );
+ ~FileExporterBibUtils();
+
+ bool save( QIODevice* iodevice, const Element* element, QStringList* errorLog = NULL );
+ bool save( QIODevice* iodevice, const File* bibtexfile, QStringList* errorLog = NULL );
+
+ public slots:
+ void cancel();
+
+ private:
+ bool m_cancelFlag;
+ BibTeX::File::FileFormat m_outputFormat;
+ FileExporterBibTeX *m_bibTeXExporter;
+
+ bool m_waiting;
+ QProcess *m_process;
+ QBuffer *m_processBuffer;
+
+ bool toBuffer( const File *bibFile, QBuffer *buffer, QStringList* errorLog);
+ bool toBuffer( const Element *bibFile, QBuffer *buffer, QStringList* errorLog);
+ bool bufferToXMLbuffer( QBuffer *buffer );
+ bool xmlBufferToIOdevice( QIODevice *iodevice );
+
+ private slots:
+ void wakeUp();
+ void slotReadyStdout();
+ void slotReadyStderr();
+ };
+
+}
+
+#endif // BIBTEXFILEEXPORTERBIBUTILS_H
diff --git a/src/fileexporterdocbook5.cpp b/src/fileexporterdocbook5.cpp
new file mode 100644
index 0000000..7a962b6
--- /dev/null
+++ b/src/fileexporterdocbook5.cpp
@@ -0,0 +1,96 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qfile.h>
+#include <qstringlist.h>
+
+#include <file.h>
+#include <fileexporterbibtex.h>
+#include "fileexporterdocbook5.h"
+
+namespace BibTeX
+{
+
+ FileExporterDocBook5::FileExporterDocBook5( const QString& classPath )
+ : FileExporterToolchain(), m_classPath( classPath )
+ {
+ bibTeXFilename = QString( workingDir ).append( "/bibtex-to-docbook5.bib" );
+ outputFilename = QString( workingDir ).append( "/bibtex-to-docbook5.bib.xml" );
+ }
+
+
+ FileExporterDocBook5::~FileExporterDocBook5()
+ {
+ // nothing
+ }
+
+ bool FileExporterDocBook5::save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog )
+ {
+ m_mutex.lock();
+ bool result = FALSE;
+
+ QFile bibtexFile( bibTeXFilename );
+ if ( bibtexFile.open( IO_WriteOnly ) )
+ {
+ FileExporter * bibtexExporter = new FileExporterBibTeX();
+ result = bibtexExporter->save( &bibtexFile, bibtexfile, errorLog );
+ bibtexFile.close();
+ delete bibtexExporter;
+ }
+
+ if ( result )
+ result = runBib2Db5( iodevice, errorLog );
+
+ m_mutex.unlock();
+ return result;
+ }
+
+ bool FileExporterDocBook5::save( QIODevice* iodevice, const Element* element, QStringList *errorLog )
+ {
+ m_mutex.lock();
+ bool result = FALSE;
+
+ QFile bibtexFile( bibTeXFilename );
+ if ( bibtexFile.open( IO_WriteOnly ) )
+ {
+ FileExporter * bibtexExporter = new FileExporterBibTeX();
+ result = bibtexExporter->save( &bibtexFile, element, errorLog );
+ bibtexFile.close();
+ delete bibtexExporter;
+ }
+
+ if ( result )
+ result = runBib2Db5( iodevice, errorLog );
+
+ m_mutex.unlock();
+ return result;
+ }
+
+ bool FileExporterDocBook5::runBib2Db5( QIODevice* iodevice, QStringList *errorLog )
+ {
+ QStringList cmdLine;
+ cmdLine << "java" << "-cp" << m_classPath << "net.sf.bib2db5.DB5Converter" << "-O" << "." << "bibtex-to-docbook5.bib";
+
+ if ( runProcess( cmdLine, errorLog ) && writeFileToIODevice( outputFilename, iodevice ) )
+ return TRUE;
+ else
+ return FALSE;
+ }
+
+}
diff --git a/src/fileexporterdocbook5.h b/src/fileexporterdocbook5.h
new file mode 100644
index 0000000..7b5f812
--- /dev/null
+++ b/src/fileexporterdocbook5.h
@@ -0,0 +1,54 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef BIBTEXFILEEXPORTERDOCBOOK5_H
+#define BIBTEXFILEEXPORTERDOCBOOK5_H
+
+#include <fileexportertoolchain.h>
+
+namespace BibTeX
+{
+
+ /**
+ @author Thomas Fischer
+ */
+ class FileExporterDocBook5 : public FileExporterToolchain
+ {
+ public:
+ FileExporterDocBook5(const QString& classPath);
+ ~FileExporterDocBook5();
+
+ bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
+ bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+
+ void setLaTeXLanguage( const QString& language );
+ void setLaTeXBibliographyStyle( const QString& bibStyle );
+
+ private:
+QString m_classPath;
+ QString bibTeXFilename;
+ QString outputFilename;
+
+ bool runBib2Db5( QIODevice* iodevice, QStringList *errorLog );
+ };
+
+
+}
+
+#endif
diff --git a/src/fileexporterexternal.cpp b/src/fileexporterexternal.cpp
new file mode 100644
index 0000000..6b7e449
--- /dev/null
+++ b/src/fileexporterexternal.cpp
@@ -0,0 +1,179 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qprocess.h>
+#include <qwaitcondition.h>
+#include <qapplication.h>
+#include <qbuffer.h>
+
+#include <fileexporterbibtex.h>
+#include <settings.h>
+#include "fileexporterexternal.h"
+
+namespace BibTeX
+{
+
+ FileExporterExternal::FileExporterExternal( Exporter exporter, File::FileFormat fileformat )
+ : FileExporter(), writeTo( NULL ), m_exporter( exporter ), m_fileformat( fileformat )
+ {
+ wc = new QWaitCondition();
+ }
+
+ FileExporterExternal::~FileExporterExternal()
+ {
+ delete wc;
+ }
+
+ bool FileExporterExternal::save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog )
+ {
+ m_mutex.lock();
+ QBuffer buffer;
+ buffer.open( IO_WriteOnly );
+ FileExporter * bibtexExporter = new FileExporterBibTeX();
+ bool result = bibtexExporter->save( &buffer, bibtexfile, errorLog );
+ buffer.close();
+ delete bibtexExporter;
+
+ if ( result )
+ result = generateOutput( buffer, iodevice );
+
+ m_mutex.unlock();
+ return result;
+ }
+
+ bool FileExporterExternal::save( QIODevice* iodevice, const Element* element, QStringList *errorLog )
+ {
+ m_mutex.lock();
+ QBuffer buffer;
+ buffer.open( IO_WriteOnly );
+ FileExporter * bibtexExporter = new FileExporterBibTeX();
+ bool result = bibtexExporter->save( &buffer, element, errorLog );
+ buffer.close();
+ delete bibtexExporter;
+
+ if ( result )
+ result = generateOutput( buffer, iodevice );
+
+ m_mutex.unlock();
+ return result;
+ }
+
+ bool FileExporterExternal::generateOutput( QBuffer &input, QIODevice *output )
+ {
+ bool result = FALSE;
+
+ QString commandLine;
+ switch ( m_fileformat )
+ {
+ case File::formatHTML:
+ switch ( m_exporter )
+ {
+ case exporterBibTeX2HTML:
+ commandLine = "bibtex2html -s plain -a";
+ break;
+ case exporterBib2XHTML:
+ commandLine = "bib2xhtml -s plain -u";
+ break;
+ case exporterBibConv:
+ commandLine = "bibconv -informat=bibtex -outformat=html";
+ break;
+ default:
+ return FALSE;
+ }
+ break;
+ default:
+ return FALSE;
+ }
+ QStringList args = QStringList::split( ' ', commandLine );
+
+ writeTo = new QTextStream( output );
+ writeTo->setEncoding( QTextStream::UnicodeUTF8 );
+
+ QApplication::setOverrideCursor( Qt::waitCursor );
+
+ process = new QProcess( args );
+ connect( process, SIGNAL( processExited() ), this, SLOT( slotProcessExited() ) );
+ connect( process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadProcessOutput() ) );
+ connect( process, SIGNAL( readyReadStderr() ), this, SLOT( slotReadProcessOutput() ) );
+ connect( process, SIGNAL( wroteToStdin() ), this, SLOT( slotWroteToStdin() ) );
+
+ if ( process->start() )
+ {
+ while ( !process->isRunning() )
+ {
+ wc->wait( 250 );
+ qApp->processEvents();
+ }
+ qApp->processEvents();
+ input.open( IO_ReadOnly );
+ QByteArray buf = input.buffer();
+ // qDebug( "buf.size=%i", buf.size() );
+ process->writeToStdin( buf );
+ input.close();
+ qApp->processEvents();
+ while ( process->isRunning() )
+ {
+ wc->wait( 250 );
+ qApp->processEvents();
+ }
+
+ result = process->normalExit();
+ }
+
+ disconnect( process, SIGNAL( wroteToStdin() ), this, SLOT( slotWroteToStdin() ) );
+ disconnect( process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadProcessOutput() ) );
+ disconnect( process, SIGNAL( readyReadStderr() ), this, SLOT( slotReadProcessOutput() ) );
+ disconnect( process, SIGNAL( processExited() ), this, SLOT( slotProcessExited() ) );
+ delete( process );
+ process = NULL;
+ delete writeTo;
+ writeTo = NULL;
+
+ QApplication::restoreOverrideCursor();
+ return result;
+ }
+
+ void FileExporterExternal::slotProcessExited()
+ {
+ wc->wakeAll();
+ }
+
+ void FileExporterExternal::slotReadProcessOutput()
+ {
+ if ( writeTo != NULL )
+ while ( process->canReadLineStdout() )
+ {
+ QString line = process->readLineStdout();
+ // qDebug( "line=%s", line.latin1() );
+ ( *writeTo ) << line.latin1() << endl;
+ }
+ // while ( process->canReadLineStderr() )
+ // {
+ // QString line = process->readLineStderr();
+ // qDebug( "stderr=%s", line.latin1() );
+ // }
+ }
+
+ void FileExporterExternal::slotWroteToStdin()
+ {
+ process->closeStdin();
+ }
+}
+
+#include "fileexporterexternal.moc"
diff --git a/src/fileexporterexternal.h b/src/fileexporterexternal.h
new file mode 100644
index 0000000..463f26a
--- /dev/null
+++ b/src/fileexporterexternal.h
@@ -0,0 +1,66 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILEEXPORTEREXTERNAL_H
+#define BIBTEXFILEEXPORTEREXTERNAL_H
+
+#include <fileexporter.h>
+#include <settings.h>
+
+class QWaitCondition;
+class QProcess;
+class QBuffer;
+
+namespace BibTeX
+{
+
+ /**
+ @author Thomas Fischer
+ */
+ class FileExporterExternal : public FileExporter
+ {
+ Q_OBJECT
+ public:
+ enum Exporter { exporterNone = 0, exporterXSLT = 1, exporterBib2XHTML = 2, exporterBibTeX2HTML = 3, exporterBibConv = 4 };
+
+ FileExporterExternal( Exporter exporter, File::FileFormat fileformat );
+ ~FileExporterExternal();
+
+ bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
+ bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+
+ private:
+ QWaitCondition *wc;
+ QProcess *process;
+ QTextStream *writeTo;
+ Exporter m_exporter;
+ File::FileFormat m_fileformat;
+
+ bool generateOutput( QBuffer &input, QIODevice* output );
+
+ private slots:
+ void slotProcessExited();
+ void slotReadProcessOutput();
+ void slotWroteToStdin();
+
+ };
+
+}
+
+#endif
diff --git a/src/fileexporterpdf.cpp b/src/fileexporterpdf.cpp
new file mode 100644
index 0000000..47b8dad
--- /dev/null
+++ b/src/fileexporterpdf.cpp
@@ -0,0 +1,197 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qfile.h>
+#include <qstringlist.h>
+#include <qurl.h>
+
+#include <settings.h>
+#include <element.h>
+#include <entry.h>
+#include <fileexporterbibtex.h>
+#include "fileexporterpdf.h"
+
+namespace BibTeX
+{
+
+ FileExporterPDF::FileExporterPDF( bool embedFiles )
+ : FileExporterToolchain(), m_latexLanguage( "english" ), m_latexBibStyle( "plain" ), m_embedFiles( embedFiles )
+ {
+ laTeXFilename = QString( workingDir ).append( "/bibtex-to-pdf.tex" );
+ bibTeXFilename = QString( workingDir ).append( "/bibtex-to-pdf.bib" );
+ outputFilename = QString( workingDir ).append( "/bibtex-to-pdf.pdf" );
+ }
+
+ FileExporterPDF::~FileExporterPDF()
+ {
+ // nothing
+ }
+
+ bool FileExporterPDF::save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog )
+ {
+ m_mutex.lock();
+ bool result = FALSE;
+ m_embeddedFileList.clear();
+ if ( m_embedFiles )
+ {
+ m_embeddedFileList.append( QString( "%1|%2" ).arg( "BibTeX source" ).arg( bibTeXFilename ) );
+ fillEmbeddedFileList( bibtexfile );
+ }
+
+ QFile bibtexFile( bibTeXFilename );
+ if ( bibtexFile.open( IO_WriteOnly ) )
+ {
+ FileExporter * bibtexExporter = new FileExporterBibTeX();
+ result = bibtexExporter->save( &bibtexFile, bibtexfile, errorLog );
+ bibtexFile.close();
+ delete bibtexExporter;
+ }
+
+ if ( result )
+ result = generatePDF( iodevice, errorLog );
+
+ m_mutex.unlock();
+ return result;
+ }
+
+ bool FileExporterPDF::save( QIODevice* iodevice, const Element* element, QStringList *errorLog )
+ {
+ m_mutex.lock();
+ bool result = FALSE;
+ m_embeddedFileList.clear();
+ if ( m_embedFiles )
+ fillEmbeddedFileList( element );
+
+ QFile bibtexFile( bibTeXFilename );
+ if ( bibtexFile.open( IO_WriteOnly ) )
+ {
+ FileExporter * bibtexExporter = new FileExporterBibTeX();
+ result = bibtexExporter->save( &bibtexFile, element, errorLog );
+ bibtexFile.close();
+ delete bibtexExporter;
+ }
+
+ if ( result )
+ result = generatePDF( iodevice, errorLog );
+
+ m_mutex.unlock();
+ return result;
+ }
+
+ void FileExporterPDF::setLaTeXLanguage( const QString& language )
+ {
+ m_latexLanguage = language;
+ }
+
+ void FileExporterPDF::setLaTeXBibliographyStyle( const QString& bibStyle )
+ {
+ m_latexBibStyle = bibStyle;
+ }
+
+ void FileExporterPDF::setDocumentSearchPaths( const QStringList& searchPaths )
+ {
+ m_searchPaths = searchPaths;
+ }
+
+ bool FileExporterPDF::generatePDF( QIODevice* iodevice, QStringList *errorLog )
+ {
+ QStringList cmdLines = QStringList::split( '|', "pdflatex -halt-on-error bibtex-to-pdf.tex|bibtex bibtex-to-pdf|pdflatex -halt-on-error bibtex-to-pdf.tex|pdflatex -halt-on-error bibtex-to-pdf.tex" );
+
+ if ( writeLatexFile( laTeXFilename ) && runProcesses( cmdLines, errorLog ) && writeFileToIODevice( outputFilename, iodevice ) )
+ return TRUE;
+ else
+ return FALSE;
+ }
+
+ bool FileExporterPDF::writeLatexFile( const QString &filename )
+ {
+ QFile latexFile( filename );
+ if ( latexFile.open( IO_WriteOnly ) )
+ {
+ m_embedFiles &= kpsewhich( "embedfile.sty" );
+ QTextStream ts( &latexFile );
+ ts.setEncoding( QTextStream::UnicodeUTF8 );
+ ts << "\\documentclass{article}\n";
+ if ( kpsewhich( "t1enc.dfu" ) )
+ ts << "\\usepackage[T1]{fontenc}\n";
+ if ( kpsewhich( "babel.sty" ) )
+ ts << "\\usepackage[" << m_latexLanguage << "]{babel}\n";
+ if ( kpsewhich( "hyperref.sty" ) )
+ ts << "\\usepackage[pdfproducer={KBibTeX: http://www.t-fischer.net/kbibtex/},pdftex]{hyperref}\n";
+ else if ( kpsewhich( "url.sty" ) )
+ ts << "\\usepackage{url}\n";
+ if ( m_latexBibStyle.startsWith( "apacite" ) && kpsewhich( "apacite.sty" ) )
+ ts << "\\usepackage[bibnewpage]{apacite}\n";
+ if ( m_embedFiles )
+ ts << "\\usepackage{embedfile}\n";
+ ts << "\\bibliographystyle{" << m_latexBibStyle << "}\n";
+ ts << "\\begin{document}\n";
+
+ if ( m_embedFiles )
+ for ( QStringList::ConstIterator it = m_embeddedFileList.begin(); it != m_embeddedFileList.end(); ++it )
+ {
+ QStringList param = QStringList::split( "|", *it );
+ QFile file( param[1] );
+ if ( file.exists() )
+ ts << "\\embedfile[desc={" << param[0] << "}]{" << param[1] << "}\n";
+ }
+
+ ts << "\\nocite{*}\n";
+ ts << "\\bibliography{bibtex-to-pdf}\n";
+ ts << "\\end{document}\n";
+ latexFile.close();
+ return TRUE;
+ }
+ else
+ return FALSE;
+ }
+
+ void FileExporterPDF::fillEmbeddedFileList( const File* bibtexfile )
+ {
+ for ( BibTeX::File::ElementList::ConstIterator it = bibtexfile->constBegin(); it != bibtexfile->constEnd(); ++it )
+ fillEmbeddedFileList( *it );
+ }
+
+ void FileExporterPDF::fillEmbeddedFileList( const Element* element )
+ {
+ const Entry *entry = dynamic_cast<const Entry*>( element );
+ if ( entry != NULL )
+ {
+ QString id = entry->id();
+ QStringList urls = entry->urls();
+ for ( QStringList::Iterator it = urls.begin(); it != urls.end(); ++it )
+ {
+ QUrl url = QUrl( *it );
+ if ( url.isValid() && url.isLocalFile() && !( *it ).endsWith( "/" ) && QFile( url.path() ).exists() )
+ m_embeddedFileList.append( QString( "%1|%2" ).arg( id ).arg( url.path() ) );
+ else
+ for ( QStringList::Iterator path_it = m_searchPaths.begin(); path_it != m_searchPaths.end(); ++path_it )
+ {
+ url = QUrl( QString( *path_it ).append( "/" ).append( *it ) );
+ if ( url.isValid() && url.isLocalFile() && !( *it ).endsWith( "/" ) && QFile( url.path() ).exists() )
+ {
+ m_embeddedFileList.append( QString( "%1|%2" ).arg( id ).arg( url.path() ) );
+ break;
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/src/fileexporterpdf.h b/src/fileexporterpdf.h
new file mode 100644
index 0000000..5641921
--- /dev/null
+++ b/src/fileexporterpdf.h
@@ -0,0 +1,62 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILEEXPORTERPDF_H
+#define BIBTEXFILEEXPORTERPDF_H
+
+#include <fileexportertoolchain.h>
+
+namespace BibTeX
+{
+
+ /**
+ @author Thomas Fischer
+ */
+ class FileExporterPDF : public FileExporterToolchain
+ {
+ public:
+ FileExporterPDF( bool embedFiles = FALSE );
+ ~FileExporterPDF();
+
+ bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
+ bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+
+ void setLaTeXLanguage( const QString& language );
+ void setLaTeXBibliographyStyle( const QString& bibStyle );
+ void setDocumentSearchPaths( const QStringList& searchPaths );
+
+ private:
+ QString laTeXFilename;
+ QString bibTeXFilename;
+ QString outputFilename;
+ QString m_latexLanguage;
+ QString m_latexBibStyle;
+ bool m_embedFiles;
+ QStringList m_embeddedFileList;
+ QStringList m_searchPaths;
+
+ bool generatePDF( QIODevice* iodevice, QStringList *errorLog );
+ bool writeLatexFile( const QString &filename );
+ void fillEmbeddedFileList( const File* bibtexfile );
+ void fillEmbeddedFileList( const Element* element );
+ };
+
+}
+
+#endif
diff --git a/src/fileexporterps.cpp b/src/fileexporterps.cpp
new file mode 100644
index 0000000..8627836
--- /dev/null
+++ b/src/fileexporterps.cpp
@@ -0,0 +1,135 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qfile.h>
+#include <qstringlist.h>
+
+#include <settings.h>
+#include <element.h>
+#include <fileexporterbibtex.h>
+#include "fileexporterps.h"
+
+namespace BibTeX
+{
+
+ FileExporterPS::FileExporterPS()
+ : FileExporterToolchain(), m_latexLanguage( "english" ), m_latexBibStyle( "plain" )
+ {
+ laTeXFilename = QString( workingDir ).append( "/bibtex-to-ps.tex" );
+ bibTeXFilename = QString( workingDir ).append( "/bibtex-to-ps.bib" );
+ outputFilename = QString( workingDir ).append( "/bibtex-to-ps.ps" );
+ }
+
+ FileExporterPS::~FileExporterPS()
+ {
+ // nothing
+ }
+
+ bool FileExporterPS::save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog )
+ {
+ m_mutex.lock();
+ bool result = FALSE;
+
+ QFile bibtexFile( bibTeXFilename );
+ if ( bibtexFile.open( IO_WriteOnly ) )
+ {
+ FileExporter * bibtexExporter = new FileExporterBibTeX();
+ result = bibtexExporter->save( &bibtexFile, bibtexfile, errorLog );
+ bibtexFile.close();
+ delete bibtexExporter;
+ }
+
+ if ( result )
+ result = generatePS( iodevice, errorLog );
+
+ m_mutex.unlock();
+ return result;
+ }
+
+ bool FileExporterPS::save( QIODevice* iodevice, const Element* element, QStringList *errorLog )
+ {
+ m_mutex.lock();
+ bool result = FALSE;
+
+ QFile bibtexFile( bibTeXFilename );
+ if ( bibtexFile.open( IO_WriteOnly ) )
+ {
+ FileExporter * bibtexExporter = new FileExporterBibTeX();
+ result = bibtexExporter->save( &bibtexFile, element, errorLog );
+ bibtexFile.close();
+ delete bibtexExporter;
+ }
+
+ if ( result )
+ result = generatePS( iodevice, errorLog );
+
+ m_mutex.unlock();
+ return result;
+ }
+
+ void FileExporterPS::setLaTeXLanguage( const QString& language )
+ {
+ m_latexLanguage = language;
+ }
+
+ void FileExporterPS::setLaTeXBibliographyStyle( const QString& bibStyle )
+ {
+ m_latexBibStyle = bibStyle;
+ }
+
+ bool FileExporterPS::generatePS( QIODevice* iodevice, QStringList *errorLog )
+ {
+ QStringList cmdLines = QStringList::split( '|', "latex -halt-on-error bibtex-to-ps.tex|bibtex bibtex-to-ps|latex -halt-on-error bibtex-to-ps.tex|latex -halt-on-error bibtex-to-ps.tex|dvips -o bibtex-to-ps.ps bibtex-to-ps.dvi" );
+
+ if ( writeLatexFile( laTeXFilename ) && runProcesses( cmdLines, errorLog ) && writeFileToIODevice( outputFilename, iodevice ) )
+ return TRUE;
+ else
+ return FALSE;
+ }
+
+ bool FileExporterPS::writeLatexFile( const QString &filename )
+ {
+ QFile latexFile( filename );
+ if ( latexFile.open( IO_WriteOnly ) )
+ {
+ QTextStream ts( &latexFile );
+ ts.setEncoding( QTextStream::UnicodeUTF8 );
+ ts << "\\documentclass{article}\n";
+ if ( kpsewhich( "t1enc.dfu" ) )
+ ts << "\\usepackage[T1]{fontenc}\n";
+ if ( kpsewhich( "babel.sty" ) )
+ ts << "\\usepackage[" << m_latexLanguage << "]{babel}\n";
+ if ( kpsewhich( "url.sty" ) )
+ ts << "\\usepackage{url}\n";
+ if ( m_latexBibStyle.startsWith( "apacite" ) && kpsewhich( "apacite.sty" ) )
+ ts << "\\usepackage[bibnewpage]{apacite}\n";
+ ts << "\\bibliographystyle{" << m_latexBibStyle << "}\n";
+ ts << "\\begin{document}\n";
+ ts << "\\nocite{*}\n";
+ ts << "\\bibliography{bibtex-to-ps}\n";
+ ts << "\\end{document}\n";
+ latexFile.close();
+ return TRUE;
+ }
+ else
+ return FALSE;
+
+ }
+
+}
diff --git a/src/fileexporterps.h b/src/fileexporterps.h
new file mode 100644
index 0000000..b252fd7
--- /dev/null
+++ b/src/fileexporterps.h
@@ -0,0 +1,58 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILEEXPORTERPS_H
+#define BIBTEXFILEEXPORTERPS_H
+
+#include <fileexportertoolchain.h>
+
+class QStringList;
+
+namespace BibTeX
+{
+
+ /**
+ @author Thomas Fischer
+ */
+ class FileExporterPS : public FileExporterToolchain
+ {
+ public:
+ FileExporterPS();
+ ~FileExporterPS();
+
+ bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
+ bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+
+ void setLaTeXLanguage( const QString& language );
+ void setLaTeXBibliographyStyle( const QString& bibStyle );
+
+ private:
+ QString laTeXFilename;
+ QString bibTeXFilename;
+ QString outputFilename;
+ QString m_latexLanguage;
+ QString m_latexBibStyle;
+
+ bool generatePS( QIODevice* iodevice, QStringList *errorLog );
+ bool writeLatexFile( const QString &filename );
+ };
+
+}
+
+#endif
diff --git a/src/fileexporterris.cpp b/src/fileexporterris.cpp
new file mode 100644
index 0000000..37908a7
--- /dev/null
+++ b/src/fileexporterris.cpp
@@ -0,0 +1,200 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qregexp.h>
+
+#include <entry.h>
+
+#include "fileexporterris.h"
+
+namespace BibTeX
+{
+
+ FileExporterRIS::FileExporterRIS() : FileExporter()
+ {
+ // nothing
+ }
+
+ FileExporterRIS::~FileExporterRIS()
+ {
+ // nothing
+ }
+
+ bool FileExporterRIS::save( QIODevice* iodevice, const Element* element, QStringList* /*errorLog*/ )
+ {
+ m_mutex.lock();
+ bool result = FALSE;
+ QTextStream stream( iodevice );
+
+ const Entry *entry = dynamic_cast<const Entry*>( element );
+ if ( entry != NULL )
+ result = writeEntry( stream, entry );
+
+ m_mutex.unlock();
+ return result && !m_cancelFlag;
+ }
+
+ bool FileExporterRIS::save( QIODevice* iodevice, const File* bibtexfile, QStringList* /*errorLog*/ )
+ {
+ m_mutex.lock();
+ bool result = TRUE;
+ m_cancelFlag = FALSE;
+ QTextStream stream( iodevice );
+
+ int numElements = (int) bibtexfile->count(), i = 0;
+ emit progress( 0, numElements );
+ for ( File::ElementList::const_iterator it = bibtexfile->elements.begin(); it != bibtexfile->elements.end() && result && !m_cancelFlag; it++ )
+ {
+ Entry *entry = dynamic_cast<Entry*>( *it );
+ if ( entry != NULL )
+ {
+ BibTeX::Entry *myEntry = bibtexfile->completeReferencedFieldsConst( entry );
+ result &= writeEntry( stream, myEntry );
+ delete myEntry;
+ }
+ emit progress( ++i, numElements );
+ }
+
+ m_mutex.unlock();
+ return result && !m_cancelFlag;
+ }
+
+ void FileExporterRIS::cancel()
+ {
+ m_cancelFlag = TRUE;
+ }
+
+ bool FileExporterRIS::writeEntry( QTextStream &stream, const Entry* entry )
+ {
+ bool result = TRUE;
+ qDebug( "Writing Entry" );
+
+ switch ( entry->entryType() )
+ {
+ case Entry::etBook:
+ writeKeyValue( stream, "TY", "BOOK" );
+ break;
+ case Entry::etInBook:
+ writeKeyValue( stream, "TY", "CHAP" );
+ break;
+ case Entry::etInProceedings:
+ writeKeyValue( stream, "TY", "CONF" );
+ break;
+ case Entry::etArticle:
+ writeKeyValue( stream, "TY", "JOUR" );
+ break;
+ case Entry::etTechReport:
+ writeKeyValue( stream, "TY", "RPRT" );
+ break;
+ case Entry::etPhDThesis:
+ writeKeyValue( stream, "TY", "THES" );
+ break;
+ default:
+ writeKeyValue( stream, "TY", "GEN" );
+ }
+
+ QString year = "";
+ QString month = "";
+
+ for ( Entry::EntryFields::ConstIterator it = entry->begin(); result && it != entry->end(); it++ )
+ {
+ EntryField *field = *it;
+
+ if ( field->fieldType() == EntryField::ftUnknown && field->fieldTypeName().startsWith( "RISfield_" ) )
+ result &= writeKeyValue( stream, field->fieldTypeName().right( 2 ), field->value()->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftAuthor )
+ {
+ QStringList authors = QStringList::split( QRegExp( "\\s+(,|and|&)\\s+", FALSE ), field->value() ->simplifiedText() );
+ for ( QStringList::Iterator it = authors.begin(); result && it != authors.end(); ++it )
+ result &= writeKeyValue( stream, "AU", *it );
+ }
+ else if ( field->fieldType() == EntryField::ftEditor )
+ {
+ QStringList authors = QStringList::split( QRegExp( "\\s+(,|and|&)\\s+", FALSE ), field->value() ->simplifiedText() );
+ for ( QStringList::Iterator it = authors.begin(); result && it != authors.end(); ++it )
+ result &= writeKeyValue( stream, "ED", *it );
+ }
+ else if ( field->fieldType() == EntryField::ftTitle )
+ result &= writeKeyValue( stream, "TI", field->value() ->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftJournal )
+ result &= writeKeyValue( stream, "JO", field->value() ->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftChapter )
+ result &= writeKeyValue( stream, "CP", field->value() ->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftISSN )
+ result &= writeKeyValue( stream, "SN", field->value() ->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftISBN )
+ result &= writeKeyValue( stream, "SN", field->value() ->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftVolume )
+ result &= writeKeyValue( stream, "VL", field->value() ->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftNumber )
+ result &= writeKeyValue( stream, "IS", field->value() ->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftNote )
+ result &= writeKeyValue( stream, "N1", field->value() ->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftAbstract )
+ result &= writeKeyValue( stream, "N2", field->value() ->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftPublisher )
+ result &= writeKeyValue( stream, "PB", field->value() ->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftLocation )
+ result &= writeKeyValue( stream, "CY", field->value() ->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftKeywords )
+ result &= writeKeyValue( stream, "KW", field->value() ->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftYear )
+ year = field->value() ->simplifiedText();
+ else if ( field->fieldType() == EntryField::ftMonth )
+ month = field->value() ->simplifiedText();
+ else if ( field->fieldType() == EntryField::ftAddress )
+ result &= writeKeyValue( stream, "AD", field->value() ->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftURL )
+ result &= writeKeyValue( stream, "UR", field->value() ->simplifiedText() );
+ else if ( field->fieldType() == EntryField::ftPages )
+ {
+ QStringList pageRange = QStringList::split( QRegExp( QString( "--|-|%1" ).arg( QChar( 0x2013 ) ) ), field->value() ->simplifiedText() );
+ if ( pageRange.count() == 2 )
+ {
+ result &= writeKeyValue( stream, "SP", pageRange[ 0 ] );
+ result &= writeKeyValue( stream, "EP", pageRange[ 1 ] );
+ }
+ }
+ else if ( field->fieldTypeName().lower() == "doi" )
+ result &= writeKeyValue( stream, "UR", field->value() ->simplifiedText() );
+ }
+
+ if ( !year.isEmpty() || !month.isEmpty() )
+ {
+ result &= writeKeyValue( stream, "PY", QString( "%1/%2//" ).arg( year ).arg( month ) );
+ }
+
+ result &= writeKeyValue( stream, "ER", QString() );
+ stream << endl;
+
+ return result;
+ }
+
+ bool FileExporterRIS::writeKeyValue( QTextStream &stream, const QString& key, const QString&value )
+ {
+ stream << key << " - ";
+ if ( !value.isEmpty() )
+ stream << value;
+ stream << endl;
+ qDebug( "%s - %s", key.latin1(), value.latin1() );
+
+ return TRUE;
+ }
+
+}
diff --git a/src/fileexporterris.h b/src/fileexporterris.h
new file mode 100644
index 0000000..d38107f
--- /dev/null
+++ b/src/fileexporterris.h
@@ -0,0 +1,50 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILEEXPORTERRIS_H
+#define BIBTEXFILEEXPORTERRIS_H
+
+#include <fileexporter.h>
+
+namespace BibTeX
+{
+
+ class FileExporterRIS : public FileExporter
+ {
+ public:
+ FileExporterRIS();
+
+ ~FileExporterRIS();
+
+ bool save( QIODevice* iodevice, const Element* element, QStringList* errorLog = NULL );
+ bool save( QIODevice* iodevice, const File* bibtexfile, QStringList* errorLog = NULL );
+
+ public slots:
+ void cancel();
+
+ private:
+ bool m_cancelFlag;
+
+ bool writeEntry( QTextStream &stream, const Entry* entry );
+ bool writeKeyValue( QTextStream &stream, const QString& key, const QString&value );
+ };
+
+}
+
+#endif
diff --git a/src/fileexporterrtf.cpp b/src/fileexporterrtf.cpp
new file mode 100644
index 0000000..2ed0c49
--- /dev/null
+++ b/src/fileexporterrtf.cpp
@@ -0,0 +1,134 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qfile.h>
+#include <qstringlist.h>
+
+#include <settings.h>
+#include <element.h>
+#include <fileexporterbibtex.h>
+#include "fileexporterrtf.h"
+
+namespace BibTeX
+{
+
+ FileExporterRTF::FileExporterRTF() : FileExporterToolchain(), m_latexLanguage( "english" ), m_latexBibStyle( "plain" )
+ {
+ laTeXFilename = QString( workingDir ).append( "/bibtex-to-rtf.tex" );
+ bibTeXFilename = QString( workingDir ).append( "/bibtex-to-rtf.bib" );
+ outputFilename = QString( workingDir ).append( "/bibtex-to-rtf.rtf" );
+ }
+
+ FileExporterRTF::~FileExporterRTF()
+ {
+ // nothing
+ }
+
+ bool FileExporterRTF::save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog )
+ {
+ m_mutex.lock();
+ bool result = FALSE;
+
+ QFile bibtexFile( bibTeXFilename );
+ if ( bibtexFile.open( IO_WriteOnly ) )
+ {
+ FileExporter * bibtexExporter = new FileExporterBibTeX();
+ result = bibtexExporter->save( &bibtexFile, bibtexfile, errorLog );
+ bibtexFile.close();
+ delete bibtexExporter;
+ }
+
+ if ( result )
+ result = generateRTF( iodevice, errorLog );
+
+ m_mutex.unlock();
+ return result;
+ }
+
+ bool FileExporterRTF::save( QIODevice* iodevice, const Element* element, QStringList *errorLog )
+ {
+ m_mutex.lock();
+ bool result = FALSE;
+
+ QFile bibtexFile( bibTeXFilename );
+ if ( bibtexFile.open( IO_WriteOnly ) )
+ {
+ FileExporter * bibtexExporter = new FileExporterBibTeX();
+ result = bibtexExporter->save( &bibtexFile, element, errorLog );
+ bibtexFile.close();
+ delete bibtexExporter;
+ }
+
+ if ( result )
+ result = generateRTF( iodevice, errorLog );
+
+ m_mutex.unlock();
+ return result;
+ }
+
+ void FileExporterRTF::setLaTeXLanguage( const QString& language )
+ {
+ m_latexLanguage = language;
+ }
+
+ void FileExporterRTF::setLaTeXBibliographyStyle( const QString& bibStyle )
+ {
+ m_latexBibStyle = bibStyle;
+ }
+
+ bool FileExporterRTF::generateRTF( QIODevice* iodevice, QStringList *errorLog )
+ {
+ QStringList cmdLines = QStringList::split( '|', "latex bibtex-to-rtf.tex|bibtex bibtex-to-rtf|latex bibtex-to-rtf.tex|latex2rtf bibtex-to-rtf.tex" );
+
+ if ( writeLatexFile( laTeXFilename ) && runProcesses( cmdLines, errorLog ) && writeFileToIODevice( outputFilename, iodevice ) )
+ return TRUE;
+ else
+ return FALSE;
+ }
+
+ bool FileExporterRTF::writeLatexFile( const QString &filename )
+ {
+ QFile latexFile( filename );
+ if ( latexFile.open( IO_WriteOnly ) )
+ {
+ QTextStream ts( &latexFile );
+ ts.setEncoding( QTextStream::UnicodeUTF8 );
+ ts << "\\documentclass{article}\n";
+ if ( kpsewhich( "t1enc.dfu" ) )
+ ts << "\\usepackage[T1]{fontenc}\n";
+ if ( kpsewhich( "babel.sty" ) )
+ ts << "\\usepackage[" << m_latexLanguage << "]{babel}\n";
+ if ( kpsewhich( "url.sty" ) )
+ ts << "\\usepackage{url}\n";
+ if ( m_latexBibStyle.startsWith( "apacite" ) && kpsewhich( "apacite.sty" ) )
+ ts << "\\usepackage[bibnewpage]{apacite}\n";
+ ts << "\\bibliographystyle{" << m_latexBibStyle << "}\n";
+ ts << "\\begin{document}\n";
+ ts << "\\nocite{*}\n";
+ ts << "\\bibliography{bibtex-to-rtf}\n";
+ ts << "\\end{document}\n";
+ latexFile.close();
+ return TRUE;
+ }
+ else
+ return FALSE;
+
+ }
+
+}
diff --git a/src/fileexporterrtf.h b/src/fileexporterrtf.h
new file mode 100644
index 0000000..bb916e0
--- /dev/null
+++ b/src/fileexporterrtf.h
@@ -0,0 +1,56 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILEEXPORTERRTF_H
+#define BIBTEXFILEEXPORTERRTF_H
+
+#include <fileexportertoolchain.h>
+
+namespace BibTeX
+{
+
+ /**
+ @author Thomas Fischer
+ */
+ class FileExporterRTF : public FileExporterToolchain
+ {
+ public:
+ FileExporterRTF();
+ ~FileExporterRTF();
+
+ bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
+ bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+
+ void setLaTeXLanguage( const QString& language );
+ void setLaTeXBibliographyStyle( const QString& bibStyle );
+
+ private:
+ QString laTeXFilename;
+ QString bibTeXFilename;
+ QString outputFilename;
+ QString m_latexLanguage;
+ QString m_latexBibStyle;
+
+ bool generateRTF( QIODevice* iodevice, QStringList *errorLog );
+ bool writeLatexFile( const QString &filename );
+ };
+
+}
+
+#endif
diff --git a/src/fileexportertoolchain.cpp b/src/fileexportertoolchain.cpp
new file mode 100644
index 0000000..8e51431
--- /dev/null
+++ b/src/fileexportertoolchain.cpp
@@ -0,0 +1,232 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+
+#include <qprocess.h>
+#include <qwaitcondition.h>
+#include <qapplication.h>
+#include <qstringlist.h>
+
+#include "fileexportertoolchain.h"
+
+namespace BibTeX
+{
+
+ FileExporterToolchain::FileExporterToolchain()
+ : FileExporter(), m_errorLog( NULL )
+ {
+ m_waitCond = new QWaitCondition();
+ workingDir = createTempDir();
+ }
+
+ FileExporterToolchain::~FileExporterToolchain()
+ {
+ delete m_waitCond;
+ deleteTempDir( workingDir );
+ }
+
+ bool FileExporterToolchain::runProcesses( const QStringList &progs, QStringList *errorLog )
+ {
+ bool result = TRUE;
+ int i = 0;
+
+ emit progress( 0, progs.size() );
+ for ( QStringList::ConstIterator it = progs.begin(); result && it != progs.end(); it++ )
+ {
+ qApp->processEvents();
+ QStringList args = QStringList::split( ' ', *it );
+ result &= runProcess( args, errorLog );
+ emit progress( i++, progs.size() );
+ }
+ qApp->processEvents();
+ return result;
+ }
+
+ bool FileExporterToolchain::runProcess( const QStringList &args, QStringList *errorLog )
+ {
+ bool result = FALSE;
+ QApplication::setOverrideCursor( Qt::waitCursor );
+
+ m_process = new QProcess( args );
+ m_process->setWorkingDirectory( workingDir );
+ connect( m_process, SIGNAL( processExited() ), this, SLOT( slotProcessExited() ) );
+ connect( m_process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadProcessOutput() ) );
+ connect( m_process, SIGNAL( readyReadStderr() ), this, SLOT( slotReadProcessOutput() ) );
+
+ if ( m_process->start() )
+ {
+ m_errorLog = errorLog;
+ int counter = 0;
+ qApp->processEvents();
+ while ( m_process->isRunning() )
+ {
+ m_waitCond->wait( 250 );
+ qApp->processEvents();
+
+ counter++;
+ if ( counter > 400 )
+ m_process->tryTerminate();
+ }
+
+ result = m_process->normalExit() && counter < 400;
+ if ( !result )
+ errorLog->append( QString( "Process '%1' failed." ).arg( args.join( " " ) ) );
+ }
+ else
+ errorLog->append( QString( "Process '%1' was not started." ).arg( args.join( " " ) ) );
+
+
+ disconnect( m_process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadProcessOutput() ) );
+ disconnect( m_process, SIGNAL( readyReadStderr() ), this, SLOT( slotReadProcessOutput() ) );
+ disconnect( m_process, SIGNAL( processExited() ), this, SLOT( slotProcessExited() ) );
+ delete( m_process );
+ m_process = NULL;
+
+ QApplication::restoreOverrideCursor();
+ return result;
+ }
+
+ bool FileExporterToolchain::writeFileToIODevice( const QString &filename, QIODevice *device )
+ {
+ QFile file( filename );
+ if ( file.open( IO_ReadOnly ) )
+ {
+ bool result = TRUE;
+ Q_ULONG buffersize = 0x10000;
+ Q_LONG amount = 0;
+ char* buffer = new char[ buffersize ];
+ do
+ {
+ result = (( amount = file.readBlock( buffer, buffersize ) ) > -1 ) && ( device->writeBlock( buffer, amount ) > -1 );
+ }
+ while ( result && amount > 0 );
+
+ file.close();
+ delete[] buffer;
+ return result;
+ }
+ else
+ return FALSE;
+ }
+
+ QString FileExporterToolchain::createTempDir()
+ {
+ QString result = QString::null;
+ QFile *devrandom = new QFile( "/dev/random" );
+
+ if ( devrandom->open( IO_ReadOnly ) )
+ {
+ Q_UINT32 randomNumber;
+ if ( devrandom->readBlock(( char* ) & randomNumber, sizeof( randomNumber ) ) > 0 )
+ {
+ randomNumber |= 0x10000000;
+ result = QString( "/tmp/bibtex-%1" ).arg( randomNumber, sizeof( randomNumber ) * 2, 16 );
+ if ( !QDir().mkdir( result ) )
+ result = QString::null;
+ }
+ devrandom->close();
+ }
+
+ delete devrandom;
+
+ return result;
+ }
+
+ void FileExporterToolchain::deleteTempDir( const QString& directory )
+ {
+ QDir dir = QDir( directory );
+ QStringList subDirs = dir.entryList( QDir::Dirs );
+ for ( QStringList::Iterator it = subDirs.begin(); it != subDirs.end(); it++ )
+ {
+ if (( QString::compare( *it, "." ) != 0 ) && ( QString::compare( *it, ".." ) != 0 ) )
+ deleteTempDir( *it );
+ }
+ QStringList allEntries = dir.entryList( QDir::All );
+ for ( QStringList::Iterator it = allEntries.begin(); it != allEntries.end(); it++ )
+ dir.remove( *it );
+
+ QDir().rmdir( directory );
+ }
+
+ void FileExporterToolchain::slotProcessExited()
+ {
+ m_waitCond->wakeAll();
+ }
+
+ void FileExporterToolchain::cancel()
+ {
+ if ( m_process != NULL )
+ {
+ qDebug( "Canceling process" );
+ m_process->tryTerminate();
+ m_process->kill();
+ m_waitCond->wakeAll();
+ }
+ }
+
+ void FileExporterToolchain::slotReadProcessOutput()
+ {
+ if ( m_process )
+ {
+ while ( m_process->canReadLineStdout() )
+ {
+ QString line = m_process->readLineStdout();
+ if ( m_errorLog != NULL )
+ m_errorLog->append( line );
+ }
+ while ( m_process->canReadLineStderr() )
+ {
+ QString line = m_process->readLineStderr();
+ if ( m_errorLog != NULL )
+ m_errorLog->append( line );
+ }
+ }
+ }
+
+ bool FileExporterToolchain::kpsewhich( const QString& filename )
+ {
+ bool result = FALSE;
+ int counter = 0;
+
+ QWaitCondition waitCond;
+ QProcess kpsewhich;
+ kpsewhich.addArgument( "kpsewhich" );
+ kpsewhich.addArgument( filename );
+ if ( kpsewhich.start() )
+ {
+ qApp->processEvents();
+ while ( kpsewhich.isRunning() )
+ {
+ waitCond.wait( 250 );
+ qApp->processEvents();
+
+ counter++;
+ if ( counter > 50 )
+ kpsewhich.tryTerminate();
+ }
+
+ result = kpsewhich.exitStatus() == 0 && counter < 50;
+ }
+
+ return result;
+ }
+
+}
+
+#include "fileexportertoolchain.moc"
diff --git a/src/fileexportertoolchain.h b/src/fileexportertoolchain.h
new file mode 100644
index 0000000..76000a1
--- /dev/null
+++ b/src/fileexportertoolchain.h
@@ -0,0 +1,70 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILEEXPORTERTOOLCHAIN_H
+#define BIBTEXFILEEXPORTERTOOLCHAIN_H
+
+#include <fileexporter.h>
+
+class QString;
+class QWaitCondition;
+class QProcess;
+class QStringList;
+
+namespace BibTeX
+{
+
+ /**
+ @author Thomas Fischer
+ */
+ class FileExporterToolchain : public FileExporter
+ {
+ Q_OBJECT
+ public:
+ FileExporterToolchain();
+ ~FileExporterToolchain();
+
+ public slots:
+ void cancel();
+
+ protected:
+ QString workingDir;
+
+ bool runProcesses( const QStringList &progs, QStringList *errorLog = NULL );
+ bool runProcess( const QStringList &args, QStringList *errorLog = NULL );
+ bool writeFileToIODevice( const QString &filename, QIODevice *device );
+ bool kpsewhich( const QString& filename );
+
+ private:
+ QWaitCondition *m_waitCond;
+ QProcess *m_process;
+ QStringList *m_errorLog;
+
+ QString createTempDir();
+ void deleteTempDir( const QString& directory );
+
+ private slots:
+ void slotProcessExited();
+ void slotReadProcessOutput();
+
+ };
+
+}
+
+#endif
diff --git a/src/fileexporterxml.cpp b/src/fileexporterxml.cpp
new file mode 100644
index 0000000..4dcbee4
--- /dev/null
+++ b/src/fileexporterxml.cpp
@@ -0,0 +1,228 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qregexp.h>
+#include <qstringlist.h>
+
+#include <file.h>
+#include <element.h>
+#include <entry.h>
+#include <encoderxml.h>
+#include <macro.h>
+#include <comment.h>
+#include "fileexporterxml.h"
+
+namespace BibTeX
+{
+
+ FileExporterXML::FileExporterXML() : FileExporter()
+ {
+ // nothing
+ }
+
+
+ FileExporterXML::~FileExporterXML()
+ {
+ // nothing
+ }
+
+ bool FileExporterXML::save( QIODevice* iodevice, const File* bibtexfile, QStringList * /*errorLog*/ )
+ {
+ m_mutex.lock();
+ bool result = TRUE;
+ m_cancelFlag = FALSE;
+ QTextStream stream( iodevice );
+ stream.setEncoding( QTextStream::UnicodeUTF8 );
+
+ stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
+ stream << "<bibliography>" << endl;
+
+ int numElements = (int) bibtexfile->count(), i = 0;
+ emit progress( 0, numElements );
+ for ( File::ElementList::const_iterator it = bibtexfile->elements.begin(); it != bibtexfile->elements.end() && result && !m_cancelFlag; it++ )
+ {
+ Element *element = *it;
+ write( stream, element, bibtexfile );
+ emit progress( ++i, numElements );
+ }
+
+ stream << "</bibliography>" << endl;
+
+ m_mutex.unlock();
+ return result && !m_cancelFlag;
+ }
+
+ bool FileExporterXML::save( QIODevice* iodevice, const Element* element, QStringList * /*errorLog*/ )
+ {
+ QTextStream stream( iodevice );
+ stream.setEncoding( QTextStream::UnicodeUTF8 );
+
+ stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
+ return write( stream, element );
+ }
+
+ void FileExporterXML::cancel()
+ {
+ m_cancelFlag = TRUE;
+ }
+
+ bool FileExporterXML::write( QTextStream&stream, const Element *element, const File* bibtexfile )
+ {
+ bool result = FALSE;
+
+ const Entry *entry = dynamic_cast<const Entry*>( element );
+ if ( entry != NULL )
+ {
+ if ( bibtexfile != NULL )
+ {
+ entry = bibtexfile->completeReferencedFieldsConst( entry );
+ }
+ result |= writeEntry( stream, entry );
+ if ( bibtexfile != NULL )
+ delete entry;
+ }
+ else
+ {
+ const Macro * macro = dynamic_cast<const Macro*>( element );
+ if ( macro != NULL )
+ result |= writeMacro( stream, macro );
+ else
+ {
+ const Comment * comment = dynamic_cast<const Comment*>( element );
+ if ( comment != NULL )
+ result |= writeComment( stream, comment );
+ else
+ {
+ // preambles are ignored, make no sense in XML files
+ }
+ }
+ }
+
+ return result;
+ }
+
+ bool FileExporterXML::writeEntry( QTextStream &stream, const Entry* entry )
+ {
+ stream << " <entry id=\"" << EncoderXML::currentEncoderXML() ->encode( entry->id() ) << "\" type=\"" << entry->entryTypeString().lower() << "\">" << endl;
+ for ( Entry::EntryFields::const_iterator it = entry->begin(); it != entry->end(); it++ )
+ {
+ EntryField *field = *it;
+ switch ( field->fieldType() )
+ {
+ case EntryField::ftAuthor:
+ case EntryField::ftEditor:
+ {
+ QString tag = field->fieldTypeName().lower();
+ stream << " <" << tag << "s>" << endl;
+ QStringList persons = QStringList::split( QRegExp( "\\s+(,|and|&)+\\s+", FALSE ), EncoderXML::currentEncoderXML() ->encode( valueToString( field->value() ) ) );
+ for ( QStringList::Iterator it = persons.begin(); it != persons.end(); it++ )
+ stream << " <person>" << *it << "</person>" << endl;
+ stream << " </" << tag << "s>" << endl;
+ }
+ break;
+ case EntryField::ftMonth:
+ {
+ stream << " <month";
+ bool ok = FALSE;
+
+ int month = -1;
+ QString tag = "";
+ QString content = "";
+ for ( QValueList<ValueItem*>::ConstIterator it = field->value()->items.begin(); it != field->value()->items.end(); ++it )
+ {
+ if ( dynamic_cast<MacroKey*>( *it ) != NULL )
+ {
+ for ( int i = 0; i < 12; i++ )
+ if ( QString::compare(( *it )->text(), MonthsTriple[ i ] ) == 0 )
+ {
+ if ( month < 1 )
+ {
+ tag = MonthsTriple[ i ];
+ month = i + 1;
+ }
+ content.append( Months[ i ] );
+ ok = TRUE;
+ break;
+ }
+ }
+ else
+ content.append( EncoderXML::currentEncoderXML() ->encode(( *it )->text() ) );
+ }
+
+ if ( !ok )
+ content = EncoderXML::currentEncoderXML() ->encode( field->value()->simplifiedText() ) ;
+ if ( !tag.isEmpty() )
+ stream << " tag=\"" << tag << "\"";
+ if ( month > 0 )
+ stream << " month=\"" << month << "\"";
+ stream << '>' << content;
+ stream << "</month>" << endl;
+ }
+ break;
+ default:
+ {
+ QString tag = field->fieldTypeName().lower();
+ stream << " <" << tag << ">" << EncoderXML::currentEncoderXML() ->encode( valueToString( field->value() ) ) << "</" << tag << ">" << endl;
+ }
+ break;
+ }
+
+ }
+ stream << " </entry>" << endl;
+
+ return TRUE;
+ }
+
+ bool FileExporterXML::writeMacro( QTextStream &stream, const Macro *macro )
+ {
+ stream << " <string key=\"" << macro->key() << "\">";
+ stream << EncoderXML::currentEncoderXML() ->encode( valueToString( macro->value() ) );
+ stream << "</string>" << endl;
+
+ return TRUE;
+ }
+
+ bool FileExporterXML::writeComment( QTextStream &stream, const Comment *comment )
+ {
+ stream << " <comment>" ;
+ stream << EncoderXML::currentEncoderXML() ->encode( comment->text() );
+ stream << "</comment>" << endl;
+
+ return TRUE;
+ }
+
+ QString FileExporterXML::valueToString( Value *value )
+ {
+ QString result;
+ bool isFirst = TRUE;
+
+ for ( QValueList<ValueItem*>::ConstIterator it = value->items.begin(); it != value->items.end(); it++ )
+ {
+ if ( !isFirst )
+ result.append( ' ' );
+ isFirst = FALSE;
+
+ result.append(( *it ) ->simplifiedText() );
+ }
+
+ return result;
+ }
+
+
+}
diff --git a/src/fileexporterxml.h b/src/fileexporterxml.h
new file mode 100644
index 0000000..a4eff65
--- /dev/null
+++ b/src/fileexporterxml.h
@@ -0,0 +1,61 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILEEXPORTERXML_H
+#define BIBTEXFILEEXPORTERXML_H
+
+#include <element.h>
+#include <fileexporter.h>
+#include <value.h>
+
+namespace BibTeX
+{
+ class Entry;
+ class Macro;
+ class Comment;
+
+ /**
+ @author Thomas Fischer
+ */
+ class FileExporterXML : public FileExporter
+ {
+ public:
+ FileExporterXML();
+ ~FileExporterXML();
+
+ bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
+ bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+
+ public slots:
+ void cancel();
+
+ private:
+ bool m_cancelFlag;
+
+ bool write( QTextStream&stream, const Element *element, const File* bibtexfile = NULL );
+ bool writeEntry( QTextStream &stream, const Entry* entry );
+ bool writeMacro( QTextStream &stream, const Macro *macro );
+ bool writeComment( QTextStream &stream, const Comment *comment );
+
+ QString valueToString( Value *value );
+ };
+
+}
+
+#endif
diff --git a/src/fileexporterxslt.cpp b/src/fileexporterxslt.cpp
new file mode 100644
index 0000000..a5a3255
--- /dev/null
+++ b/src/fileexporterxslt.cpp
@@ -0,0 +1,95 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qbuffer.h>
+
+#include <fileexporterxml.h>
+#include <xsltransform.h>
+
+#include "fileexporterxslt.h"
+
+namespace BibTeX
+{
+
+ FileExporterXSLT::FileExporterXSLT( XSLTransform *transformer )
+ : FileExporter()
+ {
+ m_transformer = transformer;
+ m_exporterXML = new FileExporterXML();
+ }
+
+
+ FileExporterXSLT::~FileExporterXSLT()
+ {
+ delete m_exporterXML;
+ }
+
+ bool FileExporterXSLT::save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog )
+ {
+ m_mutex.lock();
+ QBuffer buffer;
+
+ buffer.open( IO_WriteOnly );
+ if ( m_exporterXML->save( &buffer, bibtexfile, errorLog ) )
+ {
+ buffer.close();
+ buffer.open( IO_ReadOnly );
+ QTextStream ts( &buffer );
+ ts.setEncoding( QTextStream::UnicodeUTF8 );
+ QString xml = ts.read();
+ buffer.close();
+ QString html = m_transformer->transform( xml );
+ QTextStream htmlTS( iodevice );
+ htmlTS.setEncoding( QTextStream::UnicodeUTF8 );
+ htmlTS << html << endl;
+ m_mutex.unlock();
+ return TRUE;
+ }
+
+ m_mutex.unlock();
+ return FALSE;
+ }
+
+ bool FileExporterXSLT::save( QIODevice* iodevice, const Element* element, QStringList *errorLog )
+ {
+ m_mutex.lock();
+ QBuffer buffer;
+
+ buffer.open( IO_WriteOnly );
+ if ( m_exporterXML->save( &buffer, element, errorLog ) )
+ {
+ buffer.close();
+ buffer.open( IO_ReadOnly );
+ QTextStream xmlTS( &buffer );
+ xmlTS.setEncoding( QTextStream::UnicodeUTF8 );
+ QString xml = xmlTS.read();
+ buffer.close();
+ QString html = m_transformer->transform( xml );
+ QTextStream output( iodevice );
+ output.setEncoding( QTextStream::UnicodeUTF8 );
+ output << html << endl;
+ m_mutex.unlock();
+ return TRUE;
+ }
+
+ m_mutex.unlock();
+ return FALSE;
+ }
+
+}
diff --git a/src/fileexporterxslt.h b/src/fileexporterxslt.h
new file mode 100644
index 0000000..0d11e58
--- /dev/null
+++ b/src/fileexporterxslt.h
@@ -0,0 +1,50 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILEEXPORTERXSLT_H
+#define BIBTEXFILEEXPORTERXSLT_H
+
+#include <fileexporter.h>
+
+namespace BibTeX
+{
+
+ class XSLTransform;
+ class FileExporterXML;
+
+ /**
+ @author Thomas Fischer
+ */
+ class FileExporterXSLT : public FileExporter
+ {
+ public:
+ FileExporterXSLT( XSLTransform *transformer );
+ ~FileExporterXSLT();
+
+ bool save( QIODevice* iodevice, const File* bibtexfile, QStringList *errorLog = NULL );
+ bool save( QIODevice* iodevice, const Element* element, QStringList *errorLog = NULL );
+
+ private:
+ XSLTransform *m_transformer;
+ FileExporterXML *m_exporterXML;
+ };
+
+}
+
+#endif
diff --git a/src/fileimporter.cpp b/src/fileimporter.cpp
new file mode 100644
index 0000000..65ee792
--- /dev/null
+++ b/src/fileimporter.cpp
@@ -0,0 +1,57 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qbuffer.h>
+
+#include "fileimporter.h"
+
+namespace BibTeX
+{
+
+ FileImporter::FileImporter() : QObject()
+ {
+ // nothing
+ }
+
+ FileImporter::~FileImporter()
+ {
+ // nothing
+ }
+
+ File* FileImporter::load( const QString& text )
+ {
+ if ( text.isNull() || text.isEmpty() )
+ return NULL;
+
+ QBuffer buffer;
+ buffer.open( IO_WriteOnly );
+ QTextStream stream( &buffer );
+ stream.setEncoding( QTextStream::UnicodeUTF8 );
+ stream << text;
+ buffer.close();
+
+ buffer.open( IO_ReadOnly );
+ File *result = load( &buffer );
+ buffer.close();
+
+ return result;
+ }
+
+}
+#include "fileimporter.moc"
diff --git a/src/fileimporter.h b/src/fileimporter.h
new file mode 100644
index 0000000..6dfdb2d
--- /dev/null
+++ b/src/fileimporter.h
@@ -0,0 +1,66 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILEIMPORTER_H
+#define BIBTEXFILEIMPORTER_H
+
+#include <qobject.h>
+#include <qmutex.h>
+
+class QIODevice;
+
+namespace BibTeX
+{
+ class File;
+
+ /**
+ @author Thomas Fischer
+ */
+ class FileImporter : public QObject
+ {
+ Q_OBJECT
+ public:
+ FileImporter();
+ ~FileImporter();
+
+ File* load( const QString& text );
+ virtual File* load( QIODevice *iodevice ) = 0;
+
+ static bool guessCanDecode( const QString & )
+ {
+ return FALSE;
+ };
+
+ signals:
+ void parseError( int errorId );
+ void progress( int current, int total );
+
+ public slots:
+ virtual void cancel()
+ {
+ // nothing
+ };
+
+ protected:
+ QMutex m_mutex;
+ };
+
+}
+
+#endif
diff --git a/src/fileimporterbibtex.cpp b/src/fileimporterbibtex.cpp
new file mode 100644
index 0000000..5312f0c
--- /dev/null
+++ b/src/fileimporterbibtex.cpp
@@ -0,0 +1,658 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qiodevice.h>
+#include <qregexp.h>
+#include <qapplication.h>
+
+#include <file.h>
+#include <comment.h>
+#include <macro.h>
+#include <preamble.h>
+#include <entry.h>
+#include <element.h>
+#include <encoderlatex.h>
+#include <value.h>
+
+#include "fileimporterbibtex.h"
+
+#define max(a,b) ((a)<(b)?(b):(a))
+
+namespace BibTeX
+{
+ const QString extraAlphaNumChars = QString( "?'`-_:.+/$\\\"&" );
+ const QRegExp htmlRegExp = QRegExp( "</?(a|pre)[^>]*>", false );
+
+ FileImporterBibTeX::FileImporterBibTeX( bool personFirstNameFirst, QString encoding ) : FileImporter(), m_personFirstNameFirst( personFirstNameFirst ), m_currentChar( ' ' ), m_ignoreComments( FALSE ), m_lineBufferSize( 4096 ), m_encoding( encoding )
+ {
+ cancelFlag = FALSE;
+ m_lineBuffer = new char[m_lineBufferSize];
+ m_textStream = NULL;
+ }
+
+
+ FileImporterBibTeX::~FileImporterBibTeX()
+ {
+ delete[] m_lineBuffer;
+ }
+
+ File* FileImporterBibTeX::load( QIODevice *iodevice )
+ {
+ m_mutex.lock();
+ cancelFlag = FALSE;
+
+ QString rawText;
+ const char *encodingFrom = m_encoding == "latex" ? "utf-8\0" : m_encoding.append( "\0" ).ascii();
+ iconv_t iconvHandle = iconv_open( "utf-8", encodingFrom );
+ char *convertedLine = new char[m_lineBufferSize * 4];
+ int len;
+ bool encodingOk = true;
+ while ( encodingOk && iodevice->isReadable() && ( len = iodevice->readLine( m_lineBuffer, m_lineBufferSize ) ) > 0 )
+ {
+ evaluateParameterComments( iconvHandle, m_lineBuffer );
+
+ char *raw = m_lineBuffer;
+ char *enc = convertedLine;
+ size_t encLen = m_lineBufferSize, rawLen = ( size_t )len;
+ size_t result = iconv( iconvHandle, &raw, &rawLen, &enc, &encLen );
+
+ qApp->processEvents();
+
+ if ( result != 0 )
+ {
+ QString problematic = QString( m_lineBuffer ).mid( max( 0, m_lineBufferSize - encLen - 15 ), 30 );
+ if ( problematic.isNull() || problematic.isEmpty() ) problematic = QString( m_lineBuffer );
+ qDebug( "iconv resulted in error code %i for source encoding %s, maybe file is in different encoding? Problem is somewhere here: \"%s\"", result, encodingFrom, problematic.latin1() );
+ encodingOk = false;
+ break;
+ }
+ if ( rawLen > 0 )
+ {
+ qDebug( "iconv could not convert complete string, only %i out of %i chars", len - rawLen, len );
+ encodingOk = false;
+ break;
+ }
+ enc[0] = '\0';
+
+ /** remove leading UTF-8 byte-order mark (BOM) */
+ int offset = 0;
+ while (((( unsigned char )convertedLine[offset] ) == 0xef || (( unsigned char )convertedLine[offset] ) == 0xbb || (( unsigned char )convertedLine[offset] ) == 0xbf ) && offset < 4 )
+ ++offset;
+
+ QString line = QString::fromUtf8( convertedLine + offset );
+ rawText.append( line );
+ }
+ iconv_close( iconvHandle );
+ delete[] convertedLine;
+
+ if ( !encodingOk )
+ {
+ qDebug( "Decoding failed, cannot load file. Please fix encoding manually." );
+ m_mutex.unlock();
+ return NULL;
+ }
+
+ /** Cleaning up code comming from DBLP */
+ rawText = rawText.replace( htmlRegExp, "" );
+ rawText = EncoderLaTeX::currentEncoderLaTeX() ->decode( rawText );
+ unescapeLaTeXChars( rawText );
+ m_textStream = new QTextStream( rawText, IO_ReadOnly );
+ m_textStream->setEncoding( QTextStream::UnicodeUTF8 );
+ m_currentLineNumber = 0;
+ m_posIntCurrentLine = 0;
+ m_currentLine = "";
+
+ File *result = new File();
+ QIODevice *streamDevice = m_textStream->device();
+ while ( !cancelFlag && !m_textStream->atEnd() )
+ {
+ emit progress( streamDevice->at(), streamDevice->size() );
+ qApp->processEvents();
+ Element * element = nextElement();
+ if ( element != NULL )
+ {
+ Comment *comment = dynamic_cast<Comment*>( element );
+ if ( !m_ignoreComments || comment == NULL )
+ result->appendElement( element );
+ else
+ delete element;
+ }
+ qApp->processEvents();
+ }
+ emit progress( streamDevice->size(), streamDevice->size() );
+
+ if ( cancelFlag )
+ {
+ qDebug( "Loading file has been canceled" );
+ delete result;
+ result = NULL;
+ }
+
+ delete m_textStream;
+
+ m_mutex.unlock();
+ return result;
+ }
+
+ bool FileImporterBibTeX::guessCanDecode( const QString & rawText )
+ {
+ QString text = EncoderLaTeX::currentEncoderLaTeX() ->decode( rawText );
+ return text.find( QRegExp( "@\\w+\\{.+\\}" ) ) >= 0;
+ }
+
+ void FileImporterBibTeX::setIgnoreComments( bool ignoreComments )
+ {
+ m_ignoreComments = ignoreComments;
+ }
+
+ void FileImporterBibTeX::cancel()
+ {
+ cancelFlag = TRUE;
+ }
+
+ Element *FileImporterBibTeX::nextElement()
+ {
+ Token token = nextToken();
+
+ if ( token == tAt )
+ {
+ QString elementType = readSimpleString();
+ if ( elementType.lower() == "comment" )
+ return readCommentElement();
+ else if ( elementType.lower() == "string" )
+ return readMacroElement();
+ else if ( elementType.lower() == "preamble" )
+ return readPreambleElement();
+ else if ( !elementType.isEmpty() )
+ return readEntryElement( elementType );
+ else
+ {
+ qDebug( "ElementType is empty" );
+ return NULL;
+ }
+ }
+ else if ( token == tUnknown )
+ {
+ qDebug( "Unknown token near line %i, treating as comment", m_currentLineNumber );
+ return readPlainCommentElement();
+ }
+
+ if ( token != tEOF )
+ qDebug( "Don't know how to parse next token near line %i: %s", m_currentLineNumber, tokenidToString( token ).latin1() );
+
+ return NULL;
+ }
+
+ Comment *FileImporterBibTeX::readCommentElement()
+ {
+ while ( m_currentChar != '{' && m_currentChar != '(' && !m_textStream->atEnd() )
+ m_currentChar = nextChar();
+
+ return new Comment( readBracketString( m_currentChar ), TRUE );
+ }
+
+ Comment *FileImporterBibTeX::readPlainCommentElement()
+ {
+ QString result = m_currentChar;
+ result += readLine();
+ m_currentChar = nextChar();
+ while ( !m_textStream->atEnd() && m_currentChar != '@' && !m_currentChar.isSpace() )
+ {
+ result.append( '\n' ).append( m_currentChar );
+ m_currentChar = nextChar();
+ result.append( readLine() );
+ m_currentChar = nextChar();
+ }
+ return new Comment( result, FALSE );
+ }
+
+ Macro *FileImporterBibTeX::readMacroElement()
+ {
+ Token token = nextToken();
+ while ( token != tBracketOpen )
+ {
+ if ( token == tEOF )
+ {
+ qDebug( "Error in parsing unknown macro (near line %i): Opening curly brace ({) expected", m_currentLineNumber );
+ return NULL;
+ }
+ token = nextToken();
+ }
+
+ QString key = readSimpleString();
+ if ( nextToken() != tAssign )
+ {
+ qDebug( "Error in parsing macro '%s' (near line %i): Assign symbol (=) expected", key.latin1(), m_currentLineNumber );
+ return NULL;
+ }
+
+ Macro *macro = new Macro( key );
+ do
+ {
+ bool isStringKey = FALSE;
+ QString text = readString( isStringKey ).replace( QRegExp( "\\s+" ), " " );
+ if ( isStringKey )
+ macro->value()->items.append( new MacroKey( text ) );
+ else
+ macro->value()->items.append( new BibTeX::PlainText( text ) );
+
+ token = nextToken();
+ }
+ while ( token == tDoublecross );
+
+ return macro;
+ }
+
+ Preamble *FileImporterBibTeX::readPreambleElement()
+ {
+ Token token = nextToken();
+ while ( token != tBracketOpen )
+ {
+ if ( token == tEOF )
+ {
+ qDebug( "Error in parsing unknown preamble (near line %i): Opening curly brace ({) expected", m_currentLineNumber );
+ return NULL;
+ }
+ token = nextToken();
+ }
+
+ Preamble *preamble = new Preamble( );
+ do
+ {
+ bool isStringKey = FALSE;
+ QString text = readString( isStringKey ).replace( QRegExp( "\\s+" ), " " );
+ if ( isStringKey )
+ preamble->value()->items.append( new MacroKey( text ) );
+ else
+ preamble->value()->items.append( new BibTeX::PlainText( text ) );
+
+ token = nextToken();
+ }
+ while ( token == tDoublecross );
+
+ return preamble;
+ }
+
+ Entry *FileImporterBibTeX::readEntryElement( const QString& typeString )
+ {
+ Token token = nextToken();
+ while ( token != tBracketOpen )
+ {
+ if ( token == tEOF )
+ {
+ qDebug( "Error in parsing unknown entry (near line %i): Opening curly brace ({) expected", m_currentLineNumber );
+ return NULL;
+ }
+ token = nextToken();
+ }
+
+ QString key = readSimpleString();
+ Entry *entry = new Entry( typeString, key );
+
+ token = nextToken();
+ do
+ {
+ if ( token == tBracketClose || token == tEOF )
+ break;
+ else if ( token != tComma )
+ {
+ qDebug( "Error in parsing entry '%s' (near line %i): Comma symbol (,) expected but got 0x%x (token %s)", key.latin1(), m_currentLineNumber, m_currentChar.unicode(), tokenidToString( token ).latin1() );
+ delete entry;
+ return NULL;
+ }
+
+ QString fieldTypeName = readSimpleString();
+ token = nextToken();
+ if ( fieldTypeName == QString::null || token == tBracketClose )
+ {
+ // entry is buggy, but we still accept it
+ break;
+ }
+ else if ( token != tAssign )
+ {
+ qDebug( "Error in parsing entry '%s' (near line %i): Assign symbol (=) expected after field name '%s'", key.latin1(), m_currentLineNumber, fieldTypeName.latin1() );
+ delete entry;
+ return NULL;
+ }
+
+ /** check for duplicate fields */
+ if ( entry->getField( fieldTypeName ) != NULL )
+ {
+ int i = 1;
+ QString appendix = QString::number( i );
+ while ( entry->getField( fieldTypeName + appendix ) != NULL )
+ {
+ ++i;
+ appendix = QString::number( i );
+ }
+ fieldTypeName += appendix;
+ }
+
+ EntryField *entryField = new EntryField( fieldTypeName );
+
+ token = readValue( entryField->value(), entryField->fieldType() );
+
+ entry->addField( entryField );
+ }
+ while ( TRUE );
+
+ return entry;
+ }
+
+ FileImporterBibTeX::Token FileImporterBibTeX::nextToken()
+ {
+ if ( m_textStream->atEnd() )
+ return tEOF;
+
+ Token curToken = tUnknown;
+
+ while (( m_currentChar.isSpace() || m_currentChar == '\t' ) && !m_textStream->atEnd() )
+ m_currentChar = nextChar();
+
+ switch ( m_currentChar.latin1() )
+ {
+ case '@':
+ curToken = tAt;
+ break;
+ case '{':
+ case '(':
+ curToken = tBracketOpen;
+ break;
+ case '}':
+ case ')':
+ curToken = tBracketClose;
+ break;
+ case ',':
+ curToken = tComma;
+ break;
+ case '=':
+ curToken = tAssign;
+ break;
+ case '#':
+ curToken = tDoublecross;
+ break;
+ default:
+ if ( m_textStream->atEnd() )
+ curToken = tEOF;
+ }
+
+ if ( curToken != tUnknown && curToken != tEOF )
+ m_currentChar = nextChar();
+
+ return curToken;
+ }
+
+ QString FileImporterBibTeX::readString( bool &isStringKey )
+ {
+ while ( m_currentChar.isSpace() )
+ m_currentChar = nextChar();
+
+ isStringKey = FALSE;
+ switch ( m_currentChar.latin1() )
+ {
+ case '{':
+ case '(':
+ return readBracketString( m_currentChar );
+ case '"':
+ return readQuotedString();
+ default:
+ isStringKey = TRUE;
+ return readSimpleString();
+ }
+ }
+
+ QString FileImporterBibTeX::readSimpleString( QChar until )
+ {
+ QString result;
+
+ while ( m_currentChar.isSpace() )
+ m_currentChar = nextChar();
+
+ if ( m_currentChar.isLetterOrNumber() || extraAlphaNumChars.contains( m_currentChar ) )
+ {
+ result.append( m_currentChar );
+ m_currentChar = nextChar();
+ }
+
+ while ( !m_textStream->atEnd() )
+ {
+ if ( until != '\0' )
+ {
+ if ( m_currentChar != until )
+ result.append( m_currentChar );
+ else
+ break;
+ }
+ else
+ if ( m_currentChar.isLetterOrNumber() || extraAlphaNumChars.contains( m_currentChar ) )
+ result.append( m_currentChar );
+ else if ( m_currentChar == "," || m_currentChar == "(" || m_currentChar == ")" || m_currentChar == "{" || m_currentChar == "}" || m_currentChar == "=" || m_currentChar == "#" || m_currentChar == "@" || m_currentChar.isSpace() )
+ break;
+ else
+ {
+ qDebug( "Unknown letter or number: 0x%x", m_currentChar.unicode() );
+ // break;
+ }
+ m_currentChar = nextChar();
+ }
+ return result;
+ }
+
+ QString FileImporterBibTeX::readQuotedString()
+ {
+ QString result;
+ QChar lastChar = m_currentChar;
+ m_currentChar = nextChar();
+ while ( !m_textStream->atEnd() )
+ {
+ if ( m_currentChar != '"' || lastChar == '\\' )
+ result.append( m_currentChar );
+ else
+ break;
+ lastChar = m_currentChar;
+ m_currentChar = nextChar();
+ }
+
+ /** read character after closing " */
+ m_currentChar = nextChar();
+
+ return result;
+ }
+
+ QString FileImporterBibTeX::readLine()
+ {
+ QString result = m_currentLine.mid( m_posIntCurrentLine );
+ m_posIntCurrentLine = m_currentLine.length() + 2;
+ return result;
+ }
+
+ QString FileImporterBibTeX::readBracketString( const QChar openingBracket )
+ {
+ QString result;
+ QChar closingBracket = '}';
+ if ( openingBracket == '(' )
+ closingBracket = ')';
+ int counter = 1;
+ m_currentChar = nextChar();
+ while ( !m_textStream->atEnd() )
+ {
+ if ( m_currentChar == openingBracket )
+ counter++;
+ else if ( m_currentChar == closingBracket )
+ counter--;
+
+ if ( counter == 0 )
+ break;
+ else
+ result.append( m_currentChar );
+ m_currentChar = nextChar();
+ }
+ m_currentChar = nextChar();
+ return result;
+ }
+
+ FileImporterBibTeX::Token FileImporterBibTeX::readValue( Value *value, EntryField::FieldType fieldType )
+ {
+ Token token = tUnknown;
+
+ do
+ {
+ bool isStringKey = FALSE;
+ QString text = readString( isStringKey ).replace( QRegExp( "\\s+" ), " " );
+
+ switch ( fieldType )
+ {
+ case EntryField::ftKeywords:
+ {
+ if ( isStringKey )
+ qDebug( "WARNING: Cannot handle keywords that are macros" );
+ else
+ value->items.append( new KeywordContainer( text ) );
+ }
+ break;
+ case EntryField::ftAuthor:
+ case EntryField::ftEditor:
+ {
+ if ( isStringKey )
+ qDebug( "WARNING: Cannot handle authors/editors that are macros" );
+ else
+ {
+ QStringList persons;
+ splitPersons( text, persons );
+ PersonContainer *container = new PersonContainer( m_personFirstNameFirst );
+ for ( QStringList::ConstIterator pit = persons.constBegin(); pit != persons.constEnd(); ++pit )
+ container->persons.append( new Person( *pit, m_personFirstNameFirst ) );
+ value->items.append( container );
+ }
+ }
+ break;
+ case EntryField::ftPages:
+ text.replace( QRegExp( "\\s*--?\\s*" ), QChar( 0x2013 ) );
+ default:
+ {
+ if ( isStringKey )
+ value->items.append( new MacroKey( text ) );
+ else
+ value->items.append( new BibTeX::PlainText( text ) );
+ }
+ }
+
+ token = nextToken();
+ }
+ while ( token == tDoublecross );
+
+ return token;
+ }
+
+ void FileImporterBibTeX::unescapeLaTeXChars( QString &text )
+ {
+ text.replace( "\\&", "&" );
+ }
+
+ void FileImporterBibTeX::splitPersons( const QString& text, QStringList &persons )
+ {
+ QStringList wordList;
+ QString word;
+ int bracketCounter = 0;
+
+ for ( unsigned int pos = 0;pos < text.length();++pos )
+ {
+ if ( text[pos] == '{' )
+ ++bracketCounter;
+ else if ( text[pos] == '}' )
+ --bracketCounter;
+
+ if ( text[pos] == ' ' || text[pos] == '\n' || text[pos] == '\r' )
+ {
+ if ( word == "and" && bracketCounter == 0 )
+ {
+ persons.append( wordList.join( " " ) );
+ wordList.clear();
+ }
+ else if ( !word.isEmpty() )
+ wordList.append( word );
+
+ word = "";
+ }
+ else
+ word.append( text[pos] );
+ }
+
+ wordList.append( word );
+ persons.append( wordList.join( " " ) );
+ }
+
+ void FileImporterBibTeX::evaluateParameterComments( iconv_t &iconvHandle, const char *cline )
+ {
+ /** simple preliminary checks before expensive conversion to QString */
+ if ( cline[0] == '@' && cline[1] == 'c' )
+ {
+ QString line = QString( cline ).lower();
+ /** check if this file requests a special encoding */
+ if ( line.startsWith( "@comment{x-kbibtex-encoding=" ) && line.endsWith( "}\n" ) )
+ {
+ QString newEncoding = line.mid( 28, line.length() - 30 );
+ qDebug( "x-kbibtex-encoding=<%s>", newEncoding.latin1() );
+ if ( newEncoding == "latex" ) newEncoding = "utf-8";
+ iconv_close( iconvHandle );
+ iconvHandle = iconv_open( "utf-8", newEncoding.append( '\0' ).ascii() );
+ }
+ }
+ }
+
+ QChar FileImporterBibTeX::nextChar()
+ {
+ bool atEndOfLine = m_posIntCurrentLine >= m_currentLine.length();
+
+ while (( m_posIntCurrentLine >= m_currentLine.length() || m_currentLine.isEmpty() || m_currentLine.isNull() ) && !m_textStream->atEnd() )
+ {
+ m_currentLine = m_textStream->readLine();
+ m_posIntCurrentLine = 0;
+ ++m_currentLineNumber;
+ }
+
+ if ( atEndOfLine )
+ return QChar( ' ' );
+ else if ( m_posIntCurrentLine < m_currentLine.length() )
+ {
+ QChar result = m_currentLine[m_posIntCurrentLine];
+ ++m_posIntCurrentLine;
+ return result;
+ }
+
+ return QChar();
+ }
+
+ QString FileImporterBibTeX::tokenidToString( Token token )
+ {
+ switch ( token )
+ {
+ case tAt: return QString( "At" );
+ case tBracketClose: return QString( "BracketClose" );
+ case tBracketOpen: return QString( "BracketOpen" );
+ case tAlphaNumText: return QString( "AlphaNumText" );
+ case tAssign: return QString( "Assign" );
+ case tComma: return QString( "Comma" );
+ case tDoublecross: return QString( "Doublecross" );
+ case tEOF: return QString( "EOF" );
+ case tUnknown: return QString( "Unknown" );
+ default: return QString( "<Unknown>" );
+ }
+ }
+}
diff --git a/src/fileimporterbibtex.h b/src/fileimporterbibtex.h
new file mode 100644
index 0000000..39ab911
--- /dev/null
+++ b/src/fileimporterbibtex.h
@@ -0,0 +1,96 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILEIMPORTERBIBTEX_H
+#define BIBTEXFILEIMPORTERBIBTEX_H
+
+#include <iconv.h>
+
+#include <fileimporter.h>
+#include <entryfield.h>
+
+namespace BibTeX
+{
+
+ class Element;
+ class Comment;
+ class Preamble;
+ class Macro;
+ class Entry;
+ class Value;
+
+ /**
+ @author Thomas Fischer
+ */
+ class FileImporterBibTeX : public FileImporter
+ {
+ public:
+ FileImporterBibTeX( bool personFirstNameFirst = FALSE, QString encoding = "latex" );
+ ~FileImporterBibTeX();
+
+ File* load( QIODevice *iodevice );
+ static bool guessCanDecode( const QString & text );
+
+ void setIgnoreComments( bool ignoreComments );
+
+ public slots:
+ void cancel();
+
+ private:
+ enum Token
+ {
+ tAt = 1, tBracketOpen = 2, tBracketClose = 3, tAlphaNumText = 4, tComma = 5, tAssign = 7, tDoublecross = 8, tEOF = 9, tUnknown = 0
+ };
+
+ bool cancelFlag;
+ QTextStream *m_textStream;
+ bool m_personFirstNameFirst;
+ QChar m_currentChar;
+ bool m_ignoreComments;
+ char *m_lineBuffer;
+ const int m_lineBufferSize;
+ QString m_encoding;
+ QString m_currentLine;
+ unsigned int m_posIntCurrentLine;
+ int m_currentLineNumber;
+
+ Comment *readCommentElement();
+ Comment *readPlainCommentElement();
+ Macro *readMacroElement();
+ Preamble *readPreambleElement();
+ Entry *readEntryElement( const QString& typeString );
+ Element *nextElement();
+ Token nextToken();
+ QString readString( bool &isStringKey );
+ QString readSimpleString( QChar until = '\0' );
+ QString readQuotedString();
+ QString readLine();
+ QString readBracketString( const QChar openingBracket );
+ Token readValue( Value *value, EntryField::FieldType fieldType );
+
+ void unescapeLaTeXChars( QString &text );
+ void splitPersons( const QString& test, QStringList &persons );
+ void evaluateParameterComments( iconv_t &iconvHandle, const char *line );
+ QChar nextChar();
+ QString tokenidToString( Token token );
+ };
+
+}
+
+#endif
diff --git a/src/fileimporterbibutils.cpp b/src/fileimporterbibutils.cpp
new file mode 100644
index 0000000..bd2b622
--- /dev/null
+++ b/src/fileimporterbibutils.cpp
@@ -0,0 +1,296 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <stdio.h>
+
+#include <qfile.h>
+#include <qdir.h>
+#include <qprocess.h>
+#include <qstringlist.h>
+#include <qbuffer.h>
+#include <qwaitcondition.h>
+#include <qapplication.h>
+
+#include <file.h>
+#include <encoderlatex.h>
+#include "fileimporterbibutils.h"
+
+namespace BibTeX
+{
+
+ FileImporterBibUtils::FileImporterBibUtils( BibTeX::File::FileFormat inputFormat )
+ : FileImporter(), m_workingDir( createTempDir() ), m_inputFormat( inputFormat ), m_bibTeXImporter( new FileImporterBibTeX( false, "utf-8" ) )
+ {
+ m_processBuffer = new QBuffer();
+ }
+
+ FileImporterBibUtils::~FileImporterBibUtils()
+ {
+ delete m_processBuffer;
+ deleteTempDir( m_workingDir );
+ delete m_bibTeXImporter;
+ }
+
+ File* FileImporterBibUtils::load( QIODevice *iodevice )
+ {
+ m_cancelFlag = false;
+ if ( !iodevice->isReadable() )
+ {
+ qDebug( "iodevice is not readable" );
+ return NULL;
+ }
+ if ( !iodevice->isOpen() )
+ {
+ qDebug( "iodevice is not open" );
+ return NULL;
+ }
+
+ if ( !iodeviceToXMLbuffer( iodevice ) || m_cancelFlag )
+ return NULL;
+
+ return xmlBufferToBibTeXFile();
+ }
+
+ bool FileImporterBibUtils::guessCanDecode( const QString & text )
+ {
+ return guessInputFormat( text ) != BibTeX::File::formatUndefined;
+ }
+
+ File::FileFormat FileImporterBibUtils::guessInputFormat( const QString &text )
+ {
+ if ( text.find( "TY - " ) >= 0 )
+ return BibTeX::File::formatRIS;
+ else if ( text.find( "%A " ) >= 0 )
+ return BibTeX::File::formatEndNote;
+ else if ( text.find( "FN ISI Export Format" ) >= 0 )
+ return BibTeX::File::formatISI;
+ else
+ return BibTeX::File::formatUndefined;
+ }
+
+ void FileImporterBibUtils::cancel()
+ {
+ m_bibTeXImporter->cancel();
+ m_cancelFlag = true;
+ }
+
+ bool FileImporterBibUtils::iodeviceToXMLbuffer( QIODevice *iodevice )
+ {
+ QWaitCondition wc;
+
+ m_processBuffer->open( IO_WriteOnly );
+ m_process = NULL;
+ switch ( m_inputFormat )
+ {
+ case BibTeX::File::formatISI:
+ m_process = new QProcess( QStringList::split( ' ', "isi2xml -i utf8 -u" ) );
+ break;
+ case BibTeX::File::formatWordBib:
+ m_process = new QProcess( QStringList::split( ' ', "wordbib2xml -i utf8 -u" ) );
+ break;
+ case BibTeX::File::formatAds:
+ m_process = new QProcess( QStringList::split( ' ', "ads2xml -i utf8 -u" ) );
+ break;
+ case BibTeX::File::formatEndNote:
+ m_process = new QProcess( QStringList::split( ' ', "end2xml -i utf8 -u" ) );
+ break;
+ case BibTeX::File::formatEndNoteXML:
+ m_process = new QProcess( QStringList::split( ' ', "endx2xml -i utf8 -u" ) );
+ break;
+ case BibTeX::File::formatRIS:
+ m_process = new QProcess( QStringList::split( ' ', "ris2xml -i utf8 -u" ) );
+ break;
+ case BibTeX::File::formatMODS:
+ /* m_process = NULL; */
+ break;
+ default:
+ qDebug( "Cannot handle input format %i", m_inputFormat );
+ return false;
+ }
+
+ if ( m_process != NULL )
+ {
+ m_waiting = true;
+ connect( m_process, SIGNAL( processExited() ), this, SLOT( wakeUp() ) );
+ connect( m_process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadyStdout() ) );
+ connect( m_process, SIGNAL( readyReadStderr() ), this, SLOT( slotReadyStderr() ) );
+
+ m_process->start();
+ if ( m_process->isRunning() )
+ {
+ QByteArray inData = iodevice->readAll();
+ m_process->writeToStdin( inData );
+ qApp->processEvents();
+ m_process->closeStdin();
+
+ int nothingHappens = 20;
+ while ( m_waiting )
+ {
+ wc.wait( 250 );
+ qApp->processEvents();
+ --nothingHappens;
+ }
+
+ if ( nothingHappens <= 0 )
+ m_process->kill();
+
+ if ( !m_process->normalExit() )
+ {
+ qDebug( "%s did not exit in a clean fashion", m_process->arguments()[0].latin1() );
+ delete m_process;
+ return false;
+ }
+ }
+ else
+ {
+ qDebug( "%s did not start", m_process->arguments()[0].latin1() );
+ delete m_process;
+ return false;
+ }
+ }
+ else
+ {
+ m_processBuffer->writeBlock( iodevice->readAll() );
+ }
+
+ m_processBuffer->close();
+
+ delete m_process;
+ return true;
+ }
+
+ BibTeX::File* FileImporterBibUtils::xmlBufferToBibTeXFile()
+ {
+ QWaitCondition wc;
+
+ m_waiting = true;
+ m_process = new QProcess( QStringList::split( ' ', "xml2bib -i utf8 -o utf8 -sk" ) );
+ connect( m_process, SIGNAL( processExited() ), this, SLOT( wakeUp() ) );
+ connect( m_process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadyStdout() ) );
+ connect( m_process, SIGNAL( readyReadStderr() ), this, SLOT( slotReadyStderr() ) );
+
+ if ( m_process->start() )
+ {
+ QBuffer *tempBuffer = m_processBuffer;
+ m_processBuffer = new QBuffer();
+
+ tempBuffer->open( IO_ReadOnly );
+ m_process->writeToStdin( tempBuffer->readAll() );
+ qApp->processEvents();
+ m_process->closeStdin();
+ tempBuffer->close();
+
+ m_processBuffer->open( IO_WriteOnly );
+ int nothingHappens = 20;
+ while ( m_waiting )
+ {
+ wc.wait( 250 );
+ qApp->processEvents();
+ --nothingHappens;
+ }
+ m_processBuffer->close();
+
+ if ( nothingHappens <= 0 )
+ m_process->kill();
+
+ delete tempBuffer;
+
+ if ( ! m_process->normalExit() )
+ {
+ delete m_process;
+ return NULL;
+ }
+
+ m_processBuffer->open( IO_ReadOnly );
+ File *bibTeXFile = m_bibTeXImporter->load( m_processBuffer );
+ m_processBuffer->close();
+
+ delete m_process;
+ return bibTeXFile;
+ }
+ else
+ {
+ delete m_process;
+ return NULL;
+ }
+
+ delete m_process;
+ return NULL;
+ }
+
+ QString FileImporterBibUtils::createTempDir()
+ {
+ QString result = QString::null;
+ QFile *devrandom = new QFile( "/dev/random" );
+
+ if ( devrandom->open( IO_ReadOnly ) )
+ {
+ Q_UINT32 randomNumber;
+ if ( devrandom->readBlock(( char* ) & randomNumber, sizeof( randomNumber ) ) > 0 )
+ {
+ randomNumber |= 0x10000000;
+ result = QString( "/tmp/bibtex-%1" ).arg( randomNumber, sizeof( randomNumber ) * 2, 16 );
+ if ( !QDir().mkdir( result ) )
+ result = QString::null;
+ }
+ devrandom->close();
+ }
+
+ delete devrandom;
+
+ return result;
+ }
+
+ void FileImporterBibUtils::deleteTempDir( const QString& directory )
+ {
+ QDir dir = QDir( directory );
+ QStringList subDirs = dir.entryList( QDir::Dirs );
+ for ( QStringList::Iterator it = subDirs.begin(); it != subDirs.end(); it++ )
+ {
+ if (( QString::compare( *it, "." ) != 0 ) && ( QString::compare( *it, ".." ) != 0 ) )
+ deleteTempDir( *it );
+ }
+ QStringList allEntries = dir.entryList( QDir::All );
+ for ( QStringList::Iterator it = allEntries.begin(); it != allEntries.end(); it++ )
+ dir.remove( *it );
+
+ QDir().rmdir( directory );
+ }
+
+ void FileImporterBibUtils::wakeUp()
+ {
+ m_waiting = false;
+ }
+
+ void FileImporterBibUtils::slotReadyStdout()
+ {
+ m_processBuffer->writeBlock( m_process->readStdout() );
+ }
+
+ void FileImporterBibUtils::slotReadyStderr()
+ {
+ QByteArray ba = m_process->readStderr();
+ QTextStream bats( ba, IO_ReadOnly );
+ bats.setEncoding( QTextStream::UnicodeUTF8 );
+ qDebug( "%s", bats.read().latin1() );
+ }
+
+}
+#include "fileimporterbibutils.moc"
+
diff --git a/src/fileimporterbibutils.h b/src/fileimporterbibutils.h
new file mode 100644
index 0000000..8fd0635
--- /dev/null
+++ b/src/fileimporterbibutils.h
@@ -0,0 +1,72 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef BIBTEXFILEIMPORTBIBUTILS_H
+#define BIBTEXFILEIMPORTBIBUTILS_H
+
+#include <file.h>
+#include <fileimporter.h>
+#include <fileimporterbibtex.h>
+
+class QBuffer;
+
+namespace BibTeX
+{
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class FileImporterBibUtils : public FileImporter
+ {
+ Q_OBJECT
+ public:
+ FileImporterBibUtils( BibTeX::File::FileFormat inputFormat );
+ ~FileImporterBibUtils();
+
+ File* load( QIODevice *iodevice );
+ static bool guessCanDecode( const QString & text );
+ static File::FileFormat guessInputFormat( const QString &text );
+
+ public slots:
+ void cancel();
+
+ private:
+ bool m_cancelFlag;
+ QString m_workingDir;
+ BibTeX::File::FileFormat m_inputFormat;
+ FileImporterBibTeX *m_bibTeXImporter;
+
+ bool m_waiting;
+ QProcess *m_process;
+ QBuffer *m_processBuffer;
+
+ bool iodeviceToXMLbuffer( QIODevice *iodevice );
+ File* xmlBufferToBibTeXFile();
+ QString createTempDir();
+ void deleteTempDir( const QString& directory );
+
+ private slots:
+ void wakeUp();
+ void slotReadyStdout();
+ void slotReadyStderr();
+ };
+
+}
+
+#endif // BIBTEXFILEIMPORTBIBUTILS_H
diff --git a/src/fileimporterexternal.cpp b/src/fileimporterexternal.cpp
new file mode 100644
index 0000000..3b23946
--- /dev/null
+++ b/src/fileimporterexternal.cpp
@@ -0,0 +1,150 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qprocess.h>
+#include <qwaitcondition.h>
+#include <qapplication.h>
+#include <qbuffer.h>
+
+#include <fileimporterbibtex.h>
+#include "fileimporterexternal.h"
+
+namespace BibTeX
+{
+
+ FileImporterExternal::FileImporterExternal( Importer importer, File::FileFormat fileformat )
+ : FileImporter(), m_importer( importer ), m_fileformat( fileformat )
+ {
+ wc = new QWaitCondition();
+ }
+
+
+ FileImporterExternal::~FileImporterExternal()
+ {
+ delete wc;
+ }
+
+ File* FileImporterExternal::load( QIODevice *iodevice )
+ {
+ m_mutex.lock();
+ File * result = NULL;
+ QBuffer buffer;
+
+ if ( fetchInput( iodevice, buffer ) )
+ {
+ buffer.open( IO_ReadOnly );
+ FileImporter * bibtexImporter = new FileImporterBibTeX();
+ result = bibtexImporter->load( &buffer );
+ buffer.close();
+ delete bibtexImporter;
+ }
+
+ m_mutex.unlock();
+ return result;
+ }
+
+ void FileImporterExternal::cancel()
+ {
+ if ( process != NULL )
+ process->kill();
+ }
+
+ bool FileImporterExternal::fetchInput( QIODevice *input, QBuffer &output )
+ {
+ bool result = FALSE;
+
+ QString commandLine;
+ switch ( m_fileformat )
+ {
+ default:
+ return FALSE;
+ }
+ QStringList args = QStringList::split( ' ', commandLine );
+
+ output.open( IO_WriteOnly );
+ writeTo = new QTextStream( &output );
+ writeTo->setEncoding( QTextStream::UnicodeUTF8 );
+
+ QApplication::setOverrideCursor( Qt::waitCursor );
+
+ process = new QProcess( args );
+ connect( process, SIGNAL( processExited() ), this, SLOT( slotProcessExited() ) );
+ connect( process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadProcessOutput() ) );
+ connect( process, SIGNAL( readyReadStderr() ), this, SLOT( slotReadProcessOutput() ) );
+ connect( process, SIGNAL( wroteToStdin() ), this, SLOT( slotWroteToStdin() ) );
+
+ if ( process->start() )
+ {
+ while ( !process->isRunning() )
+ {
+ wc->wait( 250 );
+ qApp->processEvents();
+ }
+ qApp->processEvents();
+ QByteArray buf = input->readAll();
+ process->writeToStdin( buf );
+ qApp->processEvents();
+ while ( process->isRunning() )
+ {
+ wc->wait( 250 );
+ qApp->processEvents();
+ }
+
+ result = process->normalExit();
+ }
+
+ disconnect( process, SIGNAL( wroteToStdin() ), this, SLOT( slotWroteToStdin() ) );
+ disconnect( process, SIGNAL( readyReadStdout() ), this, SLOT( slotReadProcessOutput() ) );
+ disconnect( process, SIGNAL( readyReadStderr() ), this, SLOT( slotReadProcessOutput() ) );
+ disconnect( process, SIGNAL( processExited() ), this, SLOT( slotProcessExited() ) );
+ delete( process );
+ process = NULL;
+ delete writeTo;
+ writeTo = NULL;
+ output.close();
+
+ QApplication::restoreOverrideCursor();
+ return result;
+ }
+
+ void FileImporterExternal::slotProcessExited()
+ {
+ wc->wakeAll();
+ }
+
+ void FileImporterExternal::slotReadProcessOutput()
+ {
+ if ( writeTo != NULL )
+ while ( process->canReadLineStdout() )
+ {
+ QString line = process->readLineStdout();
+ // qDebug( "line=%s", line.latin1() );
+ ( *writeTo ) << line.latin1();
+ ( *writeTo ) << endl;
+ }
+ }
+
+ void FileImporterExternal::slotWroteToStdin()
+ {
+ process->closeStdin();
+ }
+
+
+}
+#include "fileimporterexternal.moc"
diff --git a/src/fileimporterexternal.h b/src/fileimporterexternal.h
new file mode 100644
index 0000000..423ee45
--- /dev/null
+++ b/src/fileimporterexternal.h
@@ -0,0 +1,72 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILEIMPORTEREXTERNAL_H
+#define BIBTEXFILEIMPORTEREXTERNAL_H
+
+#include <fileimporter.h>
+#include <file.h>
+#include <settings.h>
+
+class QWaitCondition;
+class QProcess;
+
+namespace BibTeX
+{
+
+ /**
+ @author Thomas Fischer
+ */
+ class FileImporterExternal : public FileImporter
+ {
+ Q_OBJECT
+ public:
+ enum Importer {importerNone = 0, importerBibConv = 4};
+
+ FileImporterExternal( Importer importer, File::FileFormat fileformat );
+ ~FileImporterExternal();
+
+ File* load( QIODevice *iodevice );
+ // FIXME: this is a stub:
+ static bool guessCanDecode( const QString & )
+ {
+ return TRUE;
+ };
+
+ public slots:
+ void cancel();
+
+ private:
+ QWaitCondition *wc;
+ QProcess *process;
+ QTextStream *writeTo;
+ Importer m_importer;
+ File::FileFormat m_fileformat;
+
+ bool fetchInput( QIODevice *input, QBuffer &output );
+
+ private slots:
+ void slotProcessExited();
+ void slotReadProcessOutput();
+ void slotWroteToStdin();
+ };
+
+}
+
+#endif
diff --git a/src/fileimporterris.cpp b/src/fileimporterris.cpp
new file mode 100644
index 0000000..0e5e3da
--- /dev/null
+++ b/src/fileimporterris.cpp
@@ -0,0 +1,517 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qapplication.h>
+#include <qtextstream.h>
+#include <qregexp.h>
+
+#include <entry.h>
+
+#include "fileimporterris.h"
+
+namespace BibTeX
+{
+
+ FileImporterRIS::FileImporterRIS() : FileImporter()
+ {
+ // TODO
+ }
+
+
+ FileImporterRIS::~FileImporterRIS()
+ {
+ // TODO
+ }
+
+ File* FileImporterRIS::load( QIODevice *iodevice )
+ {
+ m_mutex.lock();
+ cancelFlag = FALSE;
+ m_refNr = 0;
+ QTextStream textStream( iodevice );
+
+ File *result = new File();
+ QIODevice *streamDevice = textStream.device();
+ while ( !cancelFlag && !textStream.atEnd() )
+ {
+ emit progress( streamDevice->at(), streamDevice->size() );
+ qApp->processEvents();
+ Element * element = nextElement( textStream );
+ if ( element != NULL )
+ result->appendElement( element );
+ qApp->processEvents();
+ }
+ emit progress( streamDevice->size(), streamDevice->size() );
+
+ if ( cancelFlag )
+ {
+ delete result;
+ result = NULL;
+ }
+
+ m_mutex.unlock();
+ return result;
+ }
+
+ bool FileImporterRIS::guessCanDecode( const QString & text )
+ {
+ return text.find( "TY - " ) >= 0;
+ }
+
+ void FileImporterRIS::cancel()
+ {
+ cancelFlag = TRUE;
+ }
+
+ Element *FileImporterRIS::nextElement( QTextStream &textStream )
+ {
+ RISitemList list = readElement( textStream );
+ if ( list.empty() )
+ return NULL;
+
+ Entry::EntryType entryType = Entry::etMisc;
+ Entry *entry = new Entry( entryType, QString( "RIS_%1" ).arg( m_refNr++ ) );
+ QStringList authorList, editorList, keywordList;
+ QString journalName, abstract, startPage, endPage, date;
+ int fieldNr = 0;
+
+ for ( RISitemList::iterator it = list.begin(); it != list.end(); ++it )
+ {
+ if (( *it ).key == "TY" )
+ {
+ if (( *it ).value.startsWith( "BOOK" ) || ( *it ).value.startsWith( "SER" ) )
+ entryType = Entry::etBook;
+ else if (( *it ).value.startsWith( "CHAP" ) )
+ entryType = Entry::etInBook;
+ else if (( *it ).value.startsWith( "CONF" ) )
+ entryType = Entry::etInProceedings;
+ else if (( *it ).value.startsWith( "JFULL" ) || ( *it ).value.startsWith( "JOUR" ) || ( *it ).value.startsWith( "MGZN" ) )
+ entryType = Entry::etArticle;
+ else if (( *it ).value.startsWith( "RPRT" ) )
+ entryType = Entry::etTechReport;
+ else if (( *it ).value.startsWith( "THES" ) )
+ entryType = Entry::etPhDThesis;
+ entry->setEntryType( entryType );
+ }
+ else if (( *it ).key == "AU" || ( *it ).key == "A1" )
+ {
+ authorList.append(( *it ).value );
+ }
+ else if (( *it ).key == "ED" || ( *it ).key == "A2" )
+ {
+ editorList.append(( *it ).value );
+ }
+ else if (( *it ).key == "ID" )
+ {
+ entry->setId(( *it ).value );
+ }
+ else if (( *it ).key == "Y1" || ( *it ).key == "PY" )
+ {
+ date = ( *it ).value;
+ }
+ else if (( *it ).key == "Y2" )
+ {
+ if ( date.isEmpty() )
+ date = ( *it ).value;
+ }
+ else if (( *it ).key == "N1" /*|| ( *it ).key == "N2"*/ )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftNote );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftNote );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText(( *it ).value ) );
+ field->setValue( value );
+ }
+ else if (( *it ).key == "N2" )
+ {
+ if ( abstract.isEmpty() )
+ abstract = ( *it ).value ;
+ }
+ else if (( *it ).key == "AB" )
+ {
+ abstract = ( *it ).value ;
+ }
+ else if (( *it ).key == "KW" )
+ {
+ QString text = ( *it ).value;
+ QRegExp splitRegExp;
+ if ( text.contains( ";" ) )
+ splitRegExp = QRegExp( "\\s*[;\\n]\\s*" );
+ else if ( text.contains( "," ) )
+ splitRegExp = QRegExp( "\\s*[,\\n]\\s*" );
+ else
+ splitRegExp = QRegExp( "\\n" );
+ QStringList newKeywords = QStringList::split( splitRegExp, text, FALSE );
+ for ( QStringList::Iterator it = newKeywords.begin(); it != newKeywords.end();
+ ++it )
+ keywordList.append( *it );
+ }
+ else if (( *it ).key == "TI" || ( *it ).key == "T1" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftTitle );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftTitle );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText(( *it ).value ) );
+ field->setValue( value );
+ }
+ else if (( *it ).key == "T3" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftSeries );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftSeries );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText(( *it ).value ) );
+ field->setValue( value );
+ }
+ else if (( *it ).key == "JA" || ( *it ).key == "J1" || ( *it ).key == "J2" )
+ {
+ if ( journalName.isEmpty() )
+ journalName = ( *it ).value;
+ }
+ else if (( *it ).key == "JF" || ( *it ).key == "JO" )
+ {
+ journalName = ( *it ).value;
+ }
+ else if (( *it ).key == "VL" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftVolume );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftVolume );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText(( *it ).value ) );
+ field->setValue( value );
+ }
+ else if (( *it ).key == "CP" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftVolume );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftChapter );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText(( *it ).value ) );
+ field->setValue( value );
+ }
+ else if (( *it ).key == "IS" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftNumber );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftNumber );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText(( *it ).value ) );
+ field->setValue( value );
+ }
+ else if (( *it ).key == "PB" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftPublisher );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftPublisher );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText(( *it ).value ) );
+ field->setValue( value );
+ }
+ else if (( *it ).key == "SN" )
+ {
+ BibTeX::EntryField::FieldType fieldType = entryType == Entry::etBook || entryType == Entry::etInBook ? BibTeX::EntryField::ftISBN : BibTeX::EntryField::ftISSN;
+ BibTeX::EntryField * field = entry->getField( fieldType );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( fieldType );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText(( *it ).value ) );
+ field->setValue( value );
+ }
+ else if (( *it ).key == "CY" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftLocation );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftLocation );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText(( *it ).value ) );
+ field->setValue( value );
+ }
+ else if (( *it ).key == "AD" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftAddress );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftAddress );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText(( *it ).value ) );
+ field->setValue( value );
+ }
+ else if (( *it ).key == "L1" )
+ {
+ BibTeX::EntryField * field = entry->getField( "PDF" );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( "PDF" );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText(( *it ).value ) );
+ field->setValue( value );
+ }
+ else if (( *it ).key == "UR" )
+ {
+ BibTeX::EntryField * field = NULL;
+ if (( *it ).value.contains( "dx.doi.org" ) )
+ {
+ field = entry->getField( "DOI" );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( "DOI" );
+ entry->addField( field );
+ }
+ }
+ else
+ {
+ field = entry->getField( BibTeX::EntryField::ftURL );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftURL );
+ entry->addField( field );
+ }
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText(( *it ).value ) );
+ field->setValue( value );
+ }
+ else if (( *it ).key == "SP" )
+ {
+ startPage = ( *it ).value;
+ }
+ else if (( *it ).key == "EP" )
+ {
+ endPage = ( *it ).value;
+ }
+ else
+ {
+ QString fieldName = QString( "RISfield_%1_%2" ).arg( fieldNr++ ).arg(( *it ).key.left( 2 ) );
+ BibTeX::EntryField * field = new BibTeX::EntryField( fieldName );
+ entry->addField( field );
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText(( *it ).value ) );
+ field->setValue( value );
+ }
+ }
+
+ if ( !authorList.empty() )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftAuthor );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftAuthor );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ BibTeX::PersonContainer *container = new BibTeX::PersonContainer();
+ value->items.append( container );
+ for ( QStringList::Iterator pit = authorList.begin(); pit != authorList.end();++pit )
+ container->persons.append( new BibTeX::Person( *pit ) );
+ field->setValue( value );
+ }
+
+ if ( !editorList.empty() )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftEditor );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftEditor );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ BibTeX::PersonContainer *container = new BibTeX::PersonContainer();
+ value->items.append( container );
+ for ( QStringList::Iterator pit = authorList.begin(); pit != authorList.end();++pit )
+ container->persons.append( new BibTeX::Person( *pit ) );
+ field->setValue( value );
+ }
+
+ if ( !keywordList.empty() )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftKeywords );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftKeywords );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ BibTeX::KeywordContainer *container = new BibTeX::KeywordContainer();
+ value->items.append( container );
+ for ( QStringList::Iterator pit = keywordList.begin(); pit != keywordList.end();++pit )
+ container->keywords.append( new BibTeX::Keyword( *pit ) );
+ field->setValue( value );
+ }
+
+ if ( !journalName.isEmpty() )
+ {
+ BibTeX::EntryField * field = entry->getField( entryType == Entry::etInBook || entryType == Entry::etInProceedings ? BibTeX::EntryField::ftBookTitle : BibTeX::EntryField::ftJournal );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftJournal );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText( journalName ) );
+ field->setValue( value );
+ }
+
+ if ( !abstract.isEmpty() )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftAbstract );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftAbstract );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText( abstract ) );
+ field->setValue( value );
+ }
+
+ if ( !startPage.isEmpty() || !endPage.isEmpty() )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftPages );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftPages );
+ entry->addField( field );
+ }
+ QString page;
+ if ( startPage.isEmpty() )
+ page = endPage;
+ else if ( endPage.isEmpty() )
+ page = startPage;
+ else
+ page = startPage + QChar( 0x2013 ) + endPage;
+
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText( page ) );
+ field->setValue( value );
+ }
+
+ QStringList dateFragments = QStringList::split( "/", date );
+ if ( dateFragments.count() > 0 )
+ {
+ bool ok;
+ int year = dateFragments[ 0 ].toInt( &ok );
+ if ( ok && year > 1000 && year < 3000 )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftYear );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftYear );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText( QString::number( year ) ) );
+ field->setValue( value );
+ }
+ }
+ if ( dateFragments.count() > 1 )
+ {
+ bool ok;
+ int month = dateFragments[ 0 ].toInt( &ok );
+ if ( ok && month > 0 && month < 13 )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftMonth );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftMonth );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::PlainText( QString::number( month ) ) );
+ field->setValue( value );
+ }
+ }
+
+ return entry;
+ }
+
+ FileImporterRIS::RISitemList FileImporterRIS::readElement( QTextStream &textStream )
+ {
+ RISitemList result;
+ QString line = textStream.readLine();
+ while ( !line.startsWith( "TY - " ) && !textStream.eof() )
+ line = textStream.readLine();
+ if ( textStream.eof() )
+ return result;
+
+ QString key, value;
+ while ( !line.startsWith( "ER -" ) && !textStream.eof() )
+ {
+ if ( line.mid( 2, 3 ) == " -" )
+ {
+ if ( !value.isEmpty() )
+ {
+ RISitem item;
+ item.key = key;
+ item.value = value;
+ result.append( item );
+ }
+
+ key = line.left( 2 );
+ value = line.mid( 6 ).stripWhiteSpace();
+ }
+ else if ( line.length() > 1 )
+ value += "\n" + line.stripWhiteSpace();
+
+ line = textStream.readLine();
+ }
+ if ( !value.isEmpty() )
+ {
+ RISitem item;
+ item.key = key;
+ item.value = value;
+ result.append( item );
+ }
+
+ return result;
+ }
+}
diff --git a/src/fileimporterris.h b/src/fileimporterris.h
new file mode 100644
index 0000000..11c52e9
--- /dev/null
+++ b/src/fileimporterris.h
@@ -0,0 +1,64 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXFILEIMPORTERRIS_H
+#define BIBTEXFILEIMPORTERRIS_H
+
+#include <fileimporter.h>
+#include <entry.h>
+
+class QTextStream;
+
+namespace BibTeX
+{
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class FileImporterRIS : public FileImporter
+ {
+ public:
+ FileImporterRIS();
+ ~FileImporterRIS();
+
+ File* load( QIODevice *iodevice );
+ static bool guessCanDecode( const QString & text );
+
+ public slots:
+ void cancel();
+
+ private:
+ typedef struct
+ {
+ QString key;
+ QString value;
+ }
+ RISitem;
+ typedef QValueList<RISitem> RISitemList;
+
+ bool cancelFlag;
+ int m_refNr;
+
+ Element *nextElement( QTextStream &textStream );
+ RISitemList readElement( QTextStream &textStream );
+ };
+
+}
+
+#endif
diff --git a/src/findduplicates.cpp b/src/findduplicates.cpp
new file mode 100644
index 0000000..ddcf5a8
--- /dev/null
+++ b/src/findduplicates.cpp
@@ -0,0 +1,444 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <math.h>
+
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qregexp.h>
+#include <qapplication.h>
+
+#include <kdebug.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kprogress.h>
+
+#include <element.h>
+#include <entry.h>
+#include <file.h>
+#include <preamble.h>
+#include <macro.h>
+#include "findduplicates.h"
+
+#define max(a,b) ((a)>(b)?(a):(b))
+#define min(a,b) ((a)<(b)?(a):(b))
+
+namespace KBibTeX
+{
+ const unsigned int FindDuplicates::maxDistance = 0xffffff;
+
+ FindDuplicates::FindDuplicates( DuplicateCliqueList &result, unsigned int sensitivity, BibTeX::File *file, QWidget *parent )
+ : QObject( NULL, NULL ), m_doCancel( false )
+ {
+ if ( file->count() < 2 )
+ return;
+
+ int len = file->count() * ( file->count() - 1 ) / 2;
+ unsigned int *distVector = new unsigned int[len];
+ memset( distVector, 0xff, sizeof( unsigned int )*len );
+ QMap<BibTeX::Element*, int> mapElementToIndex;
+
+ QApplication::setOverrideCursor( Qt::waitCursor );
+ KProgressDialog *progDlg = new KProgressDialog( parent, NULL, i18n( "Find Duplicates" ), i18n( "Searching for duplicates..." ), true );
+ connect( progDlg, SIGNAL( cancelClicked() ), this, SLOT( slotCancel() ) );
+ progDlg->progressBar()->setTotalSteps( len );
+
+ determineDistances( file, distVector, mapElementToIndex, progDlg );
+ progDlg->progressBar()->setValue( len );
+
+ if ( !m_doCancel )
+ buildClique( result, file, distVector, mapElementToIndex, sensitivity );
+
+ delete progDlg;
+ delete[] distVector;
+ QApplication::restoreOverrideCursor();
+ }
+
+ /**
+ * Determine the distance between elements either from two different BibTeX
+ * files (merging operation) or within the same file (find duplicates).
+ * Inter-element distances will be written into the distance vector.
+ * @param file BibTeX file
+ * @param distVector inter-element distance vector
+ * @param mapElementToIndex map from elements to indices (will be written)
+ * @param progDlg progress dialog to write status information to
+ */
+ void FindDuplicates::determineDistances( BibTeX::File *file, unsigned int *distVector, QMap<BibTeX::Element*, int> &mapElementToIndex, KProgressDialog *progDlg )
+ {
+ int progress = 0, i = 0;
+ for ( BibTeX::File::ElementList::ConstIterator it1 = file->constBegin(); !m_doCancel && it1 != file->constEnd(); ++it1, ++i )
+ {
+ BibTeX::Entry *entryA = dynamic_cast<BibTeX::Entry*>( *it1 );
+ if ( entryA != NULL )
+ {
+ mapElementToIndex.insert( entryA, i );
+
+ int j = i + 1;
+ for ( BibTeX::File::ElementList::ConstIterator it2 = ++BibTeX::File::ElementList::ConstIterator( it1 ); !m_doCancel && it2 != file->constEnd(); ++it2, ++j )
+ {
+ BibTeX::Entry *entryB = dynamic_cast<BibTeX::Entry*>( *it2 );
+ if ( entryB == NULL ) continue;
+
+ unsigned int d = entryDistance( entryA, entryB );
+ distVector[arrayOffset( i, j )] = d;
+
+ progDlg->progressBar()->setValue( ++progress );
+ qApp->processEvents();
+ }
+ }
+ else
+ {
+ BibTeX::Macro *macroA = dynamic_cast<BibTeX::Macro*>( *it1 );
+ if ( macroA != NULL )
+ {
+ mapElementToIndex.insert( macroA, i );
+
+ int j = i + 1;
+ for ( BibTeX::File::ElementList::ConstIterator it2 = ++BibTeX::File::ElementList::ConstIterator( it1 ); !m_doCancel && it2 != file->constEnd(); ++it2, ++j )
+ {
+ BibTeX::Macro *macroB = dynamic_cast<BibTeX::Macro*>( *it2 );
+ if ( macroB == NULL ) continue;
+
+ distVector[arrayOffset( i, j )] = macroDistance( macroA, macroB );
+
+ progDlg->progressBar()->setValue( ++progress );
+ qApp->processEvents();
+ }
+ }
+ else
+ {
+ BibTeX::Preamble *preambleA = dynamic_cast<BibTeX::Preamble*>( *it1 );
+ if ( preambleA != NULL )
+ {
+ mapElementToIndex.insert( preambleA, i );
+
+ int j = i + 1;
+ for ( BibTeX::File::ElementList::ConstIterator it2 = ++BibTeX::File::ElementList::ConstIterator( it1 ); !m_doCancel && it2 != file->constEnd(); ++it2, ++j )
+ {
+ BibTeX::Preamble *preambleB = dynamic_cast<BibTeX::Preamble*>( *it2 );
+ if ( preambleB == NULL ) continue;
+
+ distVector[arrayOffset( i, j )] = preambleDistance( preambleA, preambleB );
+
+ progDlg->progressBar()->setValue( ++progress );
+ qApp->processEvents();
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Build a list of clique of BibTeX elements with a distance below the
+ * sensitivity threshold. The list of cliques is added to the cliqueList
+ * parameter.
+ * @param cliqueList List of cliques found in this function
+ * @param file BibTeX file
+ * @param distVector inter-element distance vector
+ * @param mapElementToIndex map from elements to indices
+ * @param sensitivity sensitivity threshold value
+ */
+ void FindDuplicates::buildClique( DuplicateCliqueList &cliqueList, BibTeX::File *file, unsigned int *distVector, QMap<BibTeX::Element*, int> &mapElementToIndex, unsigned int sensitivity )
+ {
+ int usedLen = file->count();
+ bool* used = new bool[usedLen];
+ memset( used, false, sizeof( bool ) * usedLen );
+ QValueList<BibTeX::Element*> queue;
+ for ( BibTeX::File::ElementList::ConstIterator it1 = file->constBegin(); it1 != file->constEnd(); ++it1 )
+ {
+ /** current element must be either entry, preamble, or macro */
+ BibTeX::Element *elem1 = dynamic_cast<BibTeX::Entry*>( *it1 );
+ if ( elem1 == NULL )
+ elem1 = dynamic_cast<BibTeX::Macro*>( *it1 );
+ if ( elem1 == NULL )
+ elem1 = dynamic_cast<BibTeX::Preamble*>( *it1 );
+ /** skip element otherwise or if already used */
+ if ( elem1 == NULL || used[mapElementToIndex[elem1]] ) continue;
+
+ DuplicateClique clique;
+
+ queue.clear();
+ queue.append( elem1 );
+ used[mapElementToIndex[elem1]] = true;
+
+ while ( !queue.isEmpty() )
+ {
+ elem1 = *( queue.begin() );
+ queue.remove( queue.begin() );
+ int curIndex = mapElementToIndex[elem1];
+ clique.append( elem1 );
+
+ for ( BibTeX::File::ElementList::ConstIterator it2 = file->constBegin(); it2 != file->constEnd(); ++it2 )
+ {
+ /** current element must be either entry, preamble, or macro */
+ BibTeX::Element *elem2 = dynamic_cast<BibTeX::Entry*>( *it2 );
+ int otherIndex=mapElementToIndex[elem2];
+ if ( elem2 == NULL )
+ elem2 = dynamic_cast<BibTeX::Macro*>( *it2 );
+ if ( elem2 == NULL )
+ elem2 = dynamic_cast<BibTeX::Preamble*>( *it2 );
+ /** skip element otherwise or if already used */
+ if ( elem2 == NULL || used[( otherIndex = mapElementToIndex[elem2] )] )
+ continue;
+
+ unsigned int distance = distVector[arrayOffset( curIndex, otherIndex )];
+
+ if ( distance <= sensitivity )
+ {
+ queue.append( elem2 );
+ used[otherIndex ] = true;
+ }
+ }
+ }
+
+ if ( clique.size() > 1 )
+ cliqueList.append( clique );
+ }
+ delete[] used;
+ }
+
+ /**
+ * Distance between two BibTeX entries, scaled by maxDistance.
+ */
+ unsigned int FindDuplicates::entryDistance( BibTeX::Entry *entryA, BibTeX::Entry *entryB )
+ {
+ double titleValue = levenshteinDistance( extractTitle( entryA ), extractTitle( entryB ) );
+ double authorValue = levenshteinDistance( authorsLastName( entryA ), authorsLastName( entryB ) );
+ double yearValue = extractYear( entryA ) - extractYear( entryB );
+ yearValue = min( 1.0, yearValue * yearValue / 100.0 );
+ unsigned int distance = ( unsigned int )( maxDistance * ( titleValue * 0.6 + authorValue * 0.3 + yearValue * 0.1 ) );
+
+ return distance;
+ }
+
+ /**
+ * Distance between two BibTeX macros, scaled by maxDistance.
+ */
+ unsigned int FindDuplicates::macroDistance( BibTeX::Macro *macroA, BibTeX::Macro *macroB )
+ {
+ double keyValue = levenshteinDistance( extractMacroKey( macroA ), extractMacroKey( macroB ) );
+ double valueValue = levenshteinDistance( extractMacroValue( macroA ), extractMacroValue( macroB ) );
+ unsigned int distance = ( unsigned int )( maxDistance * ( keyValue * 0.7 + valueValue * 0.3 ) );
+
+ return distance;
+ }
+
+ unsigned int FindDuplicates::preambleDistance( BibTeX::Preamble *preambleA, BibTeX::Preamble *preambleB )
+ {
+ return ( unsigned int )( maxDistance * levenshteinDistance( preambleA->value()->text(), preambleB->value()->text() ) );
+ }
+
+ FindDuplicates::~FindDuplicates()
+ {
+// nothing
+ }
+
+ /**
+ * Determine the Levenshtein distance between two sentences,
+ * where each sentence is in a string (not split into single words).
+ * See also http://en.wikipedia.org/wiki/Levenshtein_distance
+ * @param s first sentence
+ * @param t second sentence
+ * @return distance between both sentences
+ */
+ double FindDuplicates::levenshteinDistance( const QString &s, const QString &t )
+ {
+ const QRegExp nonWordRegExp( "[^a-zA-Z']+" );
+ if ( s == QString::null || t == QString::null ) return 1.0;
+ return levenshteinDistance( QStringList::split( nonWordRegExp, s ), QStringList::split( nonWordRegExp, t ) );
+ }
+
+ /**
+ * Determine the Levenshtein distance between two words.
+ * See also http://en.wikipedia.org/wiki/Levenshtein_distance
+ * @param s first word
+ * @param t second word
+ * @return distance between both words
+ */
+ double FindDuplicates::levenshteinDistanceWord( const QString &s, const QString &t )
+ {
+ QString mys = s.lower(), myt = t.lower();
+ int m = s.length(), n = t.length();
+ if ( m < 1 && n < 1 ) return 0.0;
+ if ( m < 1 || n < 1 ) return 1.0;
+
+ int **d = new int*[m+1];
+ for ( int i = 0; i <= m; ++i ) {d[i] = new int[n+1]; d[i][0] = i;}
+ for ( int i = 0; i <= n; ++i ) d[0][i] = i;
+
+ for ( int i = 1; i <= m;++i )
+ for ( int j = 1; j <= n;++j )
+ {
+ d[i][j] = d[i-1][j] + 1;
+ int c = d[i][j-1] + 1;
+ if ( c < d[i][j] ) d[i][j] = c;
+ c = d[i-1][j-1] + ( mys[i-1] == myt[j-1] ? 0 : 1 );
+ if ( c < d[i][j] ) d[i][j] = c;
+ }
+
+ double result = d[m][n];
+ for ( int i = 0; i <= m; ++i ) delete[] d[i];
+ delete [] d;
+
+ result = result / ( double )max( m, n );
+ result *= result;
+ return result;
+ }
+
+ /**
+ * Determine the Levenshtein distance between two sentences (list of words).
+ * See also http://en.wikipedia.org/wiki/Levenshtein_distance
+ * @param s first sentence
+ * @param t second sentence
+ * @return distance between both sentences
+ */
+ double FindDuplicates::levenshteinDistance( const QStringList &s, const QStringList &t )
+ {
+ int m = s.size(), n = t.size();
+ if ( m < 1 && n < 1 ) return 0.0;
+ if ( m < 1 || n < 1 ) return 1.0;
+
+ double **d = new double*[m+1];
+ for ( int i = 0; i <= m; ++i ) {d[i] = new double[n+1]; d[i][0] = i;}
+ for ( int i = 0; i <= n; ++i ) d[0][i] = i;
+
+ for ( int i = 1; i <= m;++i )
+ for ( int j = 1; j <= n;++j )
+ {
+ d[i][j] = d[i-1][j] + 1;
+ double c = d[i][j-1] + 1;
+ if ( c < d[i][j] ) d[i][j] = c;
+ c = d[i-1][j-1] + levenshteinDistanceWord( s[i-1], t[j-1] );
+ if ( c < d[i][j] ) d[i][j] = c;
+ }
+
+ double result = d[m][n];
+ for ( int i = 0; i <= m; ++i ) delete[] d[i];
+ delete [] d;
+
+ result = result / ( double )max( m, n );
+
+ return result;
+ }
+
+ /**
+ * Linearize a two-dimensional triangle matrix
+ */
+ int FindDuplicates::arrayOffset( int a, int b )
+ {
+ if ( a == b )
+ return -1;
+ else if ( b < a )
+ {
+ int swap = a;
+ a = b;
+ b = swap;
+ }
+
+ return ( b * ( b - 1 ) / 2 + a );
+ }
+
+ /**
+ * Determine title for a given entry
+ */
+ QString FindDuplicates::extractTitle( BibTeX::Entry *entry )
+ {
+ /** retrieve field holding title information for entry */
+ BibTeX::EntryField *field = entry->getField( BibTeX::EntryField::ftTitle );
+ if ( field == NULL )
+ return QString::null; /** no title field available */
+
+ /** *fetch value item holding title */
+ BibTeX::ValueItem *valueItem = field->value()->items.isEmpty() ? NULL : field->value()->items.first();
+ if ( valueItem == NULL )
+ return QString::null; /** no value item found or is empty */
+
+ return valueItem->text(); // TODO: Perform some postprocessing?
+ }
+
+ /**
+ * Determine list of authors for a given entry
+ */
+ QStringList FindDuplicates::authorsLastName( BibTeX::Entry *entry )
+ {
+ QStringList result;
+
+ /** retrieve field holding authors information for entry */
+ BibTeX::EntryField *field = entry->getField( BibTeX::EntryField::ftAuthor );
+ if ( field == NULL )
+ return result; /** no author field available */
+
+ /** fetch container holding list of author names */
+ BibTeX::PersonContainer *personContainer = field != NULL ? dynamic_cast<BibTeX::PersonContainer*>( field->value()->items.isEmpty() ? NULL : field->value()->items.first() ) : NULL;
+ if ( personContainer == NULL || personContainer->persons.isEmpty() )
+ return result; /** container not found or is empty */
+
+ /** iterate through container and fetch each author's last name */
+ for ( QValueList<BibTeX::Person*>::ConstIterator it = personContainer->persons.begin(); it != personContainer->persons.end(); ++it )
+ result.append(( *it )->lastName() );
+
+ return result;
+ }
+
+ /**
+ * Determine year for a given entry
+ */
+ int FindDuplicates::extractYear( BibTeX::Entry *entry )
+ {
+ /** retrieve field holding year information for entry */
+ BibTeX::EntryField *field = entry->getField( BibTeX::EntryField::ftYear );
+ if ( field == NULL )
+ return -1; /** no year field available */
+
+ /** *fetch value item holding year */
+ BibTeX::ValueItem *valueItem = field != NULL ? ( field->value()->items.isEmpty() ? NULL : field->value()->items.first() ) : NULL;
+ if ( valueItem == NULL )
+ return -1; /** no value item found or is empty */
+
+ /** parse value item's text */
+ bool ok = FALSE;
+ int year = QString( valueItem->text() ).toInt( &ok );
+ if ( !ok ) year = -1;
+
+ return year;
+ }
+
+ /**
+ * Determine key from a given macro
+ */
+ QString FindDuplicates::extractMacroKey( BibTeX::Macro *macro )
+ {
+ return macro->key();
+ }
+
+ /**
+ * Determine key from a given macro
+ */
+ QString FindDuplicates::extractMacroValue( BibTeX::Macro *macro )
+ {
+ return macro->value()->text();
+ }
+
+ void FindDuplicates::slotCancel()
+ {
+ m_doCancel = true;
+ }
+}
+#include "findduplicates.moc"
diff --git a/src/findduplicates.h b/src/findduplicates.h
new file mode 100644
index 0000000..e1a2fce
--- /dev/null
+++ b/src/findduplicates.h
@@ -0,0 +1,85 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXFINDDUPLICATES_H
+#define KBIBTEXFINDDUPLICATES_H
+
+#include <qobject.h>
+
+class KProgressDialog;
+class QWidget;
+
+namespace KBibTeX
+{
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class FindDuplicates : public QObject
+ {
+ Q_OBJECT
+ public:
+ typedef QValueList<BibTeX::Element*> DuplicateClique;
+ typedef QValueList<DuplicateClique> DuplicateCliqueList;
+
+ /**
+ * Find duplicates in a given BibTeX file. The sensitivity parameter controls the distance between two elements where both elements are considered to be duplicates. The parent object is used as a progress dialog's parent.
+ * @param file
+ * @param sensitivity
+ * @param parent
+ * @return
+ */
+ FindDuplicates( DuplicateCliqueList &result, unsigned int sensitivity, BibTeX::File *file, QWidget *parent );
+
+ ~FindDuplicates();
+
+ /**
+ * Maximum sensitivity
+ */
+ static const unsigned int maxDistance;
+
+ protected:
+ void determineDistances( BibTeX::File *file, unsigned int *distVector, QMap<BibTeX::Element*, int> &mapElementToIndex, KProgressDialog *progDlg );
+ void buildClique( DuplicateCliqueList &result, BibTeX::File *file, unsigned int *distVector, QMap<BibTeX::Element*, int> &mapElementToIndex, unsigned int sensitivity );
+ unsigned int entryDistance( BibTeX::Entry *entryA, BibTeX::Entry *entryB );
+ unsigned int macroDistance( BibTeX::Macro *macroA, BibTeX::Macro *macroB );
+ unsigned int preambleDistance( BibTeX::Preamble *preambleA, BibTeX::Preamble *preambleB );
+
+ static QString extractTitle( BibTeX::Entry *entry );
+ static QStringList authorsLastName( BibTeX::Entry *entry );
+ static int extractYear( BibTeX::Entry *entry );
+ static QString extractMacroKey( BibTeX::Macro *macro );
+ static QString extractMacroValue( BibTeX::Macro *macro );
+
+ private:
+ bool m_doCancel;
+
+ double levenshteinDistance( const QStringList &s, const QStringList &t );
+ double levenshteinDistance( const QString &s, const QString &t );
+ double levenshteinDistanceWord( const QString &s, const QString &t );
+ int arrayOffset( int a, int b );
+ void sort( unsigned int *array, int len );
+
+ private slots:
+ void slotCancel();
+ };
+
+}
+
+#endif
diff --git a/src/hi128-app-kbibtex.png b/src/hi128-app-kbibtex.png
new file mode 100644
index 0000000..f8a9b2a
--- /dev/null
+++ b/src/hi128-app-kbibtex.png
Binary files differ
diff --git a/src/hi16-app-kbibtex.png b/src/hi16-app-kbibtex.png
new file mode 100644
index 0000000..7dfd6f5
--- /dev/null
+++ b/src/hi16-app-kbibtex.png
Binary files differ
diff --git a/src/hi22-app-kbibtex.png b/src/hi22-app-kbibtex.png
new file mode 100644
index 0000000..1bc9bd3
--- /dev/null
+++ b/src/hi22-app-kbibtex.png
Binary files differ
diff --git a/src/hi32-app-kbibtex.png b/src/hi32-app-kbibtex.png
new file mode 100644
index 0000000..9641f3b
--- /dev/null
+++ b/src/hi32-app-kbibtex.png
Binary files differ
diff --git a/src/hi48-app-kbibtex.png b/src/hi48-app-kbibtex.png
new file mode 100644
index 0000000..b150dd6
--- /dev/null
+++ b/src/hi48-app-kbibtex.png
Binary files differ
diff --git a/src/hi64-app-kbibtex.png b/src/hi64-app-kbibtex.png
new file mode 100644
index 0000000..d322215
--- /dev/null
+++ b/src/hi64-app-kbibtex.png
Binary files differ
diff --git a/src/idsuggestions.cpp b/src/idsuggestions.cpp
new file mode 100644
index 0000000..5704c1e
--- /dev/null
+++ b/src/idsuggestions.cpp
@@ -0,0 +1,363 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qregexp.h>
+
+#include <klocale.h>
+
+#include <encoderlatex.h>
+#include <file.h>
+#include <settings.h>
+#include <entry.h>
+#include "idsuggestions.h"
+
+namespace KBibTeX
+{
+ const QRegExp IdSuggestions::unwantedChars = QRegExp( "[^-_:/=+a-zA-Z0-9]+" );
+
+ IdSuggestions::IdSuggestions()
+ {
+// nothing
+ }
+
+
+ IdSuggestions::~IdSuggestions()
+ {
+// nothing
+ }
+
+ /**
+ * Determine list of authors or editors for a given entry
+ */
+ QStringList IdSuggestions::authorsLastName( BibTeX::Entry *entry )
+ {
+ QStringList result;
+
+ /** retrieve field holding authors information for entry */
+ BibTeX::EntryField *field = entry->getField( BibTeX::EntryField::ftAuthor );
+ if ( field == NULL )
+ {
+ /** no author field available, try editor
+ patch by Jurgen Spitzmuller <juergen.sp@t-online.de> */
+ field = entry->getField( BibTeX::EntryField::ftEditor );
+ if ( field == NULL )
+ {
+ return result; /** neither author nor editor available */
+ }
+ }
+
+ /** fetch container holding list of author names */
+ BibTeX::PersonContainer *personContainer = field != NULL ? dynamic_cast<BibTeX::PersonContainer*>( field->value()->items.isEmpty() ? NULL : field->value()->items.first() ) : NULL;
+ if ( personContainer == NULL || personContainer->persons.isEmpty() )
+ return result; /** container not found or is empty */
+
+ /** iterate through container and fetch each author's last name */
+ for ( QValueList<BibTeX::Person*>::ConstIterator it = personContainer->persons.begin(); it != personContainer->persons.end(); ++it )
+ {
+ result.append( normalizeText(( *it )->lastName() ) );
+ }
+
+ return result;
+ }
+
+ /**
+ * Normalize a given text by removing spaces or other unwanted characters,
+ * replace some accented and special characters by plain ASCII transliterations
+ */
+ QString IdSuggestions::normalizeText( const QString& text )
+ {
+ QString result = text;
+
+ for ( int i = text.length() - 1; i >= 0; --i )
+ result[i] = QChar( BibTeX::EncoderLaTeX::unicodeToASCII( result[i].unicode() ) );
+
+ return result.replace( unwantedChars, "" );
+ }
+
+ QString IdSuggestions::resolveConflict( BibTeX::File *file, const QString &id, BibTeX::Element *element )
+ {
+ QString result = id;
+ BibTeX::Element *hit = file->containsKey( id ) ;
+ if ( hit != NULL && hit != element )
+ {
+ int i = 0;
+ do
+ {
+ result = QString( "%1-%2" ).arg( id ).arg( ++i );
+ hit = file->containsKey( result );
+ }
+ while ( hit != NULL && hit != element );
+ }
+ return result;
+ }
+
+ /**
+ * Determine year for a given entry
+ */
+ int IdSuggestions::extractYear( BibTeX::Entry *entry )
+ {
+ /** retrieve field holding year information for entry */
+ BibTeX::EntryField *field = entry->getField( BibTeX::EntryField::ftYear );
+ if ( field == NULL )
+ return -1; /** no year field available */
+
+ /** fetch value item holding year */
+ BibTeX::ValueItem *valueItem = field != NULL ? ( field->value()->items.isEmpty() ? NULL : field->value()->items.first() ) : NULL;
+ if ( valueItem == NULL )
+ return -1; /** no value item found or is empty */
+
+ /** parse value item's text */
+ bool ok = FALSE;
+ QRegExp yearRegExp( "\\b(\\d{2})?\\d{2}\\b" );
+ yearRegExp.search( valueItem->text() );
+ int year = QString( yearRegExp.cap( 0 ) ).toInt( &ok );
+ if ( !ok ) year = -1;
+
+ return year;
+ }
+
+ /**
+ * Determine title for a given entry
+ */
+ QString IdSuggestions::extractTitle( BibTeX::Entry *entry )
+ {
+ /** retrieve field holding title information for entry */
+ BibTeX::EntryField *field = entry->getField( BibTeX::EntryField::ftTitle );
+ if ( field == NULL )
+ return QString::null; /** no title field available */
+
+ /** *fetch value item holding title */
+ BibTeX::ValueItem *valueItem = field->value()->items.isEmpty() ? NULL : field->value()->items.first();
+ if ( valueItem == NULL )
+ return QString::null; /** no value item found or is empty */
+
+ return valueItem->text();
+ }
+
+ QStringList IdSuggestions::createSuggestions( BibTeX::File *file, BibTeX::Entry *entry )
+ {
+ Settings * settings = Settings::self();
+ const QStringList& formatStrList = settings->idSuggestions_formatStrList;
+ QStringList result;
+ QStringList allKeys = file != NULL ? file->allKeys() : QStringList();
+ entry = new BibTeX::Entry( entry );
+ if ( file != NULL )
+ file->completeReferencedFields( entry );
+
+ for ( QStringList::ConstIterator it = formatStrList.begin(); it != formatStrList.end(); ++it )
+ {
+ QString id = formatId( entry, *it );
+ if ( id.isEmpty() || result.contains( id ) )
+ continue;
+ if ( !result.contains( id ) )
+ result.append( id );
+ }
+
+ delete entry;
+
+ return result;
+ }
+
+ QString IdSuggestions::createDefaultSuggestion( BibTeX::File *file, BibTeX::Entry *entry )
+ {
+ Settings * settings = Settings::self();
+ if ( settings->idSuggestions_default < 0 || settings->idSuggestions_default >= ( int )settings->idSuggestions_formatStrList.size() )
+ return QString::null;
+
+ entry = new BibTeX::Entry( entry );
+ if ( file != NULL )
+ file->completeReferencedFields( entry );
+
+ QString result = formatId( entry, settings->idSuggestions_formatStrList[settings->idSuggestions_default] );
+
+ delete entry;
+ return result;
+ }
+
+ QString IdSuggestions::formatId( BibTeX::Entry *entry, const QString& formatStr )
+ {
+ QString id;
+ QStringList tokenList = QStringList::split( '|', formatStr );
+ for ( QStringList::ConstIterator tit = tokenList.begin(); tit != tokenList.end(); ++tit )
+ id.append( translateToken( entry, *tit ) );
+
+ return id;
+ }
+
+ QString IdSuggestions::translateToken( BibTeX::Entry *entry, const QString& token )
+ {
+ switch ( token[0] )
+ {
+ case 'a': return translateAuthorsToken( entry, token.mid( 1 ), aOnlyFirst );
+ case 'A': return translateAuthorsToken( entry, token.mid( 1 ), aAll );
+ case 'z': return translateAuthorsToken( entry, token.mid( 1 ), aNotFirst );
+ case 'y':
+ {
+ int year = extractYear( entry );
+ if ( year > -1 )
+ return QString::number( year % 100 + 100 ).mid( 1 );
+ else
+ return QString::null;
+ }
+ case 'Y':
+ {
+ int year = extractYear( entry );
+ if ( year > -1 )
+ return QString::number( year % 10000 + 10000 ).mid( 1 );
+ else
+ return QString::null;
+ }
+ case 't': return translateTitleToken( entry, token.mid( 1 ), FALSE );
+ case 'T': return translateTitleToken( entry, token.mid( 1 ), TRUE );
+ case '"': return token.mid( 1 );
+ default: return QString::null;
+ }
+ }
+
+ QString IdSuggestions::translateAuthorsToken( BibTeX::Entry *entry, const QString& token, Authors selectAuthors )
+ {
+ struct IdSuggestionTokenInfo ati = evalToken( token );
+ QString result;
+ bool first = true, firstInserted = true;
+ QStringList authors = authorsLastName( entry );
+ for ( QStringList::ConstIterator it = authors.begin(); it != authors.end(); ++it )
+ {
+ QString author = normalizeText( *it ).left( ati.len );
+ if ( selectAuthors == aAll || ( selectAuthors == aOnlyFirst && first ) || ( selectAuthors == aNotFirst && !first ) )
+ {
+ if ( !firstInserted )
+ result.append( ati.inBetween );
+ result.append( author );
+ firstInserted = false;
+ }
+ first = false;
+ }
+
+ if ( ati.toUpper )
+ result = result.upper();
+ else if ( ati.toLower )
+ result = result.lower();
+
+ return result;
+ }
+
+ struct IdSuggestionTokenInfo IdSuggestions::evalToken( const QString& token )
+ {
+ unsigned int pos = 0;
+ struct IdSuggestionTokenInfo result;
+ result.len = 0x00ffffff;
+ result.toLower = FALSE;
+ result.toUpper = FALSE;
+ result.inBetween = QString::null;
+
+ if ( token.length() > pos )
+ {
+ int dv = token[pos].digitValue();
+ if ( dv > -1 )
+ {
+ result.len = dv;
+ ++pos;
+ }
+ }
+
+ if ( token.length() > pos )
+ {
+ result.toLower = token[pos] == 'l';
+ result.toUpper = token[pos] == 'u';
+ if ( result.toUpper || result.toLower )
+ ++pos;
+ }
+
+ if ( token.length() > pos + 1 && token[pos] == '"' )
+ result.inBetween = token.mid( pos + 1 );
+
+ return result;
+ }
+
+ QString IdSuggestions::translateTitleToken( BibTeX::Entry *entry, const QString& token, bool removeSmallWords )
+ {
+ struct IdSuggestionTokenInfo tti = evalToken( token );
+ Settings * settings = Settings::self();
+ const QStringList smallWords = settings->idSuggestions_smallWords;
+
+ QString result;
+ bool first = TRUE;
+ QStringList titleWords = QStringList::split( QRegExp( "\\s+" ), extractTitle( entry ) );
+ for ( QStringList::ConstIterator it = titleWords.begin(); it != titleWords.end(); ++it )
+ {
+ if ( first )
+ first = FALSE;
+ else
+ result.append( tti.inBetween );
+
+ QString lowerText = ( *it ).lower();
+ if ( !removeSmallWords || !smallWords.contains( lowerText ) )
+ result.append( normalizeText( *it ).left( tti.len ) );
+ }
+
+ if ( tti.toUpper )
+ result = result.upper();
+ else if ( tti.toLower )
+ result = result.lower();
+
+ return result;
+ }
+
+ /** convert a formatting string into a human readable version (even translated) */
+ QString IdSuggestions::formatStrToHuman( const QString& formatStr )
+ {
+ bool first = TRUE;
+ QString text;
+ QStringList elements = QStringList::split( '|', formatStr );
+ for ( QStringList::iterator it = elements.begin();it != elements.end();++it )
+ {
+ if ( first ) first = FALSE; else text.append( "\n" );
+ if (( *it )[0] == 'a' || ( *it )[0] == 'A' || ( *it )[0] == 'z' )
+ {
+ struct IdSuggestionTokenInfo info = evalToken(( *it ).mid( 1 ) );
+ if (( *it )[0] == 'a' ) text.append( i18n( "First author only" ) );
+ else if (( *it )[0] == 'z' ) text.append( i18n( "All but first author" ) );
+ else text.append( i18n( "All authors" ) );
+
+ int n = info.len;
+ if ( info.len < 0x00ffffff ) text.append( i18n( ", but only first letter of each last name", ", but only first %n letters of each last name", n ) );
+ if ( info.toUpper ) text.append( i18n( ", in upper case" ) );
+ else if ( info.toLower ) text.append( i18n( ", in lower case" ) );
+ if ( info.inBetween != QString::null ) text.append( QString( i18n( ", with '%1' in between" ) ).arg( info.inBetween ) );
+ }
+ else if (( *it )[0] == 'y' ) text.append( i18n( "Year (2 digits)" ) );
+ else if (( *it )[0] == 'Y' ) text.append( i18n( "Year (4 digits)" ) );
+ else if (( *it )[0] == 't' || ( *it )[0] == 'T' )
+ {
+ struct IdSuggestionTokenInfo info = evalToken(( *it ).mid( 1 ) );
+ text.append( i18n( "Title" ) );
+ int n = info.len;
+ if ( info.len < 0x00ffffff ) text.append( i18n( ", but only first letter of each word", ", but only first %n letters of each word", n ) );
+ if ( info.toUpper ) text.append( i18n( ", in upper case" ) );
+ else if ( info.toLower ) text.append( i18n( ", in lower case" ) );
+ if ( info.inBetween != QString::null ) text.append( QString( i18n( ", with '%1' in between" ) ).arg( info.inBetween ) );
+ if (( *it )[0] == 'T' ) text.append( i18n( ", small words removed" ) );
+ }
+ else if (( *it )[0] == '"' ) text.append( QString( i18n( "Text: '%1'" ) ).arg(( *it ).mid( 1 ) ) );
+ else text.append( "?" );
+ }
+
+ return text;
+ }
+}
diff --git a/src/idsuggestions.h b/src/idsuggestions.h
new file mode 100644
index 0000000..a1bd022
--- /dev/null
+++ b/src/idsuggestions.h
@@ -0,0 +1,75 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXIDSUGGESTIONS_H
+#define KBIBTEXIDSUGGESTIONS_H
+
+#include <qstringlist.h>
+
+#include <file.h>
+#include <entry.h>
+
+namespace KBibTeX
+{
+ struct IdSuggestionTokenInfo
+ {
+ unsigned int len;
+ bool toLower;
+ bool toUpper;
+ QString inBetween;
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class IdSuggestions
+ {
+ public:
+ static QStringList createSuggestions( BibTeX::File *file, BibTeX::Entry *entry );
+ static QString createDefaultSuggestion( BibTeX::File *file, BibTeX::Entry *entry );
+ static QString formatStrToHuman( const QString& formatStr );
+ static struct IdSuggestionTokenInfo evalToken( const QString& token );
+ static QString formatId( BibTeX::Entry *entry, const QString& formatStr );
+ static QString resolveConflict( BibTeX::File *file, const QString &id, BibTeX::Element *element = NULL );
+
+ static const QStringList smallWords;
+
+ private:
+ enum Authors {aAll, aOnlyFirst, aNotFirst};
+
+ static const QRegExp unwantedChars;
+ static const QChar asciiizeSource[];
+ static const QString asciiizeTarget[];
+
+ IdSuggestions();
+ ~IdSuggestions();
+
+ static QStringList authorsLastName( BibTeX::Entry *entry );
+ static QString normalizeText( const QString& text );
+ static QString asciiizeText( const QString& text );
+ static int extractYear( BibTeX::Entry *entry );
+ static QString extractTitle( BibTeX::Entry *entry );
+ static QString translateToken( BibTeX::Entry *entry, const QString& token );
+ static QString translateAuthorsToken( BibTeX::Entry *entry, const QString& token, Authors selectAuthors );
+ static QString translateTitleToken( BibTeX::Entry *entry, const QString& token, bool removeSmallWords );
+ };
+
+}
+
+#endif
diff --git a/src/idsuggestionswidget.cpp b/src/idsuggestionswidget.cpp
new file mode 100644
index 0000000..d2d371f
--- /dev/null
+++ b/src/idsuggestionswidget.cpp
@@ -0,0 +1,567 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qlayout.h>
+#include <qspinbox.h>
+#include <qlabel.h>
+#include <qcheckbox.h>
+#include <qobjectlist.h>
+#include <qscrollview.h>
+
+#include <kglobalsettings.h>
+#include <klineedit.h>
+#include <kpopupmenu.h>
+#include <kcombobox.h>
+#include <kpushbutton.h>
+#include <kdialogbase.h>
+#include <kiconloader.h>
+#include <klocale.h>
+
+#include <idsuggestions.h>
+#include <fileimporter.h>
+#include <fileimporterbibtex.h>
+#include "idsuggestionswidget.h"
+
+#define min(a,b) ((a)>(b)?(b):(a))
+#define max(a,b) ((a)<(b)?(b):(a))
+
+namespace KBibTeX
+{
+ QString IdSuggestionsWidget::exampleBibTeXEntry = "@Article{ dijkstra1983terminationdetect,\nauthor = {Edsger W. Dijkstra and W. H. J. Feijen and A. J. M. {van Gasteren}},\ntitle = {{Derivation of a Termination Detection Algorithm for Distributed Computations}},\njournal = {Information Processing Letters},\nvolume = 16,\nnumber = 5,\npages = {217--219},\nmonth = jun,\nyear = 1983\n}";
+
+ IdSuggestionComponent::IdSuggestionComponent( const QString& title, QWidget *parent ): QFrame( parent ), m_toBeDeleted( false ), m_title( title ), m_parent( parent )
+ {
+ setFrameShape( QFrame::Panel );
+ setFrameShadow( QFrame::Sunken );
+ setLineWidth( 1 );
+ }
+
+ QWidget *IdSuggestionComponent::moveWidgets( QWidget *parent )
+ {
+ QWidget *container = new QWidget( parent );
+ QVBoxLayout *layout = new QVBoxLayout( container, 0, KDialog::spacingHint() );
+ m_pushButtonUp = new KPushButton( QIconSet( SmallIcon( "up" ) ), i18n( "Up" ), container );
+ m_pushButtonDown = new KPushButton( QIconSet( SmallIcon( "down" ) ), i18n( "Down" ), container );
+ m_pushButtonDel = new KPushButton( QIconSet( SmallIcon( "remove" ) ), i18n( "Delete" ), container );
+ layout->addWidget( m_pushButtonUp );
+ layout->addWidget( m_pushButtonDown );
+ layout->addWidget( m_pushButtonDel );
+ layout->addStretch( 10 );
+ connect( m_pushButtonUp, SIGNAL( clicked() ), this, SLOT( slotUp() ) );
+ connect( m_pushButtonDown, SIGNAL( clicked() ), this, SLOT( slotDown() ) );
+ connect( m_pushButtonDel, SIGNAL( clicked() ), this, SLOT( slotDelete() ) );
+ return container;
+ }
+
+ void IdSuggestionComponent::setEnableUpDown( bool enableUp, bool enableDown )
+ {
+ m_pushButtonUp->setEnabled( enableUp );
+ m_pushButtonDown->setEnabled( enableDown );
+ }
+
+ void IdSuggestionComponent::slotUp()
+ {
+ QVBoxLayout *layout = dynamic_cast<QVBoxLayout*>( m_parent->layout() );
+ if ( layout == NULL ) return;
+ int oldPos = layout->findWidget( this );
+ if ( oldPos > 0 )
+ {
+ layout->remove( this );
+ layout->insertWidget( oldPos - 1, this );
+ emit moved();
+ }
+ }
+
+ void IdSuggestionComponent::slotDown()
+ {
+ QVBoxLayout *layout = dynamic_cast<QVBoxLayout*>( m_parent->layout() );
+ if ( layout == NULL ) return;
+ int oldPos = layout->findWidget( this );
+ int componentCount = dynamic_cast<IdSuggestionsWidget*>( m_parent->parent()->parent()->parent() )->numComponents();
+ if ( oldPos < componentCount - 1 )
+ {
+ layout->remove( this );
+ layout->insertWidget( oldPos + 1, this );
+ emit moved();
+ }
+ }
+
+ void IdSuggestionComponent::slotDelete()
+ {
+ m_toBeDeleted = true;
+ emit deleted();
+ delete this;
+ }
+
+ IdSuggestionComponentAuthor::IdSuggestionComponentAuthor( const QString &text, QWidget *parent ): IdSuggestionComponent( i18n( "Author" ), parent )
+ {
+ QGridLayout *layout = new QGridLayout( this, 6, 4, KDialog::marginHint(), KDialog::spacingHint() );
+
+ QLabel *label = new QLabel( m_title, this );
+ QFont labelFont( label->font() );
+ labelFont.setBold( TRUE );
+ label->setFont( labelFont );
+ label->setBackgroundColor( KGlobalSettings::highlightColor() );
+ label->setPaletteForegroundColor( KGlobalSettings::highlightedTextColor() );
+ label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
+ layout->addMultiCellWidget( label, 0, 0, 0, 2 );
+
+ m_comboBoxWhichAuthors = new KComboBox( false, this );
+ layout->addMultiCellWidget( m_comboBoxWhichAuthors, 1, 1, 0, 1 );
+ m_comboBoxWhichAuthors->insertItem( i18n( "All authors" ) );
+ m_comboBoxWhichAuthors->insertItem( i18n( "First author only" ) );
+ m_comboBoxWhichAuthors->insertItem( i18n( "All but first author" ) );
+ switch ( text[0] )
+ {
+ case 'a': m_comboBoxWhichAuthors->setCurrentItem( 1 ); break;
+ case 'z': m_comboBoxWhichAuthors->setCurrentItem( 2 ); break;
+ default: m_comboBoxWhichAuthors->setCurrentItem( 0 );
+ }
+ connect( m_comboBoxWhichAuthors, SIGNAL( activated( const QString& ) ), SIGNAL( modified() ) );
+
+ struct IdSuggestionTokenInfo info = IdSuggestions::evalToken( text.mid( 1 ) );
+
+ label = new QLabel( i18n( "Casing:" ), this );
+ layout->addWidget( label, 2, 0 );
+ m_comboBoxCasing = new KComboBox( FALSE, this );
+ label->setBuddy( m_comboBoxCasing );
+ layout->addWidget( m_comboBoxCasing, 2, 1 );
+ m_comboBoxCasing->insertItem( i18n( "No change" ) );
+ m_comboBoxCasing->insertItem( i18n( "Lower case" ) );
+ m_comboBoxCasing->insertItem( i18n( "Upper case" ) );
+ if ( info.toLower )
+ m_comboBoxCasing->setCurrentItem( 1 );
+ else if ( info.toUpper )
+ m_comboBoxCasing->setCurrentItem( 2 );
+ else
+ m_comboBoxCasing->setCurrentItem( 0 );
+ connect( m_comboBoxCasing, SIGNAL( activated( const QString& ) ), SIGNAL( modified() ) );
+
+ label = new QLabel( i18n( "Only first letters:" ), this );
+ layout->addWidget( label, 3, 0 );
+ m_spinBoxLen = new QSpinBox( this );
+ label->setBuddy( m_spinBoxLen );
+ layout->addWidget( m_spinBoxLen, 3, 1 );
+ m_spinBoxLen->setMinValue( 0 );
+ m_spinBoxLen->setMaxValue( 9 );
+ m_spinBoxLen->setSpecialValueText( i18n( "Complete name" ) );
+ m_spinBoxLen->setValue( info.len > 9 ? 0 : info.len );
+ m_spinBoxLen->setMinimumWidth( m_spinBoxLen->fontMetrics().width( i18n( "Complete name" ) ) + 32 );
+ connect( m_spinBoxLen, SIGNAL( valueChanged( int ) ), SIGNAL( modified() ) );
+
+ label = new QLabel( i18n( "Text between authors:" ), this );
+ layout->addWidget( label, 4, 0 );
+ m_lineEditInBetween = new KLineEdit( this );
+ label->setBuddy( m_lineEditInBetween );
+ layout->addWidget( m_lineEditInBetween, 4, 1 );
+ m_lineEditInBetween->setText( info.inBetween );
+ connect( m_lineEditInBetween, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) );
+
+ layout->setRowStretch( 5, 1 );
+ layout->setColStretch( 1, 1 );
+ layout->setColSpacing( 2, KDialog::spacingHint() * 3 );
+ layout->addMultiCellWidget( moveWidgets( this ), 0, 5, 3, 3 );
+ }
+
+ QString IdSuggestionComponentAuthor::text() const
+ {
+ if ( m_toBeDeleted ) return QString::null;
+
+ QString result;
+ switch ( m_comboBoxWhichAuthors->currentItem() )
+ {
+ case 1: result = "a"; break;
+ case 2: result = "z"; break;
+ default: result = "A";
+ }
+ if ( m_spinBoxLen->value() > 0 && m_spinBoxLen->value() <= 9 ) result.append( QString::number( m_spinBoxLen->value() ) );
+ if ( m_comboBoxCasing->currentItem() == 1 ) result.append( "l" );
+ else if ( m_comboBoxCasing->currentItem() == 2 ) result.append( "u" );
+ if ( !m_lineEditInBetween->text().isEmpty() ) result.append( '"' ).append( m_lineEditInBetween->text() );
+
+ return result;
+ }
+
+ IdSuggestionComponentTitle::IdSuggestionComponentTitle( const QString &text, QWidget *parent ): IdSuggestionComponent( i18n( "Title" ), parent )
+ {
+ QGridLayout *layout = new QGridLayout( this, 6, 4, KDialog::marginHint(), KDialog::spacingHint() );
+
+ QLabel *label = new QLabel( m_title, this );
+ QFont labelFont( label->font() );
+ labelFont.setBold( TRUE );
+ label->setFont( labelFont );
+ label->setBackgroundColor( KGlobalSettings::highlightColor() );
+ label->setPaletteForegroundColor( KGlobalSettings::highlightedTextColor() );
+ label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
+ layout->addMultiCellWidget( label, 0, 0, 0, 2 );
+
+ m_checkBoxRemoveSmallWords = new QCheckBox( i18n( "Remove small words" ), this );
+ layout->addMultiCellWidget( m_checkBoxRemoveSmallWords, 1, 1, 0, 1 );
+ m_checkBoxRemoveSmallWords->setChecked( text[0] == 'T' );
+ connect( m_checkBoxRemoveSmallWords, SIGNAL( toggled( bool ) ), SIGNAL( modified() ) );
+
+ struct IdSuggestionTokenInfo info = IdSuggestions::evalToken( text.mid( 1 ) );
+
+ label = new QLabel( i18n( "Casing:" ), this );
+ layout->addWidget( label, 2, 0 );
+ m_comboBoxCasing = new KComboBox( FALSE, this );
+ label->setBuddy( m_comboBoxCasing );
+ layout->addWidget( m_comboBoxCasing, 2, 1 );
+ m_comboBoxCasing->insertItem( i18n( "No change" ) );
+ m_comboBoxCasing->insertItem( i18n( "Lower case" ) );
+ m_comboBoxCasing->insertItem( i18n( "Upper case" ) );
+ if ( info.toLower )
+ m_comboBoxCasing->setCurrentItem( 1 );
+ else if ( info.toUpper )
+ m_comboBoxCasing->setCurrentItem( 2 );
+ else
+ m_comboBoxCasing->setCurrentItem( 0 );
+ connect( m_comboBoxCasing, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) );
+
+ label = new QLabel( i18n( "Only first letters:" ), this );
+ layout->addWidget( label, 3, 0 );
+ m_spinBoxLen = new QSpinBox( this );
+ label->setBuddy( m_spinBoxLen );
+ layout->addWidget( m_spinBoxLen, 3, 1 );
+ m_spinBoxLen->setMinValue( 0 );
+ m_spinBoxLen->setMaxValue( 9 );
+ m_spinBoxLen->setSpecialValueText( i18n( "Complete title" ) );
+ m_spinBoxLen->setValue( info.len > 9 ? 0 : info.len );
+ m_spinBoxLen->setMinimumWidth( m_spinBoxLen->fontMetrics().width( i18n( "Complete title" ) ) + 32 );
+ connect( m_spinBoxLen, SIGNAL( valueChanged( int ) ), SIGNAL( modified() ) );
+
+ label = new QLabel( i18n( "Text between words:" ), this );
+ layout->addWidget( label, 4, 0 );
+ m_lineEditInBetween = new KLineEdit( this );
+ label->setBuddy( m_lineEditInBetween );
+ layout->addWidget( m_lineEditInBetween, 4, 1 );
+ m_lineEditInBetween->setText( info.inBetween );
+ connect( m_lineEditInBetween, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) );
+
+ layout->setRowStretch( 5, 1 );
+ layout->setColStretch( 1, 1 );
+ layout->setColSpacing( 2, KDialog::spacingHint() *2 );
+ layout->addMultiCellWidget( moveWidgets( this ), 0, 5, 3, 3 );
+ }
+
+ QString IdSuggestionComponentTitle::text() const
+ {
+ if ( m_toBeDeleted ) return QString::null;
+
+ QString result = m_checkBoxRemoveSmallWords->isChecked() ? "T" : "t";
+ if ( m_spinBoxLen->value() > 0 && m_spinBoxLen->value() <= 9 ) result.append( QString::number( m_spinBoxLen->value() ) );
+ if ( m_comboBoxCasing->currentItem() == 1 ) result.append( "l" );
+ else if ( m_comboBoxCasing->currentItem() == 2 ) result.append( "u" );
+ if ( !m_lineEditInBetween->text().isEmpty() ) result.append( '"' ).append( m_lineEditInBetween->text() );
+
+ return result;
+ }
+
+ IdSuggestionComponentYear::IdSuggestionComponentYear( const QString &text, QWidget *parent ): IdSuggestionComponent( i18n( "Year" ), parent )
+ {
+ QGridLayout *layout = new QGridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() );
+
+ QLabel *label = new QLabel( m_title, this );
+ QFont labelFont( label->font() );
+ labelFont.setBold( TRUE );
+ label->setFont( labelFont );
+ label->setBackgroundColor( KGlobalSettings::highlightColor() );
+ label->setPaletteForegroundColor( KGlobalSettings::highlightedTextColor() );
+ label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
+ layout->addMultiCellWidget( label, 0, 0, 0, 2 );
+
+ label = new QLabel( i18n( "Year:" ), this );
+ layout->addWidget( label, 1, 0 );
+ m_comboBoxDigits = new KComboBox( this );
+ label->setBuddy( m_comboBoxDigits );
+ layout->addWidget( m_comboBoxDigits, 1, 1 );
+ m_comboBoxDigits->insertItem( i18n( "2 digits" ) );
+ m_comboBoxDigits->insertItem( i18n( "4 digits" ) );
+ m_comboBoxDigits->setCurrentItem( text[0] == 'y' ? 0 : 1 );
+ connect( m_comboBoxDigits, SIGNAL( activated( int ) ), SIGNAL( modified() ) );
+
+ layout->setColStretch( 1, 1 );
+ layout->setRowStretch( 2, 1 );
+ layout->setColSpacing( 2, KDialog::spacingHint() *2 );
+ layout->addMultiCellWidget( moveWidgets( this ), 0, 2, 3, 3 );
+ }
+
+ QString IdSuggestionComponentYear::text() const
+ {
+ if ( m_toBeDeleted ) return QString::null;
+ return m_comboBoxDigits->currentItem() == 0 ? "y" : "Y";
+ }
+
+ IdSuggestionComponentText::IdSuggestionComponentText( const QString &text, QWidget *parent ): IdSuggestionComponent( i18n( "Text" ), parent )
+ {
+ QGridLayout *layout = new QGridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() );
+
+ QLabel *label = new QLabel( m_title, this );
+ QFont labelFont( label->font() );
+ labelFont.setBold( TRUE );
+ label->setFont( labelFont );
+ label->setBackgroundColor( KGlobalSettings::highlightColor() );
+ label->setPaletteForegroundColor( KGlobalSettings::highlightedTextColor() );
+ label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
+ layout->addMultiCellWidget( label, 0, 0, 0, 2 );
+
+ label = new QLabel( i18n( "Text in between:" ), this );
+ layout->addWidget( label, 1, 0 );
+ m_lineEditInBetween = new KLineEdit( this );
+ label->setBuddy( m_lineEditInBetween );
+ layout->addWidget( m_lineEditInBetween, 1, 1 );
+ m_lineEditInBetween->setText( text.mid( 1 ) );
+ connect( m_lineEditInBetween, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) );
+
+ layout->setColStretch( 1, 1 );
+ layout->setRowStretch( 2, 1 );
+ layout->setColSpacing( 2, KDialog::spacingHint() * 2 );
+ layout->addMultiCellWidget( moveWidgets( this ), 0, 2, 3, 3 );
+ }
+
+ QString IdSuggestionComponentText::text() const
+ {
+ if ( m_toBeDeleted ) return QString::null;
+ return m_lineEditInBetween->text().isEmpty() ? QString::null : QString( "\"" ).append( m_lineEditInBetween->text() );
+ }
+
+ IdSuggestionsScrollView::IdSuggestionsScrollView( QWidget *parent, const char*name ): QScrollView( parent, name ), m_widget( NULL )
+ {
+ setMinimumHeight( 256 );
+ setHScrollBarMode( QScrollView::AlwaysOff );
+ setVScrollBarMode( QScrollView::AlwaysOn );
+ setLineWidth( 0 );
+ }
+
+ IdSuggestionsScrollView::~IdSuggestionsScrollView()
+ {
+ // nothing
+ }
+
+ void IdSuggestionsScrollView::viewportResizeEvent( QResizeEvent * )
+ {
+ if ( m_widget != NULL )
+ m_widget->setFixedWidth( viewport()->width() );
+ }
+
+ IdSuggestionsWidget::IdSuggestionsWidget( const QString &formatStr, KDialogBase *parent, const char *name )
+ : QWidget( parent, name ), m_originalFormatStr( formatStr ), m_parent( parent )
+ {
+ BibTeX::FileImporter *importer = new BibTeX::FileImporterBibTeX( false );
+ BibTeX::File *file = importer->load( exampleBibTeXEntry );
+ m_example = new BibTeX::Entry( dynamic_cast<BibTeX::Entry*>( *( file->begin() ) ) );
+ delete file;
+ delete importer;
+
+ setupGUI();
+ reset( formatStr );
+ }
+
+ IdSuggestionsWidget::~IdSuggestionsWidget()
+ {
+ // nothing
+ }
+
+ int IdSuggestionsWidget::numComponents()
+ {
+ return m_componentCount;
+ }
+
+ QDialog::DialogCode IdSuggestionsWidget::execute( QString &formatStr, QWidget *parent, const char *name )
+ {
+ KDialogBase * dlg = new KDialogBase( parent, name, true, i18n( "Edit Id Suggestions" ), KDialogBase::Ok | KDialogBase::Cancel );
+ IdSuggestionsWidget* ui = new IdSuggestionsWidget( formatStr, dlg, "IdSuggestionsWidget" );
+ dlg->setMainWidget( ui );
+
+ QDialog::DialogCode result = ( QDialog::DialogCode ) dlg->exec();
+ if ( result == QDialog::Accepted )
+ ui->apply( formatStr );
+
+ delete( ui );
+ delete( dlg );
+
+ return result;
+ }
+
+ void IdSuggestionsWidget::reset( const QString& formatStr )
+ {
+ QLayoutIterator it = m_listOfComponents->layout()->iterator();
+ QLayoutItem *child;
+ while (( child = it.current() ) != 0 )
+ {
+ IdSuggestionComponent *component = dynamic_cast<IdSuggestionComponent*>( child->widget() );
+ ++it;
+ if ( component != NULL )
+ delete component;
+ }
+
+ m_componentCount = 0;
+ QStringList lines = QStringList::split( '|', formatStr );
+ for ( QStringList::Iterator it = lines.begin(); it != lines.end();++it )
+ {
+ IdSuggestionComponent *component = NULL;
+ if (( *it )[0] == 'a' || ( *it )[0] == 'A' )
+ component = new IdSuggestionComponentAuthor( *it, m_listOfComponents );
+ else if (( *it )[0] == 't' || ( *it )[0] == 'T' )
+ component = new IdSuggestionComponentTitle( *it, m_listOfComponents );
+ else if (( *it )[0] == 'y' || ( *it )[0] == 'Y' )
+ component = new IdSuggestionComponentYear( *it, m_listOfComponents );
+ else if (( *it )[0] == '"' )
+ component = new IdSuggestionComponentText( *it, m_listOfComponents );
+
+ if ( component != NULL )
+ {
+ ++m_componentCount;
+ connect( component, SIGNAL( moved() ), this, SLOT( updateGUI() ) );
+ connect( component, SIGNAL( deleted() ), this, SLOT( componentDeleted() ) );
+ connect( component, SIGNAL( modified() ), this, SLOT( updateExample() ) );
+ }
+ }
+
+ m_listOfComponents->adjustSize();
+ m_scrollViewComponents->verticalScrollBar()->adjustSize();
+ updateGUI();
+ m_scrollViewComponents->resize( m_scrollViewComponents->width(), min( 384, m_listOfComponents->height() + 2 ) );
+ }
+
+ void IdSuggestionsWidget::apply( QString& formatStr )
+ {
+ bool first = TRUE;
+ formatStr = "";
+ QLayoutIterator it = m_listOfComponents->layout()->iterator();
+ QLayoutItem *child;
+ while (( child = it.current() ) != 0 )
+ {
+ IdSuggestionComponent *component = dynamic_cast<IdSuggestionComponent*>( child->widget() );
+ QString text = QString::null;
+ if ( component != NULL && ( text = component->text() ) != QString::null )
+ {
+ if ( first ) first = FALSE; else formatStr.append( "|" );
+ formatStr.append( text );
+ }
+ ++it;
+ }
+ }
+
+ void IdSuggestionsWidget::setupGUI()
+ {
+ QGridLayout *gridLayout = new QGridLayout( this, 3, 2, 0, KDialog::spacingHint() );
+ gridLayout->setRowStretch( 2, 1 );
+ gridLayout->setColStretch( 0, 1 );
+
+ m_labelExample = new QLabel( this );
+ gridLayout->addMultiCellWidget( m_labelExample, 0, 1, 0, 0 );
+
+ m_pushButtonAdd = new KPushButton( i18n( "Add" ), this );
+ gridLayout->addWidget( m_pushButtonAdd, 1, 1 );
+
+ m_scrollViewComponents = new IdSuggestionsScrollView( this );
+ m_listOfComponents = new QWidget( m_scrollViewComponents->viewport() );
+ m_scrollViewComponents->setMainWidget( m_listOfComponents );
+ m_scrollViewComponents->addChild( m_listOfComponents );
+ gridLayout->addMultiCellWidget( m_scrollViewComponents, 2, 2, 0, 1 );
+ QVBoxLayout *listLayout = new QVBoxLayout( m_listOfComponents, 0, KDialog::spacingHint() );
+ listLayout->setAutoAdd( TRUE );
+
+ KPopupMenu *addMenu = new KPopupMenu( m_pushButtonAdd );
+ addMenu->insertItem( i18n( "Author" ), 1 );
+ addMenu->insertItem( i18n( "Year" ), 2 );
+ addMenu->insertItem( i18n( "Title" ), 3 );
+ addMenu->insertItem( i18n( "Text" ), 4 );
+ connect( addMenu, SIGNAL( activated( int ) ), this, SLOT( addMenuActivated( int ) ) );
+ m_pushButtonAdd->setPopup( addMenu );
+ }
+
+ void IdSuggestionsWidget::addMenuActivated( int id )
+ {
+ IdSuggestionComponent *comp = NULL;
+ if ( id == 1 )
+ comp = new IdSuggestionComponentAuthor( "a", m_listOfComponents );
+ else if ( id == 2 )
+ comp = new IdSuggestionComponentYear( "y", m_listOfComponents );
+ else if ( id == 3 )
+ comp = new IdSuggestionComponentTitle( "t", m_listOfComponents );
+ else if ( id == 4 )
+ comp = new IdSuggestionComponentText( "", m_listOfComponents );
+
+ if ( comp != NULL )
+ {
+ ++m_componentCount;
+
+ comp->show();
+
+ connect( comp, SIGNAL( moved() ), this, SLOT( updateGUI() ) );
+ connect( comp, SIGNAL( deleted() ), this, SLOT( componentDeleted() ) );
+ connect( comp, SIGNAL( modified() ), this, SLOT( updateExample() ) );
+ m_listOfComponents->adjustSize();
+ m_scrollViewComponents->ensureVisible( 10, m_listOfComponents->height() - 2 );
+ updateGUI();
+ }
+ }
+
+ void IdSuggestionsWidget::updateGUI()
+ {
+ QLayoutIterator it = m_listOfComponents->layout()->iterator();
+ QLayoutItem *child = NULL;
+ IdSuggestionComponent *lastComponent = NULL;
+ bool first = TRUE;
+ int i = 0;
+ while (( child = it.current() ) != 0 )
+ {
+ IdSuggestionComponent *component = dynamic_cast<IdSuggestionComponent*>( child->widget() );
+ ++it;
+ if ( component != NULL )
+ {
+ if ( first )
+ {
+ first = FALSE;
+ component->setEnableUpDown( FALSE, m_componentCount > 1 );
+ }
+ else
+ component->setEnableUpDown( TRUE, i < m_componentCount - 1 );
+
+ ++i;
+ lastComponent = component;
+ }
+ }
+
+ if ( lastComponent != NULL )
+ lastComponent->setEnableUpDown( m_componentCount > 1, FALSE );
+
+ m_scrollViewComponents->updateGeometry();
+ m_parent->enableButtonOK( m_componentCount > 0 );
+ updateExample();
+ }
+
+ void IdSuggestionsWidget::componentDeleted()
+ {
+ --m_componentCount;
+ updateGUI();
+ }
+
+ void IdSuggestionsWidget::updateExample()
+ {
+ QString formatStr;
+ apply( formatStr );
+ QString formatted = IdSuggestions::formatId( m_example, formatStr );
+ m_labelExample->setText( QString( i18n( "<qt>Example:<br/><b>%1</b></qt>" ) ).arg( formatted ) );
+ }
+
+}
+#include "idsuggestionswidget.moc"
diff --git a/src/idsuggestionswidget.h b/src/idsuggestionswidget.h
new file mode 100644
index 0000000..103029c
--- /dev/null
+++ b/src/idsuggestionswidget.h
@@ -0,0 +1,163 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXIDSUGGESTIONSWIDGET_H
+#define KBIBTEXIDSUGGESTIONSWIDGET_H
+
+#include <qwidget.h>
+#include <qdialog.h>
+
+class QCheckBox;
+class QScrollView;
+class QSpinBox;
+class KComboBox;
+class KLineEdit;
+class KPushButton;
+
+namespace KBibTeX
+{
+ class IdSuggestionComponent: public QFrame
+ {
+ Q_OBJECT
+ public:
+ IdSuggestionComponent( const QString& title, QWidget *parent );
+ virtual QString text() const = 0;
+ void setEnableUpDown( bool enableUp, bool enableDown );
+
+ signals:
+ void modified();
+ void moved();
+ void deleted();
+
+ protected:
+ QWidget *moveWidgets( QWidget *parent );
+
+ bool m_toBeDeleted;
+ QString m_title;
+ QWidget *m_parent;
+ KPushButton *m_pushButtonDel;
+ KPushButton *m_pushButtonUp;
+ KPushButton *m_pushButtonDown;
+
+ protected slots:
+ void slotUp();
+ void slotDown();
+ void slotDelete();
+ };
+
+ class IdSuggestionComponentAuthor: public IdSuggestionComponent
+ {
+ public:
+ IdSuggestionComponentAuthor( const QString &text, QWidget *parent );
+ QString text() const;
+ protected:
+ KComboBox *m_comboBoxWhichAuthors;
+ KComboBox *m_comboBoxCasing;
+ KLineEdit *m_lineEditInBetween;
+ QSpinBox *m_spinBoxLen;
+ };
+
+ class IdSuggestionComponentTitle: public IdSuggestionComponent
+ {
+ public:
+ IdSuggestionComponentTitle( const QString &text, QWidget *parent );
+ QString text() const;
+ protected:
+ QCheckBox *m_checkBoxRemoveSmallWords;
+ KComboBox *m_comboBoxCasing;
+ KLineEdit *m_lineEditInBetween;
+ QSpinBox *m_spinBoxLen;
+ };
+
+ class IdSuggestionComponentYear: public IdSuggestionComponent
+ {
+ public:
+ IdSuggestionComponentYear( const QString &text, QWidget *parent );
+ QString text() const;
+ protected:
+ KComboBox *m_comboBoxDigits;
+ };
+
+ class IdSuggestionComponentText: public IdSuggestionComponent
+ {
+ public:
+ IdSuggestionComponentText( const QString &text, QWidget *parent );
+ QString text() const;
+ protected:
+ KLineEdit *m_lineEditInBetween;
+ };
+
+ class IdSuggestionsScrollView : public QScrollView
+ {
+ Q_OBJECT
+ public:
+ IdSuggestionsScrollView( QWidget *parent, const char*name = NULL );
+ ~IdSuggestionsScrollView();
+
+ void setMainWidget( QWidget *widget ) {m_widget = widget;}
+
+ protected:
+ void viewportResizeEvent( QResizeEvent * );
+
+ private:
+ QWidget *m_widget;
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class IdSuggestionsWidget : public QWidget
+ {
+ Q_OBJECT
+ public:
+ ~IdSuggestionsWidget();
+ int numComponents();
+
+ static QDialog::DialogCode execute( QString &formatStr, QWidget *parent = 0, const char *name = 0 );
+
+ protected:
+ IdSuggestionsWidget( const QString &formatStr, KDialogBase *parent, const char *name = 0 );
+
+ QString m_originalFormatStr;
+ int m_componentCount;
+
+ void reset( const QString& formatStr );
+ void apply( QString& formatStr );
+
+ private:
+ static QString exampleBibTeXEntry;
+ BibTeX::Entry *m_example;
+ IdSuggestionsScrollView *m_scrollViewComponents;
+ QLabel *m_labelExample;
+ QWidget *m_listOfComponents;
+ KPushButton *m_pushButtonAdd;
+ KDialogBase *m_parent;
+
+ void setupGUI();
+
+ private slots:
+ void addMenuActivated( int id );
+ void updateGUI();
+ void componentDeleted();
+ void updateExample();
+ };
+
+}
+
+#endif
diff --git a/src/iso5426converter.cpp b/src/iso5426converter.cpp
new file mode 100644
index 0000000..3b40d5d
--- /dev/null
+++ b/src/iso5426converter.cpp
@@ -0,0 +1,892 @@
+/***************************************************************************
+ copyright : (C) 2006 by Robby Stephenson
+ email : robby@periapsis.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This file has been modified to match the requirements of KBibTeX. *
+ * In case of problems or bugs arising from this implementation, please *
+ * contact the KBibTeX team first. *
+ * Thomas Fischer <fischer@unix-ag.uni-kl.de> *
+ * *
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+// This class is adapted from Iso5426ToUnicode from the MARC4J project, available
+// from http://marc4j.tigris.org, with the following notice:
+// * Copyright (C) 2002 Bas Peters (mail@bpeters.com)
+// * Copyright (C) 2002 Yves Pratter (ypratter@club-internet.fr)
+//
+// That source was released under the terms of the GNU Lesser General Public
+// License, version 2.1. In accordance with Condition 3 of that license,
+// I am applying the terms of the GNU General Public License to the source
+// code, and including a large portion of it here
+
+#include "iso5426converter.h"
+#include <kdebug.h>
+
+#include <qstring.h>
+
+using KBibTeX::Iso5426Converter;
+
+QString Iso5426Converter::toUtf8(const QCString& text_) {
+ const uint len = text_.length();
+ QString result;
+ result.reserve(len);
+ uint pos = 0;
+ for(uint i = 0; i < len; ++i) {
+ uchar c = text_[i];
+ if(isAscii(c)) {
+ result[pos++] = c;
+ } else if(isCombining(c) && hasNext(i, len)) {
+ // this is a hack
+ // use the diaeresis instead of umlaut
+ // works for SUDOC
+ if(c == 0xC9) {
+ c = 0xC8;
+ }
+ QChar d = getCombiningChar(c * 256 + text_[i + 1]);
+ if(!d.isNull()) {
+ result[pos++] = d;
+ ++i;
+ } else {
+ result[pos++] = getChar(c);
+ }
+ } else {
+ result[pos++] = getChar(c);
+ }
+ }
+ result.squeeze();
+ return result;
+}
+
+inline
+bool Iso5426Converter::hasNext(uint pos, uint len) {
+ return pos < (len - 1);
+}
+
+inline
+bool Iso5426Converter::isAscii(uchar c) {
+ return c <= 0x7F;
+}
+
+inline
+bool Iso5426Converter::isCombining(uchar c) {
+ return c >= 0xC0 && c <= 0xDF;
+}
+
+// Source : http://www.itscj.ipsj.or.jp/ISO-IR/053.pdf
+QChar Iso5426Converter::getChar(uchar c) {
+ switch(c) {
+ case 0xA1:
+ return 0x00A1; // 2/1 inverted exclamation mark
+ case 0xA2:
+ return 0x201C; // 2/2 left low double quotation mark
+ case 0xA3:
+ return 0x00A3; // 2/3 pound sign
+ case 0xA4:
+ return 0x0024; // 2/4 dollar sign
+ case 0xA5:
+ return 0x00A5; // 2/5 yen sign
+ case 0xA6:
+ return 0x2020; // 2/6 single dagger
+ case 0xA7:
+ return 0x00A7; // 2/7 paragraph (section)
+ case 0xA8:
+ return 0x2032; // 2/8 prime
+ case 0xA9:
+ return 0x2018; // 2/9 left high single quotation mark
+ case 0xAA:
+ return 0x201C; // 2/10 left high double quotation mark
+ case 0xAB:
+ return 0x00AB; // 2/11 left angle quotation mark
+ case 0xAC:
+ return 0x266D; // 2/12 music flat
+ case 0xAD:
+ return 0x00A9; // 2/13 copyright sign
+ case 0xAE:
+ return 0x2117; // 2/14 sound recording copyright sign
+ case 0xAF:
+ return 0x00AE; // 2/15 trade mark sign
+
+ case 0xB0:
+ return 0x0639; // 3/0 ayn [ain]
+ case 0xB1:
+ return 0x0623; // 3/1 alif/hamzah [alef with hamza above]
+ case 0xB2:
+ return 0x2018; // 3/2 left low single quotation mark
+ // 3/3 (this position shall not be used)
+ // 3/4 (this position shall not be used)
+ // 3/5 (this position shall not be used)
+ case 0xB6:
+ return 0x2021; // 3/6 double dagger
+ case 0xB7:
+ return 0x00B7; // 3/7 middle dot
+ case 0xB8:
+ return 0x2033; // 3/8 double prime
+ case 0xB9:
+ return 0x2019; // 3/9 right high single quotation mark
+ case 0xBA:
+ return 0x201D; // 3/10 right high double quotation mark
+ case 0xBB:
+ return 0x00BB; // 3/11 right angle quotation mark
+ case 0xBC:
+ return 0x266F; // 3/12 musical sharp
+ case 0xBD:
+ return 0x02B9; // 3/13 mjagkij znak
+ case 0xBE:
+ return 0x02BA; // 3/14 tverdyj znak
+ case 0xBF:
+ return 0x00BF; // 3/15 inverted question mark
+
+ // 4/0 to 5/15 diacritic characters
+
+ // 6/0 (this position shall not be used)
+ case 0xE1:
+ return 0x00C6; // 6/1 CAPITAL DIPHTHONG A WITH E
+ case 0xE2:
+ return 0x0110; // 6/2 CAPITAL LETTER D WITH STROKE
+ // 6/3 (this position shall not be used)
+ // 6/4 (this position shall not be used)
+ // 6/5 (this position shall not be used)
+ case 0xE6:
+ return 0x0132; // 6/6 CAPITAL LETTER IJ
+ // 6/7 (this position shall not be used)
+ case 0xE8:
+ return 0x0141; // 6/8 CAPITAL LETTER L WITH STROKE
+ case 0xE9:
+ return 0x00D8; // 6/9 CAPITAL LETTER O WITH SOLIDUS [oblique stroke]
+ case 0xEA:
+ return 0x0152; // 6/10 CAPITAL DIPHTONG OE
+ // 6/11 (this position shall not be used)
+ case 0xEC:
+ return 0x00DE; // 6/12 CAPITAL LETTER THORN
+ // 6/13 (this position shall not be used)
+ // 6/14 (this position shall not be used)
+ // 6/15 (this position shall not be used)
+
+ // 7/0 (this position shall not be used)
+ case 0xF1:
+ return 0x00E6; // 7/1 small diphthong a with e
+ // 7/4 (this position shall not be used)
+ case 0xF5:
+ return 0x0131; // 7/5 small letter i without dot
+ case 0xF6:
+ return 0x0133; // 7/6 small letter ij
+ // 7/7 (this position shall not be used)
+ case 0xF8:
+ return 0x0142; // 7/8 small letter l with stroke
+ case 0xF9:
+ return 0x00F8; // 7/9 small letter o with solidus (oblique stroke)
+ case 0xFA:
+ return 0x0153; // 7/10 small diphtong oe
+ case 0xFB:
+ return 0x00DF; // 7/11 small letter sharp s
+ case 0xFC:
+ return 0x00FE; // 7/12 small letter thorn
+ // 7/13 (this position shall not be used)
+ // 7/14 (this position shall not be used)
+ default:
+ return c;
+ }
+}
+
+QChar Iso5426Converter::getCombiningChar(uint c) {
+ switch(c) {
+ // 4/0 low rising tone mark
+ case 0xC041:
+ return 0x1EA2; // CAPITAL A WITH HOOK ABOVE
+ case 0xC045:
+ return 0x1EBA; // CAPITAL E WITH HOOK ABOVE
+ case 0xC049:
+ return 0x1EC8; // CAPITAL I WITH HOOK ABOVE
+ case 0xC04F:
+ return 0x1ECE; // CAPITAL O WITH HOOK ABOVE
+ case 0xC055:
+ return 0x1EE6; // CAPITAL U WITH HOOK ABOVE
+ case 0xC059:
+ return 0x1EF6; // CAPITAL Y WITH HOOK ABOVE
+ case 0xC061:
+ return 0x1EA3; // small a with hook above
+ case 0xC065:
+ return 0x1EBB; // small e with hook above
+ case 0xC069:
+ return 0x1EC9; // small i with hook above
+ case 0xC06F:
+ return 0x1ECF; // small o with hook above
+ case 0xC075:
+ return 0x1EE7; // small u with hook above
+ case 0xC079:
+ return 0x1EF7; // small y with hook above
+
+ // 4/1 grave accent
+ case 0xC141:
+ return 0x00C0; // CAPITAL A WITH GRAVE ACCENT
+ case 0xC145:
+ return 0x00C8; // CAPITAL E WITH GRAVE ACCENT
+ case 0xC149:
+ return 0x00CC; // CAPITAL I WITH GRAVE ACCENT
+ case 0xC14F:
+ return 0x00D2; // CAPITAL O WITH GRAVE ACCENT
+ case 0xC155:
+ return 0x00D9; // CAPITAL U WITH GRAVE ACCENT
+ case 0xC157:
+ return 0x1E80; // CAPITAL W WITH GRAVE
+ case 0xC159:
+ return 0x1EF2; // CAPITAL Y WITH GRAVE
+ case 0xC161:
+ return 0x00E0; // small a with grave accent
+ case 0xC165:
+ return 0x00E8; // small e with grave accent
+ case 0xC169:
+ return 0x00EC; // small i with grave accent
+ case 0xC16F:
+ return 0x00F2; // small o with grave accent
+ case 0xC175:
+ return 0x00F9; // small u with grave accent
+ case 0xC177:
+ return 0x1E81; // small w with grave
+ case 0xC179:
+ return 0x1EF3; // small y with grave
+
+ // 4/2 acute accent
+ case 0xC241:
+ return 0x00C1; // CAPITAL A WITH ACUTE ACCENT
+ case 0xC243:
+ return 0x0106; // CAPITAL C WITH ACUTE ACCENT
+ case 0xC245:
+ return 0x00C9; // CAPITAL E WITH ACUTE ACCENT
+ case 0xC247:
+ return 0x01F4; // CAPITAL G WITH ACUTE
+ case 0xC249:
+ return 0x00CD; // CAPITAL I WITH ACUTE ACCENT
+ case 0xC24B:
+ return 0x1E30; // CAPITAL K WITH ACUTE
+ case 0xC24C:
+ return 0x0139; // CAPITAL L WITH ACUTE ACCENT
+ case 0xC24D:
+ return 0x1E3E; // CAPITAL M WITH ACUTE
+ case 0xC24E:
+ return 0x0143; // CAPITAL N WITH ACUTE ACCENT
+ case 0xC24F:
+ return 0x00D3; // CAPITAL O WITH ACUTE ACCENT
+ case 0xC250:
+ return 0x1E54; // CAPITAL P WITH ACUTE
+ case 0xC252:
+ return 0x0154; // CAPITAL R WITH ACUTE ACCENT
+ case 0xC253:
+ return 0x015A; // CAPITAL S WITH ACUTE ACCENT
+ case 0xC255:
+ return 0x00DA; // CAPITAL U WITH ACUTE ACCENT
+ case 0xC257:
+ return 0x1E82; // CAPITAL W WITH ACUTE
+ case 0xC259:
+ return 0x00DD; // CAPITAL Y WITH ACUTE ACCENT
+ case 0xC25A:
+ return 0x0179; // CAPITAL Z WITH ACUTE ACCENT
+ case 0xC261:
+ return 0x00E1; // small a with acute accent
+ case 0xC263:
+ return 0x0107; // small c with acute accent
+ case 0xC265:
+ return 0x00E9; // small e with acute accent
+ case 0xC267:
+ return 0x01F5; // small g with acute
+ case 0xC269:
+ return 0x00ED; // small i with acute accent
+ case 0xC26B:
+ return 0x1E31; // small k with acute
+ case 0xC26C:
+ return 0x013A; // small l with acute accent
+ case 0xC26D:
+ return 0x1E3F; // small m with acute
+ case 0xC26E:
+ return 0x0144; // small n with acute accent
+ case 0xC26F:
+ return 0x00F3; // small o with acute accent
+ case 0xC270:
+ return 0x1E55; // small p with acute
+ case 0xC272:
+ return 0x0155; // small r with acute accent
+ case 0xC273:
+ return 0x015B; // small s with acute accent
+ case 0xC275:
+ return 0x00FA; // small u with acute accent
+ case 0xC277:
+ return 0x1E83; // small w with acute
+ case 0xC279:
+ return 0x00FD; // small y with acute accent
+ case 0xC27A:
+ return 0x017A; // small z with acute accent
+ case 0xC2E1:
+ return 0x01FC; // CAPITAL AE WITH ACUTE
+ case 0xC2F1:
+ return 0x01FD; // small ae with acute
+
+ // 4/3 circumflex accent
+ case 0xC341:
+ return 0x00C2; // CAPITAL A WITH CIRCUMFLEX ACCENT
+ case 0xC343:
+ return 0x0108; // CAPITAL C WITH CIRCUMFLEX
+ case 0xC345:
+ return 0x00CA; // CAPITAL E WITH CIRCUMFLEX ACCENT
+ case 0xC347:
+ return 0x011C; // CAPITAL G WITH CIRCUMFLEX
+ case 0xC348:
+ return 0x0124; // CAPITAL H WITH CIRCUMFLEX
+ case 0xC349:
+ return 0x00CE; // CAPITAL I WITH CIRCUMFLEX ACCENT
+ case 0xC34A:
+ return 0x0134; // CAPITAL J WITH CIRCUMFLEX
+ case 0xC34F:
+ return 0x00D4; // CAPITAL O WITH CIRCUMFLEX ACCENT
+ case 0xC353:
+ return 0x015C; // CAPITAL S WITH CIRCUMFLEX
+ case 0xC355:
+ return 0x00DB; // CAPITAL U WITH CIRCUMFLEX
+ case 0xC357:
+ return 0x0174; // CAPITAL W WITH CIRCUMFLEX
+ case 0xC359:
+ return 0x0176; // CAPITAL Y WITH CIRCUMFLEX
+ case 0xC35A:
+ return 0x1E90; // CAPITAL Z WITH CIRCUMFLEX
+ case 0xC361:
+ return 0x00E2; // small a with circumflex accent
+ case 0xC363:
+ return 0x0109; // small c with circumflex
+ case 0xC365:
+ return 0x00EA; // small e with circumflex accent
+ case 0xC367:
+ return 0x011D; // small g with circumflex
+ case 0xC368:
+ return 0x0125; // small h with circumflex
+ case 0xC369:
+ return 0x00EE; // small i with circumflex accent
+ case 0xC36A:
+ return 0x0135; // small j with circumflex
+ case 0xC36F:
+ return 0x00F4; // small o with circumflex accent
+ case 0xC373:
+ return 0x015D; // small s with circumflex
+ case 0xC375:
+ return 0x00FB; // small u with circumflex
+ case 0xC377:
+ return 0x0175; // small w with circumflex
+ case 0xC379:
+ return 0x0177; // small y with circumflex
+ case 0xC37A:
+ return 0x1E91; // small z with circumflex
+
+ // 4/4 tilde
+ case 0xC441:
+ return 0x00C3; // CAPITAL A WITH TILDE
+ case 0xC445:
+ return 0x1EBC; // CAPITAL E WITH TILDE
+ case 0xC449:
+ return 0x0128; // CAPITAL I WITH TILDE
+ case 0xC44E:
+ return 0x00D1; // CAPITAL N WITH TILDE
+ case 0xC44F:
+ return 0x00D5; // CAPITAL O WITH TILDE
+ case 0xC455:
+ return 0x0168; // CAPITAL U WITH TILDE
+ case 0xC456:
+ return 0x1E7C; // CAPITAL V WITH TILDE
+ case 0xC459:
+ return 0x1EF8; // CAPITAL Y WITH TILDE
+ case 0xC461:
+ return 0x00E3; // small a with tilde
+ case 0xC465:
+ return 0x1EBD; // small e with tilde
+ case 0xC469:
+ return 0x0129; // small i with tilde
+ case 0xC46E:
+ return 0x00F1; // small n with tilde
+ case 0xC46F:
+ return 0x00F5; // small o with tilde
+ case 0xC475:
+ return 0x0169; // small u with tilde
+ case 0xC476:
+ return 0x1E7D; // small v with tilde
+ case 0xC479:
+ return 0x1EF9; // small y with tilde
+
+ // 4/5 macron
+ case 0xC541:
+ return 0x0100; // CAPITAL A WITH MACRON
+ case 0xC545:
+ return 0x0112; // CAPITAL E WITH MACRON
+ case 0xC547:
+ return 0x1E20; // CAPITAL G WITH MACRON
+ case 0xC549:
+ return 0x012A; // CAPITAL I WITH MACRON
+ case 0xC54F:
+ return 0x014C; // CAPITAL O WITH MACRON
+ case 0xC555:
+ return 0x016A; // CAPITAL U WITH MACRON
+ case 0xC561:
+ return 0x0101; // small a with macron
+ case 0xC565:
+ return 0x0113; // small e with macron
+ case 0xC567:
+ return 0x1E21; // small g with macron
+ case 0xC569:
+ return 0x012B; // small i with macron
+ case 0xC56F:
+ return 0x014D; // small o with macron
+ case 0xC575:
+ return 0x016B; // small u with macron
+ case 0xC5E1:
+ return 0x01E2; // CAPITAL AE WITH MACRON
+ case 0xC5F1:
+ return 0x01E3; // small ae with macron
+
+ // 4/6 breve
+ case 0xC641:
+ return 0x0102; // CAPITAL A WITH BREVE
+ case 0xC645:
+ return 0x0114; // CAPITAL E WITH BREVE
+ case 0xC647:
+ return 0x011E; // CAPITAL G WITH BREVE
+ case 0xC649:
+ return 0x012C; // CAPITAL I WITH BREVE
+ case 0xC64F:
+ return 0x014E; // CAPITAL O WITH BREVE
+ case 0xC655:
+ return 0x016C; // CAPITAL U WITH BREVE
+ case 0xC661:
+ return 0x0103; // small a with breve
+ case 0xC665:
+ return 0x0115; // small e with breve
+ case 0xC667:
+ return 0x011F; // small g with breve
+ case 0xC669:
+ return 0x012D; // small i with breve
+ case 0xC66F:
+ return 0x014F; // small o with breve
+ case 0xC675:
+ return 0x016D; // small u with breve
+
+ // 4/7 dot above
+ case 0xC742:
+ return 0x1E02; // CAPITAL B WITH DOT ABOVE
+ case 0xC743:
+ return 0x010A; // CAPITAL C WITH DOT ABOVE
+ case 0xC744:
+ return 0x1E0A; // CAPITAL D WITH DOT ABOVE
+ case 0xC745:
+ return 0x0116; // CAPITAL E WITH DOT ABOVE
+ case 0xC746:
+ return 0x1E1E; // CAPITAL F WITH DOT ABOVE
+ case 0xC747:
+ return 0x0120; // CAPITAL G WITH DOT ABOVE
+ case 0xC748:
+ return 0x1E22; // CAPITAL H WITH DOT ABOVE
+ case 0xC749:
+ return 0x0130; // CAPITAL I WITH DOT ABOVE
+ case 0xC74D:
+ return 0x1E40; // CAPITAL M WITH DOT ABOVE
+ case 0xC74E:
+ return 0x1E44; // CAPITAL N WITH DOT ABOVE
+ case 0xC750:
+ return 0x1E56; // CAPITAL P WITH DOT ABOVE
+ case 0xC752:
+ return 0x1E58; // CAPITAL R WITH DOT ABOVE
+ case 0xC753:
+ return 0x1E60; // CAPITAL S WITH DOT ABOVE
+ case 0xC754:
+ return 0x1E6A; // CAPITAL T WITH DOT ABOVE
+ case 0xC757:
+ return 0x1E86; // CAPITAL W WITH DOT ABOVE
+ case 0xC758:
+ return 0x1E8A; // CAPITAL X WITH DOT ABOVE
+ case 0xC759:
+ return 0x1E8E; // CAPITAL Y WITH DOT ABOVE
+ case 0xC75A:
+ return 0x017B; // CAPITAL Z WITH DOT ABOVE
+ case 0xC762:
+ return 0x1E03; // small b with dot above
+ case 0xC763:
+ return 0x010B; // small c with dot above
+ case 0xC764:
+ return 0x1E0B; // small d with dot above
+ case 0xC765:
+ return 0x0117; // small e with dot above
+ case 0xC766:
+ return 0x1E1F; // small f with dot above
+ case 0xC767:
+ return 0x0121; // small g with dot above
+ case 0xC768:
+ return 0x1E23; // small h with dot above
+ case 0xC76D:
+ return 0x1E41; // small m with dot above
+ case 0xC76E:
+ return 0x1E45; // small n with dot above
+ case 0xC770:
+ return 0x1E57; // small p with dot above
+ case 0xC772:
+ return 0x1E59; // small r with dot above
+ case 0xC773:
+ return 0x1E61; // small s with dot above
+ case 0xC774:
+ return 0x1E6B; // small t with dot above
+ case 0xC777:
+ return 0x1E87; // small w with dot above
+ case 0xC778:
+ return 0x1E8B; // small x with dot above
+ case 0xC779:
+ return 0x1E8F; // small y with dot above
+ case 0xC77A:
+ return 0x017C; // small z with dot above
+
+ // 4/8 trema, diaresis
+ case 0xC820:
+ return 0x00A8; // diaeresis
+ case 0xC841:
+ return 0x00C4; // CAPITAL A WITH DIAERESIS
+ case 0xC845:
+ return 0x00CB; // CAPITAL E WITH DIAERESIS
+ case 0xC848:
+ return 0x1E26; // CAPITAL H WITH DIAERESIS
+ case 0xC849:
+ return 0x00CF; // CAPITAL I WITH DIAERESIS
+ case 0xC84F:
+ return 0x00D6; // CAPITAL O WITH DIAERESIS
+ case 0xC855:
+ return 0x00DC; // CAPITAL U WITH DIAERESIS
+ case 0xC857:
+ return 0x1E84; // CAPITAL W WITH DIAERESIS
+ case 0xC858:
+ return 0x1E8C; // CAPITAL X WITH DIAERESIS
+ case 0xC859:
+ return 0x0178; // CAPITAL Y WITH DIAERESIS
+ case 0xC861:
+ return 0x00E4; // small a with diaeresis
+ case 0xC865:
+ return 0x00EB; // small e with diaeresis
+ case 0xC868:
+ return 0x1E27; // small h with diaeresis
+ case 0xC869:
+ return 0x00EF; // small i with diaeresis
+ case 0xC86F:
+ return 0x00F6; // small o with diaeresis
+ case 0xC874:
+ return 0x1E97; // small t with diaeresis
+ case 0xC875:
+ return 0x00FC; // small u with diaeresis
+ case 0xC877:
+ return 0x1E85; // small w with diaeresis
+ case 0xC878:
+ return 0x1E8D; // small x with diaeresis
+ case 0xC879:
+ return 0x00FF; // small y with diaeresis
+
+ // 4/9 umlaut
+ case 0xC920:
+ return 0x00A8; // [diaeresis]
+
+ // 4/10 circle above
+ case 0xCA41:
+ return 0x00C5; // CAPITAL A WITH RING ABOVE
+ case 0xCAAD:
+ return 0x016E; // CAPITAL U WITH RING ABOVE
+ case 0xCA61:
+ return 0x00E5; // small a with ring above
+ case 0xCA75:
+ return 0x016F; // small u with ring above
+ case 0xCA77:
+ return 0x1E98; // small w with ring above
+ case 0xCA79:
+ return 0x1E99; // small y with ring above
+
+ // 4/11 high comma off centre
+
+ // 4/12 inverted high comma centred
+
+ // 4/13 double acute accent
+ case 0xCD4F:
+ return 0x0150; // CAPITAL O WITH DOUBLE ACUTE
+ case 0xCD55:
+ return 0x0170; // CAPITAL U WITH DOUBLE ACUTE
+ case 0xCD6F:
+ return 0x0151; // small o with double acute
+ case 0xCD75:
+ return 0x0171; // small u with double acute
+
+ // 4/14 horn
+ case 0xCE54:
+ return 0x01A0; // LATIN CAPITAL LETTER O WITH HORN
+ case 0xCE55:
+ return 0x01AF; // LATIN CAPITAL LETTER U WITH HORN
+ case 0xCE74:
+ return 0x01A1; // latin small letter o with horn
+ case 0xCE75:
+ return 0x01B0; // latin small letter u with horn
+
+ // 4/15 caron (hacek)
+ case 0xCF41:
+ return 0x01CD; // CAPITAL A WITH CARON
+ case 0xCF43:
+ return 0x010C; // CAPITAL C WITH CARON
+ case 0xCF44:
+ return 0x010E; // CAPITAL D WITH CARON
+ case 0xCF45:
+ return 0x011A; // CAPITAL E WITH CARON
+ case 0xCF47:
+ return 0x01E6; // CAPITAL G WITH CARON
+ case 0xCF49:
+ return 0x01CF; // CAPITAL I WITH CARON
+ case 0xCF4B:
+ return 0x01E8; // CAPITAL K WITH CARON
+ case 0xCF4C:
+ return 0x013D; // CAPITAL L WITH CARON
+ case 0xCF4E:
+ return 0x0147; // CAPITAL N WITH CARON
+ case 0xCF4F:
+ return 0x01D1; // CAPITAL O WITH CARON
+ case 0xCF52:
+ return 0x0158; // CAPITAL R WITH CARON
+ case 0xCF53:
+ return 0x0160; // CAPITAL S WITH CARON
+ case 0xCF54:
+ return 0x0164; // CAPITAL T WITH CARON
+ case 0xCF55:
+ return 0x01D3; // CAPITAL U WITH CARON
+ case 0xCF5A:
+ return 0x017D; // CAPITAL Z WITH CARON
+ case 0xCF61:
+ return 0x01CE; // small a with caron
+ case 0xCF63:
+ return 0x010D; // small c with caron
+ case 0xCF64:
+ return 0x010F; // small d with caron
+ case 0xCF65:
+ return 0x011B; // small e with caron
+ case 0xCF67:
+ return 0x01E7; // small g with caron
+ case 0xCF69:
+ return 0x01D0; // small i with caron
+ case 0xCF6A:
+ return 0x01F0; // small j with caron
+ case 0xCF6B:
+ return 0x01E9; // small k with caron
+ case 0xCF6C:
+ return 0x013E; // small l with caron
+ case 0xCF6E:
+ return 0x0148; // small n with caron
+ case 0xCF6F:
+ return 0x01D2; // small o with caron
+ case 0xCF72:
+ return 0x0159; // small r with caron
+ case 0xCF73:
+ return 0x0161; // small s with caron
+ case 0xCF74:
+ return 0x0165; // small t with caron
+ case 0xCF75:
+ return 0x01D4; // small u with caron
+ case 0xCF7A:
+ return 0x017E; // small z with caron
+
+ // 5/0 cedilla
+ case 0xD020:
+ return 0x00B8; // cedilla
+ case 0xD043:
+ return 0x00C7; // CAPITAL C WITH CEDILLA
+ case 0xD044:
+ return 0x1E10; // CAPITAL D WITH CEDILLA
+ case 0xD047:
+ return 0x0122; // CAPITAL G WITH CEDILLA
+ case 0xD048:
+ return 0x1E28; // CAPITAL H WITH CEDILLA
+ case 0xD04B:
+ return 0x0136; // CAPITAL K WITH CEDILLA
+ case 0xD04C:
+ return 0x013B; // CAPITAL L WITH CEDILLA
+ case 0xD04E:
+ return 0x0145; // CAPITAL N WITH CEDILLA
+ case 0xD052:
+ return 0x0156; // CAPITAL R WITH CEDILLA
+ case 0xD053:
+ return 0x015E; // CAPITAL S WITH CEDILLA
+ case 0xD054:
+ return 0x0162; // CAPITAL T WITH CEDILLA
+ case 0xD063:
+ return 0x00E7; // small c with cedilla
+ case 0xD064:
+ return 0x1E11; // small d with cedilla
+ case 0xD067:
+ return 0x0123; // small g with cedilla
+ case 0xD068:
+ return 0x1E29; // small h with cedilla
+ case 0xD06B:
+ return 0x0137; // small k with cedilla
+ case 0xD06C:
+ return 0x013C; // small l with cedilla
+ case 0xD06E:
+ return 0x0146; // small n with cedilla
+ case 0xD072:
+ return 0x0157; // small r with cedilla
+ case 0xD073:
+ return 0x015F; // small s with cedilla
+ case 0xD074:
+ return 0x0163; // small t with cedilla
+
+ // 5/1 rude
+
+ // 5/2 hook to left
+
+ // 5/3 ogonek (hook to right)
+ case 0xD320:
+ return 0x02DB; // ogonek
+ case 0xD341:
+ return 0x0104; // CAPITAL A WITH OGONEK
+ case 0xD345:
+ return 0x0118; // CAPITAL E WITH OGONEK
+ case 0xD349:
+ return 0x012E; // CAPITAL I WITH OGONEK
+ case 0xD34F:
+ return 0x01EA; // CAPITAL O WITH OGONEK
+ case 0xD355:
+ return 0x0172; // CAPITAL U WITH OGONEK
+ case 0xD361:
+ return 0x0105; // small a with ogonek
+ case 0xD365:
+ return 0x0119; // small e with ogonek
+ case 0xD369:
+ return 0x012F; // small i with ogonek
+ case 0xD36F:
+ return 0x01EB; // small o with ogonek
+ case 0xD375:
+ return 0x0173; // small u with ogonek
+
+ // 5/4 circle below
+ case 0xD441:
+ return 0x1E00; // CAPITAL A WITH RING BELOW
+ case 0xD461:
+ return 0x1E01; // small a with ring below
+
+ // 5/5 half circle below
+ case 0xF948:
+ return 0x1E2A; // CAPITAL H WITH BREVE BELOW
+ case 0xF968:
+ return 0x1E2B; // small h with breve below
+
+ // 5/6 dot below
+ case 0xD641:
+ return 0x1EA0; // CAPITAL A WITH DOT BELOW
+ case 0xD642:
+ return 0x1E04; // CAPITAL B WITH DOT BELOW
+ case 0xD644:
+ return 0x1E0C; // CAPITAL D WITH DOT BELOW
+ case 0xD645:
+ return 0x1EB8; // CAPITAL E WITH DOT BELOW
+ case 0xD648:
+ return 0x1E24; // CAPITAL H WITH DOT BELOW
+ case 0xD649:
+ return 0x1ECA; // CAPITAL I WITH DOT BELOW
+ case 0xD64B:
+ return 0x1E32; // CAPITAL K WITH DOT BELOW
+ case 0xD64C:
+ return 0x1E36; // CAPITAL L WITH DOT BELOW
+ case 0xD64D:
+ return 0x1E42; // CAPITAL M WITH DOT BELOW
+ case 0xD64E:
+ return 0x1E46; // CAPITAL N WITH DOT BELOW
+ case 0xD64F:
+ return 0x1ECC; // CAPITAL O WITH DOT BELOW
+ case 0xD652:
+ return 0x1E5A; // CAPITAL R WITH DOT BELOW
+ case 0xD653:
+ return 0x1E62; // CAPITAL S WITH DOT BELOW
+ case 0xD654:
+ return 0x1E6C; // CAPITAL T WITH DOT BELOW
+ case 0xD655:
+ return 0x1EE4; // CAPITAL U WITH DOT BELOW
+ case 0xD656:
+ return 0x1E7E; // CAPITAL V WITH DOT BELOW
+ case 0xD657:
+ return 0x1E88; // CAPITAL W WITH DOT BELOW
+ case 0xD659:
+ return 0x1EF4; // CAPITAL Y WITH DOT BELOW
+ case 0xD65A:
+ return 0x1E92; // CAPITAL Z WITH DOT BELOW
+ case 0xD661:
+ return 0x1EA1; // small a with dot below
+ case 0xD662:
+ return 0x1E05; // small b with dot below
+ case 0xD664:
+ return 0x1E0D; // small d with dot below
+ case 0xD665:
+ return 0x1EB9; // small e with dot below
+ case 0xD668:
+ return 0x1E25; // small h with dot below
+ case 0xD669:
+ return 0x1ECB; // small i with dot below
+ case 0xD66B:
+ return 0x1E33; // small k with dot below
+ case 0xD66C:
+ return 0x1E37; // small l with dot below
+ case 0xD66D:
+ return 0x1E43; // small m with dot below
+ case 0xD66E:
+ return 0x1E47; // small n with dot below
+ case 0xD66F:
+ return 0x1ECD; // small o with dot below
+ case 0xD672:
+ return 0x1E5B; // small r with dot below
+ case 0xD673:
+ return 0x1E63; // small s with dot below
+ case 0xD674:
+ return 0x1E6D; // small t with dot below
+ case 0xD675:
+ return 0x1EE5; // small u with dot below
+ case 0xD676:
+ return 0x1E7F; // small v with dot below
+ case 0xD677:
+ return 0x1E89; // small w with dot below
+ case 0xD679:
+ return 0x1EF5; // small y with dot below
+ case 0xD67A:
+ return 0x1E93; // small z with dot below
+
+ // 5/7 double dot below
+ case 0xD755:
+ return 0x1E72; // CAPITAL U WITH DIAERESIS BELOW
+ case 0xD775:
+ return 0x1E73; // small u with diaeresis below
+
+ // 5/8 underline
+ case 0xD820:
+ return 0x005F; // underline
+
+ // 5/9 double underline
+ case 0xD920:
+ return 0x2017; // double underline
+
+ // 5/10 small low vertical bar
+ case 0xDA20:
+ return 0x02CC; //
+
+ // 5/11 circumflex below
+
+ // 5/12 (this position shall not be used)
+
+ // 5/13 left half of ligature sign and of double tilde
+
+ // 5/14 right half of ligature sign
+
+ // 5/15 right half of double tilde
+
+ default:
+ kdDebug() << "Iso5426Converter::getCombiningChar() - no match for " << c << endl;
+ return QChar();
+ }
+}
diff --git a/src/iso5426converter.h b/src/iso5426converter.h
new file mode 100644
index 0000000..f13873b
--- /dev/null
+++ b/src/iso5426converter.h
@@ -0,0 +1,52 @@
+/***************************************************************************
+ copyright : (C) 2006 by Robby Stephenson
+ email : robby@periapsis.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This file has been modified to match the requirements of KBibTeX. *
+ * In case of problems or bugs arising from this implementation, please *
+ * contact the KBibTeX team first. *
+ * Thomas Fischer <fischer@unix-ag.uni-kl.de> *
+ * *
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+#ifndef KBIBTEX_ISO5426CONVERTER_H
+#define KBIBTEX_ISO5426CONVERTER_H
+
+class QCString;
+class QString;
+class QChar;
+
+#include <qglobal.h>
+
+namespace KBibTeX {
+
+/**
+ * @author Robby Stephenson
+ */
+class Iso5426Converter {
+public:
+ static QString toUtf8(const QCString& text);
+
+private:
+ static bool hasNext(uint pos, uint len);
+ static bool isAscii(uchar c);
+ static bool isCombining(uchar c);
+
+ static QChar getChar(uchar c);
+ static QChar getCombiningChar(uint i);
+};
+
+} // end namespace
+
+#endif
diff --git a/src/iso6937converter.cpp b/src/iso6937converter.cpp
new file mode 100644
index 0000000..66a5154
--- /dev/null
+++ b/src/iso6937converter.cpp
@@ -0,0 +1,606 @@
+/***************************************************************************
+ copyright : (C) 2006 by Robby Stephenson
+ email : robby@periapsis.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This file has been modified to match the requirements of KBibTeX. *
+ * In case of problems or bugs arising from this implementation, please *
+ * contact the KBibTeX team first. *
+ * Thomas Fischer <fischer@unix-ag.uni-kl.de> *
+ * *
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+// This class is adapted from Iso6937ToUnicode from the MARC4J project, available
+// from http://marc4j.tigris.org, with the following notice:
+// * Copyright (C) 2002 Bas Peters (mail@bpeters.com)
+// * Copyright (C) 2002 Yves Pratter (ypratter@club-internet.fr)
+//
+// That source was released under the terms of the GNU Lesser General Public
+// License, version 2.1. In accordance with Condition 3 of that license,
+// I am applying the terms of the GNU General Public License to the source
+// code, and including a large portion of it here
+
+#include "iso6937converter.h"
+#include <kdebug.h>
+
+#include <qstring.h>
+
+using KBibTeX::Iso6937Converter;
+
+QString Iso6937Converter::toUtf8(const QCString& text_) {
+ const uint len = text_.length();
+ QString result;
+ result.reserve(len);
+ uint pos = 0;
+ for(uint i = 0; i < len; ++i) {
+ uchar c = text_[i];
+ if(isAscii(c)) {
+ result[pos++] = c;
+ } else if(isCombining(c) && hasNext(i, len)) {
+ QChar d = getCombiningChar(c * 256 + text_[i + 1]);
+ if(!d.isNull()) {
+ result[pos++] = d;
+ ++i;
+ } else {
+ result[pos++] = getChar(c);
+ }
+ } else {
+ result[pos++] = getChar(c);
+ }
+ }
+ result.squeeze();
+ return result;
+}
+
+inline
+bool Iso6937Converter::hasNext(uint pos, uint len) {
+ return pos < (len - 1);
+}
+
+inline
+bool Iso6937Converter::isAscii(uchar c) {
+ return c <= 0x7F;
+}
+
+inline
+bool Iso6937Converter::isCombining(uchar c) {
+ return c >= 0xC0 && c <= 0xDF;
+}
+
+// Source : http://anubis.dkuug.dk/JTC1/SC2/WG3/docs/6937cd.pdf
+QChar Iso6937Converter::getChar(uchar c) {
+ switch(c) {
+ case 0xA0:
+ return 0x00A0; // 10/00 NO-BREAK SPACE
+ case 0xA1:
+ return 0x00A1; // 10/01 INVERTED EXCLAMATION MARK
+ case 0xA2:
+ return 0x00A2; // 10/02 CENT SIGN
+ case 0xA3:
+ return 0x00A3; // 10/03 POUND SIGN
+ // 10/04 (This position shall not be used)
+ case 0xA5:
+ return 0x00A5; // 10/05 YEN SIGN
+ // 10/06 (This position shall not be used)
+ case 0xA7:
+ return 0x00A7; // 10/07 SECTION SIGN
+ case 0xA8:
+ return 0x00A4; // 10/08 CURRENCY SIGN
+ case 0xA9:
+ return 0x2018; // 10/09 LEFT SINGLE QUOTATION MARK
+ case 0xAA:
+ return 0x201C; // 10/10 LEFT DOUBLE QUOTATION MARK
+ case 0xAB:
+ return 0x00AB; // 10/11 LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+ case 0xAC:
+ return 0x2190; // 10/12 LEFTWARDS ARROW
+ case 0xAD:
+ return 0x2191; // 10/13 UPWARDS ARROW
+ case 0xAE:
+ return 0x2192; // 10/14 RIGHTWARDS ARROW
+ case 0xAF:
+ return 0x2193; // 10/15 DOWNWARDS ARROW
+
+ case 0xB0:
+ return 0x00B0; // 11/00 DEGREE SIGN
+ case 0xB1:
+ return 0x00B1; // 11/01 PLUS-MINUS SIGN
+ case 0xB2:
+ return 0x00B2; // 11/02 SUPERSCRIPT TWO
+ case 0xB3:
+ return 0x00B3; // 11/03 SUPERSCRIPT THREE
+ case 0xB4:
+ return 0x00D7; // 11/04 MULTIPLICATION SIGN
+ case 0xB5:
+ return 0x00B5; // 11/05 MICRO SIGN
+ case 0xB6:
+ return 0x00B6; // 11/06 PILCROW SIGN
+ case 0xB7:
+ return 0x00B7; // 11/07 MIDDLE DOT
+ case 0xB8:
+ return 0x00F7; // 11/08 DIVISION SIGN
+ case 0xB9:
+ return 0x2019; // 11/09 RIGHT SINGLE QUOTATION MARK
+ case 0xBA:
+ return 0x201D; // 11/10 RIGHT DOUBLE QUOTATION MARK
+ case 0xBB:
+ return 0x00BB; // 11/11 RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+ case 0xBC:
+ return 0x00BC; // 11/12 VULGAR FRACTION ONE QUARTER
+ case 0xBD:
+ return 0x00BD; // 11/13 VULGAR FRACTION ONE HALF
+ case 0xBE:
+ return 0x00BE; // 11/14 VULGAR FRACTION THREE QUARTERS
+ case 0xBF:
+ return 0x00BF; // 11/15 INVERTED QUESTION MARK
+
+ // 4/0 to 5/15 diacritic characters
+
+ case 0xD0:
+ return 0x2015; // 13/00 HORIZONTAL BAR
+ case 0xD1:
+ return 0x00B9; // 13/01 SUPERSCRIPT ONE
+ case 0xD2:
+ return 0x2117; // 13/02 REGISTERED SIGN
+ case 0xD3:
+ return 0x00A9; // 13/03 COPYRIGHT SIGN
+ case 0xD4:
+ return 0x00AE; // 13/04 TRADE MARK SIGN
+ case 0xD5:
+ return 0x266A; // 13/05 EIGHTH NOTE
+ case 0xD6:
+ return 0x00AC; // 13/06 NOT SIGN
+ case 0xD7:
+ return 0x00A6; // 13/07 BROKEN BAR
+ // 13/08 (This position shall not be used)
+ // 13/09 (This position shall not be used)
+ // 13/10 (This position shall not be used)
+ // 13/11 (This position shall not be used)
+ case 0xDC:
+ return 0x215B; // 13/12 VULGAR FRACTION ONE EIGHTH
+ case 0xDF:
+ return 0x215E; // 13/15 VULGAR FRACTION SEVEN EIGHTHS
+
+ case 0xE0:
+ return 0x2126; // 14/00 OHM SIGN
+ case 0xE1:
+ return 0x00C6; // 14/01 LATIN CAPITAL LETTER AE
+ case 0xE2:
+ return 0x0110; // 14/02 LATIN CAPITAL LETTER D WITH STROKE
+ case 0xE3:
+ return 0x00AA; // 14/03 FEMININE ORDINAL INDICATOR
+ case 0xE4:
+ return 0x0126; // 14/04 LATIN CAPITAL LETTER H WITH STROKE
+ // 14/05 (This position shall not be used)
+ case 0xE6:
+ return 0x0132; // 14/06 LATIN CAPITAL LIGATURE IJ
+ case 0xE7:
+ return 0x013F; // 14/07 LATIN CAPITAL LETTER L WITH MIDDLE DOT
+ case 0xE8:
+ return 0x0141; // 14/08 LATIN CAPITAL LETTER L WITH STROKE
+ case 0xE9:
+ return 0x00D8; // 14/09 LATIN CAPITAL LETTER O WITH STROKE
+ case 0xEA:
+ return 0x0152; // 14/10 LATIN CAPITAL LIGATURE OE
+ case 0xEB:
+ return 0x00BA; // 14/11 MASCULINE ORDINAL INDICATOR
+ case 0xEC:
+ return 0x00DE; // 14/12 LATIN CAPITAL LETTER THORN
+ case 0xED:
+ return 0x0166; // 14/13 LATIN CAPITAL LETTER T WITH STROKE
+ case 0xEE:
+ return 0x014A; // 14/14 LATIN CAPITAL LETTER ENG
+ case 0xEF:
+ return 0x0149; // 14/15 LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
+
+ case 0xF0:
+ return 0x0138; // 15/00 LATIN SMALL LETTER KRA
+ case 0xF1:
+ return 0x00E6; // 15/01 LATIN SMALL LETTER AE
+ case 0xF2:
+ return 0x0111; // 15/02 LATIN SMALL LETTER D WITH STROKE
+ case 0xF3:
+ return 0x00F0; // 15/03 LATIN SMALL LETTER ETH
+ case 0xF4:
+ return 0x0127; // 15/04 LATIN SMALL LETTER H WITH STROKE
+ case 0xF5:
+ return 0x0131; // 15/05 LATIN SMALL LETTER DOTLESS I
+ case 0xF6:
+ return 0x0133; // 15/06 LATIN SMALL LIGATURE IJ
+ case 0xF7:
+ return 0x0140; // 15/07 LATIN SMALL LETTER L WITH MIDDLE DOT
+ case 0xF8:
+ return 0x0142; // 15/08 LATIN SMALL LETTER L WITH STROKE
+ case 0xF9:
+ return 0x00F8; // 15/09 LATIN SMALL LETTER O WITH STROKE
+ case 0xFA:
+ return 0x0153; // 15/10 LATIN SMALL LIGATURE OE
+ case 0xFB:
+ return 0x00DF; // 15/11 LATIN SMALL LETTER SHARP S
+ case 0xFC:
+ return 0x00FE; // 15/12 LATIN SMALL LETTER THORN
+ case 0xFD:
+ return 0x0167; // 15/13 LATIN SMALL LETTER T WITH STROKE
+ case 0xFE:
+ return 0x014B; // 15/14 LATIN SMALL LETTER ENG
+ case 0xFF:
+ return 0x00AD; // 15/15 SOFT HYPHEN$
+ default:
+ return c;
+ }
+}
+
+QChar Iso6937Converter::getCombiningChar(uint c) {
+ switch(c) {
+ // 12/00 (This position shall not be used)
+
+ // 12/01 non-spacing grave accent
+ case 0xC141:
+ return 0x00C0; // LATIN CAPITAL LETTER A WITH GRAVE
+ case 0xC145:
+ return 0x00C8; // LATIN CAPITAL LETTER E WITH GRAVE
+ case 0xC149:
+ return 0x00CC; // LATIN CAPITAL LETTER I WITH GRAVE
+ case 0xC14F:
+ return 0x00D2; // LATIN CAPITAL LETTER O WITH GRAVE
+ case 0xC155:
+ return 0x00D9; // LATIN CAPITAL LETTER U WITH GRAVE
+ case 0xC161:
+ return 0x00E0; // LATIN SMALL LETTER A WITH GRAVE
+ case 0xC165:
+ return 0x00E8; // LATIN SMALL LETTER E WITH GRAVE
+ case 0xC169:
+ return 0x00EC; // LATIN SMALL LETTER I WITH GRAVE
+ case 0xC16F:
+ return 0x00F2; // LATIN SMALL LETTER O WITH GRAVE
+ case 0xC175:
+ return 0x00F9; // LATIN SMALL LETTER U WITH GRAVE
+
+ // 12/02 non-spacing acute accent
+ case 0xC220:
+ return 0x00B4; // ACUTE ACCENT
+ case 0xC241:
+ return 0x00C1; // LATIN CAPITAL LETTER A WITH ACUTE
+ case 0xC243:
+ return 0x0106; // LATIN CAPITAL LETTER C WITH ACUTE
+ case 0xC245:
+ return 0x00C9; // LATIN CAPITAL LETTER E WITH ACUTE
+ case 0xC249:
+ return 0x00CD; // LATIN CAPITAL LETTER I WITH ACUTE
+ case 0xC24C:
+ return 0x0139; // LATIN CAPITAL LETTER L WITH ACUTE
+ case 0xC24E:
+ return 0x0143; // LATIN CAPITAL LETTER N WITH ACUTE
+ case 0xC24F:
+ return 0x00D3; // LATIN CAPITAL LETTER O WITH ACUTE
+ case 0xC252:
+ return 0x0154; // LATIN CAPITAL LETTER R WITH ACUTE
+ case 0xC253:
+ return 0x015A; // LATIN CAPITAL LETTER S WITH ACUTE
+ case 0xC255:
+ return 0x00DA; // LATIN CAPITAL LETTER U WITH ACUTE
+ case 0xC259:
+ return 0x00DD; // LATIN CAPITAL LETTER Y WITH ACUTE
+ case 0xC25A:
+ return 0x0179; // LATIN CAPITAL LETTER Z WITH ACUTE
+ case 0xC261:
+ return 0x00E1; // LATIN SMALL LETTER A WITH ACUTE
+ case 0xC263:
+ return 0x0107; // LATIN SMALL LETTER C WITH ACUTE
+ case 0xC265:
+ return 0x00E9; // LATIN SMALL LETTER E WITH ACUTE
+ case 0xC267:
+ return 0x01F5; // LATIN SMALL LETTER G WITH CEDILLA(4)
+ case 0xC269:
+ return 0x00ED; // LATIN SMALL LETTER I WITH ACUTE
+ case 0xC26C:
+ return 0x013A; // LATIN SMALL LETTER L WITH ACUTE
+ case 0xC26E:
+ return 0x0144; // LATIN SMALL LETTER N WITH ACUTE
+ case 0xC26F:
+ return 0x00F3; // LATIN SMALL LETTER O WITH ACUTE
+ case 0xC272:
+ return 0x0155; // LATIN SMALL LETTER R WITH ACUTE
+ case 0xC273:
+ return 0x015B; // LATIN SMALL LETTER S WITH ACUTE
+ case 0xC275:
+ return 0x00FA; // LATIN SMALL LETTER U WITH ACUTE
+ case 0xC279:
+ return 0x00FD; // LATIN SMALL LETTER Y WITH ACUTE
+ case 0xC27A:
+ return 0x017A; // LATIN SMALL LETTER Z WITH ACUTE
+
+ // 12/03 non-spacing circumflex accent
+ case 0xC341:
+ return 0x00C2; // LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+ case 0xC343:
+ return 0x0108; // LATIN CAPITAL LETTER C WITH CIRCUMFLEX
+ case 0xC345:
+ return 0x00CA; // LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+ case 0xC347:
+ return 0x011C; // LATIN CAPITAL LETTER G WITH CIRCUMFLEX
+ case 0xC348:
+ return 0x0124; // LATIN CAPITAL LETTER H WITH CIRCUMFLEX
+ case 0xC349:
+ return 0x00CE; // LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+ case 0xC34A:
+ return 0x0134; // LATIN CAPITAL LETTER J WITH CIRCUMFLEX
+ case 0xC34F:
+ return 0x00D4; // LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+ case 0xC353:
+ return 0x015C; // LATIN CAPITAL LETTER S WITH CIRCUMFLEX
+ case 0xC355:
+ return 0x00DB; // LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+ case 0xC357:
+ return 0x0174; // LATIN CAPITAL LETTER W WITH CIRCUMFLEX
+ case 0xC359:
+ return 0x0176; // LATIN CAPITAL LETTER Y WITH CIRCUMFLEX
+ case 0xC361:
+ return 0x00E2; // LATIN SMALL LETTER A WITH CIRCUMFLEX
+ case 0xC363:
+ return 0x0109; // LATIN SMALL LETTER C WITH CIRCUMFLEX
+ case 0xC365:
+ return 0x00EA; // LATIN SMALL LETTER E WITH CIRCUMFLEX
+ case 0xC367:
+ return 0x011D; // LATIN SMALL LETTER G WITH CIRCUMFLEX
+ case 0xC368:
+ return 0x0125; // LATIN SMALL LETTER H WITH CIRCUMFLEX
+ case 0xC369:
+ return 0x00EE; // LATIN SMALL LETTER I WITH CIRCUMFLEX
+ case 0xC36A:
+ return 0x0135; // LATIN SMALL LETTER J WITH CIRCUMFLEX
+ case 0xC36F:
+ return 0x00F4; // LATIN SMALL LETTER O WITH CIRCUMFLEX
+ case 0xC373:
+ return 0x015D; // LATIN SMALL LETTER S WITH CIRCUMFLEX
+ case 0xC375:
+ return 0x00FB; // LATIN SMALL LETTER U WITH CIRCUMFLEX
+ case 0xC377:
+ return 0x0175; // LATIN SMALL LETTER W WITH CIRCUMFLEX
+ case 0xC379:
+ return 0x0177; // LATIN SMALL LETTER Y WITH CIRCUMFLEX
+
+ // 12/04 non-spacing tilde
+ case 0xC441:
+ return 0x00C3; // LATIN CAPITAL LETTER A WITH TILDE
+ case 0xC449:
+ return 0x0128; // LATIN CAPITAL LETTER I WITH TILDE
+ case 0xC44E:
+ return 0x00D1; // LATIN CAPITAL LETTER N WITH TILDE
+ case 0xC44F:
+ return 0x00D5; // LATIN CAPITAL LETTER O WITH TILDE
+ case 0xC455:
+ return 0x0168; // LATIN CAPITAL LETTER U WITH TILDE
+ case 0xC461:
+ return 0x00E3; // LATIN SMALL LETTER A WITH TILDE
+ case 0xC469:
+ return 0x0129; // LATIN SMALL LETTER I WITH TILDE
+ case 0xC46E:
+ return 0x00F1; // LATIN SMALL LETTER N WITH TILDE
+ case 0xC46F:
+ return 0x00F5; // LATIN SMALL LETTER O WITH TILDE
+ case 0xC475:
+ return 0x0169; // LATIN SMALL LETTER U WITH TILDE
+
+ // 12/05 non-spacing macron
+ case 0xC541:
+ return 0x0100; // LATIN CAPITAL LETTER A WITH MACRON
+ case 0xC545:
+ return 0x0112; // LATIN CAPITAL LETTER E WITH MACRON
+ case 0xC549:
+ return 0x012A; // LATIN CAPITAL LETTER I WITH MACRON
+ case 0xC54F:
+ return 0x014C; // LATIN CAPITAL LETTER O WITH MACRON
+ case 0xC555:
+ return 0x016A; // LATIN CAPITAL LETTER U WITH MACRON
+ case 0xC561:
+ return 0x0101; // LATIN SMALL LETTER A WITH MACRON
+ case 0xC565:
+ return 0x0113; // LATIN SMALL LETTER E WITH MACRON
+ case 0xC569:
+ return 0x012B; // LATIN SMALL LETTER I WITH MACRON
+ case 0xC56F:
+ return 0x014D; // LATIN SMALL LETTER O WITH MACRON
+ case 0xC575:
+ return 0x016B; // LATIN SMALL LETTER U WITH MACRON
+
+ // 12/06 non-spacing breve
+ case 0xC620:
+ return 0x02D8; // BREVE
+ case 0xC641:
+ return 0x0102; // LATIN CAPITAL LETTER A WITH BREVE
+ case 0xC647:
+ return 0x011E; // LATIN CAPITAL LETTER G WITH BREVE
+ case 0xC655:
+ return 0x016C; // LATIN CAPITAL LETTER U WITH BREVE
+ case 0xC661:
+ return 0x0103; // LATIN SMALL LETTER A WITH BREVE
+ case 0xC667:
+ return 0x011F; // LATIN SMALL LETTER G WITH BREVE
+ case 0xC675:
+ return 0x016D; // LATIN SMALL LETTER U WITH BREVE
+
+ // 12/07 non-spacing dot above
+ case 0xC743:
+ return 0x010A; // LATIN CAPITAL LETTER C WITH DOT ABOVE
+ case 0xC745:
+ return 0x0116; // LATIN CAPITAL LETTER E WITH DOT ABOVE
+ case 0xC747:
+ return 0x0120; // LATIN CAPITAL LETTER G WITH DOT ABOVE
+ case 0xC749:
+ return 0x0130; // LATIN CAPITAL LETTER I WITH DOT ABOVE
+ case 0xC75A:
+ return 0x017B; // LATIN CAPITAL LETTER Z WITH DOT ABOVE
+ case 0xC763:
+ return 0x010B; // LATIN SMALL LETTER C WITH DOT ABOVE
+ case 0xC765:
+ return 0x0117; // LATIN SMALL LETTER E WITH DOT ABOVE
+ case 0xC767:
+ return 0x0121; // LATIN SMALL LETTER G WITH DOT ABOVE
+ case 0xC77A:
+ return 0x017C; // LATIN SMALL LETTER Z WITH DOT ABOVE
+
+ // 12/08 non-spacing diaeresis
+ case 0xC820:
+ return 0x00A8; // DIAERESIS
+ case 0xC841:
+ return 0x00C4; // LATIN CAPITAL LETTER A WITH DIAERESIS
+ case 0xC845:
+ return 0x00CB; // LATIN CAPITAL LETTER E WITH DIAERESIS
+ case 0xC849:
+ return 0x00CF; // LATIN CAPITAL LETTER I WITH DIAERESIS
+ case 0xC84F:
+ return 0x00D6; // LATIN CAPITAL LETTER O WITH DIAERESIS
+ case 0xC855:
+ return 0x00DC; // LATIN CAPITAL LETTER U WITH DIAERESIS
+ case 0xC859:
+ return 0x0178; // LATIN CAPITAL LETTER Y WITH DIAERESIS
+ case 0xC861:
+ return 0x00E4; // LATIN SMALL LETTER A WITH DIAERESIS
+ case 0xC865:
+ return 0x00EB; // LATIN SMALL LETTER E WITH DIAERESIS
+ case 0xC869:
+ return 0x00EF; // LATIN SMALL LETTER I WITH DIAERESIS
+ case 0xC86F:
+ return 0x00F6; // LATIN SMALL LETTER O WITH DIAERESIS
+ case 0xC875:
+ return 0x00FC; // LATIN SMALL LETTER U WITH DIAERESIS
+ case 0xC879:
+ return 0x00FF; // LATIN SMALL LETTER Y WITH DIAERESIS
+
+ // 12/09 (This position shall not be used)
+
+ // 12/10 non-spacing ring above
+ case 0xCA20:
+ return 0x02DA; // RING ABOVE
+ case 0xCA41:
+ return 0x00C5; // LATIN CAPITAL LETTER A WITH RING ABOVE
+ case 0xCAAD:
+ return 0x016E; // LATIN CAPITAL LETTER U WITH RING ABOVE
+ case 0xCA61:
+ return 0x00E5; // LATIN SMALL LETTER A WITH RING ABOVE
+ case 0xCA75:
+ return 0x016F; // LATIN SMALL LETTER U WITH RING ABOVE
+
+ // 12/11 non-spacing cedilla
+ case 0xCB20:
+ return 0x00B8; // CEDILLA
+ case 0xCB43:
+ return 0x00C7; // LATIN CAPITAL LETTER C WITH CEDILLA
+ case 0xCB47:
+ return 0x0122; // LATIN CAPITAL LETTER G WITH CEDILLA
+ case 0xCB4B:
+ return 0x0136; // LATIN CAPITAL LETTER K WITH CEDILLA
+ case 0xCB4C:
+ return 0x013B; // LATIN CAPITAL LETTER L WITH CEDILLA
+ case 0xCB4E:
+ return 0x0145; // LATIN CAPITAL LETTER N WITH CEDILLA
+ case 0xCB52:
+ return 0x0156; // LATIN CAPITAL LETTER R WITH CEDILLA
+ case 0xCB53:
+ return 0x015E; // LATIN CAPITAL LETTER S WITH CEDILLA
+ case 0xCB54:
+ return 0x0162; // LATIN CAPITAL LETTER T WITH CEDILLA
+ case 0xCB63:
+ return 0x00E7; // LATIN SMALL LETTER C WITH CEDILLA
+ // case 0xCB67: return 0x0123; // small g with cedilla
+ case 0xCB6B:
+ return 0x0137; // LATIN SMALL LETTER K WITH CEDILLA
+ case 0xCB6C:
+ return 0x013C; // LATIN SMALL LETTER L WITH CEDILLA
+ case 0xCB6E:
+ return 0x0146; // LATIN SMALL LETTER N WITH CEDILLA
+ case 0xCB72:
+ return 0x0157; // LATIN SMALL LETTER R WITH CEDILLA
+ case 0xCB73:
+ return 0x015F; // LATIN SMALL LETTER S WITH CEDILLA
+ case 0xCB74:
+ return 0x0163; // LATIN SMALL LETTER T WITH CEDILLA
+
+ // 12/12 (This position shall not be used)
+
+ // 12/13 non-spacing double acute accent
+ case 0xCD4F:
+ return 0x0150; // LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
+ case 0xCD55:
+ return 0x0170; // LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
+ case 0xCD6F:
+ return 0x0151; // LATIN SMALL LETTER O WITH DOUBLE ACUTE
+ case 0xCD75:
+ return 0x0171; // LATIN SMALL LETTER U WITH DOUBLE ACUTE
+
+ // 12/14 non-spacing ogonek
+ case 0xCE20:
+ return 0x02DB; // ogonek
+ case 0xCE41:
+ return 0x0104; // LATIN CAPITAL LETTER A WITH OGONEK
+ case 0xCE45:
+ return 0x0118; // LATIN CAPITAL LETTER E WITH OGONEK
+ case 0xCE49:
+ return 0x012E; // LATIN CAPITAL LETTER I WITH OGONEK
+ case 0xCE55:
+ return 0x0172; // LATIN CAPITAL LETTER U WITH OGONEK
+ case 0xCE61:
+ return 0x0105; // LATIN SMALL LETTER A WITH OGONEK
+ case 0xCE65:
+ return 0x0119; // LATIN SMALL LETTER E WITH OGONEK
+ case 0xCE69:
+ return 0x012F; // LATIN SMALL LETTER I WITH OGONEK
+ case 0xCE75:
+ return 0x0173; // LATIN SMALL LETTER U WITH OGONEK
+
+ // 12/15 non-spacing caron
+ case 0xCF20:
+ return 0x02C7; // CARON
+ case 0xCF43:
+ return 0x010C; // LATIN CAPITAL LETTER C WITH CARON
+ case 0xCF44:
+ return 0x010E; // LATIN CAPITAL LETTER D WITH CARON
+ case 0xCF45:
+ return 0x011A; // LATIN CAPITAL LETTER E WITH CARON
+ case 0xCF4C:
+ return 0x013D; // LATIN CAPITAL LETTER L WITH CARON
+ case 0xCF4E:
+ return 0x0147; // LATIN CAPITAL LETTER N WITH CARON
+ case 0xCF52:
+ return 0x0158; // LATIN CAPITAL LETTER R WITH CARON
+ case 0xCF53:
+ return 0x0160; // LATIN CAPITAL LETTER S WITH CARON
+ case 0xCF54:
+ return 0x0164; // LATIN CAPITAL LETTER T WITH CARON
+ case 0xCF5A:
+ return 0x017D; // LATIN CAPITAL LETTER Z WITH CARON
+ case 0xCF63:
+ return 0x010D; // LATIN SMALL LETTER C WITH CARON
+ case 0xCF64:
+ return 0x010F; // LATIN SMALL LETTER D WITH CARON
+ case 0xCF65:
+ return 0x011B; // LATIN SMALL LETTER E WITH CARON
+ case 0xCF6C:
+ return 0x013E; // LATIN SMALL LETTER L WITH CARON
+ case 0xCF6E:
+ return 0x0148; // LATIN SMALL LETTER N WITH CARON
+ case 0xCF72:
+ return 0x0159; // LATIN SMALL LETTER R WITH CARON
+ case 0xCF73:
+ return 0x0161; // LATIN SMALL LETTER S WITH CARON
+ case 0xCF74:
+ return 0x0165; // LATIN SMALL LETTER T WITH CARON
+ case 0xCF7A:
+ return 0x017E; // LATIN SMALL LETTER Z WITH CARON
+
+ default:
+ kdDebug() << "Iso6937Converter::getCombiningChar() - no match for " << c << endl;
+ return QChar();
+ }
+}
diff --git a/src/iso6937converter.h b/src/iso6937converter.h
new file mode 100644
index 0000000..a72efcd
--- /dev/null
+++ b/src/iso6937converter.h
@@ -0,0 +1,50 @@
+/***************************************************************************
+ copyright : (C) 2006 by Robby Stephenson
+ email : robby@periapsis.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This file has been modified to match the requirements of KBibTeX. *
+ * In case of problems or bugs arising from this implementation, please *
+ * contact the KBibTeX team first. *
+ * Thomas Fischer <fischer@unix-ag.uni-kl.de> *
+ * *
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+#ifndef KBIBTEX_ISO6937CONVERTER_H
+#define KBIBTEX_ISO6937CONVERTER_H
+
+class QCString;
+class QString;
+class QChar;
+
+namespace KBibTeX {
+
+/**
+ * @author Robby Stephenson
+ */
+class Iso6937Converter {
+public:
+ static QString toUtf8(const QCString& text);
+
+private:
+ static bool hasNext(unsigned int pos, unsigned int len);
+ static bool isAscii(unsigned char c);
+ static bool isCombining(unsigned char c);
+
+ static QChar getChar(unsigned char c);
+ static QChar getCombiningChar(unsigned int c);
+};
+
+} // end namespace
+
+#endif
diff --git a/src/kbibtex.desktop b/src/kbibtex.desktop
new file mode 100644
index 0000000..5c9d9c3
--- /dev/null
+++ b/src/kbibtex.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Name=KBibTeX
+Exec=kbibtex %U %i -caption "%c"
+Icon=kbibtex
+Type=Application
+X-DocPath=kbibtex/kbibtex.html
+Comment=A BibTeX editor for KDE
+Comment[de]=Ein BibTeX-Editor für KDE
+MimeType=text/x-bibtex;
+Categories=Qt;KDE;Office;
+X-KDE-HasTempFileOption=true
+X-DCOP-ServiceType=Unique
diff --git a/src/kbibtex.lsm b/src/kbibtex.lsm
new file mode 100644
index 0000000..4ebf200
--- /dev/null
+++ b/src/kbibtex.lsm
@@ -0,0 +1,15 @@
+Begin3
+Title: KBibTeX -- A BibTeX editor for KDE3
+Version: 0.2.3.91
+Entered-date:
+Description: A KDE3 program to create and edit BibTeX files for LaTeX
+Keywords: KDE BibTeX
+Author: Thomas Fischer <fischer@unix-ag.uni-kl.de>
+Maintained-by: Thomas Fischer <fischer@unix-ag.uni-kl.de>
+Home-page: http://www.unix-ag.uni-kl.de/~fischer/kbibtex/
+Alternate-site:
+Primary-site: www.unix-ag.uni-kl.de /~fischer/kbibtex/download
+ 640kB kbibtex-0.2.3.91.tar.bz2
+Platform: Linux. Needs KDE 3.x
+Copying-policy: GPL
+End
diff --git a/src/kbibtex_part.cpp b/src/kbibtex_part.cpp
new file mode 100644
index 0000000..3a5f16a
--- /dev/null
+++ b/src/kbibtex_part.cpp
@@ -0,0 +1,758 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <string>
+#include <fcntl.h>
+
+#include <qstring.h>
+#include <qsplitter.h>
+#include <qtimer.h>
+#include <qvaluelist.h>
+#include <qlayout.h>
+#include <qlineedit.h>
+#include <qbuffer.h>
+#include <qtoolbutton.h>
+#include <qtabwidget.h>
+#include <qlabel.h>
+#include <qtextedit.h>
+#include <qclipboard.h>
+#include <kinstance.h>
+#include <kaction.h>
+#include <kstdaction.h>
+#include <klistview.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kfiledialog.h>
+#include <ktempfile.h>
+#include <kconfigdialog.h>
+#include <kstatusbar.h>
+#include <kglobalsettings.h>
+#include <kmessagebox.h>
+#include <kinputdialog.h>
+#include <kshortcut.h>
+#include <kstandarddirs.h>
+#include <kiconloader.h>
+#include <kapplication.h>
+#include <kxmlguifactory.h>
+#include <kpopupmenu.h>
+#include <kio/netaccess.h>
+#include <kmainwindow.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <entry.h>
+#include <documentlistviewitem.h>
+#include <documentlistview.h>
+#include <fileexporter.h>
+#include <fileexporterbibtex.h>
+#include <fileexporterxml.h>
+#include <fileexporterxslt.h>
+#include <settings.h>
+#include <encoderlatex.h>
+#include "kbibtex_part.h"
+
+const QString inPipeFilename = QDir::homeDirPath() + "/.kbibtex.in";
+
+KBibTeXPart::KBibTeXPart( QWidget *parentWidget, const char *widgetName,
+ QObject *parent, const char *name )
+ : KParts::ReadWritePart( parent, name ), m_defInitCounter( 0 ), m_settingsDlg( NULL ), m_initializationDone( FALSE ), m_inPipe( NULL )
+{
+ m_mainWindow = dynamic_cast<KMainWindow*>( parent );
+ if ( m_mainWindow == NULL )
+ kdDebug( ) << "Cannot determine main window" << endl;
+
+ // we need an instance
+ setInstance( KBibTeXPartFactory::instance() );
+
+ // set our XML-UI resource file
+ setXMLFile( "kbibtex_part.rc" );
+
+ // setup GUI elements
+ setupGUI( parentWidget, widgetName );
+
+ // create our actions
+ setupActions();
+
+ // we are read-write by default
+ setReadWrite( TRUE );
+
+ // we are not modified since we haven't done anything yet
+ setModified( FALSE );
+
+ // read configuration
+ readSettings();
+
+ QTimer::singleShot( 100, this, SLOT( slotDeferredInitialization() ) );
+}
+
+KBibTeXPart::~KBibTeXPart()
+{
+ BibTeX::EncoderLaTeX::deleteCurrentEncoderLaTeX();
+
+ if ( m_settingsDlg != NULL )
+ delete m_settingsDlg;
+}
+
+void KBibTeXPart::setReadWrite( bool rw )
+{
+ if ( rw )
+ {
+ connect( m_documentWidget, SIGNAL( modified( ) ), this, SLOT( setModified( ) ) );
+ m_actionEditElement->setText( i18n( "&Edit" ) );
+ }
+ else
+ {
+ disconnect( m_documentWidget, SIGNAL( modified( ) ), this, SLOT( setModified( ) ) );
+ m_actionEditElement->setText( i18n( "&View" ) );
+ }
+ ReadWritePart::setReadWrite( rw );
+ m_documentWidget->setReadOnly( !rw );
+}
+
+void KBibTeXPart::setModified( bool modified )
+{
+ // get a handle on our Save action and make sure it is valid
+ KAction * save = actionCollection() ->action( KStdAction::stdName( KStdAction::Save ) );
+
+ if ( save )
+ {
+ // if so, we either enable or disable it based on the current
+ // state
+ save->setEnabled( modified );
+
+ // in any event, we want our parent to do it's thing
+ KParts::ReadWritePart::setModified( modified );
+ }
+}
+
+bool KBibTeXPart::queryClose()
+{
+ writeSettings();
+
+ if ( !isReadWrite() || !isModified() )
+ return TRUE;
+
+ QString docName = url().fileName();
+ if ( docName.isEmpty() ) docName = i18n( "Untitled" );
+
+ int res = KMessageBox::warningYesNoCancel( widget(),
+ i18n( "The document '%1' has been modified.\n"
+ "Do you want to save your changes or discard them?" ).arg( docName ),
+ i18n( "Close Document" ), KStdGuiItem::save(), KStdGuiItem::discard() );
+
+ bool abortClose = false;
+ bool handled = false;
+
+ switch ( res )
+ {
+ case KMessageBox::Yes :
+ sigQueryClose( &handled, &abortClose );
+ if ( !handled )
+ {
+ if ( m_url.isEmpty() )
+ return saveAs();
+ else
+ save();
+ }
+ else if ( abortClose ) return FALSE;
+ return waitSaveComplete();
+ case KMessageBox::No :
+ return TRUE;
+ default:
+ return FALSE;
+ }
+
+}
+
+bool KBibTeXPart::closeURL()
+{
+ writeSettings();
+
+ if ( isReadWrite() && isModified() )
+ {
+ if ( !queryClose() )
+ return false;
+ }
+ // Not modified => ok and delete temp file.
+ return KParts::ReadOnlyPart::closeURL();
+}
+
+bool KBibTeXPart::openFile()
+{
+ return m_documentWidget->open( m_file, FALSE );
+}
+
+/**
+ * Save document to a filename as given in String m_file.
+ */
+bool KBibTeXPart::saveFile()
+{
+ if ( isReadWrite() == FALSE )
+ return FALSE;
+
+ if ( !url().isValid() || url().isEmpty() )
+ return saveAs();
+ else
+ {
+ /** make backup if defined by the user */
+ KBibTeX::Settings * settings = KBibTeX::Settings::self( NULL );
+ settings->createBackup( url(), widget() );
+
+ KTempFile tempBibFile = KTempFile( locateLocal( "tmp", "bibsave" ) );
+ tempBibFile.setAutoDelete( TRUE );
+ bool success = m_documentWidget->save( tempBibFile.file() );
+ tempBibFile.close();
+ if ( success )
+ {
+ QString usedFileName = m_file;
+ QFileInfo fi( usedFileName );
+ if ( !fi.readLink().isNull() && KMessageBox::questionYesNo( widget(), QString( i18n( "The selected filename \"%1\" is a symbolic link pointing to \"%2\".\nReplace the link with a new file or overwrite the existing file the link points to?" ) ).arg( usedFileName ).arg(KBibTeX::Settings::resolveLink( m_file, fi.readLink() ) ), i18n( "Symbolic Link" ), KGuiItem( i18n( "Replace link" ) ), KGuiItem( i18n( "Overwrite file the link points to" ) ) ) == KMessageBox::No )
+ usedFileName = KBibTeX::Settings::resolveLink( m_file, fi.readLink() );
+
+ m_documentWidget->dirWatch().stopScan();
+ success = KIO::NetAccess::file_copy( KURL( tempBibFile.name() ), KURL( usedFileName ), -1, true, false, widget() );
+ m_documentWidget->dirWatch().startScan();
+ }
+
+ return success;
+ }
+}
+
+void KBibTeXPart::slotFileSaveAs()
+{
+ saveAs();
+}
+
+bool KBibTeXPart::saveAs()
+{
+ bool result = FALSE;
+ KBibTeX::Settings * settings = KBibTeX::Settings::self( NULL );
+
+ QString startDir = ! url().isEmpty() ? url().url() : QDir::currentDirPath();
+ KURL saveURL = KFileDialog::getSaveURL( startDir, "*.bib|" + i18n( "BibTeX (*.bib)" ) + "\n*.ris|" + i18n( "Reference Manager (*.ris)" ) +
+ ( settings->external_xml2bibAvailable ? "\n*.ref *.refer *.rfr *.txt|" + i18n( "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)" ) + "\n*.isi *.cgi|" + i18n( "ISI Web of Knowledge (*.isi *.cgi)" ) : "" ) + "\n*.xml|" + ( settings->external_xml2bibAvailable ? i18n( "DocBook 5 or MODS (*.xml)" ) : i18n( "DocBook 5 (*.xml)" ) ), widget() );
+
+ if ( saveURL.isValid() && !saveURL.isEmpty() )
+ {
+ if ( KIO::NetAccess::exists( saveURL, FALSE, widget() ) && KMessageBox::warningContinueCancel( widget(), i18n( "A file named '%1' already exists. Are you sure you want to overwrite it?" ).arg( saveURL.filename() ), QString::null, i18n( "Overwrite" ) ) != KMessageBox::Continue )
+ return result;
+
+ if ( ReadWritePart::saveAs( saveURL ) )
+ {
+ emit signalAddRecentURL( saveURL );
+ result = TRUE;
+ }
+ }
+
+ return result;
+}
+
+void KBibTeXPart::slotFileExport()
+{
+ KBibTeX::Settings * settings = KBibTeX::Settings::self( NULL );
+ QString startDir = ! url().isEmpty() ? url().url() : QDir::currentDirPath();
+ KURL exportURL = KFileDialog::getSaveURL( startDir, "*.pdf|" + i18n( "Portable Document File (*.pdf)" ) + "\n*.ps|" + i18n( "PostScript (*.ps)" ) + "\n*.ris|" + i18n( "Reference Manager (*.ris)" ) + ( settings->external_xml2bibAvailable ? "\n*.ref *.refer *.rfr *.txt|" + i18n( "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)" ) + "\n*.isi *.cgi|" + i18n( "ISI Web of Knowledge (*.isi *.cgi)" ) : "" ) + "\n*.xml|" + ( settings->external_xml2bibAvailable ? i18n( "DocBook 5 or MODS (*.xml)" ) : i18n( "DocBook 5 (*.xml)" ) ) + "\n*.html|" + i18n( "Hypertext Markup Langage (*.html)" ) + "\n*.rtf|" + i18n( "Rich Text Format (*.rtf)" ), widget() );
+
+ if ( exportURL.isValid() && !exportURL.isEmpty() )
+ {
+ if ( KIO::NetAccess::exists( exportURL, FALSE, widget() ) )
+ {
+ if ( KMessageBox::warningContinueCancel( widget(), i18n( "A file named '%1' already exists. Are you sure you want to overwrite it?" ).arg( exportURL.filename() ), QString::null, i18n( "Overwrite" ) ) != KMessageBox::Continue )
+ return ;
+
+ /** make backup if defined by the user */
+ KBibTeX::Settings * settings = KBibTeX::Settings::self( NULL );
+ settings->createBackup( exportURL, widget() );
+ }
+
+ KTempFile tempBibFile = KTempFile( locateLocal( "tmp", "bibexport" ) );
+ tempBibFile.setAutoDelete( TRUE );
+ BibTeX::File::FileFormat format = BibTeX::File::formatBibTeX;
+ if ( exportURL.fileName().endsWith( ".rtf", FALSE ) )
+ format = BibTeX::File::formatRTF;
+ else if ( exportURL.fileName().endsWith( ".pdf", FALSE ) )
+ format = BibTeX::File::formatPDF;
+ else if ( exportURL.fileName().endsWith( ".ps", FALSE ) )
+ format = BibTeX::File::formatPS;
+ else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( exportURL.fileName().endsWith( ".ref", FALSE ) || exportURL.fileName().endsWith( ".refer", FALSE ) || exportURL.fileName().endsWith( ".txt", FALSE ) || exportURL.fileName().endsWith( ".rfr", FALSE ) ) )
+ format = BibTeX::File::formatEndNote;
+ else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( exportURL.fileName().endsWith( ".isi", FALSE ) || exportURL.fileName().endsWith( ".cgi", FALSE ) ) )
+ format = BibTeX::File::formatISI;
+ else if ( exportURL.fileName().endsWith( ".ris", FALSE ) )
+ format = BibTeX::File::formatRIS;
+ else if ( exportURL.fileName().endsWith( ".xml", FALSE ) )
+ {
+ QStringList options = QStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "DocBook5|MODS|internal XML" : "DocBook5|internal XML" ) );
+ bool ok = false;
+ QString answer = KInputDialog::getItem( i18n( "Choose file format" ), QString( i18n( "Choose file format of file '%1':" ) ).arg( exportURL.fileName() ), options, 0, false, &ok, widget() );
+ if ( ok && !answer.isNull() && answer == "DocBook5" )
+ format = BibTeX::File::formatDocBook5;
+ else if ( ok && !answer.isNull() && answer == "MODS" )
+ format = BibTeX::File::formatMODS;
+ else if ( ok && !answer.isNull() && answer == "internal XML" )
+ format = BibTeX::File::formatXML;
+ }
+ else if ( exportURL.fileName().endsWith( ".html", FALSE ) )
+ format = BibTeX::File::formatHTML;
+ else
+ {
+ QStringList options = QStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "BibTeX|EndNote|ISI|RIS" : "BibTeX|RIS" ) );
+ bool ok = false;
+ QString answer = KInputDialog::getItem( i18n( "Choose file format" ), QString( i18n( "Choose file format of file '%1':" ) ).arg( exportURL.fileName() ), options, 0, false, &ok, widget() );
+ if ( ok && !answer.isNull() && answer == "BibTeX" )
+ format = BibTeX::File::formatBibTeX;
+ else if ( ok && !answer.isNull() && answer == "EndNote" )
+ format = BibTeX::File::formatEndNote;
+ else if ( ok && !answer.isNull() && answer == "ISI" )
+ format = BibTeX::File::formatISI;
+ else if ( ok && !answer.isNull() && answer == "RIS" )
+ format = BibTeX::File::formatRIS;
+ }
+
+ QStringList errorLog;
+
+ bool error = !m_documentWidget->save( tempBibFile.file(), format, i18n( "Exporting" ), &errorLog ) ;
+ if ( !error )
+ {
+ tempBibFile.close();
+ error = !KIO::NetAccess::file_copy( KURL( tempBibFile.name() ), exportURL, -1, TRUE, FALSE, widget() );
+ }
+
+ if ( error )
+ {
+#if (KDE_VERSION_MINOR>=4) && (KDE_VERSION_MAJOR>=3)
+ if ( !errorLog.empty() )
+ KMessageBox::errorList( widget(), QString( i18n( "File could not be exported in '%1'." ) ).arg( exportURL.prettyURL() ).append( i18n( "\n\nSee the following error log for details." ) ), errorLog, i18n( "Exporting failed" ) );
+ else
+#endif
+ KMessageBox::error( widget(), QString( i18n( "File could not be exported to '%1'." ) ).arg( exportURL.prettyURL() ), i18n( "Exporting failed" ) );
+ }
+
+ }
+
+}
+
+void KBibTeXPart::slotFileStatistics()
+{
+ m_documentWidget->showStatistics();
+}
+
+void KBibTeXPart::slotFileFindDups()
+{
+ m_documentWidget->findDuplicates();
+}
+
+void KBibTeXPart::slotFileMerge()
+{
+ KBibTeX::Settings * settings = KBibTeX::Settings::self( NULL );
+ QString startDir = ! url().isEmpty() ? url().url() : QDir::currentDirPath();
+ KURL mergeURL = KFileDialog::getOpenURL( startDir, QString( "*.bib *.ris" ) +
+ ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? " *.xml *.ref *.refer *.rfr *.txt *.isi *.cgi" : "" ) + "|" + i18n( "Supported Bibliographies" ) + "\n*.bib|" + i18n( "BibTeX (*.bib)" ) + "\n*.ris|" + i18n( "Reference Manager (*.ris)" ) + ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "\n*.ref *.refer *.rfr *.txt|" + i18n( "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)" ) + "\n*.isi *.cgi|" + i18n( "ISI Web of Knowledge (*.isi *.cgi)" ) + "\n*.xml|" + i18n( "MODS or EndNote XML (*.xml)" ) : "" ) + "\n*|" + i18n( "All files (*.*)" )
+ , widget() );
+
+ if ( !mergeURL.isValid() || mergeURL.isEmpty() )
+ return;
+
+ QString extension = mergeURL.fileName();
+ int extPos = extension.find( '.' );
+ if ( extPos < 0 )
+ return;
+ extension = extension.mid( extPos );
+
+ if ( !KIO::NetAccess::exists( mergeURL, TRUE, widget() ) )
+ {
+ KMessageBox::error( widget(), i18n( "The given file could not be read, check if it exists or if it is readable for the current user." ) );
+ return ;
+ }
+
+ KTempFile tempBibFile = KTempFile( locateLocal( "tmp", "bibmerge" ), extension );
+ tempBibFile.setAutoDelete( TRUE );
+ bool error = !KIO::NetAccess::file_copy( mergeURL, KURL( tempBibFile.name() ), -1, TRUE, FALSE, widget() );
+
+ if ( !error )
+ error = !m_documentWidget->open( tempBibFile.name(), TRUE );
+
+ tempBibFile.close();
+
+ if ( error )
+ {
+ KMessageBox::error( widget(), i18n( "The given file could not be merged." ) );
+ return;
+ }
+ else
+ setModified( TRUE );
+}
+
+void KBibTeXPart::slotPreferences()
+{
+ if ( !m_settingsDlg )
+ m_settingsDlg = new KBibTeX::SettingsDlg( widget(), "settings_dlg" );
+
+ m_documentWidget->saveState();
+ if ( m_settingsDlg->exec() == QDialog::Accepted )
+ m_documentWidget->restoreState();
+}
+
+void KBibTeXPart::setupGUI( QWidget *parentWidget, const char *name )
+{
+ m_documentWidget = new KBibTeX::DocumentWidget( !isReadWrite(), parentWidget, name );
+
+ // notify the part that this is our internal widget
+ setWidget( m_documentWidget );
+}
+
+void KBibTeXPart::setupActions()
+{
+ if ( isReadWrite() )
+ {
+ KStdAction::save( this, SLOT( save() ), actionCollection() ) ->setToolTip( i18n( "Save the current file" ) );
+ KStdAction::saveAs( this, SLOT( slotFileSaveAs() ), actionCollection() ) ->setToolTip( i18n( "Save the current file under a new filename" ) );
+ }
+ m_actionFileStatistics = new KAction( i18n( "Statistics..." ), CTRL + SHIFT + Key_I, this, SLOT( slotFileStatistics() ), actionCollection(), "file_statistics" );
+ m_actionFileFindDups = new KAction( i18n( "Find Duplicates..." ), CTRL + SHIFT + Key_D, this, SLOT( slotFileFindDups() ), actionCollection(), "file_finddups" );
+ m_actionFileExport = new KAction( i18n( "Export..." ), SmallIconSet( "goto" ), CTRL + Key_E, this, SLOT( slotFileExport() ), actionCollection(), "file_export" );
+ m_actionFileExport->setToolTip( i18n( "Export to a different file format" ) );
+ m_actionFileMerge = new KAction( i18n( "Merge..." ), SmallIconSet( "reload" ), CTRL + Key_M, this, SLOT( slotFileMerge() ), actionCollection(), "file_merge" );
+ m_actionFileMerge->setToolTip( i18n( "Merge BibTeX entries from another file" ) );
+
+ m_actionEditCut = KStdAction::cut( m_documentWidget, SLOT( cutElements() ), actionCollection() );
+ m_actionEditCut->setToolTip( i18n( "Cut the selected BibTeX elements to the clipboard" ) );
+ m_actionEditCut->setEnabled( FALSE );
+ m_actionEditCopy = KStdAction::copy( m_documentWidget, SLOT( copyElements() ), actionCollection() );
+ m_actionEditCopy->setToolTip( i18n( "Copy the selected BibTeX elements to the clipboard" ) );
+ m_actionEditCopy->setEnabled( FALSE );
+ m_actionEditUndo = KStdAction::undo( m_documentWidget, SLOT( undoEditor() ), actionCollection() );
+ connect( m_documentWidget, SIGNAL( undoChanged( bool ) ), this, SLOT( slotUndoChanged( bool ) ) );
+ m_actionEditCopyRef = new KAction( i18n( "Copy &Reference" ), CTRL + SHIFT + Key_C, m_documentWidget, SLOT( copyRefElements() ), actionCollection(), "edit_copyref" );
+ m_actionEditCopyRef->setToolTip( i18n( "Copy a reference of the selected BibTeX elements to the clipboard" ) );
+ m_actionEditCopyRef->setEnabled( FALSE );
+ m_actionEditPaste = KStdAction::paste( m_documentWidget, SLOT( pasteElements() ), actionCollection() );
+ m_actionEditPaste->setToolTip( i18n( "Paste BibTeX elements from the clipboard" ) );
+ m_actionEditSelectAll = KStdAction::selectAll( m_documentWidget, SLOT( selectAll() ), actionCollection() );
+ m_actionEditSelectAll->setToolTip( i18n( "Select all BibTeX elements" ) );
+ m_actionElementSendToLyX = new KAction( i18n( "Send Reference to &LyX" ), CTRL + SHIFT + Key_L, m_documentWidget, SLOT( sendSelectedToLyx() ), actionCollection(), "element_sendtolyx" );
+ m_actionElementSendToLyX->setToolTip( i18n( "Send a reference of the selected BibTeX elements to LyX" ) );
+ m_actionElementSendToLyX->setEnabled( FALSE );
+ m_actionEditFind = KStdAction::find( m_documentWidget, SLOT( find() ), actionCollection() );
+ m_actionEditFind->setToolTip( i18n( "Find text" ) );
+ m_actionEditFindNext = KStdAction::findNext( m_documentWidget, SLOT( findNext() ), actionCollection() );
+ m_actionEditFindNext->setToolTip( i18n( "Find next occurrence" ) );
+ m_actionEditFind->setEnabled( FALSE );
+ m_actionEditFindNext->setEnabled( FALSE );
+
+ m_actionSearchOnlineDatabases = new KAction( i18n( "Search Online Databases" ), SmallIconSet( "network" ), CTRL + SHIFT + Key_S, m_documentWidget, SLOT( onlineSearch() ), actionCollection(), "search_onlinedatabases" );
+ m_actionSearchOnlineDatabases->setToolTip( i18n( "Search online databases to import bibliography data" ) );
+
+ m_actionMenuSearchWebsites = new KActionMenu( i18n( "Search Document Online" ), actionCollection(), "search_document_online" );
+ m_actionMenuSearchWebsites->setToolTip( i18n( "Search websites for the selected BibTeX element" ) );
+ connect( m_actionMenuSearchWebsites->popupMenu(), SIGNAL( activated( int ) ), this, SLOT( slotSearchWebsites( int ) ) );
+ m_actionMenuSearchWebsites->setEnabled( FALSE );
+
+ m_actionViewShowColumns = new KActionMenu( i18n( "&Show Columns" ), actionCollection(), "view_showcolumns" );
+ m_actionViewShowColumns->setToolTip( i18n( "Select columns to show in the main list" ) );
+ m_actionViewDocument = new KActionMenu( i18n( "View Document" ), actionCollection(), "view_document" );
+ m_actionViewDocument->setToolTip( i18n( "View the documents associated with this BibTeX entry" ) );
+ m_actionViewDocument->setEnabled( FALSE );
+ m_actionViewFirstDocument = new KAction( i18n( "View Primary Document" ), 0, m_documentWidget, SLOT( slotViewFirstDocument() ), actionCollection(), "view_first_document" );
+ m_actionViewFirstDocument->setShortcut( Qt::Key_F4 );
+ m_actionViewDocumentOnlineRef = new KAction( i18n( "View Primary Online Reference" ), 0, m_documentWidget, SLOT( slotViewFirstDocumentsOnlineRef() ), actionCollection(), "view_first_documents_online_ref" );
+ m_actionViewDocumentOnlineRef->setShortcut( Qt::Key_F5 );
+ m_actionAssignKeywords = new KActionMenu( i18n( "Assign Keywords" ), actionCollection(), "assign_keywords" );
+ m_actionAssignKeywords->setToolTip( i18n( "Assign keywords to this entry" ) );
+ m_actionAssignKeywords->setEnabled( FALSE );
+ m_actionNormalizeIds = new KAction( i18n( "Normalize Entry Ids" ), 0, m_documentWidget, SLOT( slotNormalizeIds() ), actionCollection( ), "normalize_ids" );
+ m_actionNormalizeIds->setToolTip( i18n( "Set entry ids as specified in the id suggestion settings" ) );
+ m_actionNormalizeIds->setEnabled( FALSE );
+
+ m_actionPreferences = KStdAction::preferences( this, SLOT( slotPreferences() ), actionCollection() );
+ m_actionPreferences->setToolTip( i18n( "Configure KBibTeX" ) );
+ KAction *actionSourceEditor = new KAction( i18n( "Configure Source View..." ), 0, m_documentWidget, SLOT( configureEditor() ), actionCollection(), "options_configure_editor" );
+ actionSourceEditor ->setToolTip( i18n( "Configure the Source Editor" ) );
+
+ ( new KAction( i18n( "Article" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_article" ) ) ->setToolTip( i18n( "Add an article to the BibTeX file" ) );
+ ( new KAction( i18n( "Book" ), "element_new_entry_book", CTRL + Key_B, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_book" ) ) ->setToolTip( i18n( "Add a book to the BibTeX file" ) );
+ ( new KAction( i18n( "Booklet" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_booklet" ) ) ->setToolTip( i18n( "Add a booklet to the BibTeX file" ) );
+ ( new KAction( i18n( "Electronic (IEEE)" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_electronic" ) ) ->setToolTip( i18n( "Add an electronic reference (IEEE) to the BibTeX file" ) );
+ ( new KAction( i18n( "InBook" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_inbook" ) ) ->setToolTip( i18n( "Add a part of a book to the BibTeX file" ) );
+ ( new KAction( i18n( "InCollection" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_incollection" ) ) ->setToolTip( i18n( "Add a publication which is part of some collection to the BibTeX file" ) );
+ ( new KAction( i18n( "InProceedings" ), "element_new_entry_inproceedings", CTRL + Key_I, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_inproceedings" ) ) ->setToolTip( i18n( "Add a publication which is part of some proceedings to the BibTeX file" ) );
+ ( new KAction( i18n( "Manual" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_manual" ) ) ->setToolTip( i18n( "Add a manual to the BibTeX file" ) );
+ ( new KAction( i18n( "MastersThesis" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_mastersthesis" ) ) ->setToolTip( i18n( "Add a master or diploma thesis to the BibTeX file" ) );
+ ( new KAction( i18n( "Misc" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_misc" ) ) ->setToolTip( i18n( "Add a not specified document or reference to the BibTeX file" ) );
+ ( new KAction( i18n( "PhDThesis" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_phdthesis" ) ) ->setToolTip( i18n( "Add a PhD thesis to the BibTeX file" ) );
+ ( new KAction( i18n( "Proceedings" ), "element_new_entry_phdthesis" , CTRL + Key_P, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_proceedings" ) ) ->setToolTip( i18n( "Add some proceedings to the BibTeX file" ) );
+ ( new KAction( i18n( "TechReport" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_techreport" ) ) ->setToolTip( i18n( "Add a technical report to the BibTeX file" ) );
+ ( new KAction( i18n( "Unpublished" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_entry_unpublished" ) ) ->setToolTip( i18n( "Add an unpublished document to the BibTeX file" ) );
+ ( new KAction( i18n( "Preamble" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_preamble" ) ) ->setToolTip( i18n( "Add a preamble to the BibTeX file" ) );
+ ( new KAction( i18n( "Comment" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_comment" ) ) ->setToolTip( i18n( "Add a comment to the BibTeX file" ) );
+ ( new KAction( i18n( "Macro" ), 0, this, SLOT( slotNewElement() ), actionCollection(), "element_new_macro" ) ) ->setToolTip( i18n( "Add a macro to the BibTeX file" ) );
+
+ m_actionEditElement = new KAction( i18n( "&Edit" ), 0, m_documentWidget, SLOT( editElement() ), actionCollection(), "element_edit" );
+ m_actionEditElement->setToolTip( i18n( "Edit the selected BibTeX element" ) );
+ m_actionEditElement->setEnabled( FALSE );
+ m_actionDeleteElement = new KAction( i18n( "&Delete" ), 0, m_documentWidget, SLOT( deleteElements() ), actionCollection(), "element_delete" );
+ m_actionDeleteElement->setToolTip( i18n( "Delete the selected BibTeX elements" ) );
+ m_actionDeleteElement->setEnabled( FALSE );
+
+ m_actionShowComments = new KToggleAction( i18n( "Show &Comments" ), 0, this, SLOT( slotToggleShowSpecialElements() ), actionCollection(), "view_showcomments" );
+ m_actionShowComments->setToolTip( i18n( "Show the comments of a BibTeX document" ) );
+ m_actionShowMacros = new KToggleAction( i18n( "Show &Macros" ), 0, this, SLOT( slotToggleShowSpecialElements() ), actionCollection(), "view_showmacros" );
+ m_actionShowMacros->setToolTip( i18n( "Show the macros of a BibTeX document" ) );
+
+ m_actionUseInPipe = new KToggleAction( i18n( "Accept input from other programs" ), 0, this , SLOT( slotUseInPipe() ), actionCollection(), "useinpipe" );
+
+ connect( m_documentWidget, SIGNAL( listViewSelectionChanged( int ) ), this, SLOT( slotUpdateMenu( int ) ) );
+
+ if ( m_mainWindow != NULL )
+ {
+ KStatusBar * statusBar = m_mainWindow->statusBar();
+ if ( statusBar != NULL )
+ {
+ connect( actionCollection(), SIGNAL( actionStatusText( const QString & ) ), statusBar, SLOT( message( const QString & ) ) );
+ connect( actionCollection(), SIGNAL( clearStatusText() ), statusBar, SLOT( clear() ) );
+ }
+ }
+
+ actionCollection() ->setHighlightingEnabled( true );
+
+ KActionMenu *acmElementNew = new KActionMenu( i18n( "&New" ), QIconSet( SmallIcon( "filenew" ) ), actionCollection(), "element_new" );
+ acmElementNew->setToolTip( i18n( "Add a new element to this BibTeX document" ) );
+ acmElementNew->setEnabled( FALSE );
+}
+
+bool KBibTeXPart::slotNewElement()
+{
+ if ( isReadWrite() && sender() )
+ {
+ QString elementType;
+
+ if ( strncmp( sender() ->name(), "element_new_entry_", 18 ) == 0 )
+ elementType = QString( sender() ->name() + 18 );
+ else if ( strcmp( sender() ->name(), "element_new_comment" ) == 0 )
+ elementType = "comment";
+ else if ( strcmp( sender() ->name(), "element_new_macro" ) == 0 )
+ elementType = "macro";
+ else if ( strcmp( sender() ->name(), "element_new_preamble" ) == 0 )
+ elementType = "preamble";
+ else
+ return FALSE;
+
+ bool result = m_documentWidget->newElement( elementType );
+ if ( result )
+ setModified( TRUE );
+ return result;
+ }
+
+ return FALSE;
+}
+
+void KBibTeXPart::readSettings()
+{
+ KBibTeX::Settings * settings = KBibTeX::Settings::self();
+ KConfig * config = KBibTeXPartFactory::instance() ->config();
+ settings->load( config );
+
+ m_actionShowComments->setChecked( settings->editing_ShowComments );
+ m_actionShowMacros->setChecked( settings->editing_ShowMacros );
+}
+
+void KBibTeXPart::writeSettings()
+{
+ if ( !m_initializationDone )
+ return ;
+
+ KBibTeX::Settings * settings = KBibTeX::Settings::self();
+ m_documentWidget->saveState();
+
+ KConfig * config = KBibTeXPartFactory::instance() ->config();
+
+ settings->editing_ShowComments = m_actionShowComments->isChecked();
+ settings->editing_ShowMacros = m_actionShowMacros->isChecked();
+
+ settings->save( config );
+
+ config->sync();
+}
+
+void KBibTeXPart::slotUpdateMenu( int numSelectedItems )
+{
+ m_documentWidget->updateViewDocumentMenu();
+ m_documentWidget->updateAssignKeywords();
+
+ m_actionEditElement->setEnabled( numSelectedItems == 1 );
+ m_actionDeleteElement->setEnabled( isReadWrite() && numSelectedItems > 0 );
+ m_actionEditCut->setEnabled( isReadWrite() && numSelectedItems > 0 );
+ m_actionEditCopy->setEnabled( numSelectedItems > 0 );
+ m_actionEditCopyRef->setEnabled( numSelectedItems > 0 );
+ m_actionElementSendToLyX->setEnabled( numSelectedItems > 0 );
+ m_actionMenuSearchWebsites->setEnabled( numSelectedItems == 1 );
+ m_actionViewDocument->setEnabled( numSelectedItems == 1 && m_actionViewDocument->popupMenu() ->count() > 0 );
+ m_actionAssignKeywords->setEnabled( numSelectedItems > 0 );
+ m_actionNormalizeIds->setEnabled( numSelectedItems > 0 && isReadWrite() );
+}
+
+void KBibTeXPart::slotUndoChanged( bool undoAvailable )
+{
+ m_actionEditUndo->setEnabled( undoAvailable );
+}
+
+void KBibTeXPart::slotUseInPipe()
+{
+ if ( m_inPipe == NULL && QFile::exists( inPipeFilename ) )
+ {
+ KMessageBox::error( widget(), QString( i18n( "Some other KBibTeX instance is using the pipe.\nIf this assumption is wrong, please delete '%1'." ) ).arg( inPipeFilename ), i18n( "Pipe already in use" ) );
+ }
+ else
+ {
+ if ( m_inPipe != NULL )
+ {
+// remove pipe
+ m_inPipe->close();
+ m_inPipe->remove();
+ delete m_inPipe;
+ m_inPipe = NULL;
+ QFile::remove( inPipeFilename );
+ }
+ else
+ {
+// create pipe
+ if ( ::mkfifo( inPipeFilename.latin1(), 0600 ) == 0 )
+ {
+ m_inPipe = new QFile( inPipeFilename );
+ if ( !m_inPipe->open( IO_ReadOnly ) || fcntl( m_inPipe->handle(), F_SETFL, O_NONBLOCK ) < 0 )
+ {
+ m_inPipe->close();
+ m_inPipe = NULL;
+ }
+ if ( m_inPipe == NULL )
+ QFile::remove( inPipeFilename );
+ }
+
+ if ( m_inPipe == NULL )
+ KMessageBox::error( widget(), QString( i18n( "Could not create pipe at '%1'." ) ).arg( inPipeFilename ), i18n( "Error creating pipe" ) );
+ }
+ }
+
+ m_actionUseInPipe->setChecked( m_inPipe != NULL );
+}
+
+void KBibTeXPart::slotSearchWebsites( int id )
+{
+ KBibTeX::Settings * settings = KBibTeX::Settings::self();
+ m_documentWidget->searchWebsites( settings->searchURLs[ id - 1 ] ->url, settings->searchURLs[ id - 1 ] ->includeAuthor );
+}
+
+void KBibTeXPart::slotToggleShowSpecialElements()
+{
+ KBibTeX::Settings * settings = KBibTeX::Settings::self();
+ settings->editing_ShowComments = m_actionShowComments->isChecked();
+ settings->editing_ShowMacros = m_actionShowMacros->isChecked();
+
+ m_documentWidget->updateViews();
+}
+
+bool KBibTeXPart::save()
+{
+ if ( !url().isValid() || url().isEmpty() )
+ return saveAs();
+ else
+ return KParts::ReadWritePart::save();
+}
+
+void KBibTeXPart::slotDeferredInitialization()
+{
+ if ( factory() != NULL )
+ {
+ m_documentWidget->setFactory( factory(), this );
+ m_documentWidget->deferredInitialization();
+ m_initializationDone = TRUE;
+ }
+ else
+ {
+ m_defInitCounter++;
+
+ if ( m_defInitCounter > 5 )
+ {
+ KMessageBox::sorry( widget(), i18n( "The KBibTeX part has problems to initialize itself. Only limited functionality will be available." ), i18n( "KBibTeX Part" ) );
+ return ;
+ }
+ QTimer::singleShot( 250, this, SLOT( slotDeferredInitialization() ) );
+ }
+}
+
+// It's usually safe to leave the factory code alone.. with the
+// notable exception of the KAboutData data
+#include <kaboutdata.h>
+#include <klocale.h>
+
+KInstance* KBibTeXPartFactory::s_instance = 0L;
+KAboutData* KBibTeXPartFactory::s_about = 0L;
+
+KBibTeXPartFactory::KBibTeXPartFactory()
+ : KParts::Factory()
+{
+ // nothing
+}
+
+KBibTeXPartFactory::~KBibTeXPartFactory()
+{
+ delete s_instance;
+ delete s_about;
+
+ s_instance = 0L;
+}
+
+KParts::Part* KBibTeXPartFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
+ QObject *parent, const char *name,
+ const char *classname, const QStringList & /* args */ )
+{
+ // Create an instance of our Part
+ KBibTeXPart * obj = new KBibTeXPart( parentWidget, widgetName, parent, name );
+
+ // See if we are to be read-write or not
+ if ( QCString( classname ) == "KParts::ReadOnlyPart" )
+ obj->setReadWrite( false );
+
+ return obj;
+}
+
+KInstance* KBibTeXPartFactory::instance()
+{
+ if ( !s_instance )
+ {
+ s_about = new KAboutData( "kbibtexpart", I18N_NOOP( "KBibTeXPart" ), "0.2.3.91" );
+ s_about->addAuthor( "Thomas Fischer", 0, "fischer@unix-ag.uni-kl.de" );
+ s_instance = new KInstance( s_about );
+ }
+ return s_instance;
+}
+
+extern "C"
+{
+ void* init_libkbibtexpart()
+ {
+ return new KBibTeXPartFactory;
+ }
+};
+
+#include "kbibtex_part.moc"
+
diff --git a/src/kbibtex_part.desktop b/src/kbibtex_part.desktop
new file mode 100644
index 0000000..57cba41
--- /dev/null
+++ b/src/kbibtex_part.desktop
@@ -0,0 +1,15 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=KBibTeXPart
+Name[et]=KBibTeX komponent
+Name[hi]=KBibTeXपार्ट
+Name[sv]=KBibTeX-del
+Name[ta]=KBibTeXபாகம்
+Name[xx]=xxKBibTeXPartxx
+Name[pl]=Moduł KBibTeX
+Name[pt_BR]=Parte do KBibTeX
+Name[de]=Einbettungsfähige Komponente von KBibTeX
+MimeType=text/x-bibtex;application/x-endnote-library;
+ServiceTypes=KParts/ReadOnlyPart,KParts/ReadWritePart
+X-KDE-Library=libkbibtexpart
+Type=Service
diff --git a/src/kbibtex_part.h b/src/kbibtex_part.h
new file mode 100644
index 0000000..f9a045a
--- /dev/null
+++ b/src/kbibtex_part.h
@@ -0,0 +1,169 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+
+#ifndef _KBIBTEXPART_H_
+#define _KBIBTEXPART_H_
+
+#include <kparts/part.h>
+#include <kparts/factory.h>
+
+#include <element.h>
+#include <xsltransform.h>
+#include <documentwidget.h>
+#include <settingsdlg.h>
+
+class QWidget;
+class QTextEdit;
+class QFile;
+class QLabel;
+class QTabWidget;
+class QPainter;
+class QListViewItem;
+class QProgressDialog;
+class KURL;
+class KListView;
+class KAction;
+class KActionMenu;
+class KToggleAction;
+class KMainWindow;
+
+class KBibTeXPart : public KParts::ReadWritePart
+{
+ Q_OBJECT
+
+public:
+ KBibTeXPart( QWidget *parentWidget, const char *widgetName,
+ QObject *parent, const char *name );
+
+ virtual ~KBibTeXPart();
+
+ void setReadWrite( bool rw );
+
+ void setModified( bool modified );
+
+ bool saveAs();
+ bool queryClose();
+ virtual bool closeURL();
+
+public slots:
+ virtual bool save();
+
+signals:
+ void signalAddRecentURL( const KURL& );
+
+protected:
+ virtual bool openFile();
+ virtual bool saveFile();
+
+protected slots:
+ void slotFileSaveAs();
+ void slotFileMerge();
+ void slotFileExport();
+ void slotFileStatistics();
+ void slotFileFindDups();
+ void slotPreferences();
+
+private slots:
+ bool slotNewElement();
+ void slotSearchWebsites( int id );
+ void slotToggleShowSpecialElements();
+ void slotDeferredInitialization();
+ void slotUpdateMenu( int numSelectedItems );
+ void slotUndoChanged( bool undoAvailable );
+ void slotUseInPipe();
+
+private:
+ enum SearchDirection
+ {
+ sdForward, sdBackward
+ };
+ enum SaveStatus
+ {
+ ssSave, ssExport, ssFailed
+ };
+
+ int m_defInitCounter;
+ QLabel *m_preview;
+ QProgressDialog *m_progressDialog;
+ KBibTeX::DocumentWidget *m_documentWidget;
+ KBibTeX::SettingsDlg *m_settingsDlg;
+ KAction *m_actionFileMerge;
+ KAction *m_actionFileExport;
+ KAction *m_actionFileStatistics;
+ KAction *m_actionFileFindDups;
+ KAction *m_actionEditUndo;
+ KAction *m_actionElementSendToLyX;
+ KAction *m_actionEditElement;
+ KAction *m_actionDeleteElement;
+ KAction *m_actionEditCut;
+ KAction *m_actionEditCopy;
+ KAction *m_actionEditCopyRef;
+ KAction *m_actionEditPaste;
+ KAction *m_actionEditSelectAll;
+ KAction *m_actionEditFind;
+ KAction *m_actionEditFindNext;
+ KAction *m_actionPreferences;
+ KAction *m_actionSearchOnlineDatabases;
+ KActionMenu *m_actionViewDocument;
+ KAction *m_actionViewFirstDocument;
+ KAction *m_actionViewDocumentOnlineRef;
+ KActionMenu *m_actionAssignKeywords;
+ KAction *m_actionNormalizeIds;
+ KActionMenu *m_actionMenuSearchWebsites;
+ KActionMenu *m_actionViewShowColumns;
+ KAction *m_actionSearchNCBI;
+ KToggleAction *m_actionUseInPipe;
+ KToggleAction *m_actionShowComments;
+ KToggleAction *m_actionShowMacros;
+ KMainWindow *m_mainWindow;
+ QValueList<KBibTeX::WebQuery*> webQueryList;
+ bool m_initializationDone;
+ QFile *m_inPipe;
+
+ void readSettings();
+ void writeSettings();
+
+ void setupGUI( QWidget *parentWidget, const char *name );
+ void setupActions();
+
+signals:
+ void progressCancel();
+};
+
+class KInstance;
+class KAboutData;
+
+class KBibTeXPartFactory : public KParts::Factory
+{
+ Q_OBJECT
+public:
+ KBibTeXPartFactory();
+ virtual ~KBibTeXPartFactory();
+ virtual KParts::Part* createPartObject( QWidget * parentWidget, const char * widgetName,
+ QObject * parent, const char * name,
+ const char * classname, const QStringList & /* args */ );
+ static KInstance* instance();
+
+private:
+ static KInstance* s_instance;
+ static KAboutData* s_about;
+};
+
+#endif // _KBIBTEXPART_H_
diff --git a/src/kbibtex_part.rc b/src/kbibtex_part.rc
new file mode 100644
index 0000000..9c970d9
--- /dev/null
+++ b/src/kbibtex_part.rc
@@ -0,0 +1,158 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="kbibtex_part" version="1">
+<MenuBar>
+ <Menu name="file">
+ <Action name="file_merge"/>
+ <Action name="file_save"/>
+ <Action name="file_save_as"/>
+ <Action name="file_export"/>
+ <Separator/>
+ <Action name="file_statistics"/>
+ <Action name="file_finddups"/>
+ </Menu>
+ <Menu name="edit"><text>&amp;Edit</text>
+ <Action name="edit_undo" />
+ <Separator/>
+ <Action name="edit_cut"/>
+ <Action name="edit_copy"/>
+ <Action name="edit_copyref"/>
+ <Action name="edit_paste"/>
+ <Separator/>
+ <Action name="edit_select_all"/>
+ <Separator/>
+ <Action name="edit_find"/>
+ <Action name="edit_find_next"/>
+ </Menu>
+ <Menu name="element"><text>E&amp;lement</text>
+ <Menu name="element_new"><text>&amp;New</text>
+ <Action name="element_new_entry_article" />
+ <Action name="element_new_entry_book" />
+ <Action name="element_new_entry_booklet" />
+ <Action name="element_new_entry_electronic" />
+ <Action name="element_new_entry_inbook" />
+ <Action name="element_new_entry_incollection" />
+ <Action name="element_new_entry_inproceedings" />
+ <Action name="element_new_entry_manual" />
+ <Action name="element_new_entry_mastersthesis" />
+ <Action name="element_new_entry_misc" />
+ <Action name="element_new_entry_phdthesis" />
+ <Action name="element_new_entry_proceedings" />
+ <Action name="element_new_entry_techreport" />
+ <Action name="element_new_entry_unpublished" />
+ <Separator/>
+ <Action name="element_new_preamble" />
+ <Action name="element_new_comment" />
+ <Action name="element_new_macro" />
+ </Menu>
+ <Action name="element_edit" />
+ <Action name="element_delete" />
+ <Separator/>
+ <Action name="search_document_online"/>
+ <Action name="view_document"/>
+ <Action name="assign_keywords"/>
+ <Action name="normalize_ids"/>
+ <Separator/>
+ <Action name="element_sendtolyx"/>
+ <Separator/>
+ <Action name="search_onlinedatabases"/>
+ </Menu>
+ <Menu name="view"><text>&amp;View</text>
+ <Action name="view_showmacros" />
+ <Action name="view_showcomments" />
+ <Action name="view_showcolumns" />
+ </Menu>
+ <Menu name="settings"><text>Se&amp;ttings</text>
+ <Action name="show_statusbar" append="show_merge"/>
+ <!-- <Action name="useinpipe" /> -->
+ <Action name="options_configure" />
+ <Action name="options_configure_editor" />
+ </Menu>
+</MenuBar>
+<ToolBar name="mainToolBar">
+ <Action name="file_save"/>
+</ToolBar>
+<Menu name="popup_bibtexlist">
+ <Menu name="element_new"><text>&amp;New</text>
+ <Action name="element_new_entry_article" />
+ <Action name="element_new_entry_book" />
+ <Action name="element_new_entry_booklet" />
+ <Action name="element_new_entry_electronic" />
+ <Action name="element_new_entry_inbook" />
+ <Action name="element_new_entry_incollection" />
+ <Action name="element_new_entry_inproceedings" />
+ <Action name="element_new_entry_manual" />
+ <Action name="element_new_entry_mastersthesis" />
+ <Action name="element_new_entry_misc" />
+ <Action name="element_new_entry_phdthesis" />
+ <Action name="element_new_entry_proceedings" />
+ <Action name="element_new_entry_techreport" />
+ <Action name="element_new_entry_unpublished" />
+ <Separator/>
+ <Action name="element_new_preamble" />
+ <Action name="element_new_comment" />
+ <Action name="element_new_macro" />
+ </Menu>
+ <Action name="element_edit" />
+ <Action name="element_delete" />
+ <Separator/>
+ <Action name="search_document_online"/>
+ <Action name="view_document"/>
+ <Action name="assign_keywords"/>
+ <Action name="normalize_ids"/>
+ <Separator/>
+ <Action name="element_sendtolyx"/>
+ <Separator/>
+ <Action name="edit_cut"/>
+ <Action name="edit_copy"/>
+ <Action name="edit_copyref"/>
+ <Action name="edit_paste"/>
+</Menu>
+<Menu name="popup_newelements">
+ <Action name="element_new_entry_article" />
+ <Action name="element_new_entry_book" />
+ <Action name="element_new_entry_booklet" />
+ <Action name="element_new_entry_electronic" />
+ <Action name="element_new_entry_inbook" />
+ <Action name="element_new_entry_incollection" />
+ <Action name="element_new_entry_inproceedings" />
+ <Action name="element_new_entry_manual" />
+ <Action name="element_new_entry_mastersthesis" />
+ <Action name="element_new_entry_misc" />
+ <Action name="element_new_entry_phdthesis" />
+ <Action name="element_new_entry_proceedings" />
+ <Action name="element_new_entry_techreport" />
+ <Action name="element_new_entry_unpublished" />
+ <Separator/>
+ <Action name="element_new_preamble" />
+ <Action name="element_new_comment" />
+ <Action name="element_new_macro" />
+</Menu>
+<Menu name="ktexteditor_popup" noMerge="1">
+ <Menu name="element_new"><text>&amp;New</text>
+ <Action name="element_new_entry_article" />
+ <Action name="element_new_entry_book" />
+ <Action name="element_new_entry_booklet" />
+ <Action name="element_new_entry_electronic" />
+ <Action name="element_new_entry_inbook" />
+ <Action name="element_new_entry_incollection" />
+ <Action name="element_new_entry_inproceedings" />
+ <Action name="element_new_entry_manual" />
+ <Action name="element_new_entry_mastersthesis" />
+ <Action name="element_new_entry_misc" />
+ <Action name="element_new_entry_phdthesis" />
+ <Action name="element_new_entry_proceedings" />
+ <Action name="element_new_entry_techreport" />
+ <Action name="element_new_entry_unpublished" />
+ <Separator/>
+ <Action name="element_new_preamble" />
+ <Action name="element_new_comment" />
+ <Action name="element_new_macro" />
+ </Menu>
+ <Separator/>
+ <Action name="edit_undo" />
+ <Separator/>
+ <Action name="edit_cut" />
+ <Action name="edit_copy" />
+ <Action name="edit_paste" />
+</Menu>
+</kpartgui>
diff --git a/src/kbibtex_shell.rc b/src/kbibtex_shell.rc
new file mode 100644
index 0000000..58b4937
--- /dev/null
+++ b/src/kbibtex_shell.rc
@@ -0,0 +1,31 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="kbibtex_shell" version="1">
+<MenuBar>
+ <Menu noMerge="1" name="file"><text>&amp;File</text>
+ <Action name="file_new"/>
+ <Action name="file_open"/>
+ <Action name="file_open_recent"/>
+ <Merge/>
+ <Separator/>
+ <Action name="file_close"/>
+ </Menu>
+ <Merge/>
+ <Menu noMerge="1" name="settings"><text>Se&amp;ttings</text>
+ <Action name="options_show_toolbar"/>
+ <Action name="options_show_statusbar"/>
+ <Merge name="show_merge"/>
+ <Separator/>
+ <Action name="options_configure_keybinding"/>
+ <Action name="options_configure_toolbars"/>
+ <Action name="options_configure"/>
+ <Merge name="configure_merge"/>
+ <Separator/>
+ <Merge/>
+ </Menu>
+</MenuBar>
+<ToolBar noMerge="1" name="mainToolBar"><text>Main Toolbar</text>
+ <Action name="file_new"/>
+ <Action name="file_open_recent"/>
+ <Merge/>
+</ToolBar>
+</kpartgui>
diff --git a/src/kbibtexshell.cpp b/src/kbibtexshell.cpp
new file mode 100644
index 0000000..e3182dd
--- /dev/null
+++ b/src/kbibtexshell.cpp
@@ -0,0 +1,387 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qprocess.h>
+
+#include <kkeydialog.h>
+#include <kencodingfiledialog.h>
+#include <kconfig.h>
+#include <kurl.h>
+#include <kactionclasses.h>
+#include <kedittoolbar.h>
+#include <kdebug.h>
+#include <kaction.h>
+#include <kstdaction.h>
+#include <kio/netaccess.h>
+#include <klibloader.h>
+#include <kmessagebox.h>
+#include <kstatusbar.h>
+#include <klocale.h>
+
+#include <kbibtex_part.h>
+#include "kbibtexshell.h"
+
+KBibTeXShell::KBibTeXShell( QWidget* parentWidget, const char* name )
+ : KParts::MainWindow( parentWidget, name ), m_part( NULL ), m_parentWidget( parentWidget )
+{
+ // set the shell's ui resource file
+ setXMLFile( "kbibtex_shell.rc" );
+
+ // then, setup our actions
+ setupActions();
+
+ // and a status bar
+ statusBar() ->show();
+
+ // this routine will find and load our Part. it finds the Part by
+ // name which is a bad idea usually.. but it's alright in this
+ // case since our Part is made for this Shell
+ KLibFactory *factory = KLibLoader::self() ->factory( "libkbibtexpart" );
+ if ( factory )
+ {
+ // now that the Part is loaded, we cast it to a Part to get
+ // our hands on it
+ m_part = static_cast<KParts::ReadWritePart *>( factory->create( this, "kbibtex_part", "KParts::ReadWritePart" ) );
+
+ if ( m_part )
+ {
+ // tell the KParts::MainWindow that this is indeed the main widget
+ setCentralWidget( m_part->widget() );
+
+ // and integrate the part's GUI with the shell's
+ createGUI( m_part );
+ }
+
+ }
+ else
+ {
+ // if we couldn't find our Part, we exit since the Shell by
+ // itself can't do anything useful
+ KMessageBox::error( this, i18n( "Could not find our part!" ) );
+ kapp->quit();
+ // we return here, cause kapp->quit() only means "exit the
+ // next time we enter the event loop...
+ return ;
+ }
+
+ // apply the saved mainwindow settings, if any, and ask the mainwindow
+ // to automatically save settings if changed: window size, toolbar
+ // position, icon size, etc.
+ setAutoSaveSettings();
+
+ readConfig();
+
+#ifdef HAVE_YAZ
+ kdDebug() << "Using YAZ to access Z39.50 databases" << endl;
+#else // HAVE_YAZ
+ kdDebug() << "YAZ not linked to KBibTeX. No access to Z39.50 databases possible" << endl;
+#endif // HAVE_YAZ
+
+}
+
+KBibTeXShell::~KBibTeXShell()
+{
+ // nothing
+}
+
+bool KBibTeXShell::openURL( const KURL& url )
+{
+ if ( url.isEmpty() )
+ return false;
+
+ // About this function, the style guide (
+ // http://developer.kde.org/documentation/standards/kde/style/basics/index.html )
+ // says that it should open a new window if the document is _not_
+ // in its initial state. This is what we do here.
+
+ // If there is no part yet created, create new one...
+
+ if ( m_part->url().isEmpty() && !m_part->isModified() )
+ {
+ if ( !m_part->openURL( url ) )
+ return FALSE;
+ }
+ else
+ {
+ KBibTeXShell *shell = new KBibTeXShell();
+
+ if ( !shell->part() ->openURL( url ) )
+ return FALSE;
+ else
+ initializePart( shell->part() );
+ shell->show();
+ }
+
+ m_recentFiles->addURL( url );
+ return TRUE;
+}
+
+KParts::ReadWritePart * KBibTeXShell::part()
+{
+ return m_part;
+}
+
+void KBibTeXShell::readConfig( KConfig *config )
+{
+ config->setGroup( "Session" );
+ m_recentFiles->loadEntries( config );
+ m_recentFiles->setEnabled( true ); // force enabling
+ m_recentFiles->setToolTip( i18n( "Click to open a file\nClick and hold to open a recent file" ) );
+}
+
+void KBibTeXShell::writeConfig( KConfig *config )
+{
+ config->setGroup( "Session" );
+ m_recentFiles->saveEntries( config );
+ config->sync();
+}
+
+void KBibTeXShell::readConfig()
+{
+ KConfig * config = kapp->config();
+ readConfig( config );
+}
+
+void KBibTeXShell::writeConfig()
+{
+ KConfig * config = kapp->config();
+ writeConfig( config );
+}
+
+QString KBibTeXShell::encoding()
+{
+ return "utf8";
+}
+
+void KBibTeXShell::slotAddRecentURL( const KURL&url )
+{
+ m_recentFiles->addURL( url );
+}
+
+void KBibTeXShell::setupActions()
+{
+ KAction * action;
+
+ action = KStdAction::openNew( this, SLOT( slotFileNew() ), actionCollection() );
+ action ->setToolTip( i18n( "Create a new window for a new BibTeX file" ) );
+ KAction *actionOpen = KStdAction::open( this, SLOT( slotFileOpen() ), actionCollection() );
+ actionOpen->setToolTip( i18n( "Open an existing BibTeX file" ) );
+
+ m_recentFiles = KStdAction::openRecent( this, SLOT( slotFileOpen( const KURL& ) ), actionCollection() );
+ m_recentFiles->setWhatsThis( i18n( "This lists files which you have opened recently, and allows you to easily open them again." ) );
+ connect( m_recentFiles, SIGNAL( activated() ), actionOpen, SLOT( activate() ) );
+
+ action = KStdAction::close( this, SLOT( slotFileClose() ), actionCollection() );
+ action->setToolTip( i18n( "Close this KBibTeX window" ) );
+ // action = KStdAction::quit( kapp, SLOT( closeAllWindows() ), actionCollection() );
+ // action->setToolTip( i18n( "Close all windows and quit KBibTeX" ) );
+
+ m_statusbarAction = KStdAction::showStatusbar( this, SLOT( optionsShowStatusbar() ), actionCollection() );
+ m_statusbarAction->setToolTip( i18n( "Show or hide the window's status bar" ) );
+
+ KStdAction::keyBindings( this, SLOT( optionsConfigureKeys() ), actionCollection() ) ->setToolTip( i18n( "Configure key bindings for KBibTeX" ) );
+ KStdAction::configureToolbars( this, SLOT( optionsConfigureToolbars() ), actionCollection() ) ->setToolTip( i18n( "Configure the tool bar for KBibTeX" ) );
+
+ connect( actionCollection(), SIGNAL( actionStatusText( const QString & ) ), this, SLOT( slotActionStatusText( const QString & ) ) );
+ connect( actionCollection(), SIGNAL( clearStatusText( ) ), statusBar(), SLOT( clear() ) );
+}
+
+void KBibTeXShell::slotActionStatusText( const QString &text )
+{
+ KStatusBar * stb = statusBar();
+
+ if ( stb )
+ stb->message( text );
+}
+
+void KBibTeXShell::saveProperties( KConfig* /*config*/ )
+{
+ // the 'config' object points to the session managed
+ // config file. anything you write here will be available
+ // later when this app is restored
+}
+
+void KBibTeXShell::readProperties( KConfig* /*config*/ )
+{
+ // the 'config' object points to the session managed
+ // config file. this function is automatically called whenever
+ // the app is being restored. read in here whatever you wrote
+ // in 'saveProperties'
+}
+
+void KBibTeXShell::optionsShowStatusbar()
+{
+ // this is all very cut and paste code for showing/hiding the
+ // statusbar
+ if ( m_statusbarAction->isChecked() )
+ statusBar() ->show();
+ else
+ statusBar() ->hide();
+}
+
+void KBibTeXShell::optionsConfigureKeys()
+{
+ KKeyDialog dlg( false, this );
+ QPtrList<KXMLGUIClient> clients = guiFactory()->clients();
+ for ( QPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it )
+ {
+ dlg.insert(( *it )->actionCollection() );
+ }
+ dlg.configure();
+}
+
+void KBibTeXShell::optionsConfigureToolbars()
+{
+#if defined(KDE_MAKE_VERSION)
+# if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
+ saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
+# else
+ saveMainWindowSettings( KGlobal::config() );
+# endif
+#else
+ saveMainWindowSettings( KGlobal::config() );
+#endif
+
+ // use the standard toolbar editor
+ KEditToolbar dlg( factory() );
+ connect( &dlg, SIGNAL( newToolbarConfig() ),
+ this, SLOT( applyNewToolbarConfig() ) );
+ dlg.exec();
+}
+
+void KBibTeXShell::applyNewToolbarConfig()
+{
+#if defined(KDE_MAKE_VERSION)
+# if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
+ applyMainWindowSettings( KGlobal::config(), autoSaveGroup() );
+# else
+ applyMainWindowSettings( KGlobal::config() );
+# endif
+#else
+ applyMainWindowSettings( KGlobal::config() );
+#endif
+}
+
+bool KBibTeXShell::queryClose()
+{
+ if ( m_part && !m_part ->closeURL() )
+ return FALSE;
+
+ writeConfig();
+
+ return KParts::MainWindow::queryClose();
+}
+
+void KBibTeXShell::slotFileNew()
+{
+ // this slot is called whenever the File->New menu is selected,
+ // the New shortcut is pressed (usually CTRL+N) or the New toolbar
+ // button is clicked
+
+ // About this function, the style guide (
+ // http://developer.kde.org/documentation/standards/kde/style/basics/index.html )
+ // says that it should open a new window if the document is _not_
+ // in its initial state. This is what we do here..
+ if ( ! m_part->url().isEmpty() || m_part->isModified() )
+ {
+ ( new KBibTeXShell() ) ->show();
+ };
+}
+
+/**
+ * Show a file open dialog where a user can select one or several
+ * files for opening.
+ */
+void KBibTeXShell::slotFileOpen()
+{
+ bool bibUtilsAvailable = checkExternalToolAvailable( "xml2bib" ) && checkExternalToolAvailable( "end2xml" );
+ QString startDir = ! m_part->url().isEmpty() ? m_part->url().url() : QDir::currentDirPath();
+ KURL mergeURL = KFileDialog::getOpenURL( startDir, QString( "*.bib *.ris" ) +
+ ( bibUtilsAvailable ? " *.xml *.ref *.refer *.rfr *.txt *.isi *.cgi" : "" ) + "|" + i18n( "Supported Bibliographies" ) + "\n*.bib|" + i18n( "BibTeX (*.bib)" ) + "\n*.ris|" + i18n( "Reference Manager (*.ris)" ) + ( bibUtilsAvailable ? "\n*.ref *.refer *.rfr *.txt|" + i18n( "EndNote (Refer format) (*.ref *.refer *.rfr *.txt)" ) + "\n*.isi *.cgi|" + i18n( "ISI Web of Knowledge (*.isi *.cgi)" ) + "\n*.xml|" + i18n( "MODS or EndNote XML (*.xml)" ) : "" ) + "\n*|" + i18n( "All files (*.*)" )
+ , widget() );
+ slotFileOpen( mergeURL );
+}
+
+
+/**
+ * Open a given url in a new window.
+ */
+void KBibTeXShell::slotFileOpen( const KURL& url )
+{
+ if ( url.isEmpty() ) return ;
+
+ if ( !KIO::NetAccess::exists( url, TRUE, this ) )
+ {
+ m_recentFiles->removeURL( url );
+ KMessageBox::error( this, i18n( "The given file could not be read, check if it exists or if it is readable for the current user." ) );
+ return ;
+ }
+
+ if ( m_part->url().isEmpty() && !m_part->isModified() )
+ // we open the file in this window...
+ openURL( url );
+ else
+ {
+ // we open the file in a new window...
+ KBibTeXShell * shell = new KBibTeXShell();
+ if ( shell->openURL( url ) )
+ {
+ initializePart( shell->part() );
+ shell->show();
+ }
+ else
+ {
+ KMessageBox::error( this, i18n( "Could not open file '%1'." ).arg( url.path() ) );
+ }
+ }
+
+}
+
+/**
+ * Close currrent window
+ */
+void KBibTeXShell::slotFileClose()
+{
+ close();
+}
+
+void KBibTeXShell::initializePart( KParts::ReadWritePart* part )
+{
+ if ( part )
+ {
+ connect( static_cast<KBibTeXPart*>( part ), SIGNAL( signalAddRecentURL( const KURL & ) ), this, SLOT( slotAddRecentURL( const KURL& ) ) );
+ }
+}
+
+bool KBibTeXShell::checkExternalToolAvailable( const QString &binary )
+{
+ QProcess *process = new QProcess( binary );
+ bool ok = process->start();
+ ok &= process->normalExit();
+ if ( process->isRunning() )
+ {
+ process->kill();
+ ok = true;
+ }
+ delete process;
+ return ok;
+}
+
+
+#include "kbibtexshell.moc"
diff --git a/src/kbibtexshell.h b/src/kbibtexshell.h
new file mode 100644
index 0000000..b52d577
--- /dev/null
+++ b/src/kbibtexshell.h
@@ -0,0 +1,100 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+
+#ifndef _KBIBTEXSHELL_H_
+#define _KBIBTEXSHELL_H_
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <kapplication.h>
+#include <kparts/mainwindow.h>
+
+class QWidget;
+class QFrame;
+
+class KToggleAction;
+class KConfig;
+class KRecentFilesAction;
+
+class KBibTeXShell : public KParts::MainWindow
+{
+ Q_OBJECT
+
+public:
+ KBibTeXShell( QWidget* parentWidget = 0, const char* name = 0 );
+
+ virtual ~KBibTeXShell();
+
+ bool openURL( const KURL& url );
+
+ KParts::ReadWritePart *part();
+
+ //config file functions
+public:
+ void readConfig( KConfig * );
+ void writeConfig( KConfig * );
+
+ void readConfig();
+ void writeConfig();
+
+public:
+ static QString encoding();
+
+public slots:
+ void slotAddRecentURL( const KURL& );
+
+protected:
+ virtual bool queryClose( );
+
+private slots:
+ void slotFileNew();
+ void slotFileOpen();
+ void slotFileOpen( const KURL& url );
+ void slotFileClose();
+ void optionsShowStatusbar();
+ void optionsConfigureKeys();
+ void optionsConfigureToolbars();
+
+ void applyNewToolbarConfig();
+
+ void slotActionStatusText( const QString &text );
+
+private:
+ KParts::ReadWritePart *m_part;
+ QWidget* m_parentWidget;
+
+ KToggleAction *m_statusbarAction;
+
+ KRecentFilesAction *m_recentFiles;
+
+ void saveProperties( KConfig * );
+ void readProperties( KConfig * );
+
+ void setupAccel();
+ void setupActions();
+
+ void initializePart( KParts::ReadWritePart* );
+
+ bool checkExternalToolAvailable( const QString &binary );
+};
+
+#endif // _KBIBTEXSHELL_H_
diff --git a/src/latin1literal.h b/src/latin1literal.h
new file mode 100644
index 0000000..97c4cfc
--- /dev/null
+++ b/src/latin1literal.h
@@ -0,0 +1,99 @@
+/***************************************************************************
+ copyright : (C) 2003-2006 by Robby Stephenson
+ email : robby@periapsis.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This file has been modified to match the requirements of KBibTeX. *
+ * In case of problems or bugs arising from this implementation, please *
+ * contact the KBibTeX team first. *
+ * Thomas Fischer <fischer@unix-ag.uni-kl.de> *
+ * *
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+// this code was original published to the kde-core-devel email list
+// copyright 2003 Harri Porten <porten@kde.org>
+// Originally licensed under LGPL, included here under GPL v2
+
+#ifndef LATIN1LITERAL_H
+#define LATIN1LITERAL_H
+
+#include <qstring.h>
+
+namespace KBibTeX {
+
+/**
+ * A class for explicit marking of string literals encoded in the ISO
+ * 8859-1 character set. Allows for efficient, still (in terms of the
+ * chosen encoding) safe comparison with QString instances. To be used
+ * like this:
+ *
+ * \code
+ * QString s = .....
+ * if (s == Latin1Literal("o")) { ..... }
+ * \endcode
+ *
+ */
+#define Latin1Literal(s) \
+ KBibTeX::Latin1LiteralInternal((s), sizeof(s)/sizeof(char)-1)
+
+class Latin1LiteralInternal {
+
+public:
+ Latin1LiteralInternal(const char* s, size_t l)
+ : str(s), len(s ? l : (size_t)-1) { }
+
+ // this is lazy, leave these public since I can't figure out
+ // how to declare a friend function that works for gcc 2.95
+ const char* str;
+ size_t len;
+};
+
+} // end namespace
+
+inline
+bool operator==(const QString& s1, const KBibTeX::Latin1LiteralInternal& s2) {
+ const QChar* uc = s1.unicode();
+ const char* c = s2.str;
+ if(!c || !uc) {
+ return (!c && !uc);
+ }
+
+ const size_t& l = s2.len;
+ if(s1.length() != l) {
+ return false;
+ }
+
+ for(size_t i = 0; i < l; ++i, ++uc, ++c) {
+ if(uc->unicode() != static_cast<uchar>(*c)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+inline
+bool operator!=(const QString& s1, const KBibTeX::Latin1LiteralInternal& s2) {
+ return !(s1 == s2);
+}
+
+inline
+bool operator==(const KBibTeX::Latin1LiteralInternal& s1, const QString& s2) {
+ return s2 == s1;
+}
+
+inline
+bool operator!=(const KBibTeX::Latin1LiteralInternal& s1, const QString& s2) {
+ return !(s2 == s1);
+}
+
+#endif
diff --git a/src/macro.cpp b/src/macro.cpp
new file mode 100644
index 0000000..4958e6f
--- /dev/null
+++ b/src/macro.cpp
@@ -0,0 +1,115 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qregexp.h>
+#include <qstringlist.h>
+
+#include "macro.h"
+
+namespace BibTeX
+{
+
+ Macro::Macro( const QString &key )
+ : Element(), m_key( key ), m_value( new Value() )
+ {
+ // nothing
+ }
+
+ Macro::Macro( Macro *other )
+ : Element(), m_value( NULL )
+ {
+ copyFrom( other );
+ }
+
+ Macro::~Macro()
+ {
+ delete m_value;
+ }
+
+ void Macro::setKey( const QString &key )
+ {
+ m_key = key;
+ }
+
+ QString Macro::key() const
+ {
+ return m_key;
+ }
+
+ Value *Macro::value() const
+ {
+ return m_value;
+ }
+
+ void Macro::setValue( Value *value )
+ {
+ if ( value != m_value )
+ {
+ delete m_value;
+
+ if ( value != NULL )
+ m_value = new Value( value );
+ else
+ m_value = NULL;
+ }
+ }
+
+ bool Macro::containsPattern( const QString& pattern, EntryField::FieldType fieldType, FilterType filterType, bool caseSensitive ) const
+ {
+ QString text = QString( m_key ).append( m_value->simplifiedText() );
+
+ if ( filterType == ftExact )
+ {
+ /** check for exact match */
+ return fieldType == EntryField::ftUnknown && text.contains( pattern, caseSensitive );
+ }
+ else
+ {
+ /** for each word in the search pattern ... */
+ QStringList words = QStringList::split( QRegExp( "\\s+" ), pattern );
+ unsigned int hits = 0;
+ for ( QStringList::Iterator it = words.begin(); it != words.end(); ++it )
+ {
+ /** check if word is contained in text */
+ if ( fieldType == EntryField::ftUnknown && text.contains( *it, caseSensitive ) )
+ ++hits;
+ }
+
+ /** return success depending on filter type and number of hits */
+ return ( ( filterType == ftAnyWord && hits > 0 ) || ( filterType == ftEveryWord && hits == words.count() ) );
+ }
+ }
+
+ Element* Macro::clone()
+ {
+ return new Macro( this );
+ }
+
+ void Macro::copyFrom( Macro *other )
+ {
+ m_key = other->m_key;
+ if ( m_value != NULL ) delete m_value;
+ m_value = new Value( other->m_value );
+ }
+
+ QString Macro::text() const
+ {
+ return m_key + "=" + m_value->text();
+ }
+}
diff --git a/src/macro.h b/src/macro.h
new file mode 100644
index 0000000..ae42bdc
--- /dev/null
+++ b/src/macro.h
@@ -0,0 +1,57 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXMACRO_H
+#define BIBTEXMACRO_H
+
+#include <element.h>
+#include <entryfield.h>
+#include <value.h>
+
+class QString;
+
+namespace BibTeX
+{
+ class Macro : public Element
+ {
+ public:
+ Macro( const QString &key );
+ Macro( Macro *other );
+ virtual ~Macro();
+
+ void setKey( const QString &key );
+ QString key() const;
+
+ Value *value() const;
+ void setValue( Value *value );
+
+ bool containsPattern( const QString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const;
+
+ Element* clone();
+ void copyFrom( Macro *other );
+ QString text() const;
+
+ private:
+ QString m_key;
+ Value *m_value;
+ };
+
+}
+
+#endif
diff --git a/src/macrowidget.cpp b/src/macrowidget.cpp
new file mode 100644
index 0000000..5acca02
--- /dev/null
+++ b/src/macrowidget.cpp
@@ -0,0 +1,99 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlabel.h>
+#include <qlayout.h>
+
+#include <klineedit.h>
+#include <kdialogbase.h>
+#include <klocale.h>
+#include <kdebug.h>
+
+#include <element.h>
+#include <fileexporterbibtex.h>
+#include <fileimporterbibtex.h>
+#include <fieldlineedit.h>
+
+#include "macrowidget.h"
+
+namespace KBibTeX
+{
+ QDialog::DialogCode MacroWidget::execute( BibTeX::Macro *macro, bool isReadOnly, QWidget *parent, const char *name )
+ {
+ KDialogBase * dlg = new KDialogBase( parent, name, TRUE, i18n( "Edit BibTeX Macro" ), KDialogBase::Ok | KDialogBase::Cancel );
+ MacroWidget* macroWidget = new MacroWidget( macro, isReadOnly, dlg, "MacroWidget" );
+
+ dlg->setMainWidget( macroWidget );
+ connect( dlg, SIGNAL( okClicked() ), macroWidget, SLOT( apply() ) );
+
+ QDialog::DialogCode result = ( QDialog::DialogCode ) dlg->exec();
+
+ delete( macroWidget );
+ delete( dlg );
+
+ return result;
+ }
+
+ MacroWidget::MacroWidget( BibTeX::Macro *bibtexmacro, bool isReadOnly, QWidget *parent, const char *name )
+ : QWidget( parent, name ), m_isReadOnly( isReadOnly ), m_bibtexmacro( bibtexmacro )
+ {
+ setupGUI();
+ reset();
+ }
+
+ MacroWidget::~MacroWidget()
+ {
+ // nothing
+ }
+
+ void MacroWidget::apply()
+ {
+ m_bibtexmacro->setKey( m_lineEditMacroId->text() );
+ BibTeX::Value *value = m_fieldLineEditMacroValue->value();
+ m_bibtexmacro->setValue( value );
+ }
+
+ void MacroWidget::reset()
+ {
+ m_lineEditMacroId->setText( m_bibtexmacro->key() );
+ m_fieldLineEditMacroValue->setValue( m_bibtexmacro->value() );
+ }
+
+ void MacroWidget::setupGUI()
+ {
+ setMinimumWidth( 384 );
+
+ QVBoxLayout * layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+
+ QLabel *label = new QLabel( i18n( "Macro &id:" ), this );
+ layout->addWidget( label );
+ m_lineEditMacroId = new KLineEdit( this, "m_lineEditMacroId" );
+ m_lineEditMacroId->setReadOnly( m_isReadOnly );
+ layout->addWidget( m_lineEditMacroId );
+ label->setBuddy( m_lineEditMacroId );
+
+ label = new QLabel( i18n( "Macro &value:" ), this );
+ layout->addWidget( label );
+ m_fieldLineEditMacroValue = new KBibTeX::FieldLineEdit( i18n( "Macro" ), KBibTeX::FieldLineEdit::itMultiLine, m_isReadOnly, this, "m_fieldLineEditMacroValue" );
+ layout->addWidget( m_fieldLineEditMacroValue );
+ label->setBuddy( m_fieldLineEditMacroValue );
+ }
+}
+
+#include "macrowidget.moc"
diff --git a/src/macrowidget.h b/src/macrowidget.h
new file mode 100644
index 0000000..38d65ec
--- /dev/null
+++ b/src/macrowidget.h
@@ -0,0 +1,56 @@
+/**************************************************************************
+* Copyright ( C ) 2004 - 2005 by Thomas Fischer *
+* fischer@unix - ag.uni - kl.de *
+* *
+* This program is free software; you can redistribute it and / or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* ( at your option ) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111 - 1307, USA. *
+**************************************************************************/
+#ifndef MACROWIDGET_H
+#define MACROWIDGET_H
+
+#include <qwidget.h>
+
+#include <macro.h>
+#include <fieldlineedit.h>
+
+class KLineEdit;
+
+namespace KBibTeX
+{
+ class MacroWidget : public QWidget
+ {
+ Q_OBJECT
+ public:
+ static QDialog::DialogCode execute( BibTeX::Macro *macro, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+
+ private slots:
+ void apply();
+ void reset();
+
+ private:
+ bool m_isReadOnly;
+ BibTeX::Macro* m_bibtexmacro;
+ KLineEdit *m_lineEditMacroId;
+ KBibTeX::FieldLineEdit *m_fieldLineEditMacroValue;
+
+ MacroWidget( BibTeX::Macro *bibtexmacro, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~MacroWidget();
+
+ void setupGUI();
+
+ };
+}
+
+#endif
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000..ecec2b0
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,128 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+
+// #define UNIQUEAPP 1
+
+#include <qframe.h>
+#include <qpixmap.h>
+#ifdef UNIQUEAPP
+#include <kuniqueapplication.h>
+#else // UNIQUEAPP
+#include <kapplication.h>
+#endif // UNIQUEAPP
+#include <kmessagebox.h>
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+#include <klocale.h>
+#include <kglobal.h>
+#include <kstandarddirs.h>
+#include <kdebug.h>
+#include "kbibtexshell.h"
+
+static const char description[] =
+ I18N_NOOP( "A BibTeX editor for KDE" );
+
+static const char version[] = "0.2.3.91";
+
+static KCmdLineOptions options[] =
+{
+ { "+[URL]", I18N_NOOP( "Document to open." ), 0
+ },
+ KCmdLineLastOption
+};
+
+#ifdef UNIQUEAPP
+class KBibTeXApplication: public KUniqueApplication
+#else // UNIQUEAPP
+class KBibTeXApplication: public KApplication
+#endif // UNIQUEAPP
+{
+public:
+#ifdef UNIQUEAPP
+ KBibTeXApplication() : KUniqueApplication()
+ {
+// nothing
+ }
+
+ int newInstance()
+ {
+#else // UNIQUEAPP
+ KBibTeXApplication() : KApplication()
+ {
+#endif // UNIQUEAPP
+ // see if we are starting with session management
+ if ( isRestored() )
+ {
+ RESTORE( KBibTeXShell );
+ }
+ else
+ {
+ // no session.. just start up normally
+ KCmdLineArgs * args = KCmdLineArgs::parsedArgs();
+
+ if ( args->count() == 0 )
+ {
+ KBibTeXShell * shell = new KBibTeXShell();
+ shell->show();
+ }
+ else
+ {
+ for ( int i = 0 ; i < args->count(); i++ )
+ {
+ KBibTeXShell *shell = new KBibTeXShell();
+ if ( shell->openURL( args->url( i ) ) )
+ shell->show();
+ else
+ {
+ kdDebug() << "Couldn't open file " << args->url( i ).path() << endl;
+ KMessageBox::error( NULL, i18n( "Could not open file '%1'." ).arg( args->url( i ).path() ) );
+ }
+ }
+ }
+ args->clear();
+ }
+
+#ifdef UNIQUEAPP
+ return 0;
+#endif // UNIQUEAPP
+
+ }
+};
+
+int main( int argc, char **argv )
+{
+ KAboutData about( "kbibtex", I18N_NOOP( "KBibTeX" ), version, description,
+ KAboutData::License_GPL, "(C) 2004-2009 Thomas Fischer", 0, "http://www.unix-ag.uni-kl.de/~fischer/kbibtex/", "fischer@unix-ag.uni-kl.de" );
+ about.addAuthor( "Thomas Fischer", 0, "fischer@unix-ag.uni-kl.de" );
+ about.setTranslator( I18N_NOOP( "NAME OF TRANSLATORS" ), I18N_NOOP( "EMAIL OF TRANSLATORS" ) );
+ KCmdLineArgs::init( argc, argv, &about );
+ KCmdLineArgs::addCmdLineOptions( options );
+
+#ifdef UNIQUEAPP
+ if ( !KUniqueApplication::start() )
+ {
+ kdDebug() << "Reusing existing KBibTeX instance" << endl;
+ return 0;
+ }
+#endif // UNIQUEAPP
+
+ KBibTeXApplication app;
+ return app.exec();
+}
diff --git a/src/mergeelements.cpp b/src/mergeelements.cpp
new file mode 100644
index 0000000..9ad05d7
--- /dev/null
+++ b/src/mergeelements.cpp
@@ -0,0 +1,864 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <cmath>
+
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qprogressbar.h>
+#include <qtimer.h>
+
+#include <klocale.h>
+#include <kpushbutton.h>
+#include <kapplication.h>
+#include <kmessagebox.h>
+#include <ktextedit.h>
+#include <klistview.h>
+#include <kconfig.h>
+#include <kwin.h>
+
+#include <macro.h>
+#include <comment.h>
+#include <preamble.h>
+#include <macrowidget.h>
+#include <entrywidget.h>
+#include <preamblewidget.h>
+#include <settings.h>
+#include <fileexporterbibtex.h>
+#include "mergeelements.h"
+
+namespace KBibTeX
+{
+ MergeElementsCliqueItem::MergeElementsCliqueItem( BibTeX::Entry* _entry, BibTeX::Macro* _macro, BibTeX::Preamble* _preamble, QListView *parent )
+ : QCheckListItem( parent, _entry == NULL ?( _macro == NULL ? _preamble->value()->text() : _macro->key() ) : _entry->id(), QCheckListItem::CheckBox ), entry( _entry ), macro( _macro ), preamble( _preamble )
+ {
+ // nothing
+ }
+
+ void MergeElementsCliqueItem::stateChange( bool )
+ {
+ emit stateChanged( this );
+ };
+
+ MergeEntriesAlternativesController::MergeEntriesAlternativesController( const QString &label, QListView *parent )
+ : QCheckListItem( parent, label, QCheckListItem::RadioButtonController ), fieldType( BibTeX::EntryField::ftUnknown ), fieldName( label )
+ {
+ // nothing
+ }
+
+ MergeEntriesAlternativesController::MergeEntriesAlternativesController( BibTeX::EntryField::FieldType _fieldType, QListView *parent )
+ : QCheckListItem( parent, BibTeX::EntryField::fieldTypeToString( _fieldType ), QCheckListItem::RadioButtonController ), fieldType( _fieldType ), fieldName( BibTeX::EntryField::fieldTypeToString( _fieldType ) )
+ {
+ // nothing
+ }
+
+ MergeMacrosAlternativesController::MergeMacrosAlternativesController( bool isKey, QListView *parent )
+ : QCheckListItem( parent, isKey ? i18n( "Key" ) : i18n( "Value" ), QCheckListItem::RadioButtonController )
+ {
+ // nothing
+ }
+
+ MergeEntriesAlternativesItem::MergeEntriesAlternativesItem( BibTeX::EntryField *_field, MergeEntriesAlternativesController *parent )
+ : QCheckListItem( parent, _field->value()->text(), QCheckListItem::RadioButton ), field( _field )
+ {
+ // nothing
+ }
+
+ MergeMacrosAlternativesItem::MergeMacrosAlternativesItem( BibTeX::Value *_value, MergeMacrosAlternativesController *parent )
+ : QCheckListItem( parent, _value->text(), QCheckListItem::RadioButton ), value( _value )
+ {
+ // nothing
+ }
+
+ MergeElementsAlternativesId::MergeElementsAlternativesId( const QString & _id, MergeEntriesAlternativesController *parent ) : QCheckListItem( parent, _id, QCheckListItem::RadioButton ), id( _id )
+ {
+ // nothing
+ }
+
+ MergeMacroAlternativesKey::MergeMacroAlternativesKey( const QString & _key, MergeMacrosAlternativesController *parent ) : QCheckListItem( parent, _key, QCheckListItem::RadioButton ), key( _key )
+ {
+ // nothing
+ }
+
+ MergeEntriesAlternativesEntryType::MergeEntriesAlternativesEntryType( const QString & _typeString, MergeEntriesAlternativesController *parent )
+ : QCheckListItem( parent, _typeString, QCheckListItem::RadioButton ), typeString( _typeString ), type( BibTeX::Entry::entryTypeFromString( _typeString ) )
+ {
+ // nothing
+ }
+
+ MergeEntriesAlternativesEntryType::MergeEntriesAlternativesEntryType( BibTeX::Entry::EntryType _type, MergeEntriesAlternativesController *parent )
+ : QCheckListItem( parent, BibTeX::Entry::entryTypeToString( _type ), QCheckListItem::RadioButton ), typeString( BibTeX::Entry::entryTypeToString( _type ) ), type( _type )
+ {
+ // nothing
+ }
+
+ MergePreambleAlternativesController::MergePreambleAlternativesController( QListView *parent )
+ : QCheckListItem( parent, i18n( "Preamble text" ), QCheckListItem::RadioButtonController )
+ {
+ // nothing
+ }
+
+ MergePreambleAlternatives::MergePreambleAlternatives( const QString &_text, MergePreambleAlternativesController *parent )
+ :QCheckListItem( parent, _text, QCheckListItem::RadioButton ), text( _text )
+ {
+ // nothing
+ }
+
+ MergeElements::MergeElements( QWidget *parent )
+ : KDialogBase( parent, "MergeElements", true, "undefined", Ok | Cancel | User1 | User2, User1, true, KGuiItem( i18n( "Next" ), "next" ), KGuiItem( i18n( "Previous" ), "previous" ) ), m_currentCliqueIndex( 0 )
+ {
+ setupGUI();
+ }
+
+ MergeElements::~MergeElements()
+ {
+ KConfig * config = kapp->config();
+ config->setGroup( "MergeElements" );
+ saveWindowSize( config );
+ }
+
+ void MergeElements::setupGUI()
+ {
+ QWidget *vboxContainer = new QWidget( this );
+ setMainWidget( vboxContainer );
+ QBoxLayout *vboxLayout = new QVBoxLayout( vboxContainer, 0, KDialog::spacingHint() );
+ vboxLayout->setResizeMode( QLayout::Minimum );
+
+ QLabel *label = new QLabel( i18n( "Select elements to merge. At least two elements must be checked to perform a merge operation. Checked entries will be replaced by the merged element, unchecked elements will be kept." ), vboxContainer );
+ label->setAlignment( Qt::WordBreak );
+ vboxLayout->addWidget( label );
+ m_listViewClique = new KListView( vboxContainer );
+ m_listViewClique->addColumn( i18n( "Entry/Macro Id" ) );
+ m_listViewClique->setFullWidth( true );
+ m_listViewClique->setAllColumnsShowFocus( true );
+ vboxLayout->addWidget( m_listViewClique );
+ vboxLayout->setStretchFactor( m_listViewClique, 1 );
+ label->setBuddy( m_listViewClique );
+
+ m_progressBar = new QProgressBar( vboxContainer );
+ vboxLayout->addWidget( m_progressBar );
+
+ vboxLayout->addSpacing( KDialog::spacingHint() * 2 );
+
+ label = new QLabel( i18n( "Choose from this list which alternatives you want to keep in the merged element." ), vboxContainer );
+ label->setAlignment( Qt::WordBreak );
+ vboxLayout->addWidget( label );
+ m_listViewAlternatives = new KListView( vboxContainer );
+ m_listViewAlternatives->addColumn( i18n( "Field/Key" ) );
+ m_listViewAlternatives->setFullWidth( true );
+ m_listViewAlternatives->setAllColumnsShowFocus( true );
+ vboxLayout->addWidget( m_listViewAlternatives );
+ vboxLayout->setStretchFactor( m_listViewAlternatives, 3 );
+ label->setBuddy( m_listViewAlternatives );
+
+ connect( m_listViewClique, SIGNAL( doubleClicked( QListViewItem * ) ), this, SLOT( slotPreviewElement( QListViewItem * ) ) );
+ connect( this, SIGNAL( user1Clicked() ), this, SLOT( slotNextClique() ) );
+ connect( this, SIGNAL( user2Clicked() ), this, SLOT( slotPreviousClique() ) );
+ connect( this, SIGNAL( okClicked() ), this, SLOT( saveCurrentMergeSet() ) );
+ }
+
+ void MergeElements::setClique( int cliqueIndex )
+ {
+ if ( m_currentCliqueIndex != cliqueIndex )
+ saveCurrentMergeSet();
+ m_currentCliqueIndex = cliqueIndex;
+
+ m_listViewClique->clear();
+ FindDuplicates::DuplicateClique clique = m_duplicateCliqueList[cliqueIndex];
+
+ for ( FindDuplicates::DuplicateClique::Iterator it = clique.begin(); it != clique.end(); ++it )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( entry != NULL )
+ {
+ MergeElementsCliqueItem *item = new MergeElementsCliqueItem( entry, NULL, NULL, m_listViewClique );
+ connect( item, SIGNAL( stateChanged( MergeElementsCliqueItem* ) ), this, SLOT( slotRefreshAlternatives() ) );
+ }
+ else
+ {
+ BibTeX::Macro *macro = dynamic_cast<BibTeX::Macro*>( *it );
+ if ( macro != NULL )
+ {
+ MergeElementsCliqueItem *item = new MergeElementsCliqueItem( NULL, macro, NULL, m_listViewClique );
+ connect( item, SIGNAL( stateChanged( MergeElementsCliqueItem* ) ), this, SLOT( slotRefreshAlternatives() ) );
+ }
+ else
+ {
+ BibTeX::Preamble *preamble = dynamic_cast<BibTeX::Preamble*>( *it );
+ if ( preamble!=NULL )
+ {
+ MergeElementsCliqueItem *item = new MergeElementsCliqueItem( NULL, NULL, preamble, m_listViewClique );
+ connect( item, SIGNAL( stateChanged( MergeElementsCliqueItem* ) ), this, SLOT( slotRefreshAlternatives() ) );
+ }
+ }
+ }
+ }
+ restoreCurrentMergeSet();
+
+ enableButton( User1, ( cliqueIndex < ( int )( m_duplicateCliqueList.size() ) - 1 ) && m_duplicateCliqueList.size() > 1 );
+ enableButton( User2, cliqueIndex > 0 && m_duplicateCliqueList.size() > 1 );
+ m_progressBar->setProgress( cliqueIndex, m_duplicateCliqueList.size() - 1 );
+ }
+
+ void MergeElements::saveCurrentMergeSet()
+ {
+ if ( m_mergeSetList[m_currentCliqueIndex] == NULL )
+ m_mergeSetList[m_currentCliqueIndex] = new MergeSet;
+ else
+ {
+ m_mergeSetList[m_currentCliqueIndex]->entries.clear();
+ m_mergeSetList[m_currentCliqueIndex]->fields.clear();
+ }
+ m_mergeSetList[m_currentCliqueIndex]->type = BibTeX::Entry::etUnknown;
+ m_mergeSetList[m_currentCliqueIndex]->typeString = QString::null;
+ m_mergeSetList[m_currentCliqueIndex]->id = QString::null;
+ m_mergeSetList[m_currentCliqueIndex]->macroKey = QString::null;
+ m_mergeSetList[m_currentCliqueIndex]->macroValue = NULL;
+ m_mergeSetList[m_currentCliqueIndex]->preambleText=QString::null;
+
+ for ( QListViewItemIterator it( m_listViewClique, QListViewItemIterator::Checked ); it.current(); ++it )
+ {
+ MergeElementsCliqueItem *eci = dynamic_cast<MergeElementsCliqueItem*>( *it );
+ BibTeX::Entry *entry = eci->entry;
+ if ( entry != NULL )
+ m_mergeSetList[m_currentCliqueIndex]->entries.append( entry );
+ BibTeX::Macro *macro = eci->macro;
+ if ( macro != NULL )
+ m_mergeSetList[m_currentCliqueIndex]->macros.append( macro );
+ BibTeX::Preamble *preamble = eci->preamble;
+ if ( preamble !=NULL )
+ m_mergeSetList[m_currentCliqueIndex]->preambles.append( preamble );
+ }
+
+ for ( QListViewItemIterator it( m_listViewAlternatives, QListViewItemIterator::Checked ); it.current(); ++it )
+ {
+ MergeEntriesAlternativesItem *item = dynamic_cast<MergeEntriesAlternativesItem*>( *it );
+ if ( item != NULL )
+ {
+ BibTeX::EntryField *field = item->field;
+ m_mergeSetList[m_currentCliqueIndex]->fields.append( field );
+ }
+ else
+ {
+ MergeElementsAlternativesId *item = dynamic_cast<MergeElementsAlternativesId*>( *it );
+ if ( item != NULL )
+ m_mergeSetList[m_currentCliqueIndex]->id = item->id;
+ else
+ {
+ MergeEntriesAlternativesEntryType *itemT = dynamic_cast<MergeEntriesAlternativesEntryType*>( *it );
+ if ( itemT != NULL )
+ {
+ m_mergeSetList[m_currentCliqueIndex]->typeString = itemT->typeString;
+ m_mergeSetList[m_currentCliqueIndex]->type = itemT->type;
+ }
+ else
+ {
+ MergeMacroAlternativesKey *itemK = dynamic_cast<MergeMacroAlternativesKey*>( *it );
+ if ( itemK != NULL )
+ m_mergeSetList[m_currentCliqueIndex]->macroKey = itemK->key;
+ else
+ {
+ MergeMacrosAlternativesItem *itemMA = dynamic_cast<MergeMacrosAlternativesItem*>( *it );
+ if ( itemMA != NULL )
+ m_mergeSetList[m_currentCliqueIndex]->macroValue = itemMA->value;
+ else
+ {
+ MergePreambleAlternatives *itemP=dynamic_cast<MergePreambleAlternatives*>( *it );
+ if ( itemP!=NULL )
+ m_mergeSetList[m_currentCliqueIndex]->preambleText=itemP->text;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ void MergeElements::restoreCurrentMergeSet()
+ {
+ if ( m_mergeSetList[m_currentCliqueIndex] == NULL )
+ {
+ m_listViewAlternatives->clear();
+ return;
+ }
+
+ for ( QListViewItemIterator it( m_listViewClique ); it.current(); ++it )
+ {
+ MergeElementsCliqueItem *item = dynamic_cast<MergeElementsCliqueItem*>( *it );
+ BibTeX::Entry *entry = item->entry;
+ BibTeX::Macro *macro = item->macro;
+ BibTeX::Preamble *preamble = item->preamble;
+ if ( entry != NULL )
+ for ( QValueList<BibTeX::Entry*>::Iterator it2 = m_mergeSetList[m_currentCliqueIndex]->entries.begin(); it2 != m_mergeSetList[m_currentCliqueIndex]->entries.end(); ++it2 )
+ {
+ if ( entry->id() == ( *it2 )->id() )
+ {
+ item->setOn( true );
+ break;
+ }
+ }
+ else if ( macro != NULL )
+ {
+ for ( QValueList<BibTeX::Macro*>::Iterator it2 = m_mergeSetList[m_currentCliqueIndex]->macros.begin(); it2 != m_mergeSetList[m_currentCliqueIndex]->macros.end(); ++it2 )
+ if ( macro->key() == ( *it2 )->key() )
+ {
+ item->setOn( true );
+ break;
+ }
+ }
+ else if ( preamble!=NULL )
+ for ( QValueList<BibTeX::Preamble*>::Iterator it2 = m_mergeSetList[m_currentCliqueIndex]->preambles.begin(); it2 != m_mergeSetList[m_currentCliqueIndex]->preambles.end(); ++it2 )
+ if ( preamble->value()->text() == ( *it2 )->value()->text() )
+ {
+ item->setOn( true );
+ break;
+ }
+ }
+
+ slotRefreshAlternatives();
+
+ for ( QListViewItemIterator it( m_listViewAlternatives ); it.current(); ++it )
+ {
+ MergeEntriesAlternativesItem *item = dynamic_cast<MergeEntriesAlternativesItem*>( *it );
+ if ( item != NULL )
+ {
+ for ( QValueList<BibTeX::EntryField*>::Iterator it2 = m_mergeSetList[m_currentCliqueIndex]->fields.begin(); it2 != m_mergeSetList[m_currentCliqueIndex]->fields.end(); ++it2 )
+ if ( item->field->fieldTypeName().lower() == ( *it2 )->fieldTypeName().lower() && item->field->value()->text() == ( *it2 )->value()->text() )
+ {
+ item->setOn( true );
+ break;
+ }
+ }
+ else
+ {
+ MergeElementsAlternativesId *item = dynamic_cast<MergeElementsAlternativesId*>( *it );
+ if ( item != NULL )
+ {
+ if ( item->id == m_mergeSetList[m_currentCliqueIndex]->id )
+ item->setOn( true );
+ }
+ else
+ {
+ MergeEntriesAlternativesEntryType *item = dynamic_cast<MergeEntriesAlternativesEntryType*>( *it );
+ if ( item != NULL )
+ {
+ if (( item->type != BibTeX::Entry::etUnknown && item->type == m_mergeSetList[m_currentCliqueIndex]->type ) || ( item->typeString.lower() == m_mergeSetList[m_currentCliqueIndex]->typeString.lower() ) )
+ item->setOn( true );
+ }
+ else
+ {
+ MergeMacrosAlternativesItem *mai = dynamic_cast<MergeMacrosAlternativesItem*>( *it );
+ if ( mai != NULL )
+ {
+ if ( mai->value == m_mergeSetList[m_currentCliqueIndex]->macroValue )
+ mai->setOn( true );
+ }
+ else
+ {
+ MergeMacroAlternativesKey *mak = dynamic_cast<MergeMacroAlternativesKey*>( *it );
+ if ( mak != NULL )
+ {
+ if ( mak->key == m_mergeSetList[m_currentCliqueIndex]->macroKey )
+ mak->setOn( true );
+ }
+ else
+ {
+ MergePreambleAlternatives *mpa =dynamic_cast<MergePreambleAlternatives*>( *it );
+ if ( mpa!=NULL )
+ {
+ if ( mpa->text==m_mergeSetList[m_currentCliqueIndex]->preambleText )
+ mpa->setOn( true );
+ }
+ else
+ qDebug( "Item is of unknown type" );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ void MergeElements::applyMergeSet( BibTeX::File *bibTeXFile, BibTeX::File *otherBibTeXFile )
+ {
+ int n = m_duplicateCliqueList.size();
+ for ( int i = 0; i < n; ++i )
+ {
+ if ( m_mergeSetList[i] == NULL ) continue;
+
+ if ( !m_mergeSetList[i]->entries.isEmpty() )
+ {
+ QString id = m_mergeSetList[i]->id == QString::null ? ( *m_mergeSetList[i]->entries.begin() )->id() : m_mergeSetList[i]->id;
+
+ BibTeX::Entry *newEntry = NULL;
+ if ( m_mergeSetList[i]->type == BibTeX::Entry::etUnknown )
+ {
+ if ( m_mergeSetList[i]->typeString == QString::null )
+ {
+ BibTeX::Entry *firstEntry = *m_mergeSetList[i]->entries.begin();
+ if ( firstEntry->entryType() == BibTeX::Entry::etUnknown )
+ newEntry = new BibTeX::Entry( firstEntry->entryTypeString(), id );
+ else
+ newEntry = new BibTeX::Entry( firstEntry->entryType(), id );
+ }
+ else
+ newEntry = new BibTeX::Entry( m_mergeSetList[i]->typeString, id );
+ }
+ else
+ newEntry = new BibTeX::Entry( m_mergeSetList[i]->type, id );
+
+ for ( QValueList<BibTeX::EntryField*>::Iterator it = m_mergeSetList[i]->fields.begin(); it != m_mergeSetList[i]->fields.end(); ++it )
+ {
+ newEntry->addField( new BibTeX::EntryField( *it ) );
+ }
+
+ for ( QValueList<BibTeX::Entry*>::Iterator it = m_mergeSetList[i]->entries.begin(); it != m_mergeSetList[i]->entries.end(); ++it )
+ for ( QValueList<BibTeX::EntryField*>::ConstIterator fIt = ( *it )->begin(); fIt != ( *it )->end(); ++fIt )
+ if ( newEntry->getField(( *fIt )->fieldTypeName() ) == NULL )
+ {
+ newEntry->addField( new BibTeX::EntryField( *fIt ) );
+ }
+
+ for ( QValueList<BibTeX::Entry*>::Iterator it = m_mergeSetList[i]->entries.begin(); it != m_mergeSetList[i]->entries.end(); ++it )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( bibTeXFile->containsKey(( *it )->id() ) );
+ if ( entry != NULL )
+ bibTeXFile->deleteElement( entry );
+ else
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( otherBibTeXFile->containsKey(( *it )->id() ) );
+ if ( entry != NULL )
+ otherBibTeXFile->deleteElement( entry );
+ }
+ }
+ bibTeXFile->appendElement( newEntry );
+ }
+ else if ( !m_mergeSetList[i]->macros.isEmpty() )
+ {
+ BibTeX::Macro *newMacro = new BibTeX::Macro( m_mergeSetList[i]->macroKey );
+ newMacro->setValue( m_mergeSetList[i]->macroValue );
+
+ for ( QValueList<BibTeX::Macro*>::Iterator it = m_mergeSetList[i]->macros.begin(); it != m_mergeSetList[i]->macros.end(); ++it )
+ {
+ bibTeXFile->deleteElement( *it );
+ if ( otherBibTeXFile != NULL )
+ otherBibTeXFile->deleteElement( *it );
+ }
+
+ bibTeXFile->appendElement( newMacro );
+ }
+ else if ( !m_mergeSetList[i]->preambles.isEmpty() )
+ {
+ BibTeX::Preamble *newPreamble = new BibTeX::Preamble( m_mergeSetList[i]->preambleText );
+
+ for ( QValueList<BibTeX::Preamble*>::Iterator it = m_mergeSetList[i]->preambles.begin(); it != m_mergeSetList[i]->preambles.end(); ++it )
+ {
+ bibTeXFile->deleteElement( *it );
+ if ( otherBibTeXFile != NULL )
+ otherBibTeXFile->deleteElement( *it );
+ }
+
+ bibTeXFile->appendElement( newPreamble );
+ }
+ }
+ }
+
+ int MergeElements::mergeDuplicates( BibTeX::File *bibTeXFile )
+ {
+ setCaption( i18n( "Find Duplicates" ) );
+ Settings * settings = Settings::self( NULL );
+ int sensitivity = ( int )( FindDuplicates::maxDistance / exp( log( 10 ) * settings->editing_findDuplicatesSensitivity / 10.0 ) );
+ qDebug( "sensitivity= %i / %i", sensitivity, FindDuplicates::maxDistance );
+ FindDuplicates findDuplicates( m_duplicateCliqueList, sensitivity, bibTeXFile, parentWidget( true ) );
+
+ if ( m_duplicateCliqueList.isEmpty() )
+ {
+ KMessageBox::information( parentWidget( true ), i18n( "No duplicates found." ), i18n( "Find Duplicates" ) );
+ return QDialog::Rejected;
+ }
+
+ m_mergeSetList = new MergeSet*[m_duplicateCliqueList.size()];
+ memset( m_mergeSetList, 0, sizeof( MergeSet* )*m_duplicateCliqueList.size() );
+
+ qDebug( "%i cliques", m_duplicateCliqueList.size() );
+ setClique( 0 );
+
+ int result = exec();
+ if ( result == QDialog::Accepted )
+ applyMergeSet( bibTeXFile );
+
+ delete[] m_mergeSetList;
+
+ return result;
+ }
+
+ void MergeElements::slotRefreshAlternatives()
+ {
+ QMap<BibTeX::EntryField::FieldType, MergeEntriesAlternativesController*> mapFieldToController;
+ QMap<BibTeX::EntryField::FieldType, First> firstEntryData;
+ bool first = true;
+ MergePreambleAlternativesController* preambleController = NULL;
+ MergeMacrosAlternativesController* macroKeyController = NULL;
+ MergeMacrosAlternativesController* macroValueController = NULL;
+ MergeEntriesAlternativesController *idController = NULL;
+ MergeEntriesAlternativesController *typeController = NULL;
+ QString firstId = QString::null;
+ QString firstMacroKey = QString::null;
+ BibTeX::Value *firstMacroValue = NULL;
+ QString firstPreambleText = QString::null;
+ BibTeX::Entry::EntryType firstType = BibTeX::Entry::etUnknown;
+ QString firstTypeString = QString::null;
+
+ m_listViewAlternatives->clear();
+
+ for ( QListViewItemIterator it( m_listViewClique, QListViewItemIterator::Checked ); it.current(); ++it )
+ {
+ MergeElementsCliqueItem *meci = dynamic_cast<MergeElementsCliqueItem*>( *it );
+ BibTeX::Entry *entry = NULL;
+ BibTeX::Macro *macro = NULL;
+ BibTeX::Preamble *preamble = NULL;
+ if ( meci != NULL && ( entry = meci->entry ) != NULL )
+ {
+ if ( first )
+ {
+ firstId = entry->id();
+ firstType = entry->entryType();
+ firstTypeString = entry->entryTypeString();
+ for ( BibTeX::Entry::EntryFields::const_iterator efi = entry->begin(); efi != entry->end(); ++efi )
+ {
+ First first;
+ first.entry = entry;
+ first.field = *efi;
+ firstEntryData.insert(( *efi )->fieldType(), first );
+ }
+ }
+ else
+ {
+ if ( idController == NULL )
+ {
+ if ( entry->id() != firstId )
+ {
+ idController = new MergeEntriesAlternativesController( i18n( "Id" ), m_listViewAlternatives );
+ idController->setOpen( true );
+ MergeElementsAlternativesId *item = new MergeElementsAlternativesId( firstId, idController );
+ item->setOn( true );
+ new MergeElementsAlternativesId( entry->id(), idController );
+ }
+ }
+ else
+ {
+ QString thisText = entry->id();
+ bool isNew = true;
+ for ( QListViewItem *cur = idController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
+ {
+ MergeElementsAlternativesId *meai = dynamic_cast<MergeElementsAlternativesId*>( cur );
+ isNew = meai->id != thisText;
+ }
+ if ( isNew )
+ new MergeElementsAlternativesId( thisText, idController );
+ }
+
+ if ( typeController == NULL )
+ {
+ if (( firstType != BibTeX::Entry::etUnknown && entry->entryType() != firstType ) || ( entry->entryTypeString().lower() != entry->entryTypeString().lower() ) )
+ {
+ typeController = new MergeEntriesAlternativesController( i18n( "Type" ), m_listViewAlternatives );
+ typeController->setOpen( true );
+ MergeEntriesAlternativesEntryType *item = firstType != BibTeX::Entry::etUnknown ? new MergeEntriesAlternativesEntryType( firstType, typeController ) : new MergeEntriesAlternativesEntryType( firstTypeString, typeController );
+ item->setOn( true );
+ if ( entry->entryType() != BibTeX::Entry::etUnknown )
+ new MergeEntriesAlternativesEntryType( entry->entryType(), typeController );
+ else
+ new MergeEntriesAlternativesEntryType( entry->entryTypeString(), typeController );
+ }
+ }
+ else
+ {
+ QString typeString = entry->entryTypeString();
+ BibTeX::Entry::EntryType type = entry->entryType();
+ bool isNew = true;
+ for ( QListViewItem *cur = typeController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
+ {
+ MergeEntriesAlternativesEntryType *meat = dynamic_cast<MergeEntriesAlternativesEntryType*>( cur );
+ isNew = type == BibTeX::Entry::etUnknown && meat->typeString != typeString || meat->type != type;
+ }
+ if ( isNew )
+ {
+ if ( type != BibTeX::Entry::etUnknown )
+ new MergeEntriesAlternativesEntryType( type, typeController );
+ else
+ new MergeEntriesAlternativesEntryType( typeString, typeController );
+ }
+ }
+
+ for ( BibTeX::Entry::EntryFields::const_iterator efi = entry->begin(); efi != entry->end(); ++efi )
+ if ( mapFieldToController.contains(( *efi )->fieldType() ) )
+ {
+ MergeEntriesAlternativesController *controller = mapFieldToController[( *efi )->fieldType()];
+ QString thisText = ( *efi )->value()->text();
+ bool isNew = true;
+ for ( QListViewItem *cur = controller->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
+ {
+ MergeEntriesAlternativesItem *meai = dynamic_cast<MergeEntriesAlternativesItem*>( cur );
+ isNew = meai->field->value()->text() != thisText;
+ }
+ if ( isNew )
+ new MergeEntriesAlternativesItem( *efi, controller );
+ }
+ else if ( firstEntryData.contains(( *efi )->fieldType() ) )
+ {
+ QString firstText = firstEntryData[( *efi )->fieldType()].field->value()->text();
+ QString thisText = ( *efi )->value()->text();
+ if ( firstText != thisText )
+ {
+ MergeEntriesAlternativesController *controller = new MergeEntriesAlternativesController(( *efi )->fieldType(), m_listViewAlternatives );
+ controller->setOpen( true );
+ MergeEntriesAlternativesItem *item = new MergeEntriesAlternativesItem( firstEntryData[( *efi )->fieldType()].field, controller );
+ item->setOn( true );
+ item = new MergeEntriesAlternativesItem( *efi, controller );
+ mapFieldToController.insert(( *efi )->fieldType(), controller );
+ }
+ }
+ else
+ {
+ First first;
+ first.entry = entry;
+ first.field = *efi;
+ firstEntryData.insert(( *efi )->fieldType(), first );
+ }
+ }
+ }
+ else if ( meci != NULL && ( macro = meci->macro ) != NULL )
+ {
+ if ( first )
+ {
+ firstMacroKey = macro->key();
+ firstMacroValue = macro->value();
+ }
+ else
+ {
+ if ( macroKeyController == NULL )
+ {
+ if ( macro->key() != firstMacroKey )
+ {
+ macroKeyController = new MergeMacrosAlternativesController( true, m_listViewAlternatives );
+ macroKeyController->setOpen( true );
+ MergeMacroAlternativesKey *item = new MergeMacroAlternativesKey( firstMacroKey, macroKeyController );
+ item->setOn( true );
+ new MergeMacroAlternativesKey( macro->key(), macroKeyController );
+ }
+ }
+ else
+ {
+ QString thisText = macro->key();
+ bool isNew = true;
+ for ( QListViewItem *cur = macroKeyController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
+ {
+ MergeMacroAlternativesKey *mak = dynamic_cast<MergeMacroAlternativesKey*>( cur );
+ isNew = mak->key != thisText;
+ }
+ if ( isNew )
+ new MergeMacroAlternativesKey( thisText, macroKeyController );
+ }
+ }
+
+ if ( macroValueController == NULL )
+ {
+ if ( firstMacroValue->text() != macro->value()->text() )
+ {
+ macroValueController = new MergeMacrosAlternativesController( false, m_listViewAlternatives );
+ macroValueController->setOpen( true );
+ MergeMacrosAlternativesItem *item = new MergeMacrosAlternativesItem( firstMacroValue, macroValueController );
+ item->setOn( true );
+ new MergeMacrosAlternativesItem( macro->value(), macroValueController );
+ }
+ }
+ else
+ {
+ QString macroString = macro->value()->text();
+ bool isNew = true;
+ for ( QListViewItem *cur = macroValueController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
+ {
+ MergeMacrosAlternativesItem *mai = dynamic_cast<MergeMacrosAlternativesItem*>( cur );
+ isNew = macroString != mai->value->text();
+ }
+ if ( isNew )
+ new MergeMacrosAlternativesItem( macro->value(), macroValueController );
+ }
+ }
+ else if ( meci != NULL && ( preamble = meci->preamble ) != NULL )
+ {
+ if ( first )
+ firstPreambleText = preamble->value()->text();
+ else
+ {
+ if ( preambleController == NULL )
+ {
+ if ( preamble->value()->text() != firstPreambleText )
+ {
+ preambleController = new MergePreambleAlternativesController( m_listViewAlternatives );
+ preambleController->setOpen( true );
+ MergePreambleAlternatives *item = new MergePreambleAlternatives( firstPreambleText, preambleController );
+ item->setOn( true );
+ new MergePreambleAlternatives( preamble->value()->text(), preambleController );
+ }
+ }
+ else
+ {
+ QString thisText = preamble->value()->text();
+ bool isNew = true;
+ for ( QListViewItem *cur = preambleController->firstChild(); isNew && cur != NULL; cur = cur->nextSibling() )
+ {
+ MergePreambleAlternatives *mpa = dynamic_cast<MergePreambleAlternatives*>( cur );
+ isNew = mpa->text != thisText;
+ }
+ if ( isNew )
+ new MergePreambleAlternatives( thisText, preambleController );
+ }
+ }
+ }
+ first = false;
+ }
+ }
+
+ void MergeElements::slotNextClique()
+ {
+ if ( m_currentCliqueIndex < ( int )( m_duplicateCliqueList.size() ) - 1 )
+ {
+ setClique( m_currentCliqueIndex + 1 );
+ }
+ else
+ enableButton( User1, false );
+ }
+
+ void MergeElements::slotPreviousClique()
+ {
+ if ( m_currentCliqueIndex > 0 )
+ {
+ setClique( m_currentCliqueIndex - 1 );
+ }
+ else
+ enableButton( User2, false );
+ }
+
+ void MergeElements::slotPreviewElement( QListViewItem *item )
+ {
+ MergeElementsCliqueItem *meci = dynamic_cast<MergeElementsCliqueItem*>( item );
+ if ( meci != NULL && meci->entry != NULL )
+ KBibTeX::EntryWidget::execute( meci->entry, NULL, TRUE, FALSE, this );
+ else if ( meci != NULL && meci->macro != NULL )
+ KBibTeX::MacroWidget::execute( meci->macro, TRUE, this );
+ else if ( meci!=NULL&& meci->preamble!=NULL )
+ KBibTeX::PreambleWidget::execute( meci->preamble, TRUE, this );
+ }
+
+ /* This function was taken form KMainWindow of KDE 3.5 and modified to fit KBibTeX */
+ void MergeElements::saveWindowSize( KConfig *config ) const
+ {
+ int scnum = QApplication::desktop()->screenNumber( parentWidget() );
+ QRect desk = QApplication::desktop()->screenGeometry( scnum );
+ int w, h;
+#if defined Q_WS_X11
+ // save maximalization as desktop size + 1 in that direction
+ KWin::WindowInfo info = KWin::windowInfo( winId(), NET::WMState );
+ w = info.state() & NET::MaxHoriz ? desk.width() + 1 : width();
+ h = info.state() & NET::MaxVert ? desk.height() + 1 : height();
+#else
+ if ( isMaximized() )
+ {
+ w = desk.width() + 1;
+ h = desk.height() + 1;
+ }
+ //TODO: add "Maximized" property instead "+1" hack
+#endif
+ QRect size( desk.width(), w, desk.height(), h );
+ bool defaultSize = false;//( size == d->defaultWindowSize );
+ QString widthString = QString::fromLatin1( "Width %1" ).arg( desk.width() );
+ QString heightString = QString::fromLatin1( "Height %1" ).arg( desk.height() );
+ if ( !config->hasDefault( widthString ) && defaultSize )
+ config->revertToDefault( widthString );
+ else
+ config->writeEntry( widthString, w );
+
+ if ( !config->hasDefault( heightString ) && defaultSize )
+ config->revertToDefault( heightString );
+ else
+ config->writeEntry( heightString, h );
+ }
+
+ void MergeElements::showEvent( QShowEvent * )
+ {
+ qDebug( "showEvent" );
+ QTimer::singleShot( 10, this, SLOT( slotRestore() ) );
+ }
+
+ void MergeElements::slotRestore()
+ {
+ qDebug( "slotRestore" );
+ KConfig * config = kapp->config();
+ config->setGroup( "MergeElements" );
+ restoreWindowSize( config );
+ }
+
+ /* This function was taken form KMainWindow of KDE 3.5 and modified to fit KBibTeX */
+ void MergeElements::restoreWindowSize( KConfig *config )
+ {
+ // restore the size
+ int scnum = QApplication::desktop()->screenNumber( parentWidget() );
+ QRect desk = QApplication::desktop()->screenGeometry( scnum );
+ QSize size( config->readNumEntry( QString::fromLatin1( "Width %1" ).arg( desk.width() ), 0 ),
+ config->readNumEntry( QString::fromLatin1( "Height %1" ).arg( desk.height() ), 0 ) );
+ if ( size.isEmpty() )
+ {
+ // try the KDE 2.0 way
+ size = QSize( config->readNumEntry( QString::fromLatin1( "Width" ), 0 ),
+ config->readNumEntry( QString::fromLatin1( "Height" ), 0 ) );
+ if ( !size.isEmpty() )
+ {
+ // make sure the other resolutions don't get old settings
+ config->writeEntry( QString::fromLatin1( "Width" ), 0 );
+ config->writeEntry( QString::fromLatin1( "Height" ), 0 );
+ }
+ }
+ if ( !size.isEmpty() )
+ {
+#ifdef Q_WS_X11
+ int state = ( size.width() > desk.width() ? NET::MaxHoriz : 0 )
+ | ( size.height() > desk.height() ? NET::MaxVert : 0 );
+ if (( state & NET::Max ) == NET::Max )
+ ; // no resize
+ else if (( state & NET::MaxHoriz ) == NET::MaxHoriz )
+ resize( width(), size.height() );
+ else if (( state & NET::MaxVert ) == NET::MaxVert )
+ resize( size.width(), height() );
+ else
+ resize( size );
+ // QWidget::showMaximized() is both insufficient and broken
+ KWin::setState( winId(), state );
+#else
+ if ( size.width() > desk.width() || size.height() > desk.height() )
+ setWindowState( WindowMaximized );
+ else
+ resize( size );
+#endif
+ }
+ }
+
+}
+#include "mergeelements.moc"
diff --git a/src/mergeelements.h b/src/mergeelements.h
new file mode 100644
index 0000000..88c011e
--- /dev/null
+++ b/src/mergeelements.h
@@ -0,0 +1,179 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXMERGEELEMENTS_H
+#define KBIBTEXMERGEELEMENTS_H
+
+#include <kdialogbase.h>
+
+#include <findduplicates.h>
+#include <file.h>
+#include <entry.h>
+
+class KPushButton;
+class KTextEdit;
+class KListView;
+class QProgressBar;
+
+namespace KBibTeX
+{
+ class MergeElementsCliqueItem : public QObject, public QCheckListItem
+ {
+ Q_OBJECT
+ public:
+ MergeElementsCliqueItem( BibTeX::Entry* entry, BibTeX::Macro* macro, BibTeX::Preamble* preamble, QListView *parent );
+ BibTeX::Entry* entry;
+ BibTeX::Macro* macro;
+ BibTeX::Preamble* preamble;
+
+ protected:
+ void stateChange( bool );
+
+ signals:
+ void stateChanged( MergeElementsCliqueItem* );
+ };
+
+ class MergeEntriesAlternativesController: public QCheckListItem
+ {
+ public:
+ MergeEntriesAlternativesController( const QString &label, QListView *parent );
+ MergeEntriesAlternativesController( BibTeX::EntryField::FieldType fieldType, QListView *parent );
+ BibTeX::EntryField::FieldType fieldType;
+ const QString fieldName;
+ };
+
+ class MergeMacrosAlternativesController: public QCheckListItem
+ {
+ public:
+ MergeMacrosAlternativesController( bool isKey, QListView *parent );
+ };
+
+
+ class MergeEntriesAlternativesItem: public QCheckListItem
+ {
+ public:
+ MergeEntriesAlternativesItem( BibTeX::EntryField *field, MergeEntriesAlternativesController *parent );
+ BibTeX::EntryField *field;
+ };
+
+ class MergeMacrosAlternativesItem: public QCheckListItem
+ {
+ public:
+ MergeMacrosAlternativesItem( BibTeX::Value *value, MergeMacrosAlternativesController *parent );
+ BibTeX::Value *value;
+ };
+
+ class MergeElementsAlternativesId: public QCheckListItem
+ {
+ public:
+ MergeElementsAlternativesId( const QString &id, MergeEntriesAlternativesController *parent );
+ QString id;
+ };
+
+ class MergeMacroAlternativesKey: public QCheckListItem
+ {
+ public:
+ MergeMacroAlternativesKey( const QString &key, MergeMacrosAlternativesController *parent );
+ QString key;
+ };
+
+
+ class MergeEntriesAlternativesEntryType: public QCheckListItem
+ {
+ public:
+ MergeEntriesAlternativesEntryType( const QString &typeString, MergeEntriesAlternativesController *parent );
+ MergeEntriesAlternativesEntryType( BibTeX::Entry::EntryType type, MergeEntriesAlternativesController *parent );
+ QString typeString;
+ BibTeX::Entry::EntryType type;
+ };
+
+ class MergePreambleAlternativesController: public QCheckListItem
+ {
+ public:
+ MergePreambleAlternativesController( QListView *parent );
+ };
+
+ class MergePreambleAlternatives: public QCheckListItem
+ {
+ public:
+ MergePreambleAlternatives( const QString &text, MergePreambleAlternativesController *parent );
+ QString text;
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class MergeElements : public KDialogBase
+ {
+ Q_OBJECT
+ public:
+ MergeElements( QWidget *parent );
+ ~MergeElements();
+ int mergeDuplicates( BibTeX::File *bibTeXFile );
+
+ protected:
+ void showEvent( QShowEvent * );
+
+ protected slots:
+ void slotRefreshAlternatives();
+ void slotNextClique();
+ void slotPreviousClique();
+ void slotPreviewElement( QListViewItem *item );
+ void saveCurrentMergeSet();
+ void slotRestore();
+
+ private:
+ typedef struct
+ {
+ BibTeX::Macro *macro;
+ BibTeX::Entry *entry;
+ BibTeX::EntryField *field;
+ } First;
+
+ typedef struct
+ {
+ QValueList<BibTeX::Macro*> macros;
+ QValueList<BibTeX::Entry*> entries;
+ QValueList<BibTeX::EntryField*> fields;
+ QValueList<BibTeX::Preamble*> preambles;
+ QString macroKey;
+ BibTeX::Value *macroValue;
+ QString id, typeString;
+ BibTeX::Entry::EntryType type;
+ QString preambleText;
+ } MergeSet;
+
+ KListView *m_listViewClique;
+ KListView *m_listViewAlternatives;
+ QProgressBar *m_progressBar;
+ FindDuplicates::DuplicateCliqueList m_duplicateCliqueList;
+ MergeSet **m_mergeSetList;
+ int m_currentCliqueIndex;
+
+ void setupGUI();
+ void setClique( int cliqueIndex );
+ void restoreCurrentMergeSet();
+ void applyMergeSet( BibTeX::File *bibTeXFile, BibTeX::File *otherBibTeXFile = NULL );
+ void restoreWindowSize( KConfig *config );
+ void saveWindowSize( KConfig *config ) const;
+ };
+
+}
+
+#endif // KBIBTEXMERGEELEMENTS_H
diff --git a/src/messagehandler.cpp b/src/messagehandler.cpp
new file mode 100644
index 0000000..273a5eb
--- /dev/null
+++ b/src/messagehandler.cpp
@@ -0,0 +1,44 @@
+/***************************************************************************
+ copyright : (C) 2005-2006 by Robby Stephenson
+ email : robby@periapsis.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This file has been modified to match the requirements of KBibTeX. *
+ * In case of problems or bugs arising from this implementation, please *
+ * contact the KBibTeX team first. *
+ * Thomas Fischer <fischer@unix-ag.uni-kl.de> *
+ * *
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+#include "messagehandler.h"
+
+#include <kmessagebox.h>
+
+namespace KBibTeX {
+
+// all messages go to manager
+void ManagerMessage::send(const QString& message_, Type type_) {
+// Fetch::Manager::self()->updateStatus(message_);
+ // plus errors get a message box
+ if(type_ == Error) {
+ KMessageBox::sorry(NULL, message_); // FIXME: some widget instead of NULL
+ } else if(type_ == Warning) {
+ KMessageBox::information(NULL, message_); // FIXME: some widget instead of NULL
+ }
+}
+
+void ManagerMessage::infoList(const QString& message_, const QStringList& list_) {
+ KMessageBox::informationList(NULL, message_, list_); // FIXME: some widget instead of NULL
+}
+
+}
diff --git a/src/messagehandler.h b/src/messagehandler.h
new file mode 100644
index 0000000..00fcbe9
--- /dev/null
+++ b/src/messagehandler.h
@@ -0,0 +1,56 @@
+/***************************************************************************
+ copyright : (C) 2005-2006 by Robby Stephenson
+ email : robby@periapsis.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This file has been modified to match the requirements of KBibTeX. *
+ * In case of problems or bugs arising from this implementation, please *
+ * contact the KBibTeX team first. *
+ * Thomas Fischer <fischer@unix-ag.uni-kl.de> *
+ * *
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+#ifndef KBIBTEX_MESSAGEHANDLER_H
+#define KBIBTEX_MESSAGEHANDLER_H
+
+class QString;
+class QStringList;
+
+namespace KBibTeX {
+
+/**
+ * @author Robby Stephenson
+ */
+class MessageHandler {
+public:
+ enum Type { Status, Warning, Error, ListError };
+
+ MessageHandler() {}
+ virtual ~MessageHandler() {}
+
+ virtual void send(const QString& message, Type type) = 0;
+ virtual void infoList(const QString& message, const QStringList& list) = 0;
+};
+
+class ManagerMessage : public MessageHandler {
+public:
+ ManagerMessage() : MessageHandler() {}
+ virtual ~ManagerMessage() {}
+
+ virtual void send(const QString& message, Type type);
+ virtual void infoList(const QString& message, const QStringList& list);
+};
+
+} // end namespace
+
+#endif
diff --git a/src/preamble.cpp b/src/preamble.cpp
new file mode 100644
index 0000000..1b03a0f
--- /dev/null
+++ b/src/preamble.cpp
@@ -0,0 +1,107 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qregexp.h>
+#include <qstringlist.h>
+
+#include "preamble.h"
+
+namespace BibTeX
+{
+
+ Preamble::Preamble() : Element(), m_value( new Value() )
+ {
+// TODO
+ }
+
+ Preamble::Preamble( const QString& text ) : Element()
+ {
+ m_value = new Value( text, false );
+ }
+
+ Preamble::Preamble( Preamble *other ): Element(), m_value( NULL )
+ {
+ copyFrom( other );
+ }
+
+ Preamble::~Preamble()
+ {
+ delete m_value;
+ }
+
+ Value *Preamble::value() const
+ {
+ return m_value;
+ }
+
+ void Preamble::setValue( Value *value )
+ {
+ if ( value != m_value )
+ {
+ delete m_value;
+
+ if ( value != NULL )
+ m_value = new Value( value );
+ else
+ m_value = NULL;
+ }
+ }
+
+ bool Preamble::containsPattern( const QString& pattern, EntryField::FieldType fieldType, FilterType filterType, bool caseSensitive ) const
+ {
+ QString text = m_value->simplifiedText();
+
+ if ( filterType == ftExact )
+ {
+ /** check for exact match */
+ return fieldType == EntryField::ftUnknown && text.contains( pattern, caseSensitive );
+ }
+ else
+ {
+ /** for each word in the search pattern ... */
+ QStringList words = QStringList::split( QRegExp( "\\s+" ), pattern );
+ unsigned int hits = 0;
+ for ( QStringList::Iterator it = words.begin(); it != words.end(); ++it )
+ {
+ /** check if word is contained in text */
+ if ( fieldType == EntryField::ftUnknown && text.contains( *it, caseSensitive ) )
+ ++hits;
+ }
+
+ /** return success depending on filter type and number of hits */
+ return (( filterType == ftAnyWord && hits > 0 ) || ( filterType == ftEveryWord && hits == words.count() ) );
+ }
+ }
+
+ Element* Preamble::clone()
+ {
+ return new Preamble( this );
+ }
+
+ void Preamble::copyFrom( Preamble *other )
+ {
+ if ( m_value != NULL ) delete m_value;
+ m_value = new Value( other->m_value );
+ }
+
+ QString Preamble::text() const
+ {
+ return "Preamble: " + m_value->text();
+ }
+}
diff --git a/src/preamble.h b/src/preamble.h
new file mode 100644
index 0000000..fc6da9d
--- /dev/null
+++ b/src/preamble.h
@@ -0,0 +1,54 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef BIBTEXPREAMBLE_H
+#define BIBTEXPREAMBLE_H
+
+#include <element.h>
+
+namespace BibTeX
+{
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class Preamble : public Element
+ {
+ public:
+ Preamble( );
+ Preamble( const QString& text );
+ Preamble( Preamble *other );
+ virtual ~Preamble();
+
+ Value *value() const;
+ void setValue( Value *value );
+
+ bool containsPattern( const QString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const;
+
+ Element* clone();
+ void copyFrom( Preamble *other );
+ QString text() const;
+
+ private:
+ Value *m_value;
+ };
+
+}
+
+#endif // BIBTEXPREAMBLE_H
diff --git a/src/preamblewidget.cpp b/src/preamblewidget.cpp
new file mode 100644
index 0000000..a1cc0c1
--- /dev/null
+++ b/src/preamblewidget.cpp
@@ -0,0 +1,84 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qlabel.h>
+#include <qlayout.h>
+
+#include <kdialogbase.h>
+#include <klocale.h>
+
+#include "preamblewidget.h"
+
+namespace KBibTeX
+{
+
+ QDialog::DialogCode PreambleWidget::execute( BibTeX::Preamble *preamble, bool isReadOnly, QWidget *parent, const char *name )
+ {
+ KDialogBase * dlg = new KDialogBase( parent, name, TRUE, i18n( "Edit BibTeX Preamble" ), KDialogBase::Ok | KDialogBase::Cancel );
+ PreambleWidget* preambleWidget = new PreambleWidget( preamble, isReadOnly, dlg, "PreambleWidget" );
+
+ dlg->setMainWidget( preambleWidget );
+ connect( dlg, SIGNAL( okClicked() ), preambleWidget, SLOT( apply() ) );
+
+ QDialog::DialogCode result = ( QDialog::DialogCode ) dlg->exec();
+
+ delete( preambleWidget );
+ delete( dlg );
+
+ return result;
+ }
+
+ PreambleWidget::PreambleWidget( BibTeX::Preamble *bibtexpreamble, bool isReadOnly, QWidget *parent, const char *name ) : QWidget( parent, name ), m_isReadOnly( isReadOnly ), m_bibtexpreamble( bibtexpreamble )
+ {
+ setupGUI();
+ reset();
+ }
+
+
+ PreambleWidget::~PreambleWidget()
+ {
+// nothing
+ }
+
+ void PreambleWidget::apply()
+ {
+ BibTeX::Value *value = m_fieldLineEditPreambleValue->value();
+ m_bibtexpreamble->setValue( value );
+ }
+
+ void PreambleWidget::reset()
+ {
+ m_fieldLineEditPreambleValue->setValue( m_bibtexpreamble->value() );
+ }
+
+ void PreambleWidget::setupGUI()
+ {
+ setMinimumWidth( 384 );
+
+ QVBoxLayout * layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+
+ QLabel *label = new QLabel( i18n( "&Preamble:" ), this );
+ layout->addWidget( label );
+ m_fieldLineEditPreambleValue = new KBibTeX::FieldLineEdit( i18n( "Preamble" ), KBibTeX::FieldLineEdit::itMultiLine, m_isReadOnly, this, "m_fieldLineEditPreambleValue" );
+ layout->addWidget( m_fieldLineEditPreambleValue );
+ label->setBuddy( m_fieldLineEditPreambleValue );
+ }
+
+}
+#include "preamblewidget.moc"
diff --git a/src/preamblewidget.h b/src/preamblewidget.h
new file mode 100644
index 0000000..f08ba47
--- /dev/null
+++ b/src/preamblewidget.h
@@ -0,0 +1,59 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXPREAMBLEWIDGET_H
+#define KBIBTEXPREAMBLEWIDGET_H
+
+#include <qwidget.h>
+#include <qdialog.h>
+
+#include <preamble.h>
+#include <fieldlineedit.h>
+
+namespace KBibTeX
+{
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class PreambleWidget : public QWidget
+ {
+ Q_OBJECT
+ public:
+ static QDialog::DialogCode execute( BibTeX::Preamble *preamble, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+
+ private slots:
+ void apply();
+ void reset();
+
+ private:
+ bool m_isReadOnly;
+ BibTeX::Preamble* m_bibtexpreamble;
+ KBibTeX::FieldLineEdit *m_fieldLineEditPreambleValue;
+
+ PreambleWidget( BibTeX::Preamble *bibtexpreamble, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~PreambleWidget();
+
+ void setupGUI();
+
+ };
+
+}
+
+#endif
diff --git a/src/searchbar.cpp b/src/searchbar.cpp
new file mode 100644
index 0000000..113bb4d
--- /dev/null
+++ b/src/searchbar.cpp
@@ -0,0 +1,192 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlineedit.h>
+#include <qlayout.h>
+#include <qlistbox.h>
+#include <qtimer.h>
+#include <qtooltip.h>
+#include <qlabel.h>
+
+#include <kcombobox.h>
+#include <kpushbutton.h>
+#include <kcombobox.h>
+#include <klocale.h>
+#include <kdialog.h>
+#include <kiconloader.h>
+#include <kpopupmenu.h>
+
+#include <settings.h>
+#include "searchbar.h"
+
+namespace KBibTeX
+{
+
+ SearchBar::SearchBar( QWidget *parent, const char *name )
+ : QWidget( parent, name )
+ {
+ m_timerInput = new QTimer( this );
+ connect( m_timerInput, SIGNAL( timeout() ), SLOT( slotTimeout() ) );
+
+ setupGUI();
+ }
+
+ SearchBar::~SearchBar()
+ {
+ delete m_timerInput;
+ }
+
+ void SearchBar::setFactory( KXMLGUIFactory *factory, KXMLGUIClient *client )
+ {
+ KPopupMenu * menu = static_cast<KPopupMenu*>( factory -> container( "popup_newelements", client ) );
+ Settings * settings = Settings::self();
+ m_pushButtonAddElement->setPopup( menu );
+ m_comboboxFilter->setHistoryItems( settings->editing_FilterHistory );
+ }
+
+ void SearchBar::restoreState()
+ {
+ Settings * settings = Settings::self();
+ if ( settings->editing_UseSpecialFont )
+ m_comboboxFilter->setFont( settings->editing_SpecialFont );
+ else
+ m_comboboxFilter->setFont( KGlobalSettings::generalFont() );
+ }
+
+ void SearchBar::setSearch( const QString&text, BibTeX::Element::FilterType filterType, BibTeX::EntryField::FieldType fieldType )
+ {
+ m_comboboxFilter->setCurrentText( text );
+ switch ( filterType )
+ {
+ case BibTeX::Element::ftExact: m_comboboxFilterType->setCurrentItem( 0 ); break;
+ case BibTeX::Element::ftEveryWord: m_comboboxFilterType->setCurrentItem( 1 ); break;
+ case BibTeX::Element::ftAnyWord: m_comboboxFilterType->setCurrentItem( 2 ); break;
+ }
+ m_comboboxRestrictTo->setCurrentItem(( int ) fieldType + 1 );
+ }
+
+ void SearchBar::setupGUI()
+ {
+ QBoxLayout * layout = new QHBoxLayout( this, 3 /* KDialog::marginHint()*/, KDialog::spacingHint() );
+ KIconLoader iconLoader = KIconLoader( "kbibtex" );
+
+ m_pushButtonAddElement = new KPushButton( this );
+ m_pushButtonAddElement->setIconSet( QIconSet( BarIcon( "add" ) ) );
+ layout->addWidget( m_pushButtonAddElement );
+ QToolTip::add( m_pushButtonAddElement, i18n( "Add a new BibTeX entry, comment or macro to this file" ) );
+
+ m_pushButtonSearchOnlineDatabases = new KPushButton( this );
+ m_pushButtonSearchOnlineDatabases->setIconSet( QIconSet( BarIcon( "network" ) ) );
+ layout->addWidget( m_pushButtonSearchOnlineDatabases );
+ QToolTip::add( m_pushButtonSearchOnlineDatabases, i18n( "Add a new BibTeX entry from an online database" ) );
+ connect( m_pushButtonSearchOnlineDatabases, SIGNAL( clicked() ), this, SIGNAL( onlineSearch() ) );
+
+ layout->insertSpacing( 2, KDialog::spacingHint() );
+
+ m_pushButtonClearSearchText = new KPushButton( this );
+ m_pushButtonClearSearchText->setIconSet( QIconSet( BarIcon( "locationbar_erase" ) ) );
+ layout->addWidget( m_pushButtonClearSearchText );
+ QToolTip::add( m_pushButtonClearSearchText, i18n( "Erase current search pattern" ) );
+ m_pushButtonClearSearchText->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred );
+
+ QLabel *label = new QLabel( i18n( "&Search:" ), this );
+ layout->addWidget( label );
+
+ m_comboboxFilter = new KHistoryCombo( TRUE, this, "search_combobox" );
+ layout->addWidget( m_comboboxFilter );
+ label->setBuddy( m_comboboxFilter );
+ m_comboboxFilter->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
+ m_comboboxFilter->setMaxCount( 256 );
+
+ m_comboboxFilterType = new KComboBox( FALSE, this );
+ m_comboboxFilterType->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred );
+ layout->addWidget( m_comboboxFilterType );
+
+ m_comboboxFilterType->insertItem( i18n( "Exact" ) );
+ m_comboboxFilterType->insertItem( i18n( "Every word" ) );
+ m_comboboxFilterType->insertItem( i18n( "Any word" ) );
+ m_comboboxFilterType->setCurrentItem( 1 );
+
+ label = new QLabel( i18n( "Restrict to:" ), this );
+ layout->addWidget( label );
+ m_comboboxRestrictTo = new KComboBox( FALSE, this );
+ m_comboboxRestrictTo->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred );
+ layout->addWidget( m_comboboxRestrictTo );
+ label->setBuddy( m_comboboxRestrictTo );
+
+ m_comboboxRestrictTo->insertItem( i18n( "All fields" ) );
+ for ( int i = ( int ) BibTeX::EntryField::ftAbstract; i <= ( int ) BibTeX::EntryField::ftYear; i++ )
+ {
+ BibTeX::EntryField::FieldType fieldType = ( BibTeX::EntryField::FieldType ) i;
+ m_comboboxRestrictTo->insertItem( Settings::fieldTypeToI18NString( fieldType ) );
+ }
+
+ connect( m_comboboxFilter->lineEdit(), SIGNAL( textChanged( const QString & ) ), this, SLOT( slotKeyPressed() ) );
+ connect( m_comboboxFilter, SIGNAL( activated( const QString& ) ), m_comboboxFilter, SLOT( addToHistory( const QString& ) ) );
+ connect( m_pushButtonClearSearchText, SIGNAL( clicked() ), this, SLOT( slotClear() ) );
+ connect( m_comboboxFilterType, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotAnnounceDoSearch() ) );
+ connect( m_comboboxFilter, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotAnnounceDoSearch() ) );
+ connect( m_comboboxFilter->lineEdit(), SIGNAL( returnPressed() ), this, SLOT( slotAnnounceDoSearch() ) );
+ connect( m_comboboxFilterType, SIGNAL( activated( int ) ), this, SLOT( slotTimeout() ) );
+ connect( m_comboboxRestrictTo, SIGNAL( activated( int ) ), this, SLOT( slotTimeout() ) );
+
+ setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
+ }
+
+ void SearchBar::slotClear()
+ {
+ m_comboboxFilter->lineEdit() ->clear();
+ m_comboboxRestrictTo->setCurrentItem( 0 );
+ m_comboboxFilterType->setCurrentItem( 1 );
+ m_comboboxFilter->setFocus();
+ }
+
+ void SearchBar::slotTimeout()
+ {
+ BibTeX::EntryField::FieldType fieldType = BibTeX::EntryField::ftUnknown;
+ if ( m_comboboxRestrictTo->currentItem() > 0 )
+ fieldType = ( BibTeX::EntryField::FieldType )( m_comboboxRestrictTo->currentItem() - 1 + ( int ) BibTeX::EntryField::ftAbstract );
+
+ Settings * settings = Settings::self();
+ settings->editing_FilterHistory = m_comboboxFilter->historyItems();
+
+ BibTeX::Element::FilterType filterType = BibTeX::Element::ftExact;
+ if ( m_comboboxFilterType->currentItem() == 1 ) filterType = BibTeX::Element::ftEveryWord;
+ else if ( m_comboboxFilterType->currentItem() == 2 ) filterType = BibTeX::Element::ftAnyWord;
+
+ emit doSearch( m_comboboxFilter->currentText(), filterType, fieldType );
+ }
+
+ void SearchBar::slotAnnounceDoSearch()
+ {
+ if ( m_timerInput->isActive() )
+ m_timerInput->stop();
+
+ m_timerInput->start( 0, true );
+ }
+
+ void SearchBar::slotKeyPressed()
+ {
+ Settings * settings = Settings::self();
+ if ( settings->editing_SearchBarClearField )
+ m_comboboxRestrictTo->setCurrentItem( 0 );
+ }
+
+}
+#include "searchbar.moc"
diff --git a/src/searchbar.h b/src/searchbar.h
new file mode 100644
index 0000000..e733d42
--- /dev/null
+++ b/src/searchbar.h
@@ -0,0 +1,78 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXSEARCHBAR_H
+#define KBIBTEXSEARCHBAR_H
+
+#include <qwidget.h>
+
+#include <kxmlguifactory.h>
+
+#include <documentlistview.h>
+#include <entryfield.h>
+
+class QTimer;
+class KPushButton;
+class KPopupMenu;
+class KHistoryCombo;
+class KComboBox;
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer
+ */
+ class SearchBar : public QWidget
+ {
+ Q_OBJECT
+ public:
+ SearchBar( QWidget *parent = 0, const char *name = "search_bar" );
+ ~SearchBar();
+
+ void setFactory( KXMLGUIFactory *factory, KXMLGUIClient *client );
+ void restoreState();
+
+ signals:
+ void doSearch( const QString &text, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType fieldType );
+ void onlineSearch();
+
+ public slots:
+ void setSearch( const QString&text, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType fieldType );
+
+ private:
+ KPushButton *m_pushButtonClearSearchText;
+ KHistoryCombo *m_comboboxFilter;
+ QTimer *m_timerInput;
+ KPushButton *m_pushButtonAddElement;
+ KPushButton *m_pushButtonSearchOnlineDatabases;
+ KComboBox *m_comboboxFilterType;
+ KComboBox *m_comboboxRestrictTo;
+
+ void setupGUI();
+
+ private slots:
+ void slotClear();
+ void slotTimeout();
+ void slotAnnounceDoSearch();
+ void slotKeyPressed();
+ };
+
+}
+
+#endif
diff --git a/src/settings.cpp b/src/settings.cpp
new file mode 100644
index 0000000..67b4d2f
--- /dev/null
+++ b/src/settings.cpp
@@ -0,0 +1,966 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qstring.h>
+#include <qprocess.h>
+#include <qstringlist.h>
+#include <qfont.h>
+#include <qregexp.h>
+#include <qwaitcondition.h>
+#include <qprocess.h>
+#include <qapplication.h>
+
+#include <kconfig.h>
+#include <kstandarddirs.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+#include <kbibtex_part.h>
+#include <kdebug.h>
+#include <kio/netaccess.h>
+
+#include <entryfield.h>
+#include <element.h>
+#include <entry.h>
+#include <macro.h>
+#include "settings.h"
+
+namespace KBibTeX
+{
+ Settings* Settings::staticSettings = new Settings();
+ QStringList Settings::m_lyxRcFileNames = QStringList::split( '|', QDir::home().canonicalPath() + "/.lyx/lyxrc" + '|' + QDir::home().canonicalPath() + "/.lyx/preferences" );
+
+ const QRegExp Settings::noIdChars( "[^-.:/+_a-zA-Z0-9]" );
+
+ Settings::Settings()
+ {
+ checkExternalToolsAvailable();
+
+ KStandardDirs * kstd = KGlobal::dirs();
+ external_XSLTStylesheetHTML = kstd->findResource( "data", "kbibtexpart/xslt/html.xsl" );
+ if ( external_XSLTStylesheetHTML == NULL )
+ KMessageBox::error( NULL, i18n( "Could not determine filename for XSLT file" ), i18n( "Initialization failed" ) );
+
+ int numCompletions = BibTeX::EntryField::ftYear - BibTeX::EntryField::ftAbstract + 4;
+ m_completion = new KCompletion * [ numCompletions ];
+ for ( int i = 0; i < numCompletions; ++i )
+ {
+ m_completion[ i ] = new KCompletion();
+ m_completion[ i ] ->setIgnoreCase( TRUE );
+ }
+ completionMacro = new KCompletion();
+ completionMacro->setIgnoreCase( FALSE );
+
+ currentBibTeXFile = NULL;
+ }
+
+ Settings::~Settings()
+ {
+ int numCompletions = BibTeX::EntryField::ftYear - BibTeX::EntryField::ftAbstract + 4;
+ for ( int i = 0; i < numCompletions; ++i )
+ delete m_completion[ i ];
+ delete[] m_completion;
+ delete completionMacro;
+
+ for ( QValueList<SearchURL*>::ConstIterator it = searchURLs.begin(); it != searchURLs.end(); ++it )
+ delete *it;
+ }
+
+ Settings* Settings::self( BibTeX::File *bibtexFile )
+ {
+ if ( bibtexFile != NULL )
+ staticSettings->currentBibTeXFile = bibtexFile;
+ return staticSettings;
+ }
+
+ void Settings::load( KConfig * config )
+ {
+ config->setGroup( "FileIO" );
+ fileIO_Encoding = config->readEntry( "Encoding", "latex" );
+ if ( fileIO_Encoding.length() == 1 ) fileIO_Encoding = "latex"; // due to old scheme where digits were used
+ fileIO_ExportLanguage = config->readEntry( "ExportLanguage", "english" );
+ fileIO_ExportBibliographyStyle = config->readEntry( "ExportBibliographyStyle", "plain" );
+ fileIO_ExporterHTML = ( BibTeX::FileExporterExternal::Exporter ) config->readNumEntry( "ExporterHTML", ( int ) BibTeX::FileExporterExternal::exporterNone );
+ fileIO_BibtexStringOpenDelimiter = config->readEntry( "BibtexStringOpenDelimiter", "\"" ).at( 0 );
+ fileIO_BibtexStringCloseDelimiter = config->readEntry( "BibtexStringCloseDelimiter", "\"" ).at( 0 );
+ fileIO_KeywordCasing = ( BibTeX::FileExporterBibTeX::KeywordCasing ) config->readNumEntry( "KeywordCasing", ( int ) BibTeX::FileExporterBibTeX::kcCamelCase );
+ fileIO_EmbedFiles = config->readBoolEntry( "EmbedFiles", FALSE );
+ fileIO_EnclosingCurlyBrackets = config->readBoolEntry( "EnclosingCurlyBrackets", FALSE );
+ fileIO_useBibUtils = config->readBoolEntry( "UseBibUtils", TRUE );
+ updateBib2Db5ClassPath( config->readEntry( "Bib2Db5BasePath", QString::null ) );
+ fileIO_NumberOfBackups = config->readNumEntry( "NumberOfBackups", 0 );
+
+ config->setGroup( "Editing" );
+ editing_SearchBarClearField = config->readBoolEntry( "SearchBarClearField", false );
+ editing_EnableAllFields = config->readBoolEntry( "EnableAllFields", false );
+ editing_MainListDoubleClickAction = config->readNumEntry( "MainListDoubleClickAction", 0 );
+ editing_MainListSortingColumn = config->readNumEntry( "MainListSortingColumn", 1 );
+ editing_MainListSortingOrder = config->readNumEntry( "MainListSortingOrder", 1 );
+ editing_MainListColumnsWidth = config->readIntListEntry( "MainListColumnsWidth" );
+ editing_MainListColumnsIndex = config->readIntListEntry( "MainListColumnsIndex" );
+ editing_FilterHistory = config->readListEntry( "FilterHistory" );
+ editing_ShowComments = config->readBoolEntry( "ShowComments", TRUE );
+ editing_ShowMacros = config->readBoolEntry( "ShowMacros", TRUE );
+ editing_HorSplitterSizes = config->readIntListEntry( "HorizontalSplitterSizes" );
+ editing_VertSplitterSizes = config->readIntListEntry( "VerticalSplitterSizes" );
+ QFont defaultFont = KGlobalSettings::generalFont();
+ editing_SpecialFont = config->readFontEntry( "SpecialFont", &defaultFont );
+ editing_UseSpecialFont = config->readBoolEntry( "UseSpecialFont", FALSE );
+ editing_FirstNameFirst = config->readBoolEntry( "FirstNameFirst", FALSE );
+ editing_DocumentSearchPaths = config->readListEntry( "DocumentSearchPath" );
+ editing_DragAction = ( DragAction ) config->readNumEntry( "DragAction", ( int ) COPYREFERENCE );
+
+ if ( editing_MainListColumnsWidth.isEmpty() || editing_MainListColumnsIndex.isEmpty() )
+ {
+ editing_MainListColumnsWidth.clear();
+ editing_MainListColumnsIndex.clear();
+
+ int column = 0;
+ // for type and id column
+ editing_MainListColumnsWidth.append( 0xffff );
+ editing_MainListColumnsWidth.append( 0xffff );
+ editing_MainListColumnsIndex.append( column++ );
+ editing_MainListColumnsIndex.append( column++ );
+
+ for ( int i = 0; i <= ( int ) BibTeX::EntryField::ftYear - ( int ) BibTeX::EntryField::ftAbstract; i++ )
+ {
+ BibTeX::EntryField::FieldType fieldType = ( BibTeX::EntryField::FieldType )( i + ( int ) BibTeX::EntryField::ftAbstract );
+ if ( fieldType == BibTeX::EntryField::ftAuthor || fieldType == BibTeX::EntryField::ftTitle )
+ editing_MainListColumnsWidth.append( 0xffff );
+ else
+ editing_MainListColumnsWidth.append( 0 );
+ editing_MainListColumnsIndex.append( column++ );
+ }
+ }
+ editing_findDuplicatesSensitivity = config->readNumEntry( "FindDuplicatesSensitivity", 12 );
+
+ config->setGroup( "SearchURLs" );
+ searchURLs.clear();
+ for ( int i = 1; i < 1024; i++ )
+ {
+ QString descr = config->readEntry( QString( "SearchURLDescription%1" ).arg( i ), QString::null );
+ QString url = config->readEntry( QString( "SearchURL%1" ).arg( i ), QString::null );
+ bool includeAuthor = config->readBoolEntry( QString( "IncludeAuthor%1" ).arg( i ), FALSE );
+ if ( descr != QString::null && url != QString::null )
+ {
+ SearchURL * searchURL = new SearchURL;
+ searchURL->description = descr;
+ searchURL->url = url;
+ searchURL->includeAuthor = includeAuthor;
+ searchURLs.append( searchURL );
+ }
+ else
+ break;
+ }
+
+ if ( searchURLs.count() == 0 )
+ restoreDefaultSearchURLs();
+
+ config->setGroup( "Keyword" );
+ keyword_GlobalList = config->readListEntry( "GlobalList" );
+ keyword_GlobalList.sort();
+
+ config->setGroup( "OnlineSearchDatabase" );
+ webQuery_LastEngine = config->readNumEntry( "LastEngine", 0 );
+ webQuery_LastSearchTerm = config->readEntry( "LastSearchTerm", "" );
+ webQuery_LastNumberOfResults = config->readNumEntry( "LastNumberOfResults", 10 );
+ webQuery_ImportAll = config->readBoolEntry( "ImportAll", FALSE );
+
+ config->setGroup( "IdSuggestions" );
+ idSuggestions_formatStrList = config->readListEntry( "FormatStrList" );
+ if ( idSuggestions_formatStrList.count() == 0 )
+ {
+ idSuggestions_formatStrList = QStringList::split( ',', "A,A2|y,A3|y,A4|y|\":|T5,al|\":|T,al|y,al|Y,Al\"-|\"-|y,Al\"+|Y,al|y|T,al|Y|T3,al|Y|T3l,a|\":|Y|\":|T1,a|y,A|\":|Y" );
+ idSuggestions_default = -1;
+ idSuggestions_forceDefault = FALSE;
+ }
+ else
+ {
+ idSuggestions_default = config->readNumEntry( "Default", -1 );
+ idSuggestions_forceDefault = config->readBoolEntry( "ForceDefault", FALSE );
+ }
+ idSuggestions_smallWords = config->readListEntry( "SmallWords" );
+ if ( idSuggestions_smallWords.count() == 0 )
+ idSuggestions_smallWords = QStringList::split( '|', "and|on|in|the|of|at|a|an|with|for|from" );
+ idSuggestions_smallWords.sort();
+
+ config->setGroup( "UserDefinedInputFields" );
+ QStringList names = config->readListEntry( "Names" );
+ QStringList labels = config->readListEntry( "Labels" );
+ QStringList inputtypes = config->readListEntry( "InputTypes" );
+
+ userDefinedInputFields.clear();
+ for ( unsigned int i = 0; i < names.size();++i )
+ {
+ UserDefinedInputFields *udif = new UserDefinedInputFields();
+ udif->name = names[i];
+ udif->label = labels[i];
+ udif->inputType = ( inputtypes[i] == "single" ? FieldLineEdit::itSingleLine : FieldLineEdit::itMultiLine );
+ userDefinedInputFields << udif;
+ }
+
+ // web query history/default values
+ m_webQueryDefaults = config->entryMap( "WebQuery" );
+
+#ifdef HAVE_YAZ
+ z3950clearAll();
+ z3950loadUser( config );
+ z3950loadDefault();
+#endif // HAVE_YAZ
+ }
+
+ void Settings::save( KConfig * config )
+ {
+ config->setGroup( "FileIO" );
+ config->writeEntry( "Encoding", fileIO_Encoding );
+ config->writeEntry( "ExportLanguage", fileIO_ExportLanguage );
+ config->writeEntry( "ExportBibliographyStyle", fileIO_ExportBibliographyStyle );
+ config->writeEntry( "ExporterHTML", ( int ) fileIO_ExporterHTML );
+ config->writeEntry( "BibtexStringOpenDelimiter", QString( fileIO_BibtexStringOpenDelimiter ) );
+ config->writeEntry( "BibtexStringCloseDelimiter", QString( fileIO_BibtexStringCloseDelimiter ) );
+ config->writeEntry( "KeywordCasing", ( int ) fileIO_KeywordCasing );
+ config->writeEntry( "EmbedFiles", fileIO_EmbedFiles );
+ config->writeEntry( "EnclosingCurlyBrackets", fileIO_EnclosingCurlyBrackets );
+ config->writeEntry( "UseBibUtils", fileIO_useBibUtils );
+ config->writeEntry( "Bib2Db5BasePath", fileIO_bib2db5BasePath );
+ config->writeEntry( "NumberOfBackups", fileIO_NumberOfBackups );
+
+ config->setGroup( "Editing" );
+ config->writeEntry( "SearchBarClearField", editing_SearchBarClearField );
+ config->writeEntry( "EnableAllFields", editing_EnableAllFields );
+ config->writeEntry( "MainListDoubleClickAction", editing_MainListDoubleClickAction );
+ config->writeEntry( "MainListSortingColumn", editing_MainListSortingColumn );
+ config->writeEntry( "MainListSortingOrder", editing_MainListSortingOrder );
+ config->writeEntry( "MainListColumnsWidth", editing_MainListColumnsWidth );
+ config->writeEntry( "MainListColumnsIndex", editing_MainListColumnsIndex );
+ config->writeEntry( "FilterHistory", editing_FilterHistory );
+ config->writeEntry( "ShowComments", editing_ShowComments );
+ config->writeEntry( "ShowMacros", editing_ShowMacros );
+ config->writeEntry( "HorizontalSplitterSizes", editing_HorSplitterSizes );
+ config->writeEntry( "VerticalSplitterSizes", editing_VertSplitterSizes );
+ config->writeEntry( "SpecialFont", editing_SpecialFont );
+ config->writeEntry( "UseSpecialFont", editing_UseSpecialFont );
+ config->writeEntry( "FirstNameFirst", editing_FirstNameFirst );
+ config->writeEntry( "DocumentSearchPath", editing_DocumentSearchPaths );
+ config->writeEntry( "DragAction", editing_DragAction );
+ config->writeEntry( "FindDuplicatesSensitivity", editing_findDuplicatesSensitivity );
+
+ config->setGroup( "SearchURLs" );
+ int i = 1;
+ for ( QValueList<SearchURL*>::ConstIterator it = searchURLs.begin(); it != searchURLs.end(); ++it, ++i )
+ {
+ config->writeEntry( QString( "SearchURLDescription%1" ).arg( i ), ( *it ) ->description );
+ config->writeEntry( QString( "SearchURL%1" ).arg( i ), ( *it ) ->url );
+ config->writeEntry( QString( "IncludeAuthor%1" ).arg( i ), ( *it ) ->includeAuthor );
+ }
+
+ config->setGroup( "Keyword" );
+ config->writeEntry( "GlobalList", keyword_GlobalList );
+
+ config->setGroup( "OnlineSearchDatabase" );
+ config->writeEntry( "LastEngine", webQuery_LastEngine );
+ config->writeEntry( "LastSearchTerm", webQuery_LastSearchTerm );
+ config->writeEntry( "LastNumberOfResults", webQuery_LastNumberOfResults );
+ config->writeEntry( "ImportAll", webQuery_ImportAll );
+
+ config->setGroup( "IdSuggestions" );
+ config->writeEntry( "FormatStrList", idSuggestions_formatStrList );
+ config->writeEntry( "Default", idSuggestions_default );
+ config->writeEntry( "ForceDefault", idSuggestions_forceDefault );
+ config->writeEntry( "SmallWords", idSuggestions_smallWords );
+
+ config->setGroup( "UserDefinedInputFields" );
+ QStringList names, labels, inputtype;
+ for ( QValueList<UserDefinedInputFields*>::iterator it = userDefinedInputFields.begin(); it != userDefinedInputFields.end();++it )
+ {
+ names << ( *it )->name;
+ labels << ( *it )->label;
+ inputtype << (( *it )->inputType == FieldLineEdit::itMultiLine ? "multi" : "single" );
+ }
+ config->writeEntry( "Names", names );
+ config->writeEntry( "Labels", labels );
+ config->writeEntry( "InputTypes", inputtype );
+
+ config->setGroup( "WebQuery" );
+ for ( QMap<QString, QString>::Iterator it = m_webQueryDefaults.begin(); it != m_webQueryDefaults.end(); ++it )
+ config->writeEntry( it.key(), it.data() );
+
+#ifdef HAVE_YAZ
+ z3950saveUser( config );
+#endif // HAVE_YAZ
+ }
+
+ void Settings::checkExternalToolsAvailable()
+ {
+ external_bibconvAvailable = checkExternalToolAvailable( "bibconv" );
+ external_bibtex2htmlAvailable = checkExternalToolAvailable( "bibtex2html" );
+ external_bib2xhtmlAvailable = checkExternalToolAvailable( "bib2xhtml" );
+ external_latex2rtfAvailable = checkExternalToolAvailable( "latex2rtf" );
+ external_xml2bibAvailable = checkExternalToolAvailable( "xml2bib" );
+ external_end2xmlAvailable = checkExternalToolAvailable( "end2xml" );
+ external_ris2xmlAvailable = checkExternalToolAvailable( "ris2xml" );
+ }
+
+ bool Settings::updateBib2Db5ClassPath( const QString& newBasePath, bool testOnly )
+ {
+ QString bib2db5ClassPath = QString::null;
+ QDir bib2db5BaseDir( newBasePath );
+ QStringList list = bib2db5BaseDir.entryList( "antlr-runtime*.jar" );
+ if ( !list.isEmpty() )
+ {
+ bib2db5ClassPath = bib2db5BaseDir.absPath() + "/" + list[0];
+ list = bib2db5BaseDir.entryList( "bib2db5*.jar" );
+ if ( !list.isEmpty() )
+ bib2db5ClassPath += ":" + bib2db5BaseDir.absPath() + "/" + list[0];
+ else
+ bib2db5ClassPath = QString::null;
+ }
+ else
+ bib2db5ClassPath = QString::null;
+ if ( bib2db5ClassPath == QString::null )
+ kdDebug() << "Base path for bib2db5 is invalid (\"" << newBasePath << "\")" << endl;
+
+ if ( !testOnly )
+ {
+ fileIO_bib2db5BasePath = newBasePath;
+ fileIO_bib2db5ClassPath = bib2db5ClassPath;
+ }
+
+ return bib2db5ClassPath != QString::null;
+ }
+
+ bool Settings::checkExternalToolAvailable( const QString &binary )
+ {
+ QProcess *process = new QProcess( binary );
+ bool ok = process->start();
+ ok &= process->normalExit();
+ if ( process->isRunning() )
+ {
+ process->kill();
+ ok = true;
+ }
+ delete process;
+ return ok;
+ }
+
+ QString Settings::detectLyXInPipe()
+ {
+ QString result = QString::null;
+ for ( QStringList::Iterator it = m_lyxRcFileNames.begin(); result.isNull() && it != m_lyxRcFileNames.end(); ++it )
+ {
+ QString lyxRcFileName = *it;
+ QFile lyxRcFile( lyxRcFileName );
+
+ kdDebug() << "detectLyXInPipe: looking for " << lyxRcFileName << endl;
+ if ( lyxRcFile.exists() && lyxRcFile.open( IO_ReadOnly ) )
+ {
+ QTextStream input( &lyxRcFile );
+ while ( result.isNull() && !input.atEnd() )
+ {
+ QString line = input.readLine();
+ if ( line.startsWith( "\\serverpipe ", FALSE ) )
+ {
+ QStringList cols = QStringList::split( QRegExp( "\\s+\"|\"" ), line );
+ if ( cols.size() >= 2 )
+ {
+ result = cols[ 1 ] + ".in";
+ kdDebug() << "detectLyXInPipe: testing " << result << " from config file" << endl;
+ if ( !QFile::exists( result ) )
+ kdDebug() << "LyX in pipe '" << result << "' from " << lyxRcFileName << " does not exist" << endl;
+ }
+ }
+ }
+ lyxRcFile.close();
+ }
+ }
+
+ if ( result.isNull() )
+ {
+ result = QDir::home().canonicalPath() + "/.lyx/lyxpipe.in";
+ kdDebug() << "detectLyXInPipe: testing " << result << endl;
+ if ( !QFile::exists( result ) )
+ result = QString::null;
+ }
+
+ if ( result.isNull() )
+ {
+ result = QDir::home().canonicalPath() + "/.lyx/.lyxpipe.in";
+ kdDebug() << "detectLyXInPipe: testing " << result << endl;
+ if ( !QFile::exists( result ) )
+ result = QString::null;
+ }
+
+ if ( result.isNull() )
+ {
+ result = QDir::home().canonicalPath() + "/.lyxpipe.in";
+ kdDebug() << "detectLyXInPipe: testing " << result << endl;
+ if ( !QFile::exists( result ) )
+ result = QString::null;
+ }
+
+ kdDebug() << "detectLyXInPipe: using " << ( result.isNull() ? "<INVALID>" : result ) << endl;
+ return result;
+ }
+
+ QString Settings::getWebQueryDefault( const QString &key )
+ {
+ return m_webQueryDefaults[key];
+ }
+
+ void Settings::setWebQueryDefault( const QString &key, const QString& value )
+ {
+ m_webQueryDefaults[key] = value;
+ }
+
+ void Settings::addToCompletion( BibTeX::File *file )
+ {
+ for ( BibTeX::File::ElementList::iterator it = file->begin(); it != file->end(); it++ )
+ addToCompletion( *it );
+ }
+
+ void Settings::addToCompletion( BibTeX::Element *element )
+ {
+ BibTeX::Entry * entry = dynamic_cast<BibTeX::Entry*>( element );
+ BibTeX::Macro * macro = dynamic_cast<BibTeX::Macro*>( element );
+ if ( entry != NULL )
+ {
+ for ( BibTeX::Entry::EntryFields::ConstIterator ite = entry->begin(); ite != entry->end(); ite++ )
+ {
+ BibTeX::EntryField::FieldType fieldType = ( *ite ) ->fieldType();
+ BibTeX::Value *value = ( *ite ) ->value();
+ addToCompletion( value, fieldType );
+ }
+ }
+ else if ( macro != NULL )
+ completionMacro->addItem( macro->key() );
+ }
+
+ void Settings::addToCompletion( BibTeX::Value *value, BibTeX::EntryField::FieldType fieldType )
+ {
+ int index = completionFieldTypeToIndex( fieldType );
+
+ for ( QValueList<BibTeX::ValueItem*>::ConstIterator itv = value->items.begin(); itv != value->items.end(); itv++ )
+ {
+ BibTeX::PlainText *plainText = dynamic_cast<BibTeX::PlainText*>( *itv );
+ if ( plainText != NULL )
+ m_completion[ index ] ->addItem( plainText->text() );
+ else
+ {
+ BibTeX::PersonContainer *personContainer = dynamic_cast<BibTeX::PersonContainer*>( *itv );
+ if ( personContainer != NULL )
+ for ( QValueList<BibTeX::Person*>::Iterator itp = personContainer->persons.begin();itp != personContainer->persons.end(); ++itp )
+ {
+ m_completion[ index ] ->addItem(( *itp )->text( TRUE ) );
+ m_completion[ index ] ->addItem(( *itp )->text( FALSE ) );
+ }
+ else
+ {
+ BibTeX::KeywordContainer *keywordContainer = dynamic_cast<BibTeX::KeywordContainer*>( *itv );
+ if ( keywordContainer != NULL )
+ for ( QValueList<BibTeX::Keyword*>::Iterator itk = keywordContainer->keywords.begin();itk != keywordContainer->keywords.end(); ++itk )
+ m_completion[ index ] ->addItem(( *itk )->text() );
+ }
+ }
+ }
+ }
+
+ KCompletion *Settings::completion( BibTeX::EntryField::FieldType fieldType )
+ {
+ return m_completion[ completionFieldTypeToIndex( fieldType )];
+ }
+
+ int Settings::completionFieldTypeToIndex( BibTeX::EntryField::FieldType fieldType )
+ {
+ int index = 0;
+ if ( fieldType == BibTeX::EntryField::ftEditor )
+ fieldType = BibTeX::EntryField::ftAuthor;
+ if ( fieldType != BibTeX::EntryField::ftUnknown )
+ index = ( int )( fieldType - BibTeX::EntryField::ftAbstract ) + 1;
+ return index;
+ }
+
+ void Settings::restoreDefaultSearchURLs()
+ {
+ QStringList defaultDescriptions;
+ defaultDescriptions.append( "Google Scholar" );
+ defaultDescriptions.append( "Google .bib Search" );
+ defaultDescriptions.append( "Google Document Search" );
+ defaultDescriptions.append( "Google" );
+ defaultDescriptions.append( "CiteSeer" );
+ defaultDescriptions.append( "PubMed" );
+ defaultDescriptions.append( "PubMed Central" );
+ defaultDescriptions.append( "DBLP (Computer Science)" );
+ defaultDescriptions.append( "citebase" );
+ defaultDescriptions.append( "BASE" );
+ defaultDescriptions.append( "Forschungsportal.Net" );
+ defaultDescriptions.append( "scirus" );
+ defaultDescriptions.append( "ScientificCommons" );
+ defaultDescriptions.append( "Amatex (US)" );
+ defaultDescriptions.append( "SpringerLink" );
+
+ QValueList<SearchURL*> toDelete;
+ for ( QValueList<SearchURL*>::ConstIterator it = searchURLs.begin(); it != searchURLs.end(); ++it )
+ {
+ if ( defaultDescriptions.contains(( *it ) ->description ) )
+ {
+ toDelete.append( *it );
+ }
+ }
+
+ for ( QValueList<SearchURL*>::ConstIterator it = toDelete.begin(); it != toDelete.end(); ++it )
+ {
+ delete *it;
+ searchURLs.remove( *it );
+ }
+
+ SearchURL *searchURL = new SearchURL;
+ searchURL->description = "Google";
+ searchURL->url = "http://www.google.com/search?q=%1&ie=UTF-8&oe=UTF-8";
+ searchURL->includeAuthor = TRUE;
+ searchURLs.append( searchURL );
+
+ searchURL = new SearchURL;
+ searchURL->description = "Google Scholar";
+ searchURL->url = "http://scholar.google.com/scholar?q=%1&ie=UTF-8&oe=UTF-8";
+ searchURL->includeAuthor = TRUE;
+ searchURLs.append( searchURL );
+
+ searchURL = new SearchURL;
+ searchURL->description = "Google .bib Search";
+ searchURL->url = "http://www.google.com/search?q=%1%20filetype%3Abib&ie=UTF-8&oe=UTF-8";
+ searchURL->includeAuthor = TRUE;
+ searchURLs.append( searchURL );
+
+ searchURL = new SearchURL;
+ searchURL->description = "Google Document Search";
+ searchURL->url = "http://www.google.com/search?q=%1%20filetype%3Apdf%20OR%20filetype%3Aps&ie=UTF-8&oe=UTF-8";
+ searchURL->includeAuthor = TRUE;
+ searchURLs.append( searchURL );
+
+ searchURL = new SearchURL;
+ searchURL->description = "PubMed";
+ searchURL->url = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=pubmed&cmd=search&pmfilter_Fulltext=on&pmfilter_Relevance=on&term=%1&search=Find+Articles";
+ searchURL->includeAuthor = FALSE;
+ searchURLs.append( searchURL );
+
+ searchURL = new SearchURL;
+ searchURL->description = "PubMed Central";
+ searchURL->url = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=pubmed&cmd=search&term=%1";
+ searchURL->includeAuthor = FALSE;
+ searchURLs.append( searchURL );
+
+ searchURL = new SearchURL;
+ searchURL->description = "Amatex (US)";
+ searchURL->url = "http://www.2ndminute.org:8080/amatex/search.do?querry=%1&suchart=kwd&lang=DE";
+ searchURL->includeAuthor = FALSE;
+ searchURLs.append( searchURL );
+
+ searchURL = new SearchURL;
+ searchURL->description = "DBLP (Computer Science)";
+ searchURL->url = "http://www.informatik.uni-trier.de/ley/dbbin/dblpquery.cgi?title=%1";
+ searchURL->includeAuthor = FALSE;
+ searchURLs.append( searchURL );
+
+ searchURL = new SearchURL;
+ searchURL->description = "CiteSeer";
+ searchURL->url = "http://citeseer.ist.psu.edu/cis?q=%1&submit=Search+Documents";
+ searchURL->includeAuthor = FALSE;
+ searchURLs.append( searchURL );
+
+ searchURL = new SearchURL;
+ searchURL->description = "citebase";
+ searchURL->url = "http://www.citebase.org/search?type=metadata&author=&title=%1&publication=&yearfrom=&yearuntil=&order=DESC&rank=paperimpact&submitted=Search";
+ searchURL->includeAuthor = FALSE;
+ searchURLs.append( searchURL );
+
+ searchURL = new SearchURL;
+ searchURL->description = "BASE";
+ searchURL->url = "http://digital.ub.uni-bielefeld.de/index.php?q=%1&s=free";
+ searchURL->includeAuthor = FALSE;
+ searchURLs.append( searchURL );
+
+ searchURL = new SearchURL;
+ searchURL->description = "Forschungsportal.Net";
+ searchURL->url = "http://www.forschungsportal.net/fpj/q/?q=%1&pp=5&art=dok&html=1&pdf=1&ps=1&dvi=1";
+ searchURL->includeAuthor = FALSE;
+ searchURLs.append( searchURL );
+
+ searchURL = new SearchURL;
+ searchURL->description = "scirus";
+ searchURL->url = "http://www.scirus.com/srsapp/search?q=%1&ds=jnl&ds=nom&ds=web&g=s&t=all";
+ searchURL->includeAuthor = FALSE;
+ searchURLs.append( searchURL );
+
+ searchURL = new SearchURL;
+ searchURL->description = "ScientificCommons";
+ searchURL->url = "http://en.scientificcommons.org/#search_string=%1";
+ searchURL->includeAuthor = FALSE;
+ searchURLs.append( searchURL );
+
+ searchURL = new SearchURL;
+ searchURL->description = "SpringerLink";
+ searchURL->url = "http://www.springerlink.com/content/?k=%1";
+ searchURL->includeAuthor = FALSE;
+ searchURLs.append( searchURL );
+ }
+
+ QString Settings::fieldTypeToI18NString( const BibTeX::EntryField::FieldType fieldType )
+ {
+ switch ( fieldType )
+ {
+ case BibTeX::EntryField::ftAbstract:
+ return QString( i18n( "Abstract" ) );
+ case BibTeX::EntryField::ftAddress:
+ return QString( i18n( "Address" ) );
+ case BibTeX::EntryField::ftAnnote:
+ return QString( i18n( "Annote" ) );
+ case BibTeX::EntryField::ftAuthor:
+ return QString( i18n( "Author" ) );
+ case BibTeX::EntryField::ftBookTitle:
+ return QString( i18n( "Book Title" ) );
+ case BibTeX::EntryField::ftChapter:
+ return QString( i18n( "Chapter" ) );
+ case BibTeX::EntryField::ftCrossRef:
+ return QString( i18n( "Crossref" ) );
+ case BibTeX::EntryField::ftDoi:
+ return QString( i18n( "DOI" ) );
+ case BibTeX::EntryField::ftEdition:
+ return QString( i18n( "Edition" ) );
+ case BibTeX::EntryField::ftEditor:
+ return QString( i18n( "Editor" ) );
+ case BibTeX::EntryField::ftHowPublished:
+ return QString( i18n( "How Published" ) );
+ case BibTeX::EntryField::ftInstitution:
+ return QString( i18n( "Institution" ) );
+ case BibTeX::EntryField::ftISBN:
+ return QString( i18n( "ISBN" ) );
+ case BibTeX::EntryField::ftISSN:
+ return QString( i18n( "ISSN" ) );
+ case BibTeX::EntryField::ftJournal:
+ return QString( i18n( "Journal" ) );
+ case BibTeX::EntryField::ftKey:
+ return QString( i18n( "Key" ) );
+ case BibTeX::EntryField::ftKeywords:
+ return QString( i18n( "Keywords" ) );
+ case BibTeX::EntryField::ftLocalFile:
+ return QString( i18n( "Local File" ) );
+ case BibTeX::EntryField::ftLocation:
+ return QString( i18n( "Location" ) );
+ case BibTeX::EntryField::ftMonth:
+ return QString( i18n( "Month" ) );
+ case BibTeX::EntryField::ftNote:
+ return QString( i18n( "Note" ) );
+ case BibTeX::EntryField::ftNumber:
+ return QString( i18n( "Number" ) );
+ case BibTeX::EntryField::ftOrganization:
+ return QString( i18n( "Organization" ) );
+ case BibTeX::EntryField::ftPages:
+ return QString( i18n( "Pages" ) );
+ case BibTeX::EntryField::ftPublisher:
+ return QString( i18n( "Publisher" ) );
+ case BibTeX::EntryField::ftSeries:
+ return QString( i18n( "Series" ) );
+ case BibTeX::EntryField::ftSchool:
+ return QString( i18n( "School" ) );
+ case BibTeX::EntryField::ftTitle:
+ return QString( i18n( "Title" ) );
+ case BibTeX::EntryField::ftType:
+ return QString( i18n( "Type" ) );
+ case BibTeX::EntryField::ftURL:
+ return QString( i18n( "URL" ) );
+ case BibTeX::EntryField::ftVolume:
+ return QString( i18n( "Volume" ) );
+ case BibTeX::EntryField::ftYear:
+ return QString( i18n( "Year" ) );
+ default:
+ return QString( i18n( "Unknown" ) );
+ }
+ }
+
+ QString Settings::entryTypeToI18NString( const BibTeX::Entry::EntryType entryType )
+ {
+ switch ( entryType )
+ {
+ case BibTeX::Entry::etArticle:
+ return QString( i18n( "Article" ) );
+ case BibTeX::Entry::etBook:
+ return QString( i18n( "Book" ) );
+ case BibTeX::Entry::etBooklet:
+ return QString( i18n( "Booklet" ) );
+ case BibTeX::Entry::etCollection:
+ return QString( i18n( "Collection" ) );
+ case BibTeX::Entry::etElectronic:
+ return QString( i18n( "Electronic" ) );
+ case BibTeX::Entry::etInBook:
+ return QString( i18n( "InBook" ) );
+ case BibTeX::Entry::etInCollection:
+ return QString( i18n( "InCollection" ) );
+ case BibTeX::Entry::etInProceedings:
+ return QString( i18n( "InProceedings" ) );
+ case BibTeX::Entry::etManual:
+ return QString( i18n( "Manual" ) );
+ case BibTeX::Entry::etMastersThesis:
+ return QString( i18n( "MastersThesis" ) );
+ case BibTeX::Entry::etMisc:
+ return QString( i18n( "Misc" ) );
+ case BibTeX::Entry::etPhDThesis:
+ return QString( i18n( "PhDThesis" ) );
+ case BibTeX::Entry::etProceedings:
+ return QString( i18n( "Proceedings" ) );
+ case BibTeX::Entry::etTechReport:
+ return QString( i18n( "TechReport" ) );
+ case BibTeX::Entry::etUnpublished:
+ return QString( i18n( "Unpublished" ) );
+ default:
+ return QString( i18n( "Unknown" ) );
+ }
+ }
+
+ KURL Settings::doiURL( const QString& doiText )
+ {
+ KURL result( doiText );
+ if ( result.isValid() )
+ return result;
+
+ result = KURL( QString( "http://dx.doi.org/%1" ).arg( doiText ) );
+ if ( result.isValid() )
+ return result;
+
+ return KURL();
+ }
+
+ bool Settings::kpsewhich( const QString& filename )
+ {
+ bool result = FALSE;
+ int counter = 0;
+
+ QWaitCondition waitCond;
+ QProcess kpsewhich;
+ kpsewhich.addArgument( "kpsewhich" );
+ kpsewhich.addArgument( filename );
+ if ( kpsewhich.start() )
+ {
+ qApp->processEvents();
+ while ( kpsewhich.isRunning() )
+ {
+ waitCond.wait( 250 );
+ qApp->processEvents();
+
+ counter++;
+ if ( counter > 50 )
+ kpsewhich.tryTerminate();
+ }
+
+ result = kpsewhich.exitStatus() == 0 && counter < 50;
+ }
+
+ return result;
+ }
+
+ KURL Settings::locateFile( const QString& filename, const QString& bibTeXFileName, QWidget *window )
+ {
+ QString _filename = filename;
+ QString userHome = QString( getenv( "HOME" ) );
+ if ( _filename.contains( "~/" ) && !userHome.isEmpty() ) _filename = _filename.replace( "~/", userHome.append( "/" ) );
+
+ KURL url( _filename );
+ if ( url.isValid() && ( !url.isLocalFile() || KIO::NetAccess::exists( url, TRUE, window ) ) )
+ return url;
+
+ if ( bibTeXFileName != QString::null )
+ {
+ QString path = KURL( bibTeXFileName ).directory( FALSE, FALSE );
+ url = KURL( path + "/" + _filename );
+ if ( url.isValid() && KIO::NetAccess::exists( url, TRUE, window ) )
+ return url;
+ }
+
+ Settings* settings = self( NULL );
+ for ( QStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it )
+ {
+ url = KURL( *it + "/" + _filename );
+ if ( url.isValid() && KIO::NetAccess::exists( url, TRUE, window ) )
+ return url;
+ }
+
+ return KURL();
+ }
+
+ KURL Settings::locateFile( const QString& filename, QWidget *window )
+ {
+ return locateFile( filename, currentBibTeXFile == NULL ? QString::null : currentBibTeXFile->fileName, window );
+ }
+
+ QString Settings::resolveLink( const QString& originalFilename, const QString& linkFilename )
+ {
+ if ( linkFilename[0] == '/' )
+ return linkFilename;
+ QFileInfo fiO( originalFilename );
+ QFileInfo fiL( fiO.dirPath( TRUE ) + "/" + linkFilename );
+ return fiL.absFilePath();
+ }
+
+ bool Settings::openUrl( const KURL& url, QWidget *parent )
+ {
+ QStringList args;
+ args << "xdg-open" << url.prettyURL();
+ QProcess proc( args, parent, "Settings::openUrl" );
+ return proc.start();
+ }
+
+
+#ifdef HAVE_YAZ
+ void Settings::z3950clearAll()
+ {
+ z3950_ServerList.clear();
+ }
+
+ void Settings::z3950loadDefault()
+ {
+ QString z3950serverConfigFile = locate( "appdata", "z3950-servers.cfg" );
+ if ( !z3950serverConfigFile.isEmpty() )
+ {
+ KConfig z3950serverConfig( z3950serverConfigFile, true, false );
+ QStringList serverList = z3950serverConfig.groupList();
+ for ( QStringList::ConstIterator it = serverList.begin(); it != serverList.end(); ++it )
+ if ( !z3950_ServerList.contains( *it ) )
+ {
+ z3950serverConfig.setGroup( *it );
+
+ Z3950Server server;
+ server.name = z3950serverConfig.readEntry( "Name" );
+ server.host = z3950serverConfig.readEntry( "Host" );
+ server.port = z3950serverConfig.readNumEntry( "Port", 2100 );
+ server.database = z3950serverConfig.readEntry( "Database" );
+ server.charset = z3950serverConfig.readEntry( "Charset" );
+ server.syntax = z3950serverConfig.readEntry( "Syntax" );
+ server.user = z3950serverConfig.readEntry( "User" );
+ server.password = z3950serverConfig.readEntry( "Password" );
+ server.locale = z3950serverConfig.readEntry( "Locale" );
+
+ z3950_ServerList[*it] = server;
+ }
+ }
+ }
+
+ void Settings::z3950loadUser( KConfig * config )
+ {
+ config->setGroup( "Z3950Server" );
+ int i = 0;
+ QString key = config->readEntry( QString( "Key%1" ).arg( i ) );
+ while ( key != QString::null )
+ {
+ Z3950Server server;
+ server.name = config->readEntry( QString( "Name%1" ).arg( i ) );
+ server.host = config->readEntry( QString( "Host%1" ).arg( i ) );
+ server.port = config->readNumEntry( QString( "Port%1" ).arg( i ), 2100 );
+ server.database = config->readEntry( QString( "Database%1" ).arg( i ) );
+ server.charset = config->readEntry( QString( "Charset%1" ).arg( i ) );
+ server.syntax = config->readEntry( QString( "Syntax%1" ).arg( i ) );
+ server.user = config->readEntry( QString( "User%1" ).arg( i ) );
+ server.password = config->readEntry( QString( "Password%1" ).arg( i ) );
+ server.locale = config->readEntry( QString( "Locale%1" ).arg( i ) );
+ z3950_ServerList[key] = server;
+
+ ++i;
+ key = config->readEntry( QString( "Key%1" ).arg( i ) );
+ }
+ }
+
+ void Settings::z3950saveUser( KConfig *config )
+ {
+ config->deleteGroup( "Z3950Server" );
+ config->setGroup( "Z3950Server" );
+ int i = 0;
+
+ QString z3950serverConfigFile = locate( "appdata", "z3950-servers.cfg" );
+ if ( !z3950serverConfigFile.isEmpty() )
+ {
+ KConfig z3950serverConfig( z3950serverConfigFile, true, false );
+ for ( QMap<QString, Z3950Server>::Iterator it = z3950_ServerList.begin(); it != z3950_ServerList.end(); ++it )
+ {
+ bool notInDefault = !z3950serverConfig.hasGroup( it.key() );
+ if ( !notInDefault )
+ {
+ z3950serverConfig.setGroup( it.key() );
+ notInDefault = z3950serverConfig.readEntry( "Name", it.data().name ) != it.data().name || z3950serverConfig.readEntry( "Host", it.data().host ) != it.data().host || z3950serverConfig.readNumEntry( "Port", it.data().port ) != it.data().port || z3950serverConfig.readEntry( "Database", it.data().database ) != it.data().database || z3950serverConfig.readEntry( "Charset", it.data().charset ) != it.data().charset || z3950serverConfig.readEntry( "Syntax", it.data().syntax ) != it.data().syntax || z3950serverConfig.readEntry( "User", it.data().user ) != it.data().user || z3950serverConfig.readEntry( "Password", it.data().password ) != it.data().password || z3950serverConfig.readEntry( "Locale", it.data().locale ) != it.data().locale || z3950serverConfig.readEntry( "User", it.data().user ) != it.data().user;
+ }
+
+ if ( notInDefault )
+ {
+ config->writeEntry( QString( "Key%1" ).arg( i ), it.key() );
+ config->writeEntry( QString( "Name%1" ).arg( i ), it.data().name );
+ config->writeEntry( QString( "Host%1" ).arg( i ), it.data().host );
+ config->writeEntry( QString( "Port%1" ).arg( i ), it.data().port );
+ config->writeEntry( QString( "Database%1" ).arg( i ), it.data().database );
+ config->writeEntry( QString( "Charset%1" ).arg( i ), it.data().charset );
+ config->writeEntry( QString( "Syntax%1" ).arg( i ), it.data().syntax );
+ config->writeEntry( QString( "User%1" ).arg( i ), it.data().user );
+ config->writeEntry( QString( "Password%1" ).arg( i ), it.data().password );
+ config->writeEntry( QString( "Locale%1" ).arg( i ), it.data().locale );
+ ++i;
+ }
+ }
+ }
+ }
+
+#endif // HAVE_YAZ
+
+ /** Create backup of file as specified in fileIO_NumberOfBackups */
+ bool Settings::createBackup( const KURL &url, QWidget *window )
+ {
+ QString basename = url.prettyURL();
+
+ qDebug( "Making %i backups of URL %s", fileIO_NumberOfBackups, basename.latin1() );
+
+ for ( int i = fileIO_NumberOfBackups; i > 2; --i )
+ {
+ KURL backupN( basename + "~" + QString::number( i ) );
+ KURL backupNmm( basename + "~" + QString::number( i - 1 ) );
+ if ( KIO::NetAccess::exists( backupNmm, true, window ) )
+ {
+ if ( !KIO::NetAccess::file_copy( backupNmm, backupN, -1, true, false, false ) )
+ return false;
+ }
+ }
+
+ if ( fileIO_NumberOfBackups >= 2 )
+ {
+ KURL backupN( basename + "~2" );
+ KURL backupNmm( basename + "~" );
+ if ( KIO::NetAccess::exists( backupNmm, true, window ) )
+ {
+ if ( !KIO::NetAccess::file_copy( backupNmm, backupN, -1, true, false, false ) )
+ return false;
+ }
+ }
+ if ( fileIO_NumberOfBackups >= 1 )
+ {
+ KURL backupN( basename + "~" );
+ KURL backupNmm( basename );
+ if ( KIO::NetAccess::exists( backupNmm, true, window ) )
+ {
+ if ( !KIO::NetAccess::file_copy( backupNmm, backupN, -1, true, false, false ) )
+ return false;
+ }
+ }
+ return true;
+ }
+
+
+}
diff --git a/src/settings.h b/src/settings.h
new file mode 100644
index 0000000..ff8275b
--- /dev/null
+++ b/src/settings.h
@@ -0,0 +1,205 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef SETTINGS_H
+#define SETTINGS_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <qstringlist.h>
+
+#include <kcompletion.h>
+
+#include <file.h>
+#include <fieldlineedit.h>
+#include <fileexporterbibtex.h>
+#include <fileexporterexternal.h>
+#include <entryfield.h>
+#include <entry.h>
+
+class KConfig;
+class KStandardDirs;
+class KURL;
+class QString;
+class QRegExp;
+class QChar;
+class QFont;
+
+namespace KBibTeX
+{
+ class Settings
+ {
+ public:
+ struct SearchURL
+ {
+ QString description;
+ QString url;
+ bool includeAuthor;
+ };
+
+ struct UserDefinedInputFields
+ {
+ QString name;
+ QString label;
+ FieldLineEdit::InputType inputType;
+ };
+
+ static Settings* self( BibTeX::File *bibtexFile = NULL );
+
+ void load( KConfig * config );
+ void save( KConfig * config );
+
+ static QString fieldTypeToI18NString( const BibTeX::EntryField::FieldType fieldType );
+ static QString entryTypeToI18NString( const BibTeX::Entry::EntryType entryType );
+
+ static KURL doiURL( const QString& doiText );
+ static bool kpsewhich( const QString& filename );
+ static KURL locateFile( const QString& filename, const QString& bibTeXFileName = QString::null, QWidget *window = NULL );
+ KURL locateFile( const QString& filename, QWidget *window = NULL );
+ static QString resolveLink( const QString& originalFilename, const QString& linkFilename );
+ static bool openUrl( const KURL& url, QWidget *parent );
+
+#ifdef HAVE_YAZ
+ void z3950clearAll();
+ void z3950loadDefault();
+ void z3950loadUser( KConfig * config );
+ void z3950saveUser( KConfig *config );
+ typedef struct Z3950Server_
+ {
+ QString charset, database, host, locale, name, syntax, user, password;
+ int port;
+ } Z3950Server;
+ QMap<QString, Z3950Server> z3950_ServerList;
+#endif // HAVE_YAZ
+
+ enum DragAction {COPYREFERENCE = 1, COPYBIBTEX = 2};
+
+ // FileIO section
+ QString fileIO_Encoding;
+ QString fileIO_ExportLanguage;
+ QString fileIO_ExportBibliographyStyle;
+ QChar fileIO_BibtexStringOpenDelimiter;
+ QChar fileIO_BibtexStringCloseDelimiter;
+ BibTeX::FileExporterBibTeX::KeywordCasing fileIO_KeywordCasing;
+ BibTeX::FileExporterExternal::Exporter fileIO_ExporterHTML;
+ bool fileIO_EmbedFiles;
+ bool fileIO_EnclosingCurlyBrackets;
+ bool fileIO_useBibUtils;
+ QString fileIO_bib2db5BasePath;
+ QString fileIO_bib2db5ClassPath;
+ int fileIO_NumberOfBackups;
+
+ bool updateBib2Db5ClassPath( const QString& newBasePath, bool testOnly = false );
+
+ // Editing section
+ bool editing_SearchBarClearField;
+ bool editing_EnableAllFields;
+ int editing_MainListDoubleClickAction;
+ int editing_MainListSortingColumn;
+ int editing_MainListSortingOrder;
+ QStringList editing_FilterHistory;
+ bool editing_ShowMacros;
+ bool editing_ShowComments;
+ QValueList<int> editing_MainListColumnsWidth;
+ QValueList<int> editing_MainListColumnsIndex;
+ QValueList<int> editing_HorSplitterSizes;
+ QValueList<int> editing_VertSplitterSizes;
+ QFont editing_SpecialFont;
+ bool editing_UseSpecialFont;
+ bool editing_FirstNameFirst;
+ QStringList editing_DocumentSearchPaths;
+ DragAction editing_DragAction;
+ int editing_findDuplicatesSensitivity;
+
+ // SearchURLs section
+ QValueList<SearchURL*> searchURLs;
+
+ // UserDefinedInputFields section
+ QValueList<UserDefinedInputFields*> userDefinedInputFields;
+
+ // External section
+ QString external_XSLTStylesheetHTML;
+ bool external_bibconvAvailable;
+ bool external_bibtex2htmlAvailable;
+ bool external_bib2xhtmlAvailable;
+ bool external_latex2rtfAvailable;
+ bool external_xml2bibAvailable;
+ bool external_end2xmlAvailable;
+ bool external_ris2xmlAvailable;
+
+ // Id Suggestions
+ QStringList idSuggestions_formatStrList;
+ int idSuggestions_default;
+ bool idSuggestions_forceDefault;
+ QStringList idSuggestions_smallWords;
+
+ // Auto-completion for user fields (non-persistant)
+ void addToCompletion( BibTeX::File *file );
+ void addToCompletion( BibTeX::Element *element );
+ void addToCompletion( BibTeX::Value *value, BibTeX::EntryField::FieldType fieldType );
+ KCompletion* completion( BibTeX::EntryField::FieldType fieldType );
+ KCompletion* completionMacro;
+
+ // Keyword list
+ QStringList keyword_GlobalList;
+
+ // Online Database Search;
+ int webQuery_LastEngine;
+ QString webQuery_LastSearchTerm;
+ int webQuery_LastNumberOfResults;
+ bool webQuery_ImportAll;
+
+ // Current BibTeX file
+ BibTeX::File *currentBibTeXFile;
+
+ void restoreDefaultSearchURLs();
+
+ QString detectLyXInPipe();
+
+ // web query history/default values
+ QString getWebQueryDefault( const QString &key );
+ void setWebQueryDefault( const QString &key, const QString& value );
+
+ // characters that do match this regexp are
+ // not allowed in entry ids or macro keys
+ static const QRegExp noIdChars;
+
+ /** Create backup of file as specified in fileIO_NumberOfBackups */
+ bool createBackup( const KURL &url, QWidget *window = NULL );
+
+ private:
+ static Settings* staticSettings;
+ KCompletion **m_completion;
+ static QStringList m_lyxRcFileNames;
+
+ QMap<QString, QString> m_webQueryDefaults;
+
+ Settings();
+ ~Settings();
+
+ bool checkExternalToolAvailable( const QString &binary );
+ void checkExternalToolsAvailable();
+
+ int completionFieldTypeToIndex( BibTeX::EntryField::FieldType fieldType );
+ };
+}
+
+#endif
diff --git a/src/settingsdlg.cpp b/src/settingsdlg.cpp
new file mode 100644
index 0000000..938dc6b
--- /dev/null
+++ b/src/settingsdlg.cpp
@@ -0,0 +1,137 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+
+#include <qlayout.h>
+
+#include <klocale.h>
+#include <kiconloader.h>
+
+#include <settingsfileio.h>
+#include <settingsediting.h>
+#include <settingssearchurl.h>
+#include <settingsidsuggestions.h>
+#include <settingskeyword.h>
+#include <settingsuserdefinedinput.h>
+#ifdef HAVE_YAZ
+#include <settingsz3950.h>
+#endif // HAVE_YAZ
+#include "settingsdlg.h"
+
+namespace KBibTeX
+{
+ SettingsDlg::SettingsDlg( QWidget *parent, const char *name )
+ : KDialogBase( Tabbed, i18n( "Configure" ), Ok | Apply | Cancel, Ok, parent, name, true )
+ {
+ QFrame * page = addPage( i18n( "&Editing" ) );
+ QVBoxLayout *layout = new QVBoxLayout( page, 0, spacingHint() );
+ m_editing = new SettingsEditing( page );
+ layout->addWidget( m_editing );
+ connect( m_editing, SIGNAL( configChanged() ), this, SLOT( slotConfigChanged() ) );
+
+ page = addPage( i18n( "&File Open&&Save" ) );
+ layout = new QVBoxLayout( page, 0, spacingHint() );
+ m_fileIO = new SettingsFileIO( page );
+ layout->addWidget( m_fileIO );
+ connect( m_fileIO, SIGNAL( configChanged() ), this, SLOT( slotConfigChanged() ) );
+
+ page = addPage( i18n( "&Search URLs" ) );
+ layout = new QVBoxLayout( page, 0, spacingHint() );
+ m_searchURL = new SettingsSearchURL( page );
+ layout->addWidget( m_searchURL );
+ connect( m_searchURL, SIGNAL( configChanged() ), this, SLOT( slotConfigChanged() ) );
+
+ page = addPage( i18n( "Global &Keywords" ), QString::null, SmallIcon( "package" ) );
+ layout = new QVBoxLayout( page, 0, spacingHint() );
+ m_keyword = new SettingsKeyword( page );
+ layout->addWidget( m_keyword );
+ connect( m_keyword, SIGNAL( configChanged() ), this, SLOT( slotConfigChanged() ) );
+
+ page = addPage( i18n( "Id Suggestions" ) );
+ layout = new QVBoxLayout( page, 0, spacingHint() );
+ m_idSuggestions = new SettingsIdSuggestions( page );
+ layout->addWidget( m_idSuggestions );
+ connect( m_idSuggestions, SIGNAL( configChanged() ), this, SLOT( slotConfigChanged() ) );
+
+ page = addPage( i18n( "User Defined Fields" ) );
+ layout = new QVBoxLayout( page, 0, spacingHint() );
+ m_userDefinedInput = new SettingsUserDefinedInput( page );
+ layout->addWidget( m_userDefinedInput );
+ connect( m_userDefinedInput, SIGNAL( configChanged() ), this, SLOT( slotConfigChanged() ) );
+
+#ifdef HAVE_YAZ
+ page = addPage( i18n( "Z39.50" ) );
+ layout = new QVBoxLayout( page, 0, spacingHint() );
+ m_z3950config = new SettingsZ3950( page );
+ layout->addWidget( m_z3950config );
+ connect( m_z3950config, SIGNAL( configChanged() ), this, SLOT( slotConfigChanged() ) );
+#endif // HAVE_YAZ
+
+ connect( this, SIGNAL( applyClicked() ), SLOT( slotApplySettings() ) );
+ }
+
+
+ SettingsDlg::~SettingsDlg()
+ {
+ // nothing
+ }
+
+ int SettingsDlg::exec()
+ {
+ m_fileIO->readData();
+ m_editing->readData();
+ m_searchURL->readData();
+ m_keyword->readData();
+ m_idSuggestions->readData();
+ m_userDefinedInput->readData();
+#ifdef HAVE_YAZ
+ m_z3950config->readData();
+#endif // HAVE_YAZ
+ enableButton( Apply, FALSE );
+
+ return KDialogBase::exec();
+ }
+
+ void SettingsDlg::slotConfigChanged()
+ {
+ enableButton( Apply, TRUE );
+ }
+
+ void SettingsDlg::slotApplySettings()
+ {
+ m_fileIO->applyData();
+ m_editing->applyData();
+ m_searchURL->applyData();
+ m_keyword->applyData();
+ m_idSuggestions->applyData();
+ m_userDefinedInput->applyData();
+#ifdef HAVE_YAZ
+ m_z3950config->applyData();
+#endif // HAVE_YAZ
+ enableButton( Apply, FALSE );
+ }
+
+ void SettingsDlg::accept()
+ {
+ slotApplySettings();
+ KDialogBase::accept();
+ }
+}
+
+#include "settingsdlg.moc"
diff --git a/src/settingsdlg.h b/src/settingsdlg.h
new file mode 100644
index 0000000..e256349
--- /dev/null
+++ b/src/settingsdlg.h
@@ -0,0 +1,70 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifndef SETTINGSDLG_H
+#define SETTINGSDLG_H
+
+#include <kdialogbase.h>
+
+namespace KBibTeX
+{
+ class SettingsFileIO;
+ class SettingsEditing;
+ class SettingsSearchURL;
+ class SettingsKeyword;
+ class SettingsIdSuggestions;
+ class SettingsUserDefinedInput;
+#ifdef HAVE_YAZ
+ class SettingsZ3950;
+#endif // HAVE_YAZ
+
+ class SettingsDlg : public KDialogBase
+ {
+ Q_OBJECT
+ public:
+ SettingsDlg( QWidget *parent = 0, const char *name = "SETTINGsdlg" );
+
+ ~SettingsDlg();
+
+ public slots:
+ virtual int exec();
+
+ protected slots:
+ void slotConfigChanged();
+ void slotApplySettings();
+ virtual void accept();
+
+ private:
+ SettingsFileIO *m_fileIO;
+ SettingsEditing *m_editing;
+ SettingsSearchURL *m_searchURL;
+ SettingsKeyword *m_keyword;
+ SettingsIdSuggestions *m_idSuggestions;
+ SettingsUserDefinedInput *m_userDefinedInput;
+#ifdef HAVE_YAZ
+ SettingsZ3950 *m_z3950config;
+#endif // HAVE_YAZ
+ };
+}
+
+#endif
diff --git a/src/settingsediting.cpp b/src/settingsediting.cpp
new file mode 100644
index 0000000..e5c71fc
--- /dev/null
+++ b/src/settingsediting.cpp
@@ -0,0 +1,331 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qdir.h>
+#include <qheader.h>
+#include <qcombobox.h>
+#include <qslider.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qgroupbox.h>
+#include <qpushbutton.h>
+#include <qcheckbox.h>
+
+#include <kpushbutton.h>
+#include <kdirselectdialog.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kurlrequester.h>
+#include <kmessagebox.h>
+#include <klineedit.h>
+#include <kdialog.h>
+#include <kfontdialog.h>
+#include <kurlcompletion.h>
+
+#include <documentlistview.h>
+#include "settingsediting.h"
+
+namespace KBibTeX
+{
+ const QChar SettingsEditing::pathListSeparator = QChar( ';' );
+
+ SettingsEditingPaths::SettingsEditingPaths( QStringList& pathList, QWidget*parent, const char *name )
+ : QWidget( parent, name ), m_pathList( pathList )
+ {
+ QGridLayout *layout = new QGridLayout( this, 5, 3, 0, KDialog::spacingHint() );
+ setMinimumWidth( 480 );
+
+ QLabel *label = new QLabel( i18n( "Path to add:" ), this );
+ layout->addWidget( label, 0, 0 );
+ m_urlRequesterNewPath = new KURLRequester( this );
+ m_urlRequesterNewPath->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
+ m_urlRequesterNewPath->completionObject()->setDir( QDir::currentDirPath() );
+ label->setBuddy( m_urlRequesterNewPath );
+ layout->addWidget( m_urlRequesterNewPath, 1, 0 );
+ QToolTip::add( m_urlRequesterNewPath->button(), i18n( "Select a path to add" ) );
+ m_pushButtonAddDir = new KPushButton( i18n( "Add" ), this );
+ m_pushButtonAddDir->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+ m_pushButtonAddDir->setEnabled( FALSE );
+ QToolTip::add( m_pushButtonAddDir, i18n( "Add chosen path to list" ) );
+ layout->addWidget( m_pushButtonAddDir, 1, 2 );
+
+ label = new QLabel( i18n( "List of paths:" ), this );
+ layout->addWidget( label, 2, 0 );
+ m_listViewPathList = new KListView( this );
+ m_listViewPathList->addColumn( i18n( "Path" ) );
+ m_listViewPathList->header()->setClickEnabled( false );
+ m_listViewPathList->setFullWidth( true );
+ label->setBuddy( m_listViewPathList );
+ layout->addMultiCellWidget( m_listViewPathList, 3, 4, 0, 1 );
+ m_pushButtonDelDir = new KPushButton( i18n( "Delete" ), this );
+ layout->addWidget( m_pushButtonDelDir, 3, 2 );
+ m_pushButtonDelDir->setEnabled( FALSE );
+ m_pushButtonDelDir->setIconSet( QIconSet( SmallIcon( "editdelete" ) ) );
+ QToolTip::add( m_pushButtonDelDir, i18n( "Remove selected path from list" ) );
+
+ layout->setRowStretch( 4, 1 );
+ layout->setColStretch( 0, 1 );
+
+ connect( m_urlRequesterNewPath, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( const QString& ) ) );
+ connect( m_urlRequesterNewPath, SIGNAL( urlSelected( const QString& ) ), this, SLOT( slotTextChanged( const QString& ) ) );
+ connect( m_pushButtonAddDir, SIGNAL( clicked() ), this, SLOT( slotAddDir() ) );
+ connect( m_listViewPathList, SIGNAL( selectionChanged() ), this, SLOT( slotSelectionChanged() ) );
+ connect( m_pushButtonDelDir, SIGNAL( clicked() ), this, SLOT( slotDelDir() ) );
+
+ for ( QStringList::Iterator it = pathList.begin(); it != pathList.end(); ++it )
+ new QListViewItem( m_listViewPathList, *it );
+ }
+
+ bool SettingsEditingPaths::execute( QWidget *parent, QStringList &pathList )
+ {
+ KDialogBase *dlg = new KDialogBase( parent, "SettingsEditingPathsDialog", true, i18n( "Edit Document Search Paths" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, false );
+ SettingsEditingPaths *sep = new SettingsEditingPaths( pathList, dlg, "SettingsEditingPaths" );
+ dlg->setMainWidget( sep );
+ connect( dlg, SIGNAL( apply() ), sep, SLOT( slotApply() ) );
+ connect( dlg, SIGNAL( okClicked() ), sep, SLOT( slotApply() ) );
+
+ bool result = dlg->exec() == QDialog::Accepted;
+ delete dlg;
+
+ return result;
+ }
+
+ void SettingsEditingPaths::slotApply()
+ {
+ m_pathList.clear();
+ QListViewItem *item = m_listViewPathList->firstChild();
+ while ( item != NULL )
+ {
+ m_pathList.append( item->text( 0 ) );
+ item = item->nextSibling();
+ }
+ }
+
+ void SettingsEditingPaths::slotTextChanged( const QString&text )
+ {
+ QDir pathObj( text );
+ m_pushButtonAddDir->setEnabled( pathObj.exists() && pathObj.isReadable() );
+ }
+
+ void SettingsEditingPaths::slotAddDir()
+ {
+ QString path = m_urlRequesterNewPath->lineEdit()->text();
+ QDir pathObj( path );
+ if ( pathObj.exists() && pathObj.isReadable() )
+ {
+ QListViewItem *item = new KListViewItem( m_listViewPathList, path );
+ m_listViewPathList->ensureItemVisible( item );
+ m_listViewPathList->setSelected( item, TRUE );
+ slotSelectionChanged();
+ }
+ else
+ KMessageBox::error( this, QString( i18n( "Folder '%1' does not exist or is not readable." ) ).arg( path ) );
+ }
+
+ void SettingsEditingPaths::slotSelectionChanged()
+ {
+ m_pushButtonDelDir->setEnabled( m_listViewPathList->selectedItem() != NULL );
+ }
+
+ void SettingsEditingPaths::slotDelDir()
+ {
+ m_listViewPathList->takeItem( m_listViewPathList->selectedItem() );
+ slotSelectionChanged();
+ }
+
+ SettingsEditing::SettingsEditing( QWidget *parent, const char *name )
+ : QWidget( parent, name ), m_findDuplicatesSensitivityMin( 3 ), m_findDuplicatesSensitivityMax( 13 )
+ {
+ QGroupBox * group = NULL;
+ QVBoxLayout *layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+
+ group = new QGroupBox( 2, Qt::Horizontal, i18n( "Main List" ), this );
+ layout->addWidget( group );
+ QLabel *label = new QLabel( i18n( "&Sorting:" ), group );
+ m_comboBoxSortingColumn = new QComboBox( FALSE, group );
+ m_comboBoxSortingColumn->insertItem( i18n( "Element Type" ) );
+ m_comboBoxSortingColumn->insertItem( i18n( "Entry Id" ) );
+ for ( int i = 0; i <= ( int ) BibTeX::EntryField::ftYear - ( int ) BibTeX::EntryField::ftAbstract; i++ )
+ {
+ BibTeX::EntryField::FieldType fieldType = ( BibTeX::EntryField::FieldType )( i + ( int ) BibTeX::EntryField::ftAbstract );
+ QString label = Settings::fieldTypeToI18NString( fieldType );
+ m_comboBoxSortingColumn->insertItem( label );
+ }
+ label->setBuddy( m_comboBoxSortingColumn );
+
+ label = new QLabel( i18n( "So&rting order:" ), group );
+ m_comboBoxSortingOrder = new QComboBox( FALSE, group );
+ m_comboBoxSortingOrder->insertItem( i18n( "Ascending" ) );
+ m_comboBoxSortingOrder->insertItem( i18n( "Descending" ) );
+ label->setBuddy( m_comboBoxSortingOrder );
+
+ label = new QLabel( i18n( "&Double click action:" ), group );
+ m_comboBoxDoubleClickAction = new QComboBox( FALSE, group );
+ m_comboBoxDoubleClickAction->insertItem( i18n( "Edit element" ) );
+ m_comboBoxDoubleClickAction->insertItem( i18n( "Open document" ) );
+ label->setBuddy( m_comboBoxDoubleClickAction );
+
+ label = new QLabel( i18n( "On dragging with mouse:" ), group );
+ m_comboBoxDragAction = new QComboBox( FALSE, group );
+ m_comboBoxDragAction->insertItem( i18n( "Copy reference (\\cite{...})" ) );
+ m_comboBoxDragAction->insertItem( i18n( "Copy BibTeX text (@article{...})" ) );
+ label->setBuddy( m_comboBoxDragAction );
+
+ group = new QGroupBox( 1, Qt::Vertical, i18n( "Entry Editing" ), this );
+ layout->addWidget( group );
+ m_checkBoxEnableAllFields = new QCheckBox( i18n( "Enable all &fields for editing" ), group );
+
+ group = new QGroupBox( 1, Qt::Vertical, i18n( "Search Bar" ), this );
+ layout->addWidget( group );
+ m_checkBoxSearchBarClearField = new QCheckBox( i18n( "Reset field filter when changing filter text" ), group );
+
+ group = new QGroupBox( 2, Qt::Horizontal, i18n( "Presentation" ), this );
+ layout->addWidget( group );
+ m_checkBoxUseSpecialFont = new QCheckBox( i18n( "Use special &font" ), group );
+ m_pushButtonSpecialFont = new QPushButton( group );
+ label = new QLabel( i18n( "Author and editor names:" ), group );
+ m_comboBoxNameOrder = new QComboBox( group );
+ label->setBuddy( m_comboBoxNameOrder );
+ m_comboBoxNameOrder->insertItem( i18n( "John Doe" ) );
+ m_comboBoxNameOrder->insertItem( i18n( "Doe, John" ) );
+ QToolTip::add( m_comboBoxNameOrder, i18n( "Show names as 'John Doe' instead of 'Doe, John'" ) );
+ QWhatsThis::add( m_comboBoxNameOrder, i18n( "Show names as 'John Doe' instead of 'Doe, John'.\n\nTakes only effect after the next start of KBibTeX." ) );
+
+ group = new QGroupBox( 1, Qt::Vertical, i18n( "Document Search Paths" ), this );
+ layout->addWidget( group );
+ KPushButton *btnSelectDocumentSearchPath = new KPushButton( SmallIcon( "fileopen" ), i18n( "Edit Search Paths" ), group );
+
+ group = new QGroupBox( 1, Qt::Vertical, i18n( "Find Duplicates" ), this );
+ layout->addWidget( group );
+ label = new QLabel( i18n( "Sensitivity:" ), group );
+ QWidget *spacer = new QWidget( group );
+ spacer->setFixedSize( KDialog::spacingHint() * 3, KDialog::spacingHint() );
+ QLabel *label2 = new QLabel( i18n( "Low" ), group );
+ m_sliderBarFindDuplicatesSensitivity = new QSlider( Qt::Horizontal, group );
+ m_sliderBarFindDuplicatesSensitivity->setMinValue( m_findDuplicatesSensitivityMin );
+ m_sliderBarFindDuplicatesSensitivity->setMaxValue( m_findDuplicatesSensitivityMax );
+ m_sliderBarFindDuplicatesSensitivity->setLineStep( 1 );
+ m_sliderBarFindDuplicatesSensitivity->setPageStep( 5 );
+ label->setBuddy( m_sliderBarFindDuplicatesSensitivity );
+ label2 = new QLabel( i18n( "High" ), group );
+
+ layout->addStretch();
+
+ connect( m_checkBoxSearchBarClearField, SIGNAL( toggled( bool ) ), this, SLOT( slotConfigChanged() ) );
+ connect( m_checkBoxEnableAllFields, SIGNAL( toggled( bool ) ), this, SLOT( slotConfigChanged() ) );
+ connect( m_comboBoxDoubleClickAction, SIGNAL( activated( int ) ), this, SLOT( slotConfigChanged() ) );
+ connect( m_comboBoxDragAction, SIGNAL( activated( int ) ), this, SLOT( slotConfigChanged() ) );
+ connect( m_comboBoxSortingColumn, SIGNAL( activated( int ) ), this, SLOT( slotConfigChanged() ) );
+ connect( m_comboBoxSortingOrder, SIGNAL( activated( int ) ), this, SLOT( slotConfigChanged() ) );
+ connect( m_pushButtonSpecialFont, SIGNAL( clicked() ), this, SLOT( slotSelectSpecialFont() ) );
+ connect( m_checkBoxUseSpecialFont, SIGNAL( toggled( bool ) ), m_pushButtonSpecialFont, SLOT( setEnabled( bool ) ) );
+ connect( m_checkBoxUseSpecialFont, SIGNAL( toggled( bool ) ), this, SLOT( slotConfigChanged() ) );
+ connect( btnSelectDocumentSearchPath, SIGNAL( clicked() ), this, SLOT( slotSelectDocumentSearchPath() ) );
+ }
+
+
+ SettingsEditing::~SettingsEditing()
+ {
+ // nothing
+ }
+
+ void SettingsEditing::applyData()
+ {
+ Settings * settings = Settings::self();
+
+ settings->editing_SearchBarClearField = m_checkBoxSearchBarClearField->isChecked();
+ settings->editing_EnableAllFields = m_checkBoxEnableAllFields->isChecked();
+ settings->editing_MainListSortingColumn = m_comboBoxSortingColumn->currentItem();
+ settings->editing_MainListSortingOrder = m_comboBoxSortingOrder->currentItem() == 0 ? 1 : -1;
+ settings->editing_MainListDoubleClickAction = m_comboBoxDoubleClickAction->currentItem();
+ settings->editing_DragAction = m_comboBoxDragAction->currentItem() == 0 ? Settings::COPYREFERENCE : Settings::COPYBIBTEX;
+
+ settings->editing_UseSpecialFont = m_checkBoxUseSpecialFont->isChecked();
+ settings->editing_SpecialFont = m_specialFont;
+
+ settings->editing_FirstNameFirst = m_comboBoxNameOrder->currentItem() == 0;
+
+ settings->editing_DocumentSearchPaths.clear();
+ for ( QStringList::Iterator it = m_documentSearchPaths.begin(); it != m_documentSearchPaths.end(); ++it )
+ settings->editing_DocumentSearchPaths.append( *it );
+
+ settings->editing_findDuplicatesSensitivity = ( m_findDuplicatesSensitivityMin + m_findDuplicatesSensitivityMax ) - m_sliderBarFindDuplicatesSensitivity->value();
+ }
+
+ void SettingsEditing::readData()
+ {
+ Settings * settings = Settings::self();
+
+ m_checkBoxSearchBarClearField->setChecked( settings->editing_SearchBarClearField );
+ m_checkBoxEnableAllFields->setChecked( settings->editing_EnableAllFields );
+ m_comboBoxSortingColumn->setCurrentItem( settings->editing_MainListSortingColumn );
+ m_comboBoxSortingOrder->setCurrentItem( settings->editing_MainListSortingOrder == 1 ? 0 : 1 );
+ m_comboBoxDoubleClickAction->setCurrentItem( settings->editing_MainListDoubleClickAction );
+ m_comboBoxDragAction->setCurrentItem( settings->editing_DragAction == Settings::COPYREFERENCE ? 0 : 1 );
+
+ m_checkBoxUseSpecialFont->setChecked( settings->editing_UseSpecialFont );
+ m_specialFont = settings->editing_SpecialFont;
+ updateFontData();
+ m_pushButtonSpecialFont->setEnabled( m_checkBoxUseSpecialFont->isChecked() );
+
+ m_comboBoxNameOrder->setCurrentItem( settings->editing_FirstNameFirst ? 0 : 1 );
+
+ m_documentSearchPaths.clear();
+ for ( QStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it )
+ m_documentSearchPaths.append( *it );
+
+ m_sliderBarFindDuplicatesSensitivity->setValue(( m_findDuplicatesSensitivityMin + m_findDuplicatesSensitivityMax ) - settings->editing_findDuplicatesSensitivity );
+ }
+
+ void SettingsEditing::slotConfigChanged()
+ {
+ emit configChanged();
+ }
+
+ void SettingsEditing::slotSelectSpecialFont()
+ {
+ int result = KFontDialog::getFont( m_specialFont );
+ if ( result == KFontDialog::Accepted )
+ {
+ updateFontData();
+ emit configChanged();
+ }
+ }
+
+ void SettingsEditing::slotSelectDocumentSearchPath()
+ {
+ if ( editPathList( m_documentSearchPaths ) )
+ slotConfigChanged();
+ }
+
+ void SettingsEditing::updateFontData()
+ {
+ m_pushButtonSpecialFont->setText( m_specialFont.family() );
+ m_pushButtonSpecialFont->setFont( m_specialFont );
+ }
+
+ bool SettingsEditing::editPathList( QStringList &pathList )
+ {
+ return SettingsEditingPaths::execute( this, pathList );
+ }
+}
+
+#include "settingsediting.moc"
diff --git a/src/settingsediting.h b/src/settingsediting.h
new file mode 100644
index 0000000..b938f4e
--- /dev/null
+++ b/src/settingsediting.h
@@ -0,0 +1,100 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef SETTINGSEDITING_H
+#define SETTINGSEDITING_H
+
+#include <qwidget.h>
+
+class QCheckBox;
+class QPushButton;
+class QComboBox;
+class QSlider;
+
+class KPushButton;
+class KURLRequester;
+class KListView;
+
+namespace KBibTeX
+{
+ class SettingsEditingPaths: public QWidget
+ {
+ Q_OBJECT
+ protected:
+ SettingsEditingPaths( QStringList& pathList, QWidget*parent = 0, const char *name = 0 );
+
+ public:
+ static bool execute( QWidget *parent, QStringList &pathList );
+
+ public slots:
+ void slotApply();
+ void slotTextChanged( const QString&text );
+ void slotAddDir();
+ void slotSelectionChanged();
+ void slotDelDir();
+
+ private:
+ QStringList &m_pathList;
+ KURLRequester *m_urlRequesterNewPath;
+ KPushButton *m_pushButtonAddDir;
+ KListView *m_listViewPathList;
+ KPushButton *m_pushButtonDelDir;
+ };
+
+ class SettingsEditing : public QWidget
+ {
+ Q_OBJECT
+ public:
+ SettingsEditing( QWidget *parent = 0, const char *name = 0 );
+ ~SettingsEditing();
+
+ void applyData();
+ void readData();
+
+ signals:
+ void configChanged();
+
+ protected slots:
+ void slotConfigChanged();
+ void slotSelectSpecialFont();
+ void slotSelectDocumentSearchPath();
+
+ private:
+ QCheckBox *m_checkBoxEnableAllFields;
+ QCheckBox *m_checkBoxSearchBarClearField;
+ QComboBox *m_comboBoxSortingColumn;
+ QComboBox *m_comboBoxSortingOrder;
+ QComboBox *m_comboBoxDoubleClickAction;
+ QComboBox *m_comboBoxDragAction;
+ QCheckBox *m_checkBoxUseSpecialFont;
+ QPushButton *m_pushButtonSpecialFont;
+ QFont m_specialFont;
+ QComboBox *m_comboBoxNameOrder;
+ QStringList m_documentSearchPaths;
+ static const QChar pathListSeparator;
+ QSlider *m_sliderBarFindDuplicatesSensitivity;
+
+ void updateFontData();
+ bool editPathList( QStringList &pathList );
+
+ const int m_findDuplicatesSensitivityMin, m_findDuplicatesSensitivityMax;
+ };
+}
+
+#endif // SETTINGSEDITING_H
diff --git a/src/settingsfileio.cpp b/src/settingsfileio.cpp
new file mode 100644
index 0000000..7cceedf
--- /dev/null
+++ b/src/settingsfileio.cpp
@@ -0,0 +1,341 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+
+#include <qhbuttongroup.h>
+#include <qbuttongroup.h>
+#include <qpushbutton.h>
+#include <qlabel.h>
+#include <qcheckbox.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qcombobox.h>
+#include <qlayout.h>
+#include <qradiobutton.h>
+#include <qspinbox.h>
+
+#include <klocale.h>
+#include <kurl.h>
+#include <kmessagebox.h>
+#include <kfiledialog.h>
+#include <klineedit.h>
+#include <kdialog.h>
+#include <kdirselectdialog.h>
+#include <kiconloader.h>
+#include <kpushbutton.h>
+
+#include <settings.h>
+#include <file.h>
+#include "settingsfileio.h"
+
+namespace KBibTeX
+{
+ static const QString encodingList[] =
+ {
+ "LaTeX", "437", "500", "500V1", "850", "851", "852", "855", "856", "857", "860", "861", "862", "863", "864", "865", "866", "866NAV", "869", "874", "904", "1026", "1046", "1047", "8859_1", "8859_2", "8859_3", "8859_4", "8859_5", "8859_6", "8859_7", "8859_8", "8859_9", "10646-1:1993", "10646-1:1993/UCS4/", "ANSI_X3.4-1968", "ANSI_X3.4-1986", "ANSI_X3.4", "ANSI_X3.110-1983", "ANSI_X3.110", "ARABIC", "ARABIC7", "ARMSCII-8", "ASCII", "ASMO-708", "ASMO_449", "BALTIC", "BIG-5", "BIG-FIVE", "BIG5-HKSCS", "BIG5", "BIG5HKSCS", "BIGFIVE", "BRF", "BS_4730", "CA", "CN-BIG5", "CN-GB", "CN", "CP-AR", "CP-GR", "CP-HU", "CP037", "CP038", "CP273", "CP274", "CP275", "CP278", "CP280", "CP281", "CP282", "CP284", "CP285", "CP290", "CP297", "CP367", "CP420", "CP423", "CP424", "CP437", "CP500", "CP737", "CP775", "CP803", "CP813", "CP819", "CP850", "CP851", "CP852", "CP855", "CP856", "CP857", "CP860", "CP861", "CP862", "CP863", "CP864", "CP865", "CP866", "CP866NAV", "CP868", "CP869", "CP870", "CP871", "CP874", "CP875", "CP880", "CP891", "CP901", "CP902", "CP903", "CP904", "CP905", "CP912", "CP915", "CP916", "CP918", "CP920", "CP921", "CP922", "CP930", "CP932", "CP933", "CP935", "CP936", "CP937", "CP939", "CP949", "CP950", "CP1004", "CP1008", "CP1025", "CP1026", "CP1046", "CP1047", "CP1070", "CP1079", "CP1081", "CP1084", "CP1089", "CP1097", "CP1112", "CP1122", "CP1123", "CP1124", "CP1125", "CP1129", "CP1130", "CP1132", "CP1133", "CP1137", "CP1140", "CP1141", "CP1142", "CP1143", "CP1144", "CP1145", "CP1146", "CP1147", "CP1148", "CP1149", "CP1153", "CP1154", "CP1155", "CP1156", "CP1157", "CP1158", "CP1160", "CP1161", "CP1162", "CP1163", "CP1164", "CP1166", "CP1167", "CP1250", "CP1251", "CP1252", "CP1253", "CP1254", "CP1255", "CP1256", "CP1257", "CP1258", "CP1361", "CP1364", "CP1371", "CP1388", "CP1390", "CP1399", "CP4517", "CP4899", "CP4909", "CP4971", "CP5347", "CP9030", "CP9066", "CP9448", "CP10007", "CP12712", "CP16804", "CPIBM861", "CSA7-1", "CSA7-2", "CSASCII", "CSA_T500-1983", "CSA_T500", "CSA_Z243.4-1985-1", "CSA_Z243.4-1985-2", "CSA_Z243.419851", "CSA_Z243.419852", "CSDECMCS", "CSEBCDICATDE", "CSEBCDICATDEA", "CSEBCDICCAFR", "CSEBCDICDKNO", "CSEBCDICDKNOA", "CSEBCDICES", "CSEBCDICESA", "CSEBCDICESS", "CSEBCDICFISE", "CSEBCDICFISEA", "CSEBCDICFR", "CSEBCDICIT", "CSEBCDICPT", "CSEBCDICUK", "CSEBCDICUS", "CSEUCKR", "CSEUCPKDFMTJAPANESE", "CSGB2312", "CSHPROMAN8", "CSIBM037", "CSIBM038", "CSIBM273", "CSIBM274", "CSIBM275", "CSIBM277", "CSIBM278", "CSIBM280", "CSIBM281", "CSIBM284", "CSIBM285", "CSIBM290", "CSIBM297", "CSIBM420", "CSIBM423", "CSIBM424", "CSIBM500", "CSIBM803", "CSIBM851", "CSIBM855", "CSIBM856", "CSIBM857", "CSIBM860", "CSIBM863", "CSIBM864", "CSIBM865", "CSIBM866", "CSIBM868", "CSIBM869", "CSIBM870", "CSIBM871", "CSIBM880", "CSIBM891", "CSIBM901", "CSIBM902", "CSIBM903", "CSIBM904", "CSIBM905", "CSIBM918", "CSIBM921", "CSIBM922", "CSIBM930", "CSIBM932", "CSIBM933", "CSIBM935", "CSIBM937", "CSIBM939", "CSIBM943", "CSIBM1008", "CSIBM1025", "CSIBM1026", "CSIBM1097", "CSIBM1112", "CSIBM1122", "CSIBM1123", "CSIBM1124", "CSIBM1129", "CSIBM1130", "CSIBM1132", "CSIBM1133", "CSIBM1137", "CSIBM1140", "CSIBM1141", "CSIBM1142", "CSIBM1143", "CSIBM1144", "CSIBM1145", "CSIBM1146", "CSIBM1147", "CSIBM1148", "CSIBM1149", "CSIBM1153", "CSIBM1154", "CSIBM1155", "CSIBM1156", "CSIBM1157", "CSIBM1158", "CSIBM1160", "CSIBM1161", "CSIBM1163", "CSIBM1164", "CSIBM1166", "CSIBM1167", "CSIBM1364", "CSIBM1371", "CSIBM1388", "CSIBM1390", "CSIBM1399", "CSIBM4517", "CSIBM4899", "CSIBM4909", "CSIBM4971", "CSIBM5347", "CSIBM9030", "CSIBM9066", "CSIBM9448", "CSIBM12712", "CSIBM16804", "CSIBM11621162", "CSISO4UNITEDKINGDOM", "CSISO10SWEDISH", "CSISO11SWEDISHFORNAMES", "CSISO14JISC6220RO", "CSISO15ITALIAN", "CSISO16PORTUGESE", "CSISO17SPANISH", "CSISO18GREEK7OLD", "CSISO19LATINGREEK", "CSISO21GERMAN", "CSISO25FRENCH", "CSISO27LATINGREEK1", "CSISO49INIS", "CSISO50INIS8", "CSISO51INISCYRILLIC", "CSISO58GB1988", "CSISO60DANISHNORWEGIAN", "CSISO60NORWEGIAN1", "CSISO61NORWEGIAN2", "CSISO69FRENCH", "CSISO84PORTUGUESE2", "CSISO85SPANISH2", "CSISO86HUNGARIAN", "CSISO88GREEK7", "CSISO89ASMO449", "CSISO90", "CSISO92JISC62991984B", "CSISO99NAPLPS", "CSISO103T618BIT", "CSISO111ECMACYRILLIC", "CSISO121CANADIAN1", "CSISO122CANADIAN2", "CSISO139CSN369103", "CSISO141JUSIB1002", "CSISO143IECP271", "CSISO150", "CSISO150GREEKCCITT", "CSISO151CUBA", "CSISO153GOST1976874", "CSISO646DANISH", "CSISO2022CN", "CSISO2022JP", "CSISO2022JP2", "CSISO2022KR", "CSISO2033", "CSISO5427CYRILLIC", "CSISO5427CYRILLIC1981", "CSISO5428GREEK", "CSISO10367BOX", "CSISOLATIN1", "CSISOLATIN2", "CSISOLATIN3", "CSISOLATIN4", "CSISOLATIN5", "CSISOLATIN6", "CSISOLATINARABIC", "CSISOLATINCYRILLIC", "CSISOLATINGREEK", "CSISOLATINHEBREW", "CSKOI8R", "CSKSC5636", "CSMACINTOSH", "CSNATSDANO", "CSNATSSEFI", "CSN_369103", "CSPC8CODEPAGE437", "CSPC775BALTIC", "CSPC850MULTILINGUAL", "CSPC862LATINHEBREW", "CSPCP852", "CSSHIFTJIS", "CSUCS4", "CSUNICODE", "CSWINDOWS31J", "CUBA", "CWI-2", "CWI", "CYRILLIC", "DE", "DEC-MCS", "DEC", "DECMCS", "DIN_66003", "DK", "DS2089", "DS_2089", "E13B", "EBCDIC-AT-DE-A", "EBCDIC-AT-DE", "EBCDIC-BE", "EBCDIC-BR", "EBCDIC-CA-FR", "EBCDIC-CP-AR1", "EBCDIC-CP-AR2", "EBCDIC-CP-BE", "EBCDIC-CP-CA", "EBCDIC-CP-CH", "EBCDIC-CP-DK", "EBCDIC-CP-ES", "EBCDIC-CP-FI", "EBCDIC-CP-FR", "EBCDIC-CP-GB", "EBCDIC-CP-GR", "EBCDIC-CP-HE", "EBCDIC-CP-IS", "EBCDIC-CP-IT", "EBCDIC-CP-NL", "EBCDIC-CP-NO", "EBCDIC-CP-ROECE", "EBCDIC-CP-SE", "EBCDIC-CP-TR", "EBCDIC-CP-US", "EBCDIC-CP-WT", "EBCDIC-CP-YU", "EBCDIC-CYRILLIC", "EBCDIC-DK-NO-A", "EBCDIC-DK-NO", "EBCDIC-ES-A", "EBCDIC-ES-S", "EBCDIC-ES", "EBCDIC-FI-SE-A", "EBCDIC-FI-SE", "EBCDIC-FR", "EBCDIC-GREEK", "EBCDIC-INT", "EBCDIC-INT1", "EBCDIC-IS-FRISS", "EBCDIC-IT", "EBCDIC-JP-E", "EBCDIC-JP-KANA", "EBCDIC-PT", "EBCDIC-UK", "EBCDIC-US", "EBCDICATDE", "EBCDICATDEA", "EBCDICCAFR", "EBCDICDKNO", "EBCDICDKNOA", "EBCDICES", "EBCDICESA", "EBCDICESS", "EBCDICFISE", "EBCDICFISEA", "EBCDICFR", "EBCDICISFRISS", "EBCDICIT", "EBCDICPT", "EBCDICUK", "EBCDICUS", "ECMA-114", "ECMA-118", "ECMA-128", "ECMA-CYRILLIC", "ECMACYRILLIC", "ELOT_928", "ES", "ES2", "EUC-CN", "EUC-JISX0213", "EUC-JP-MS", "EUC-JP", "EUC-KR", "EUC-TW", "EUCCN", "EUCJP-MS", "EUCJP-OPEN", "EUCJP-WIN", "EUCJP", "EUCKR", "EUCTW", "FI", "FR", "GB", "GB2312", "GB13000", "GB18030", "GBK", "GB_1988-80", "GB_198880", "GEORGIAN-ACADEMY", "GEORGIAN-PS", "GOST_19768-74", "GOST_19768", "GOST_1976874", "GREEK-CCITT", "GREEK", "GREEK7-OLD", "GREEK7", "GREEK7OLD", "GREEK8", "GREEKCCITT", "HEBREW", "HP-ROMAN8", "HPROMAN8", "HU", "IBM-803", "IBM-856", "IBM-901", "IBM-902", "IBM-921", "IBM-922", "IBM-930", "IBM-932", "IBM-933", "IBM-935", "IBM-937", "IBM-939", "IBM-943", "IBM-1008", "IBM-1025", "IBM-1046", "IBM-1047", "IBM-1097", "IBM-1112", "IBM-1122", "IBM-1123", "IBM-1124", "IBM-1129", "IBM-1130", "IBM-1132", "IBM-1133", "IBM-1137", "IBM-1140", "IBM-1141", "IBM-1142", "IBM-1143", "IBM-1144", "IBM-1145", "IBM-1146", "IBM-1147", "IBM-1148", "IBM-1149", "IBM-1153", "IBM-1154", "IBM-1155", "IBM-1156", "IBM-1157", "IBM-1158", "IBM-1160", "IBM-1161", "IBM-1162", "IBM-1163", "IBM-1164", "IBM-1166", "IBM-1167", "IBM-1364", "IBM-1371", "IBM-1388", "IBM-1390", "IBM-1399", "IBM-4517", "IBM-4899", "IBM-4909", "IBM-4971", "IBM-5347", "IBM-9030", "IBM-9066", "IBM-9448", "IBM-12712", "IBM-16804", "IBM037", "IBM038", "IBM256", "IBM273", "IBM274", "IBM275", "IBM277", "IBM278", "IBM280", "IBM281", "IBM284", "IBM285", "IBM290", "IBM297", "IBM367", "IBM420", "IBM423", "IBM424", "IBM437", "IBM500", "IBM775", "IBM803", "IBM813", "IBM819", "IBM848", "IBM850", "IBM851", "IBM852", "IBM855", "IBM856", "IBM857", "IBM860", "IBM861", "IBM862", "IBM863", "IBM864", "IBM865", "IBM866", "IBM866NAV", "IBM868", "IBM869", "IBM870", "IBM871", "IBM874", "IBM875", "IBM880", "IBM891", "IBM901", "IBM902", "IBM903", "IBM904", "IBM905", "IBM912", "IBM915", "IBM916", "IBM918", "IBM920", "IBM921", "IBM922", "IBM930", "IBM932", "IBM933", "IBM935", "IBM937", "IBM939", "IBM943", "IBM1004", "IBM1008", "IBM1025", "IBM1026", "IBM1046", "IBM1047", "IBM1089", "IBM1097", "IBM1112", "IBM1122", "IBM1123", "IBM1124", "IBM1129", "IBM1130", "IBM1132", "IBM1133", "IBM1137", "IBM1140", "IBM1141", "IBM1142", "IBM1143", "IBM1144", "IBM1145", "IBM1146", "IBM1147", "IBM1148", "IBM1149", "IBM1153", "IBM1154", "IBM1155", "IBM1156", "IBM1157", "IBM1158", "IBM1160", "IBM1161", "IBM1162", "IBM1163", "IBM1164", "IBM1166", "IBM1167", "IBM1364", "IBM1371", "IBM1388", "IBM1390", "IBM1399", "IBM4517", "IBM4899", "IBM4909", "IBM4971", "IBM5347", "IBM9030", "IBM9066", "IBM9448", "IBM12712", "IBM16804", "IEC_P27-1", "IEC_P271", "INIS-8", "INIS-CYRILLIC", "INIS", "INIS8", "INISCYRILLIC", "ISIRI-3342", "ISIRI3342", "ISO-2022-CN-EXT", "ISO-2022-CN", "ISO-2022-JP-2", "ISO-2022-JP-3", "ISO-2022-JP", "ISO-2022-KR", "ISO-8859-1", "ISO-8859-2", "ISO-8859-3", "ISO-8859-4", "ISO-8859-5", "ISO-8859-6", "ISO-8859-7", "ISO-8859-8", "ISO-8859-9", "ISO-8859-10", "ISO-8859-11", "ISO-8859-13", "ISO-8859-14", "ISO-8859-15", "ISO-8859-16", "ISO-10646", "ISO-10646/UCS2/", "ISO-10646/UCS4/", "ISO-10646/UTF-8/", "ISO-10646/UTF8/", "ISO-CELTIC", "ISO-IR-4", "ISO-IR-6", "ISO-IR-8-1", "ISO-IR-9-1", "ISO-IR-10", "ISO-IR-11", "ISO-IR-14", "ISO-IR-15", "ISO-IR-16", "ISO-IR-17", "ISO-IR-18", "ISO-IR-19", "ISO-IR-21", "ISO-IR-25", "ISO-IR-27", "ISO-IR-37", "ISO-IR-49", "ISO-IR-50", "ISO-IR-51", "ISO-IR-54", "ISO-IR-55", "ISO-IR-57", "ISO-IR-60", "ISO-IR-61", "ISO-IR-69", "ISO-IR-84", "ISO-IR-85", "ISO-IR-86", "ISO-IR-88", "ISO-IR-89", "ISO-IR-90", "ISO-IR-92", "ISO-IR-98", "ISO-IR-99", "ISO-IR-100", "ISO-IR-101", "ISO-IR-103", "ISO-IR-109", "ISO-IR-110", "ISO-IR-111", "ISO-IR-121", "ISO-IR-122", "ISO-IR-126", "ISO-IR-127", "ISO-IR-138", "ISO-IR-139", "ISO-IR-141", "ISO-IR-143", "ISO-IR-144", "ISO-IR-148", "ISO-IR-150", "ISO-IR-151", "ISO-IR-153", "ISO-IR-155", "ISO-IR-156", "ISO-IR-157", "ISO-IR-166", "ISO-IR-179", "ISO-IR-193", "ISO-IR-197", "ISO-IR-199", "ISO-IR-203", "ISO-IR-209", "ISO-IR-226", "ISO/TR_11548-1/", "ISO646-CA", "ISO646-CA2", "ISO646-CN", "ISO646-CU", "ISO646-DE", "ISO646-DK", "ISO646-ES", "ISO646-ES2", "ISO646-FI", "ISO646-FR", "ISO646-FR1", "ISO646-GB", "ISO646-HU", "ISO646-IT", "ISO646-JP-OCR-B", "ISO646-JP", "ISO646-KR", "ISO646-NO", "ISO646-NO2", "ISO646-PT", "ISO646-PT2", "ISO646-SE", "ISO646-SE2", "ISO646-US", "ISO646-YU", "ISO2022CN", "ISO2022CNEXT", "ISO2022JP", "ISO2022JP2", "ISO2022KR", "ISO6937", "ISO8859-1", "ISO8859-2", "ISO8859-3", "ISO8859-4", "ISO8859-5", "ISO8859-6", "ISO8859-7", "ISO8859-8", "ISO8859-9", "ISO8859-10", "ISO8859-11", "ISO8859-13", "ISO8859-14", "ISO8859-15", "ISO8859-16", "ISO11548-1", "ISO88591", "ISO88592", "ISO88593", "ISO88594", "ISO88595", "ISO88596", "ISO88597", "ISO88598", "ISO88599", "ISO885910", "ISO885911", "ISO885913", "ISO885914", "ISO885915", "ISO885916", "ISO_646.IRV:1991", "ISO_2033-1983", "ISO_2033", "ISO_5427-EXT", "ISO_5427", "ISO_5427:1981", "ISO_5427EXT", "ISO_5428", "ISO_5428:1980", "ISO_6937-2", "ISO_6937-2:1983", "ISO_6937", "ISO_6937:1992", "ISO_8859-1", "ISO_8859-1:1987", "ISO_8859-2", "ISO_8859-2:1987", "ISO_8859-3", "ISO_8859-3:1988", "ISO_8859-4", "ISO_8859-4:1988", "ISO_8859-5", "ISO_8859-5:1988", "ISO_8859-6", "ISO_8859-6:1987", "ISO_8859-7", "ISO_8859-7:1987", "ISO_8859-7:2003", "ISO_8859-8", "ISO_8859-8:1988", "ISO_8859-9", "ISO_8859-9:1989", "ISO_8859-10", "ISO_8859-10:1992", "ISO_8859-14", "ISO_8859-14:1998", "ISO_8859-15", "ISO_8859-15:1998", "ISO_8859-16", "ISO_8859-16:2001", "ISO_9036", "ISO_10367-BOX", "ISO_10367BOX", "ISO_11548-1", "ISO_69372", "IT", "JIS_C6220-1969-RO", "JIS_C6229-1984-B", "JIS_C62201969RO", "JIS_C62291984B", "JOHAB", "JP-OCR-B", "JP", "JS", "JUS_I.B1.002", "KOI-7", "KOI-8", "KOI8-R", "KOI8-T", "KOI8-U", "KOI8", "KOI8R", "KOI8U", "KSC5636", "L1", "L2", "L3", "L4", "L5", "L6", "L7", "L8", "L10", "LATIN-9", "LATIN-GREEK-1", "LATIN-GREEK", "LATIN1", "LATIN2", "LATIN3", "LATIN4", "LATIN5", "LATIN6", "LATIN7", "LATIN8", "LATIN10", "LATINGREEK", "LATINGREEK1", "MAC-CYRILLIC", "MAC-IS", "MAC-SAMI", "MAC-UK", "MAC", "MACCYRILLIC", "MACINTOSH", "MACIS", "MACUK", "MACUKRAINIAN", "MIK", "MS-ANSI", "MS-ARAB", "MS-CYRL", "MS-EE", "MS-GREEK", "MS-HEBR", "MS-MAC-CYRILLIC", "MS-TURK", "MS932", "MS936", "MSCP949", "MSCP1361", "MSMACCYRILLIC", "MSZ_7795.3", "MS_KANJI", "NAPLPS", "NATS-DANO", "NATS-SEFI", "NATSDANO", "NATSSEFI", "NC_NC0010", "NC_NC00-10", "NC_NC00-10:81", "NF_Z_62-010", "NF_Z_62-010_(1973)", "NF_Z_62-010_1973", "NF_Z_62010", "NF_Z_62010_1973", "NO", "NO2", "NS_4551-1", "NS_4551-2", "NS_45511", "NS_45512", "OS2LATIN1", "OSF00010001", "OSF00010002", "OSF00010003", "OSF00010004", "OSF00010005", "OSF00010006", "OSF00010007", "OSF00010008", "OSF00010009", "OSF0001000A", "OSF00010020", "OSF00010100", "OSF00010101", "OSF00010102", "OSF00010104", "OSF00010105", "OSF00010106", "OSF00030010", "OSF0004000A", "OSF0005000A", "OSF05010001", "OSF100201A4", "OSF100201A8", "OSF100201B5", "OSF100201F4", "OSF100203B5", "OSF1002011C", "OSF1002011D", "OSF1002035D", "OSF1002035E", "OSF1002035F", "OSF1002036B", "OSF1002037B", "OSF10010001", "OSF10020025", "OSF10020111", "OSF10020115", "OSF10020116", "OSF10020118", "OSF10020122", "OSF10020129", "OSF10020352", "OSF10020354", "OSF10020357", "OSF10020359", "OSF10020360", "OSF10020364", "OSF10020365", "OSF10020366", "OSF10020367", "OSF10020370", "OSF10020387", "OSF10020388", "OSF10020396", "OSF10020402", "OSF10020417", "PT", "PT2", "PT154", "R8", "RK1048", "ROMAN8", "RUSCII", "SE", "SE2", "SEN_850200_B", "SEN_850200_C", "SHIFT-JIS", "SHIFT_JIS", "SHIFT_JISX0213", "SJIS-OPEN", "SJIS-WIN", "SJIS", "SS636127", "STRK1048-2002", "ST_SEV_358-88", "T.61-8BIT", "T.61", "T.618BIT", "TCVN-5712", "TCVN", "TCVN5712-1", "TCVN5712-1:1993", "TIS-620", "TIS620-0", "TIS620.2529-1", "TIS620.2533-0", "TIS620", "TS-5881", "TSCII", "UCS-2", "UCS-2BE", "UCS-2LE", "UCS-4", "UCS-4BE", "UCS-4LE", "UCS2", "UCS4", "UHC", "UJIS", "UK", "UNICODE", "UNICODEBIG", "UNICODELITTLE", "US-ASCII", "US", "UTF-7", "UTF-8", "UTF-16", "UTF-16BE", "UTF-16LE", "UTF-32", "UTF-32BE", "UTF-32LE", "UTF7", "UTF8", "UTF16", "UTF16BE", "UTF16LE", "UTF32", "UTF32BE", "UTF32LE", "VISCII", "WCHAR_T", "WIN-SAMI-2", "WINBALTRIM", "WINDOWS-31J", "WINDOWS-874", "WINDOWS-936", "WINDOWS-1250", "WINDOWS-1251", "WINDOWS-1252", "WINDOWS-1253", "WINDOWS-1254", "WINDOWS-1255", "WINDOWS-1256", "WINDOWS-1257", "WINDOWS-1258", "WINSAMI2", "WS2", "YU"
+ };
+ static const QString LanguagesI18N = i18n( "English|German|French|Spanish|Swedish" );
+ static const QString Languages[] =
+ {
+ "english", "german", "french", "spanish", "swedish"
+ };
+ static const QString BibliographyStyles = i18n( "plain|achemso (American Chemical Society)|alpha|unsrt|abbrv|acm (Association of Computing Machinery)|apacite|apalike|authordate|ieeetr|natbib|siam" );
+ static const QString StringDelimiters = "\"...\"|{...}|(...)";
+ static const QString KeywordCasing = "@inproceedings|@Inproceedings|@InProceedings|@INPROCEEDINGS";
+
+ SettingsFileIO::SettingsFileIO( QWidget *parent, const char *name )
+ : QWidget( parent, name )
+ {
+ setupGUI();
+ }
+
+ SettingsFileIO::~SettingsFileIO()
+ {
+ // nothing
+ }
+
+ void SettingsFileIO::applyData()
+ {
+ Settings * settings = Settings::self();
+
+ settings->fileIO_Encoding = m_comboBoxEncoding->currentText().lower();
+ QString delimiters = m_comboBoxStringDelimiters->currentText();
+ settings->fileIO_BibtexStringOpenDelimiter = delimiters.at( 0 ) ;
+ settings->fileIO_BibtexStringCloseDelimiter = delimiters.at( 4 ) ;
+
+ switch ( m_comboBoxKeywordCasing->currentItem() )
+ {
+ case 0:
+ settings->fileIO_KeywordCasing = BibTeX::FileExporterBibTeX::kcLowerCase;
+ break;
+ case 1:
+ settings->fileIO_KeywordCasing = BibTeX::FileExporterBibTeX::kcInitialCapital;
+ break;
+ case 3:
+ settings->fileIO_KeywordCasing = BibTeX::FileExporterBibTeX::kcCapital;
+ break;
+ default:
+ settings->fileIO_KeywordCasing = BibTeX::FileExporterBibTeX::kcCamelCase;
+ }
+
+ settings->fileIO_EnclosingCurlyBrackets = m_checkBoxProtectCasing->isChecked();
+
+ settings->fileIO_ExportLanguage = Languages[ m_comboBoxLanguage->currentItem()];
+ settings->fileIO_ExportBibliographyStyle = m_comboBoxBibliographyStyle->currentText().section( ' ', 0, 0 );
+
+ if ( m_comboBoxExportSystemHTML->isEnabled() )
+ {
+ QString text = m_comboBoxExportSystemHTML->currentText();
+ if ( text == "bib2xhtml" )
+ settings->fileIO_ExporterHTML = BibTeX::FileExporterExternal::exporterBib2XHTML;
+ else if ( text == "bibtex2html" )
+ settings->fileIO_ExporterHTML = BibTeX::FileExporterExternal::exporterBibTeX2HTML;
+ else if ( text == "bibconv" )
+ settings->fileIO_ExporterHTML = BibTeX::FileExporterExternal::exporterBibConv;
+ else
+ settings->fileIO_ExporterHTML = BibTeX::FileExporterExternal::exporterXSLT;
+ }
+ else
+ settings->fileIO_ExporterHTML = BibTeX::FileExporterExternal::exporterNone;
+
+ settings->fileIO_EmbedFiles = m_checkBoxEmbedFiles->isChecked();
+
+ settings->updateBib2Db5ClassPath( m_bib2db5BasePath );
+
+ if ( m_checkBoxUseBibUtils->isEnabled() )
+ settings->fileIO_useBibUtils = m_checkBoxUseBibUtils->isChecked();
+
+ settings->fileIO_NumberOfBackups = m_spinBoxNumberOfBackups->value();
+ }
+
+ void SettingsFileIO::readData()
+ {
+ Settings * settings = Settings::self();
+
+ m_comboBoxEncoding->setCurrentItem( 0 );
+ for ( int i = sizeof( encodingList ) / sizeof( encodingList[0] ) - 1; i >= 0; --i )
+ if ( encodingList[i].lower() == settings->fileIO_Encoding )
+ {
+ m_comboBoxEncoding->setCurrentItem( i );
+ break;
+ }
+
+ QString toMatch = QString( settings->fileIO_BibtexStringOpenDelimiter ).append( "..." ).append( settings->fileIO_BibtexStringCloseDelimiter );
+ QStringList delimiterList = QStringList::split( '|', StringDelimiters );
+ int i = 0;
+ for ( QStringList::Iterator it = delimiterList.begin(); it != delimiterList.end(); ++it, i++ )
+ if (( *it ) == toMatch )
+ {
+ m_comboBoxStringDelimiters->setCurrentItem( i );
+ break;
+ }
+
+ switch ( settings->fileIO_KeywordCasing )
+ {
+ case BibTeX::FileExporterBibTeX::kcLowerCase:
+ m_comboBoxKeywordCasing->setCurrentItem( 0 );
+ break;
+ case BibTeX::FileExporterBibTeX::kcInitialCapital:
+ m_comboBoxKeywordCasing->setCurrentItem( 1 );
+ break;
+ case BibTeX::FileExporterBibTeX::kcCapital:
+ m_comboBoxKeywordCasing->setCurrentItem( 3 );
+ break;
+ default:
+ m_comboBoxKeywordCasing->setCurrentItem( 2 );
+ }
+
+ m_checkBoxProtectCasing->setChecked( settings->fileIO_EnclosingCurlyBrackets );
+
+ for ( int i = 0; i < m_comboBoxLanguage->count(); i++ )
+ if ( Languages[ i ] == settings->fileIO_ExportLanguage )
+ {
+ m_comboBoxLanguage->setCurrentItem( i );
+ break;
+ }
+
+ m_comboBoxBibliographyStyle->setCurrentText( settings->fileIO_ExportBibliographyStyle );
+
+ m_comboBoxExportSystemHTML->clear();
+
+ m_comboBoxExportSystemHTML->insertItem( i18n( "XSLT Stylesheet" ) );
+ if ( settings->fileIO_ExporterHTML == BibTeX::FileExporterExternal::exporterXSLT )
+ m_comboBoxExportSystemHTML->setCurrentItem( m_comboBoxExportSystemHTML->count() - 1 );
+ if ( settings->external_bib2xhtmlAvailable )
+ {
+ m_comboBoxExportSystemHTML->insertItem( "bib2xhtml" );
+ if ( settings->fileIO_ExporterHTML == BibTeX::FileExporterExternal::exporterBib2XHTML )
+ m_comboBoxExportSystemHTML->setCurrentItem( m_comboBoxExportSystemHTML->count() - 1 );
+ }
+ if ( settings->external_bibtex2htmlAvailable )
+ {
+ m_comboBoxExportSystemHTML->insertItem( "bibtex2html" );
+ if ( settings->fileIO_ExporterHTML == BibTeX::FileExporterExternal::exporterBibTeX2HTML )
+ m_comboBoxExportSystemHTML->setCurrentItem( m_comboBoxExportSystemHTML->count() - 1 );
+ }
+ if ( settings->external_bibconvAvailable )
+ {
+ m_comboBoxExportSystemHTML->insertItem( "bibconv" );
+ if ( settings->fileIO_ExporterHTML == BibTeX::FileExporterExternal::exporterBibConv )
+ m_comboBoxExportSystemHTML->setCurrentItem( m_comboBoxExportSystemHTML->count() - 1 );
+ }
+
+ if ( m_comboBoxExportSystemHTML->count() == 0 )
+ {
+ m_comboBoxExportSystemHTML->insertItem( i18n( "No exporter available" ) );
+ m_comboBoxExportSystemHTML->setEnabled( FALSE );
+ }
+
+ m_checkBoxEmbedFiles->setChecked( settings->fileIO_EmbedFiles );
+
+ m_bib2db5BasePath = settings->fileIO_bib2db5BasePath;
+ m_lineeditBib2Db5Path->setText( m_bib2db5BasePath );
+
+ if ( m_checkBoxUseBibUtils->isEnabled() )
+ m_checkBoxUseBibUtils->setChecked( settings->fileIO_useBibUtils );
+
+ m_spinBoxNumberOfBackups->setValue( settings->fileIO_NumberOfBackups );
+ }
+
+ void SettingsFileIO::slotConfigChanged()
+ {
+ emit configChanged();
+ }
+
+ void SettingsFileIO::slotBib2db5BasePath()
+ {
+ KURL newPath = KDirSelectDialog::selectDirectory( m_bib2db5BasePath, true, this, i18n( "Path to the jar files for bib2db5" ) );
+ if ( !newPath.isEmpty() && newPath.isValid() && newPath.isLocalFile() )
+ {
+ m_bib2db5BasePath = newPath.directory() + QDir::separator() + newPath.fileName();
+ m_lineeditBib2Db5Path->setText( m_bib2db5BasePath );
+ slotCheckBib2Db5Path();
+ }
+ }
+
+ void SettingsFileIO::slotCheckBib2Db5Path()
+ {
+ if ( !Settings::self()->updateBib2Db5ClassPath( m_lineeditBib2Db5Path->text(), true ) )
+ {
+ KMessageBox::error( this, i18n( "To export DocBook5 bibliographies, the path to the jar file for bib2db5 has to be set first." ), i18n( "Invalid path for bib2db5" ) );
+ }
+ }
+
+ void SettingsFileIO::setupGUI()
+ {
+ QVBoxLayout * layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+
+ QGroupBox *groupBox = new QGroupBox( 2, Horizontal, i18n( "BibTeX Import and Export" ), this );
+ layout->addWidget( groupBox );
+ QLabel *label = new QLabel( i18n( "&Encoding:" ), groupBox );
+ m_comboBoxEncoding = new QComboBox( groupBox );
+ label->setBuddy( m_comboBoxEncoding );
+ label = new QLabel( i18n( "Text &delimiters:" ), groupBox );
+ m_comboBoxStringDelimiters = new QComboBox( groupBox );
+ label->setBuddy( m_comboBoxStringDelimiters );
+ label = new QLabel( i18n( "Keyword casing:" ), groupBox );
+ m_comboBoxKeywordCasing = new QComboBox( groupBox );
+ label->setBuddy( m_comboBoxKeywordCasing );
+ label = new QLabel( i18n( "Protect title's casing:" ), groupBox );
+ m_checkBoxProtectCasing = new QCheckBox( i18n( "Put curly brackets around" ), groupBox );
+ QToolTip::add( m_checkBoxProtectCasing, i18n( "Put curly brackets around title and other selected fields." ) );
+ QWhatsThis::add( m_checkBoxProtectCasing, i18n( "Put curly brackets around title and other selected fields to protect them from case changes in certain BibTeX styles." ) );
+
+ groupBox = new QGroupBox( 2, Horizontal, i18n( "PDF, PostScript and Rich Text Format Export" ), this );
+ layout->addWidget( groupBox );
+ QWhatsThis::add( groupBox, i18n( "Select the layout of the resulting PDF, PostScript or Rich Text Format document when exporting a BibTeX file." ) );
+ label = new QLabel( i18n( "&Language:" ), groupBox );
+ m_comboBoxLanguage = new QComboBox( groupBox );
+ label->setBuddy( m_comboBoxLanguage );
+ label = new QLabel( i18n( "&Biblography style:" ), groupBox );
+ m_comboBoxBibliographyStyle = new QComboBox( TRUE, groupBox );
+ label->setBuddy( m_comboBoxBibliographyStyle );
+
+ groupBox = new QGroupBox( 1, Horizontal, i18n( "PDF Export" ), this );
+ layout->addWidget( groupBox );
+ m_checkBoxEmbedFiles = new QCheckBox( i18n( "Embed local files into PDF if possible" ), groupBox );
+ QWhatsThis::add( m_checkBoxEmbedFiles, i18n( "<qt>If checked, KBibTeX tries to embed all referenced files for the BibTeX entries into the exported PDF file.<br/>This requires that you have installed <tt>embedfile.sty</tt>.</qt>" ) );
+
+ groupBox = new QGroupBox( 2, Horizontal, i18n( "XML Export" ), this );
+ layout->addWidget( groupBox );
+ label->setBuddy( m_comboBoxEncoding );
+ label = new QLabel( i18n( "Path to the jar files for bib2db5:" ), groupBox );
+ QWidget *container = new QWidget( groupBox );
+ QBoxLayout *containerLayout = new QHBoxLayout( container, 0, KDialog::spacingHint() );
+ m_lineeditBib2Db5Path = new KLineEdit( container );
+ m_lineeditBib2Db5Path->setReadOnly( true );
+ containerLayout->addWidget( m_lineeditBib2Db5Path );
+ containerLayout->setStretchFactor( m_lineeditBib2Db5Path, 10 );
+ KPushButton *buttonBib2Db5 = new KPushButton( container );
+ label->setBuddy( buttonBib2Db5 );
+ containerLayout->addWidget( buttonBib2Db5 );
+ containerLayout->setStretchFactor( buttonBib2Db5, 1 );
+ buttonBib2Db5->setIconSet( QIconSet( SmallIcon( "folder_open" ) ) );
+ label->setBuddy( buttonBib2Db5 );
+ connect( buttonBib2Db5, SIGNAL( clicked() ), this, SLOT( slotBib2db5BasePath() ) );
+
+ groupBox = new QGroupBox( 2, Horizontal, i18n( "Export Systems" ), this );
+ layout->addWidget( groupBox );
+ label = new QLabel( i18n( "HTML:" ), groupBox );
+ m_comboBoxExportSystemHTML = new QComboBox( FALSE, groupBox );
+ label->setBuddy( m_comboBoxExportSystemHTML );
+
+ groupBox = new QGroupBox( 1, Horizontal, i18n( "BibUtils" ), this );
+ layout->addWidget( groupBox );
+ m_checkBoxUseBibUtils = new QCheckBox( i18n( "Always use BibUtils" ), groupBox );
+ QToolTip::add( m_checkBoxUseBibUtils, i18n( "If possible, use BibUtils to import and export alien bibliography." ) );
+ QWhatsThis::add( m_checkBoxUseBibUtils, i18n( "If possible, use BibUtils to import and export alien bibliography such as RIS.\nIf unchecked, prefer internal import and export library." ) );
+ /** command line tools from BibUtils must be available to enable this option */
+ m_checkBoxUseBibUtils->setEnabled( Settings::self()->external_xml2bibAvailable && Settings::self()->external_ris2xmlAvailable );
+
+ groupBox = new QGroupBox( 2, Horizontal, i18n( "Backups" ), this );
+ layout->addWidget( groupBox );
+ label = new QLabel( i18n( "Number of Backups:" ), groupBox );
+ m_spinBoxNumberOfBackups = new QSpinBox( 0, 15, 1, groupBox, "m_spinBoxNumberOfBackups" );
+ m_spinBoxNumberOfBackups->setSpecialValueText( "No backups" );
+ label->setBuddy( m_spinBoxNumberOfBackups );
+
+ layout->addStretch( 1 );
+
+ for ( unsigned int i = 0; i < sizeof( encodingList ) / sizeof( encodingList[0] ); ++i )
+ m_comboBoxEncoding->insertItem( encodingList[i] );
+
+ QStringList delimiterList = QStringList::split( '|', StringDelimiters );
+ m_comboBoxStringDelimiters->insertStringList( delimiterList );
+
+ QStringList keywordCasingList = QStringList::split( '|', KeywordCasing );
+ m_comboBoxKeywordCasing->insertStringList( keywordCasingList );
+
+ QStringList langList = QStringList::split( '|', LanguagesI18N );
+ m_comboBoxLanguage->insertStringList( langList );
+
+ QStringList bibList = QStringList::split( '|', BibliographyStyles );
+ bibList.sort();
+ m_comboBoxBibliographyStyle->insertStringList( bibList );
+
+ connect( m_comboBoxEncoding, SIGNAL( activated( int ) ), this, SLOT( slotConfigChanged() ) );
+ connect( m_comboBoxStringDelimiters, SIGNAL( activated( int ) ), this, SLOT( slotConfigChanged() ) );
+ connect( m_comboBoxKeywordCasing, SIGNAL( activated( int ) ), this, SLOT( slotConfigChanged() ) );
+ connect( m_comboBoxLanguage, SIGNAL( activated( int ) ), this, SLOT( slotConfigChanged() ) );
+ connect( m_comboBoxBibliographyStyle, SIGNAL( activated( int ) ), this, SLOT( slotConfigChanged() ) );
+ connect( m_comboBoxExportSystemHTML, SIGNAL( activated( int ) ), this, SLOT( slotConfigChanged() ) );
+ }
+
+}
+#include "settingsfileio.moc"
diff --git a/src/settingsfileio.h b/src/settingsfileio.h
new file mode 100644
index 0000000..2697473
--- /dev/null
+++ b/src/settingsfileio.h
@@ -0,0 +1,73 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef SETTINGSFILEIO_H
+#define SETTINGSFILEIO_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <qwidget.h>
+
+class QComboBox;
+class QCheckBox;
+class QSpinBox;
+class KLineEdit;
+
+namespace KBibTeX
+{
+ class SettingsFileIO : public QWidget
+ {
+ Q_OBJECT
+ public:
+ SettingsFileIO( QWidget *parent = 0, const char *name = 0 );
+ ~SettingsFileIO();
+
+ void applyData();
+ void readData();
+
+ signals:
+ void configChanged();
+
+ protected slots:
+ void slotConfigChanged();
+ void slotBib2db5BasePath();
+ void slotCheckBib2Db5Path();
+
+ private:
+ QComboBox *m_comboBoxEncoding;
+ QComboBox *m_comboBoxStringDelimiters;
+ QComboBox *m_comboBoxKeywordCasing;
+ QCheckBox *m_checkBoxProtectCasing;
+ QComboBox *m_comboBoxLanguage;
+ QComboBox *m_comboBoxBibliographyStyle;
+ QCheckBox *m_checkBoxEmbedFiles;
+ QComboBox *m_comboBoxExportSystemHTML;
+ QCheckBox *m_checkBoxUseBibUtils;
+ KLineEdit *m_lineeditBib2Db5Path;
+ QString m_bib2db5BasePath;
+ QSpinBox *m_spinBoxNumberOfBackups;
+
+ void setupGUI();
+
+ };
+}
+
+#endif
diff --git a/src/settingsidsuggestions.cpp b/src/settingsidsuggestions.cpp
new file mode 100644
index 0000000..7d53327
--- /dev/null
+++ b/src/settingsidsuggestions.cpp
@@ -0,0 +1,400 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qlayout.h>
+#include <qcheckbox.h>
+#include <qtimer.h>
+#include <qvalidator.h>
+#include <qheader.h>
+#include <qlabel.h>
+
+#include <kinputdialog.h>
+#include <klistview.h>
+#include <kiconloader.h>
+#include <kpushbutton.h>
+#include <klocale.h>
+#include <kdialog.h>
+#include <klineedit.h>
+
+#include <idsuggestions.h>
+#include <idsuggestionswidget.h>
+#include <settings.h>
+#include <fileimporter.h>
+#include <fileimporterbibtex.h>
+#include "settingsidsuggestions.h"
+
+namespace KBibTeX
+{
+ QString SettingsIdSuggestions::exampleBibTeXEntry = "@Article{ dijkstra1983terminationdetect,\nauthor = {Edsger W. Dijkstra and W. H. J. Feijen and A. J. M. {van Gasteren}},\ntitle = {{Derivation of a Termination Detection Algorithm for Distributed Computations}},\njournal = {Information Processing Letters},\nvolume = 16,\nnumber = 5,\npages = {217--219},\nmonth = jun,\nyear = 1983\n}";
+
+ IdSuggestionsListViewItem::IdSuggestionsListViewItem( KListView *list, const QString& plainText, BibTeX::Entry *example ): KListViewItem( list ), m_original( plainText ), m_example( example )
+ {
+ KListViewItem::setText( 0, parse( plainText ) );
+ KListViewItem::setMultiLinesEnabled( TRUE );
+ }
+
+ IdSuggestionsListViewItem::IdSuggestionsListViewItem( KListView *list, KListViewItem *prev, const QString& plainText, BibTeX::Entry *example ): KListViewItem( list, prev ), m_original( plainText ), m_example( example )
+ {
+ KListViewItem::setText( 0, parse( plainText ) );
+ KListViewItem::setMultiLinesEnabled( TRUE );
+ }
+
+ void IdSuggestionsListViewItem::setText( int col, const QString& text )
+ {
+ if ( col == 0 )
+ KListViewItem::setText( 0, parse( text ) );
+ else
+ KListViewItem::setText( col, text );
+ }
+
+ int IdSuggestionsListViewItem::width( const QFontMetrics & fm, const QListView *, int c ) const
+ {
+ int max = 100;
+ QStringList lines = QStringList::split( '\n', text( c ) );
+ for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
+ {
+ int w = fm.width( *it );
+ if ( w > max ) max = w;
+ }
+
+ return max + 36;
+ }
+
+ QString IdSuggestionsListViewItem::originalText() const
+ {
+ return m_original;
+ }
+
+ QString IdSuggestionsListViewItem::parse( const QString&plainText )
+ {
+ m_original = plainText;
+ QString result = IdSuggestions::formatStrToHuman( plainText );
+ if ( m_example != NULL )
+ {
+ result.append( QString( i18n( "\nExample: %1" ) ).arg( IdSuggestions::formatId( m_example, plainText ) ) );
+ }
+ return result;
+ }
+
+ SettingsIdSuggestions::SettingsIdSuggestions( QWidget *parent, const char *name )
+ : QWidget( parent, name )
+ {
+ m_validator = new QRegExpValidator( QRegExp( "[^\\s]+" ), this );
+ setupGUI();
+
+ BibTeX::FileImporter *importer = new BibTeX::FileImporterBibTeX( false );
+ BibTeX::File *file = importer->load( exampleBibTeXEntry );
+ m_example = new BibTeX::Entry( dynamic_cast<BibTeX::Entry*>( *( file->begin() ) ) );
+ delete file;
+ delete importer;
+ }
+
+ SettingsIdSuggestions::~SettingsIdSuggestions()
+ {
+ delete m_example;
+ delete m_validator;
+ }
+
+ void SettingsIdSuggestions::applyData()
+ {
+ Settings * settings = Settings::self();
+
+ settings->idSuggestions_formatStrList.clear();
+ settings->idSuggestions_default = -1;
+ settings->idSuggestions_forceDefault = m_checkBoxForceDefault->isChecked();
+ int i = 0;
+ for ( QListViewItemIterator it( m_listIdSuggestions ); it.current(); ++i, ++it )
+ {
+ IdSuggestionsListViewItem *item = dynamic_cast<IdSuggestionsListViewItem*>( *it );
+ settings->idSuggestions_formatStrList.append( item->originalText() );
+ if ( item == m_defaultSuggestionItem )
+ settings->idSuggestions_default = i;
+ }
+ settings->idSuggestions_smallWords.clear();
+ for ( QListViewItemIterator it( m_listSmallWords ); it.current(); ++it )
+ settings->idSuggestions_smallWords << it.current()->text( 0 );
+ }
+
+ void SettingsIdSuggestions::readData()
+ {
+ Settings * settings = Settings::self();
+
+ IdSuggestionsListViewItem *prev = NULL;
+ m_listIdSuggestions->clear();
+ m_defaultSuggestionItem = NULL;
+ m_checkBoxForceDefault->setChecked( settings->idSuggestions_forceDefault );
+ m_checkBoxForceDefault->setEnabled( settings->idSuggestions_default >= 0 );
+ int i = 0;
+ for ( QStringList::ConstIterator it = settings->idSuggestions_formatStrList.begin(); it != settings->idSuggestions_formatStrList.end(); ++i, ++it )
+ {
+ prev = new IdSuggestionsListViewItem( m_listIdSuggestions, prev, *it, m_example );
+ prev->setPixmap( 0, SmallIcon( "filter" ) );
+ if ( i == settings->idSuggestions_default )
+ m_defaultSuggestionItem = prev;
+ }
+
+ if ( m_defaultSuggestionItem != NULL )
+ m_defaultSuggestionItem->setPixmap( 0, SmallIcon( "favorites" ) );
+
+ m_listSmallWords->clear();
+ for ( QStringList::ConstIterator it = settings->idSuggestions_smallWords.begin(); it != settings->idSuggestions_smallWords.end(); ++it )
+ new KListViewItem( m_listSmallWords, *it );
+ m_lineEditSmallWords->setText( "" );
+ slotListSmallWordsChanged();
+
+ updateGUI();
+ }
+
+ void SettingsIdSuggestions::slotConfigChanged()
+ {
+ emit configChanged();
+ }
+
+ void SettingsIdSuggestions::slotNewIdSuggestion()
+ {
+ IdSuggestionsListViewItem * item = new IdSuggestionsListViewItem( m_listIdSuggestions, "a|Y|T", m_example );
+ item->setPixmap( 0, SmallIcon( "filter" ) );
+ m_listIdSuggestions->setSelected( item, TRUE );
+ QTimer::singleShot( 100, this, SLOT( slotEditIdSuggestion() ) );
+ }
+
+ void SettingsIdSuggestions::slotEditIdSuggestion()
+ {
+ IdSuggestionsListViewItem * item = static_cast<IdSuggestionsListViewItem*>( m_listIdSuggestions->selectedItem() );
+ if ( item != NULL )
+ {
+ QString formatStr = item->originalText();
+ if ( IdSuggestionsWidget::execute( formatStr, this ) == QDialog::Accepted )
+ {
+ item->setText( 0, formatStr );
+ emit configChanged();
+ }
+ }
+ updateGUI();
+ }
+
+ void SettingsIdSuggestions::slotDeleteIdSuggestion()
+ {
+ IdSuggestionsListViewItem * item = static_cast<IdSuggestionsListViewItem*>( m_listIdSuggestions->selectedItem() );
+ if ( item != NULL )
+ {
+ if ( m_defaultSuggestionItem == item )
+ m_defaultSuggestionItem = NULL;
+ m_checkBoxForceDefault->setEnabled( m_defaultSuggestionItem != NULL );
+
+ delete item;
+ emit configChanged();
+ }
+ updateGUI();
+ }
+
+ void SettingsIdSuggestions::slotMoveUpIdSuggestion()
+ {
+ IdSuggestionsListViewItem * item = dynamic_cast<IdSuggestionsListViewItem*>( m_listIdSuggestions->selectedItem() );
+ if ( item != NULL && item -> itemAbove() != NULL )
+ {
+ IdSuggestionsListViewItem *itemAbove = dynamic_cast<IdSuggestionsListViewItem*>( item->itemAbove() );
+ QString text = item->originalText();
+ item->setText( 0, itemAbove->originalText( ) );
+ itemAbove->setText( 0, text );
+ m_listIdSuggestions->setCurrentItem( itemAbove );
+ m_listIdSuggestions->ensureItemVisible( itemAbove );
+
+ if ( m_defaultSuggestionItem == itemAbove )
+ {
+ itemAbove->setPixmap( 0, SmallIcon( "filter" ) );
+ m_defaultSuggestionItem = item;
+ }
+ else if ( m_defaultSuggestionItem == item )
+ {
+ item->setPixmap( 0, SmallIcon( "filter" ) );
+ m_defaultSuggestionItem = itemAbove;
+ }
+ if ( m_defaultSuggestionItem != NULL )
+ m_defaultSuggestionItem->setPixmap( 0, SmallIcon( "favorites" ) );
+ }
+ }
+
+ void SettingsIdSuggestions::slotMoveDownIdSuggestion()
+ {
+ IdSuggestionsListViewItem * item = dynamic_cast<IdSuggestionsListViewItem*>( m_listIdSuggestions->selectedItem() );
+ if ( item != NULL && item -> itemBelow() != NULL )
+ {
+ IdSuggestionsListViewItem *itemBelow = dynamic_cast<IdSuggestionsListViewItem*>( item->itemBelow() );
+ QString text = item->originalText();
+ item->setText( 0, itemBelow->originalText( ) );
+ itemBelow->setText( 0, text );
+ m_listIdSuggestions->setCurrentItem( itemBelow );
+ m_listIdSuggestions->ensureItemVisible( itemBelow );
+
+ if ( m_defaultSuggestionItem == itemBelow )
+ {
+ itemBelow->setPixmap( 0, SmallIcon( "filter" ) );
+ m_defaultSuggestionItem = item;
+ }
+ else if ( m_defaultSuggestionItem == item )
+ {
+ item->setPixmap( 0, SmallIcon( "filter" ) );
+ m_defaultSuggestionItem = itemBelow;
+ }
+ if ( m_defaultSuggestionItem != NULL )
+ m_defaultSuggestionItem->setPixmap( 0, SmallIcon( "favorites" ) );
+ }
+ }
+
+ void SettingsIdSuggestions::slotToggleDefault()
+ {
+ if ( m_defaultSuggestionItem != NULL )
+ m_defaultSuggestionItem->setPixmap( 0, SmallIcon( "filter" ) );
+
+ QListViewItem *item = m_listIdSuggestions->selectedItem();
+ if ( item == m_defaultSuggestionItem )
+ m_defaultSuggestionItem = NULL;
+ else
+ {
+ m_defaultSuggestionItem = item;
+ m_defaultSuggestionItem->setPixmap( 0, SmallIcon( "favorites" ) );
+ }
+ m_checkBoxForceDefault->setEnabled( m_defaultSuggestionItem != NULL );
+ }
+
+ void SettingsIdSuggestions::slotEditSmallWordsChanged( const QString &newWord )
+ {
+ bool result = !newWord.isEmpty();
+
+ for ( QListViewItemIterator it( m_listSmallWords ); result && it.current(); ++it )
+ result &= it.current()->text( 0 ) != newWord;
+
+ m_buttonAddSmallWord->setEnabled( result );
+ }
+
+ void SettingsIdSuggestions::slotAddSmallWord()
+ {
+ new KListViewItem( m_listSmallWords, m_lineEditSmallWords->text() );
+ m_lineEditSmallWords->setText( "" );
+ emit configChanged();
+ }
+
+ void SettingsIdSuggestions::slotDeleteSmallWord()
+ {
+ bool changed = false;
+ QListViewItemIterator it( m_listSmallWords, QListViewItemIterator::Selected );
+ while ( it.current() )
+ {
+ QListViewItem *cur = it.current();
+ ++it;
+ delete cur;
+ changed = true;
+ }
+
+ if ( changed )
+ emit configChanged();
+ }
+
+ void SettingsIdSuggestions::slotListSmallWordsChanged()
+ {
+ QListViewItemIterator it( m_listSmallWords, QListViewItemIterator::Selected );
+ m_buttonDeleteSmallWord->setEnabled( it.current() != NULL );
+ }
+
+ void SettingsIdSuggestions::updateGUI()
+ {
+ QListViewItem *item = m_listIdSuggestions->selectedItem();
+ bool selected = item != NULL;
+ m_buttonEditIdSuggestion->setEnabled( selected );
+ m_buttonDeleteIdSuggestion->setEnabled( selected );
+ m_buttonMoveDownIdSuggestion->setEnabled( selected && item->itemBelow() != NULL );
+ m_buttonMoveUpIdSuggestion->setEnabled( selected && item->itemAbove() != NULL );
+ m_buttonToggleDefault->setEnabled( selected );
+ }
+
+ void SettingsIdSuggestions::setupGUI()
+ {
+ QGridLayout * gridLayout = new QGridLayout( this, 13, 2, 0, KDialog::spacingHint(), "gridLayout" );
+ gridLayout->setRowStretch( 6, 2 );
+ gridLayout->setRowSpacing( 8, KDialog::spacingHint() );
+ gridLayout->setRowStretch( 12, 1 );
+ gridLayout->setColStretch( 0, 1 );
+
+ m_listIdSuggestions = new KListView( this );
+ m_listIdSuggestions->setSorting( -1, FALSE );
+ m_listIdSuggestions->addColumn( i18n( "Id Suggestions" ) );
+ m_listIdSuggestions->header()->setClickEnabled( FALSE );
+ m_listIdSuggestions->setFullWidth( true );
+ gridLayout->addMultiCellWidget( m_listIdSuggestions, 0, 6, 0, 0 );
+ connect( m_listIdSuggestions, SIGNAL( selectionChanged() ), this, SLOT( updateGUI() ) );
+ connect( m_listIdSuggestions, SIGNAL( currentChanged( QListViewItem * ) ), this, SLOT( updateGUI() ) );
+ connect( m_listIdSuggestions, SIGNAL( doubleClicked( QListViewItem*, const QPoint &, int ) ), this, SLOT( slotEditIdSuggestion() ) );
+
+ m_buttonNewIdSuggestion = new KPushButton( i18n( "id suggestion", "New" ), this );
+ m_buttonNewIdSuggestion->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+ gridLayout->addWidget( m_buttonNewIdSuggestion, 0, 1 );
+ connect( m_buttonNewIdSuggestion, SIGNAL( clicked() ), this, SLOT( slotNewIdSuggestion() ) );
+ m_buttonEditIdSuggestion = new KPushButton( i18n( "id suggestion", "Edit" ), this );
+ m_buttonEditIdSuggestion->setIconSet( QIconSet( SmallIcon( "edit" ) ) );
+ gridLayout->addWidget( m_buttonEditIdSuggestion, 1, 1 );
+ connect( m_buttonEditIdSuggestion, SIGNAL( clicked() ), this, SLOT( slotEditIdSuggestion() ) );
+ m_buttonDeleteIdSuggestion = new KPushButton( i18n( "id suggestion", "Delete" ), this );
+ m_buttonDeleteIdSuggestion->setIconSet( QIconSet( SmallIcon( "editdelete" ) ) );
+ gridLayout->addWidget( m_buttonDeleteIdSuggestion, 2, 1 );
+ connect( m_buttonDeleteIdSuggestion, SIGNAL( clicked() ), this, SLOT( slotDeleteIdSuggestion() ) );
+ m_buttonMoveUpIdSuggestion = new KPushButton( i18n( "id suggestion", "Up" ), this );
+ m_buttonMoveUpIdSuggestion->setIconSet( QIconSet( SmallIcon( "up" ) ) );
+ gridLayout->addWidget( m_buttonMoveUpIdSuggestion, 3, 1 );
+ connect( m_buttonMoveUpIdSuggestion, SIGNAL( clicked() ), this, SLOT( slotMoveUpIdSuggestion() ) );
+ m_buttonMoveDownIdSuggestion = new KPushButton( i18n( "id suggestion", "Down" ), this );
+ m_buttonMoveDownIdSuggestion->setIconSet( QIconSet( SmallIcon( "down" ) ) );
+ gridLayout->addWidget( m_buttonMoveDownIdSuggestion, 4, 1 );
+ connect( m_buttonMoveDownIdSuggestion, SIGNAL( clicked() ), this, SLOT( slotMoveDownIdSuggestion() ) );
+ m_buttonToggleDefault = new KPushButton( i18n( "Toogle default" ), this );
+ m_buttonToggleDefault->setIconSet( QIconSet( SmallIcon( "favorites" ) ) );
+ gridLayout->addWidget( m_buttonToggleDefault, 5, 1 );
+ connect( m_buttonToggleDefault, SIGNAL( clicked() ), this, SLOT( slotToggleDefault() ) );
+
+ m_checkBoxForceDefault = new QCheckBox( i18n( "Use default id suggestion when editing new entries" ), this );
+ gridLayout->addMultiCellWidget( m_checkBoxForceDefault, 7, 7, 0, 1 );
+
+ QLabel *label = new QLabel( i18n( "Small Words:" ), this );
+ gridLayout->addMultiCellWidget( label, 9, 9, 0, 1 );
+ m_lineEditSmallWords = new KLineEdit( this );
+ label->setBuddy( m_lineEditSmallWords );
+ gridLayout->addWidget( m_lineEditSmallWords, 10, 0 );
+ connect( m_lineEditSmallWords, SIGNAL( textChanged( const QString & ) ), this, SLOT( slotEditSmallWordsChanged( const QString & ) ) );
+ m_buttonAddSmallWord = new KPushButton( i18n( "Add" ), this );
+ m_buttonAddSmallWord->setEnabled( false );
+ m_buttonAddSmallWord->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+ gridLayout->addWidget( m_buttonAddSmallWord, 10, 1 );
+ connect( m_buttonAddSmallWord, SIGNAL( clicked() ), this, SLOT( slotAddSmallWord() ) );
+
+ m_listSmallWords = new KListView( this );
+ m_listSmallWords->addColumn( i18n( "Small Words" ) );
+ m_listSmallWords->header()->setClickEnabled( true );
+ m_listSmallWords->setFullWidth( true );
+ connect( m_listSmallWords, SIGNAL( selectionChanged() ), this, SLOT( slotListSmallWordsChanged() ) );
+ connect( m_listSmallWords, SIGNAL( currentChanged( QListViewItem * ) ), this, SLOT( slotListSmallWordsChanged() ) );
+ gridLayout->addMultiCellWidget( m_listSmallWords, 11, 12, 0, 0 );
+ m_buttonDeleteSmallWord = new KPushButton( i18n( "Delete" ), this );
+ m_buttonDeleteSmallWord->setEnabled( false );
+ m_buttonDeleteSmallWord->setIconSet( QIconSet( SmallIcon( "editdelete" ) ) );
+ gridLayout->addWidget( m_buttonDeleteSmallWord, 11, 1 );
+ connect( m_buttonDeleteSmallWord, SIGNAL( clicked() ), this, SLOT( slotDeleteSmallWord() ) );
+ }
+}
+
+#include "settingsidsuggestions.moc"
diff --git a/src/settingsidsuggestions.h b/src/settingsidsuggestions.h
new file mode 100644
index 0000000..cbde362
--- /dev/null
+++ b/src/settingsidsuggestions.h
@@ -0,0 +1,108 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXSETTINGSIDSUGGESTIONS_H
+#define KBIBTEXSETTINGSIDSUGGESTIONS_H
+
+#include <qwidget.h>
+
+#include <klistview.h>
+
+#include <entry.h>
+
+class QRegExpValidator;
+class QCheckBox;
+
+class KPushButton;
+class KLineEdit;
+
+namespace KBibTeX
+{
+
+ class IdSuggestionsListViewItem: public KListViewItem
+ {
+ public:
+ IdSuggestionsListViewItem( KListView *, const QString&, BibTeX::Entry *example );
+ IdSuggestionsListViewItem( KListView *, KListViewItem *, const QString&, BibTeX::Entry *example );
+ void setText( int, const QString& );
+ QString originalText() const;
+ int width( const QFontMetrics &, const QListView *, int ) const;
+
+ private:
+ QString m_original;
+ BibTeX::Entry *m_example;
+ QString parse( const QString& );
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class SettingsIdSuggestions : public QWidget
+ {
+ Q_OBJECT
+ public:
+ SettingsIdSuggestions( QWidget *parent = 0, const char *name = 0 );
+ ~SettingsIdSuggestions();
+
+ void applyData();
+ void readData();
+
+ signals:
+ void configChanged();
+
+ protected slots:
+ void slotConfigChanged();
+
+ private slots:
+ void slotNewIdSuggestion();
+ void slotEditIdSuggestion();
+ void slotDeleteIdSuggestion();
+ void slotMoveUpIdSuggestion();
+ void slotMoveDownIdSuggestion();
+ void slotToggleDefault();
+ void slotEditSmallWordsChanged( const QString & );
+ void slotAddSmallWord();
+ void slotDeleteSmallWord();
+ void slotListSmallWordsChanged();
+ void updateGUI();
+
+ private:
+ KListView *m_listIdSuggestions;
+ KPushButton *m_buttonNewIdSuggestion;
+ KPushButton *m_buttonEditIdSuggestion;
+ KPushButton *m_buttonDeleteIdSuggestion;
+ KPushButton *m_buttonMoveUpIdSuggestion;
+ KPushButton *m_buttonMoveDownIdSuggestion;
+ KPushButton *m_buttonToggleDefault;
+ QCheckBox *m_checkBoxForceDefault;
+ KListView *m_listSmallWords;
+ KLineEdit *m_lineEditSmallWords;
+ KPushButton *m_buttonAddSmallWord;
+ KPushButton *m_buttonDeleteSmallWord;
+ QRegExpValidator *m_validator;
+ QListViewItem *m_defaultSuggestionItem;
+ static QString exampleBibTeXEntry;
+ BibTeX::Entry *m_example;
+
+ void setupGUI();
+ };
+
+}
+
+#endif
diff --git a/src/settingskeyword.cpp b/src/settingskeyword.cpp
new file mode 100644
index 0000000..6667e01
--- /dev/null
+++ b/src/settingskeyword.cpp
@@ -0,0 +1,194 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlayout.h>
+#include <qpushbutton.h>
+#include <qheader.h>
+#include <qtimer.h>
+#include <qtooltip.h>
+
+#include <klistview.h>
+#include <kdialog.h>
+#include <kiconloader.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+
+#include <file.h>
+#include <entryfield.h>
+#include <value.h>
+#include <entry.h>
+#include <settings.h>
+#include "settingskeyword.h"
+
+namespace KBibTeX
+{
+
+ SettingsKeyword::SettingsKeyword( QWidget *parent, const char *name ) : QWidget( parent, name ), m_keywords( NULL )
+ {
+ setupGUI();
+ }
+
+ SettingsKeyword::~SettingsKeyword()
+ {
+ // nothing
+ }
+
+ void SettingsKeyword::applyData()
+ {
+ Settings * settings = Settings::self();
+ settings->keyword_GlobalList.clear();
+ for ( QListViewItemIterator it = QListViewItemIterator( m_listKeywords ); it.current() != NULL; ++it )
+ settings->keyword_GlobalList.append( it.current() ->text( 0 ) );
+ settings->keyword_GlobalList.sort();
+ }
+
+ void SettingsKeyword::readData()
+ {
+ Settings * settings = Settings::self();
+ m_listKeywords->clear();
+ for ( QStringList::Iterator it = settings->keyword_GlobalList.begin(); it != settings->keyword_GlobalList.end(); ++it )
+ {
+ KListViewItem *item = new KListViewItem( m_listKeywords, *it );
+ item->setPixmap( 0, SmallIcon( "package" ) );
+ }
+
+// Settings * settings = Settings::self();
+ BibTeX::File *bibtexFile = settings->currentBibTeXFile;
+// m_keywordsFromFile.clear();
+ if ( bibtexFile != NULL )
+// {
+ m_keywordsFromFile = bibtexFile->getAllValuesAsStringList( BibTeX::EntryField::ftKeywords );
+
+ m_buttonImportKeywords->setEnabled( m_keywordsFromFile.size() > 0 );
+ }
+
+ void SettingsKeyword::slotNewKeyword()
+ {
+ KListViewItem * item = new KListViewItem( m_listKeywords, i18n( "New Keyword" ) );
+ item->setPixmap( 0, SmallIcon( "package" ) );
+ m_listKeywords->setSelected( item, TRUE );
+ m_listKeywords->ensureItemVisible( item );
+ QTimer::singleShot( 100, this, SLOT( slotEditKeyword() ) );
+ }
+
+ void SettingsKeyword::slotEditKeyword()
+ {
+ KListViewItem * item = static_cast<KListViewItem*>( m_listKeywords->selectedItem() );
+ if ( item != NULL )
+ {
+ m_oldText = item->text( 0 );
+ m_listKeywords->rename( item, 0 );
+ }
+ }
+
+ void SettingsKeyword::slotDeleteKeyword()
+ {
+ KListViewItem * item = static_cast<KListViewItem*>( m_listKeywords->selectedItem() );
+ if ( item != NULL )
+ {
+ delete item;
+ emit configChanged();
+ }
+ updateGUI();
+ }
+
+ void SettingsKeyword::slotImportKeywords()
+ {
+ int numImported = m_keywordsFromFile.size();
+ for ( QListViewItemIterator it = QListViewItemIterator( m_listKeywords ); it.current() != NULL; ++it )
+ {
+ QString text = it.current() ->text( 0 );
+ if ( !m_keywordsFromFile.contains( text ) )
+ m_keywordsFromFile.append( text );
+ else
+ numImported--;
+ }
+
+ m_keywordsFromFile.sort();
+ m_listKeywords->clear();
+ for ( QStringList::Iterator it = m_keywordsFromFile.begin(); it != m_keywordsFromFile.end(); ++it )
+ {
+ KListViewItem *item = new KListViewItem( m_listKeywords, *it );
+ item->setPixmap( 0, SmallIcon( "package" ) );
+ }
+
+ KMessageBox::information( this, i18n( "1 keyword has been imported.", "%n keywords have been imported.", numImported ), i18n( "Keywords imported" ) );
+
+ m_buttonImportKeywords->setEnabled( FALSE );
+ }
+
+ void SettingsKeyword::slotItemRenamed( QListViewItem *item )
+ {
+ QString newText = item->text( 0 ).stripWhiteSpace();
+ if ( newText.isEmpty() )
+ item->setText( 0, m_oldText );
+ else
+ {
+ item->setText( 0, newText );
+ emit configChanged();
+ }
+ updateGUI();
+ }
+
+ void SettingsKeyword::updateGUI()
+ {
+ bool selected = m_listKeywords->selectedItem() != NULL;
+ m_buttonEditKeyword->setEnabled( selected );
+ m_buttonDeleteKeyword->setEnabled( selected );
+ }
+
+ void SettingsKeyword::setupGUI()
+ {
+ QGridLayout * gridLayout = new QGridLayout( this, 5, 2, 0, KDialog::spacingHint(), "gridLayout" );
+
+ m_listKeywords = new KListView( this );
+ m_listKeywords->addColumn( i18n( "Keywords" ) );
+ m_listKeywords->header()->setClickEnabled( FALSE );
+ m_listKeywords->setFullWidth( true );
+ gridLayout->addMultiCellWidget( m_listKeywords, 0, 4, 0, 0 );
+
+ m_buttonNewKeyword = new QPushButton( i18n( "keyword", "New" ), this );
+ m_buttonNewKeyword->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+ gridLayout->addWidget( m_buttonNewKeyword, 0, 1 );
+ m_buttonEditKeyword = new QPushButton( i18n( "keyword", "Edit" ), this );
+ m_buttonEditKeyword->setIconSet( QIconSet( SmallIcon( "edit" ) ) );
+ gridLayout->addWidget( m_buttonEditKeyword, 1, 1 );
+ m_buttonDeleteKeyword = new QPushButton( i18n( "keyword", "Delete" ), this );
+ m_buttonDeleteKeyword->setIconSet( QIconSet( SmallIcon( "editdelete" ) ) );
+ gridLayout->addWidget( m_buttonDeleteKeyword, 2, 1 );
+
+ m_buttonImportKeywords = new QPushButton( i18n( "keyword", "Import" ), this );
+ m_buttonImportKeywords->setIconSet( QIconSet( SmallIcon( "openfile" ) ) );
+ QToolTip::add( m_buttonImportKeywords, "Import all keywords from the current BibTeX file" );
+ gridLayout->addWidget( m_buttonImportKeywords, 4, 1 );
+ connect( m_buttonImportKeywords, SIGNAL( clicked() ), this, SLOT( slotImportKeywords() ) );
+
+ connect( m_buttonNewKeyword, SIGNAL( clicked() ), this, SLOT( slotNewKeyword() ) );
+ connect( m_buttonEditKeyword, SIGNAL( clicked() ), this, SLOT( slotEditKeyword() ) );
+ connect( m_buttonDeleteKeyword, SIGNAL( clicked() ), this, SLOT( slotDeleteKeyword() ) );
+ connect( m_listKeywords, SIGNAL( selectionChanged() ), this, SLOT( updateGUI() ) );
+ connect( m_listKeywords, SIGNAL( currentChanged( QListViewItem * ) ), this, SLOT( updateGUI() ) );
+ connect( m_listKeywords, SIGNAL( doubleClicked( QListViewItem*, const QPoint &, int ) ), this, SLOT( slotEditKeyword() ) );
+ connect( m_listKeywords, SIGNAL( itemRenamed( QListViewItem* ) ), this, SLOT( slotItemRenamed( QListViewItem* ) ) );
+
+ updateGUI();
+ }
+
+}
+#include "settingskeyword.moc"
diff --git a/src/settingskeyword.h b/src/settingskeyword.h
new file mode 100644
index 0000000..516dfcb
--- /dev/null
+++ b/src/settingskeyword.h
@@ -0,0 +1,69 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXSETTINGSKEYWORD_H
+#define KBIBTEXSETTINGSKEYWORD_H
+
+#include <qwidget.h>
+
+class KListView;
+class QPushButton;
+
+namespace KBibTeX
+{
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class SettingsKeyword : public QWidget
+ {
+ Q_OBJECT
+ public:
+ SettingsKeyword( QWidget *parent = 0, const char *name = 0 );
+ ~SettingsKeyword();
+
+ void applyData();
+ void readData();
+
+ signals:
+ void configChanged();
+
+ private slots:
+ void slotNewKeyword();
+ void slotEditKeyword();
+ void slotDeleteKeyword();
+ void slotImportKeywords();
+ void slotItemRenamed( QListViewItem * );
+ void updateGUI();
+
+ private:
+ QStringList *m_keywords;
+ QStringList m_keywordsFromFile;
+ KListView *m_listKeywords;
+ QPushButton *m_buttonNewKeyword;
+ QPushButton *m_buttonEditKeyword;
+ QPushButton *m_buttonDeleteKeyword;
+ QPushButton *m_buttonImportKeywords;
+ QString m_oldText;
+
+ void setupGUI();
+ };
+}
+
+#endif
diff --git a/src/settingssearchurl.cpp b/src/settingssearchurl.cpp
new file mode 100644
index 0000000..3adfd6f
--- /dev/null
+++ b/src/settingssearchurl.cpp
@@ -0,0 +1,221 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlayout.h>
+#include <qlineedit.h>
+#include <qlabel.h>
+#include <qtooltip.h>
+#include <qheader.h>
+#include <qcombobox.h>
+
+#include <kiconloader.h>
+#include <klistview.h>
+#include <klocale.h>
+#include <kpushbutton.h>
+#include <kdialogbase.h>
+#include <kmessagebox.h>
+
+#include <settings.h>
+#include "settingssearchurl.h"
+
+namespace KBibTeX
+{
+ SettingsSearchURL::SettingsSearchURL( QWidget *parent, const char *name )
+ : QWidget( parent, name ), m_counter( 1 )
+ {
+ setupGUI();
+ }
+
+
+ SettingsSearchURL::~SettingsSearchURL()
+ {
+ // nothing
+ }
+
+ void SettingsSearchURL::applyData()
+ {
+ Settings * settings = Settings::self();
+ settings->searchURLs.clear();
+ for ( QListViewItemIterator it( m_listviewSearchURLs ); it.current(); it++ )
+ {
+ Settings::SearchURL *searchURL = new Settings::SearchURL;
+ searchURL->description = it.current() ->text( 0 );
+ searchURL->includeAuthor = it.current() ->text( 1 ) == i18n( "Yes" );
+ searchURL->url = it.current() ->text( 2 );
+ settings->searchURLs.append( searchURL );
+ }
+ }
+
+ void SettingsSearchURL::readData()
+ {
+ Settings * settings = Settings::self();
+
+ m_listviewSearchURLs->clear();
+ for ( QValueList<Settings::SearchURL*>::ConstIterator it = settings->searchURLs.begin(); it != settings->searchURLs.end(); ++it )
+ {
+ KListViewItem *item = new KListViewItem( m_listviewSearchURLs, ( *it ) ->description, ( *it ) ->includeAuthor ? i18n( "Yes" ) : i18n( "No" ), ( *it ) ->url );
+ item->setPixmap( 0, SmallIcon( "html" ) );
+ }
+ }
+
+ void SettingsSearchURL::slotNew()
+ {
+ urlDialog();
+ emit configChanged();
+ updateGUI();
+ }
+
+ void SettingsSearchURL::slotDelete()
+ {
+ QListViewItem * item = m_listviewSearchURLs->selectedItem();
+ if ( item != NULL )
+ {
+ m_listviewSearchURLs->removeItem( item );
+ emit configChanged();
+ }
+ updateGUI();
+ }
+
+ void SettingsSearchURL::slotEdit()
+ {
+ QListViewItem * item = m_listviewSearchURLs->selectedItem();
+ if ( item != NULL )
+ {
+ urlDialog( item );
+ emit configChanged();
+ }
+ updateGUI();
+ }
+
+ void SettingsSearchURL::slotReset()
+ {
+ if ( KMessageBox:: warningContinueCancel( this, i18n( "The list of URLs will be checked and known entries will be replaced by the program standards. Search entries you have defined by yourself will be kept most likely." ), i18n( "Reset list of URLs" ), KGuiItem( i18n( "Reset" ), "reload" ) ) == KMessageBox::Continue )
+ {
+ Settings::self() ->restoreDefaultSearchURLs();
+ readData();
+ emit configChanged();
+ }
+ updateGUI();
+ }
+
+ void SettingsSearchURL::updateGUI()
+ {
+ bool enable = m_listviewSearchURLs->selectedItem() != NULL;
+ m_pushbuttonEdit->setEnabled( enable );
+ m_pushbuttonDelete->setEnabled( enable );
+ }
+
+ void SettingsSearchURL::setupGUI()
+ {
+ QGridLayout * layout = new QGridLayout( this, 5, 2, 0, KDialog::spacingHint() );
+ layout->setRowStretch( 3, 1 );
+ layout->setColStretch( 0, 1 );
+
+ m_listviewSearchURLs = new KListView( this );
+ layout->addMultiCellWidget( m_listviewSearchURLs, 0, 4, 0, 0 );
+ m_listviewSearchURLs->setAllColumnsShowFocus( TRUE );
+ m_listviewSearchURLs->addColumn( i18n( "Description" ) );
+ m_listviewSearchURLs->addColumn( i18n( "Author" ) );
+ m_listviewSearchURLs->addColumn( i18n( "URL" ) );
+ m_listviewSearchURLs->header()->setClickEnabled( FALSE );
+ m_listviewSearchURLs->setFullWidth( true );
+ m_listviewSearchURLs->setMinimumWidth( 384 );
+
+ m_pushbuttonNew = new KPushButton( i18n( "search url", "New" ), this );
+ m_pushbuttonNew->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+ layout->addWidget( m_pushbuttonNew, 0, 1 );
+
+ m_pushbuttonEdit = new KPushButton( i18n( "search url", "Edit" ), this );
+ m_pushbuttonEdit->setIconSet( QIconSet( SmallIcon( "edit" ) ) );
+ layout->addWidget( m_pushbuttonEdit, 1, 1 );
+
+ m_pushbuttonDelete = new KPushButton( i18n( "search url", "Delete" ), this );
+ m_pushbuttonDelete->setIconSet( QIconSet( SmallIcon( "editdelete" ) ) );
+ layout->addWidget( m_pushbuttonDelete, 2, 1 );
+
+ m_pushbuttonReset = new KPushButton( i18n( "search url", "Reset" ), this );
+ m_pushbuttonReset->setIconSet( QIconSet( SmallIcon( "reload" ) ) );
+ layout->addWidget( m_pushbuttonReset, 4, 1 );
+
+ connect( m_pushbuttonNew, SIGNAL( clicked() ), this, SLOT( slotNew() ) );
+ connect( m_pushbuttonEdit, SIGNAL( clicked() ), this, SLOT( slotEdit() ) );
+ connect( m_listviewSearchURLs, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int ) ), this, SLOT( slotEdit() ) );
+ connect( m_pushbuttonDelete, SIGNAL( clicked() ), this, SLOT( slotDelete() ) );
+ connect( m_pushbuttonReset, SIGNAL( clicked() ), this, SLOT( slotReset() ) );
+ connect( m_listviewSearchURLs, SIGNAL( selectionChanged( QListViewItem * ) ), this, SLOT( updateGUI() ) );
+ connect( m_listviewSearchURLs, SIGNAL( currentChanged( QListViewItem * ) ), this, SLOT( updateGUI() ) );
+ connect( m_listviewSearchURLs, SIGNAL( onItem( QListViewItem * ) ), this, SLOT( updateGUI() ) );
+
+ updateGUI();
+ }
+
+ void SettingsSearchURL::urlDialog( QListViewItem * item )
+ {
+ KDialogBase * dlg = new KDialogBase( this, "urldialog", TRUE, item == NULL ? i18n( "New URL" ) : i18n( "Edit URL" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, TRUE );
+ QWidget *container = new QWidget( dlg, "container" );
+ QGridLayout *layout = new QGridLayout( container, 3, 2, 0, KDialog::spacingHint() );
+ QLabel *label = new QLabel( i18n( "Description:" ), container );
+ layout->addWidget( label, 0, 0 );
+ QLineEdit *descr = new QLineEdit( container );
+ label->setBuddy( descr );
+ layout->addWidget( descr, 0, 1 );
+ label = new QLabel( i18n( "URL:" ), container );
+ layout->addWidget( label, 1, 0 );
+ QLineEdit *url = new QLineEdit( container );
+ layout->addWidget( url, 1, 1 );
+ label->setBuddy( url );
+ url->setMinimumWidth( 384 );
+ QToolTip::add( url, i18n( "Within the URL, '%1' will be replaced by the search term." ) );
+ label = new QLabel( i18n( "Include Author:" ), container );
+ layout->addWidget( label, 2, 0 );
+ QComboBox *cbIncludeAuthor = new QComboBox( FALSE, container );
+ layout->addWidget( cbIncludeAuthor, 2, 1 );
+ label->setBuddy( cbIncludeAuthor );
+ cbIncludeAuthor->insertItem( i18n( "Yes" ) );
+ cbIncludeAuthor->insertItem( i18n( "No" ) );
+
+ dlg->setMainWidget( container );
+
+ if ( item != NULL )
+ {
+ descr->setText( item->text( 0 ) );
+ url->setText( item->text( 2 ) );
+ cbIncludeAuthor->setCurrentItem( item->text( 1 ) == i18n( "Yes" ) ? 0 : 1 );
+ }
+
+ if ( dlg->exec() == QDialog::Accepted )
+ {
+ if ( item == NULL )
+ {
+ KListViewItem *item = new KListViewItem( m_listviewSearchURLs, descr->text(), cbIncludeAuthor->currentItem() == 0 ? i18n( "Yes" ) : i18n( "No" ), url->text() );
+ item->setPixmap( 0, SmallIcon( "html" ) );
+ }
+ else
+ {
+ item->setText( 0, descr->text() );
+ item->setText( 1, cbIncludeAuthor->currentItem() == 0 ? i18n( "Yes" ) : i18n( "No" ) );
+ item->setText( 2, url->text() );
+ }
+ }
+
+ delete dlg;
+ }
+}
+
+#include "settingssearchurl.moc"
diff --git a/src/settingssearchurl.h b/src/settingssearchurl.h
new file mode 100644
index 0000000..7cc4f5a
--- /dev/null
+++ b/src/settingssearchurl.h
@@ -0,0 +1,68 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef SETTINGSSEARCHURL_H
+#define SETTINGSSEARCHURL_H
+
+#include <qwidget.h>
+
+class QLineEdit;
+class KPushButton;
+class KListView;
+class QListViewItem;
+
+namespace KBibTeX
+{
+ class SettingsSearchURL : public QWidget
+ {
+ Q_OBJECT
+ public:
+ SettingsSearchURL( QWidget *parent = 0, const char *name = 0 );
+ ~SettingsSearchURL();
+
+ void applyData();
+ void readData();
+
+ signals:
+ void configChanged();
+
+ private slots:
+ void slotNew();
+ void slotEdit();
+ void slotDelete();
+ void slotReset();
+ void updateGUI();
+
+ private:
+ KPushButton *m_pushbuttonNew;
+ KPushButton *m_pushbuttonEdit;
+ KPushButton *m_pushbuttonDelete;
+ KListView *m_listviewSearchURLs;
+ KPushButton *m_pushbuttonReset;
+
+ int m_counter;
+
+ void setupGUI();
+
+ void urlDialog( QListViewItem * item = NULL );
+
+ };
+}
+
+#endif
diff --git a/src/settingsuserdefinedinput.cpp b/src/settingsuserdefinedinput.cpp
new file mode 100644
index 0000000..dc903bc
--- /dev/null
+++ b/src/settingsuserdefinedinput.cpp
@@ -0,0 +1,264 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qlayout.h>
+#include <qheader.h>
+#include <qlabel.h>
+#include <qtooltip.h>
+
+#include <kdialog.h>
+#include <kdialogbase.h>
+#include <klineedit.h>
+#include <kcombobox.h>
+#include <klistview.h>
+#include <kdialog.h>
+#include <kiconloader.h>
+#include <kpushbutton.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+
+#include <settings.h>
+#include <fieldlineedit.h>
+#include "settingsuserdefinedinput.h"
+
+namespace KBibTeX
+{
+
+ SettingsUserDefinedInput::SettingsUserDefinedInput( QWidget *parent, const char *name ) : QWidget( parent, name )
+ {
+ setupGUI();
+ }
+
+ SettingsUserDefinedInput::~SettingsUserDefinedInput()
+ {
+ // nothing
+ }
+
+ void SettingsUserDefinedInput::applyData()
+ {
+ Settings *settings = Settings::self( NULL );
+ settings->userDefinedInputFields.clear();
+ for ( QListViewItemIterator it( m_listFields ); it.current(); ++it )
+ {
+ Settings::UserDefinedInputFields *udif = new Settings::UserDefinedInputFields();
+ udif->name = it.current()->text( 0 );
+ udif->label = it.current()->text( 1 );
+ udif->inputType = it.current()->text( 2 ) == i18n( "Single line" ) ? FieldLineEdit::itSingleLine : FieldLineEdit::itMultiLine;
+ settings->userDefinedInputFields << udif;
+ }
+ }
+
+ void SettingsUserDefinedInput::readData()
+ {
+ m_listFields->clear();
+ Settings *settings = Settings::self( NULL );
+ KListViewItem *prev = NULL;
+ for ( QValueList<Settings::UserDefinedInputFields*>::iterator it = settings->userDefinedInputFields.begin(); it != settings->userDefinedInputFields.end(); ++it )
+ {
+ prev = new KListViewItem( m_listFields, prev, ( *it )->name, ( *it )->label, ( *it )->inputType == FieldLineEdit::itMultiLine ? i18n( "Multiple lines" ) : i18n( "Single line" ) );
+ }
+ }
+
+ void SettingsUserDefinedInput::slotNewField()
+ {
+ fieldDialog();
+ emit configChanged();
+ updateGUI();
+ }
+
+ void SettingsUserDefinedInput::slotEditField()
+ {
+ QListViewItem * item = m_listFields->selectedItem();
+ if ( item != NULL )
+ {
+ fieldDialog( item );
+ emit configChanged();
+ }
+ updateGUI();
+ }
+
+ void SettingsUserDefinedInput::slotDeleteField()
+ {
+ QListViewItem * item = m_listFields->selectedItem();
+ if ( item != NULL )
+ {
+ m_listFields->removeItem( item );
+ emit configChanged();
+ }
+ updateGUI();
+ }
+
+ void SettingsUserDefinedInput::slotMoveUpField()
+ {
+ QListViewItem *item = m_listFields->selectedItem();
+ if ( item != NULL && item -> itemAbove() != NULL )
+ {
+ QListViewItem *itemAbove = item->itemAbove();
+ for ( int i = 0; i < 3; ++i )
+ {
+ QString text = item->text( i );
+ item->setText( i, itemAbove->text( i ) );
+ itemAbove->setText( i, text );
+ }
+ m_listFields->setCurrentItem( itemAbove );
+ m_listFields->ensureItemVisible( itemAbove );
+ updateGUI();
+ }
+ }
+
+ void SettingsUserDefinedInput::slotMoveDownField()
+ {
+ QListViewItem *item = m_listFields->selectedItem();
+ if ( item != NULL && item -> itemBelow() != NULL )
+ {
+ QListViewItem *itemBelow = item->itemBelow();
+ for ( int i = 0; i < 3; ++i )
+ {
+ QString text = item->text( i );
+ item->setText( i, itemBelow->text( i ) );
+ itemBelow->setText( i, text );
+ }
+ m_listFields->setCurrentItem( itemBelow );
+ m_listFields->ensureItemVisible( itemBelow );
+ updateGUI();
+ }
+ }
+
+ void SettingsUserDefinedInput::updateGUI()
+ {
+ QListViewItem *item = m_listFields->selectedItem();
+ bool selected = item != NULL;
+ m_buttonEditField->setEnabled( selected );
+ m_buttonDeleteField->setEnabled( selected );
+ m_buttonMoveDownField->setEnabled( selected && item->itemBelow() != NULL );
+ m_buttonMoveUpField->setEnabled( selected && item->itemAbove() != NULL );
+ }
+
+ void SettingsUserDefinedInput::updateDialogGUI()
+ {
+ bool enable = !m_lineEditName->text().isEmpty() && !m_lineEditLabel->text().isEmpty();
+ fieldDlg->enableButtonOK( enable );
+ fieldDlg->enableButtonApply( enable );
+ }
+
+ void SettingsUserDefinedInput::setupGUI()
+ {
+ QGridLayout * gridLayout = new QGridLayout( this, 6, 2, 0, KDialog::spacingHint(), "gridLayout" );
+ gridLayout->setRowStretch( 5, 1 );
+ gridLayout->setColStretch( 0, 1 );
+
+ m_listFields = new KListView( this );
+ m_listFields->setSorting( -1, FALSE );
+ m_listFields->addColumn( i18n( "Name" ) );
+ m_listFields->header()->setClickEnabled( FALSE );
+ m_listFields->addColumn( i18n( "Label" ) );
+ m_listFields->header()->setClickEnabled( FALSE );
+ m_listFields->addColumn( i18n( "Type" ) );
+ m_listFields->header()->setClickEnabled( FALSE );
+ m_listFields->header()->setClickEnabled( FALSE );
+ m_listFields->setFullWidth( true );
+ m_listFields->setMinimumWidth( 128 );
+ m_listFields->setAllColumnsShowFocus( TRUE );
+ gridLayout->addMultiCellWidget( m_listFields, 0, 5, 0, 0 );
+
+ m_buttonNewField = new KPushButton( i18n( "user-defined input", "New" ), this );
+ m_buttonNewField->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+ gridLayout->addWidget( m_buttonNewField, 0, 1 );
+ m_buttonEditField = new KPushButton( i18n( "user-defined input", "Edit" ), this );
+ m_buttonEditField->setIconSet( QIconSet( SmallIcon( "edit" ) ) );
+ gridLayout->addWidget( m_buttonEditField, 1, 1 );
+ m_buttonDeleteField = new KPushButton( i18n( "user-defined input", "Delete" ), this );
+ m_buttonDeleteField->setIconSet( QIconSet( SmallIcon( "editdelete" ) ) );
+ gridLayout->addWidget( m_buttonDeleteField, 2, 1 );
+ m_buttonMoveUpField = new KPushButton( i18n( "user-defined input", "Up" ), this );
+ m_buttonMoveUpField->setIconSet( QIconSet( SmallIcon( "up" ) ) );
+ gridLayout->addWidget( m_buttonMoveUpField, 3, 1 );
+ connect( m_buttonMoveUpField, SIGNAL( clicked() ), this, SLOT( slotMoveUpField() ) );
+ m_buttonMoveDownField = new KPushButton( i18n( "user-defined input", "Down" ), this );
+ m_buttonMoveDownField->setIconSet( QIconSet( SmallIcon( "down" ) ) );
+ gridLayout->addWidget( m_buttonMoveDownField, 4, 1 );
+ connect( m_buttonMoveDownField, SIGNAL( clicked() ), this, SLOT( slotMoveDownField() ) );
+
+ connect( m_buttonNewField, SIGNAL( clicked() ), this, SLOT( slotNewField() ) );
+ connect( m_buttonEditField, SIGNAL( clicked() ), this, SLOT( slotEditField() ) );
+ connect( m_buttonDeleteField, SIGNAL( clicked() ), this, SLOT( slotDeleteField() ) );
+ connect( m_listFields, SIGNAL( selectionChanged() ), this, SLOT( updateGUI() ) );
+ connect( m_listFields, SIGNAL( doubleClicked( QListViewItem*, const QPoint &, int ) ), this, SLOT( slotEditField() ) );
+ connect( m_listFields, SIGNAL( currentChanged( QListViewItem * ) ), this, SLOT( updateGUI() ) );
+
+ updateGUI();
+ }
+
+ void SettingsUserDefinedInput::fieldDialog( QListViewItem * item )
+ {
+ fieldDlg = new KDialogBase( this, "fieldDialog", TRUE, item == NULL ? i18n( "New Field" ) : i18n( "Edit Field" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, TRUE );
+ QWidget *container = new QWidget( fieldDlg, "container" );
+ QGridLayout *layout = new QGridLayout( container, 3, 2, 0, KDialog::spacingHint() );
+ QLabel *label = new QLabel( i18n( "Name:" ), container );
+ layout->addWidget( label, 0, 0 );
+ m_lineEditName = new KLineEdit( container );
+ label->setBuddy( m_lineEditName );
+ layout->addWidget( m_lineEditName, 0, 1 );
+ label = new QLabel( i18n( "Label:" ), container );
+ layout->addWidget( label, 1, 0 );
+ m_lineEditLabel = new KLineEdit( container );
+ layout->addWidget( m_lineEditLabel, 1, 1 );
+ label->setBuddy( m_lineEditLabel );
+ m_lineEditLabel->setMinimumWidth( 384 );
+ label = new QLabel( i18n( "Input Type:" ), container );
+ layout->addWidget( label, 2, 0 );
+ KComboBox *comboBoxInputType = new KComboBox( FALSE, container );
+ layout->addWidget( comboBoxInputType, 2, 1 );
+ label->setBuddy( comboBoxInputType );
+ comboBoxInputType->insertItem( i18n( "Single line" ) );
+ comboBoxInputType->insertItem( i18n( "Multiple lines" ) );
+
+ fieldDlg->setMainWidget( container );
+
+ if ( item != NULL )
+ {
+ m_lineEditName->setText( item->text( 0 ) );
+ m_lineEditLabel->setText( item->text( 1 ) );
+ comboBoxInputType->setCurrentItem( item->text( 2 ) == i18n( "Single line" ) ? 0 : 1 );
+ fieldDlg->enableButton( KDialogBase::Ok, true );
+ }
+ else
+ fieldDlg->enableButton( KDialogBase::Ok, false );
+
+ connect( m_lineEditName, SIGNAL( textChanged( const QString & ) ), this, SLOT( updateDialogGUI() ) );
+ connect( m_lineEditLabel, SIGNAL( textChanged( const QString & ) ), this, SLOT( updateDialogGUI() ) );
+ if ( fieldDlg->exec() == QDialog::Accepted )
+ {
+ if ( item == NULL )
+ {
+ /*KListViewItem *item = */
+ new KListViewItem( m_listFields, m_lineEditName->text(), m_lineEditLabel->text(), comboBoxInputType->currentItem() == 0 ? i18n( "Single line" ) : i18n( "Multiple lines" ) );
+ }
+ else
+ {
+ item->setText( 0, m_lineEditName->text() );
+ item->setText( 1, m_lineEditLabel->text() );
+ item->setText( 2, comboBoxInputType->currentItem() == 0 ? i18n( "Single line" ) : i18n( "Multiple lines" ) );
+ }
+ }
+
+ delete fieldDlg;
+ }
+}
+#include "settingsuserdefinedinput.moc"
diff --git a/src/settingsuserdefinedinput.h b/src/settingsuserdefinedinput.h
new file mode 100644
index 0000000..a06d7b0
--- /dev/null
+++ b/src/settingsuserdefinedinput.h
@@ -0,0 +1,74 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXSETTINGSUSERDEFINEDINPUT_H
+#define KBIBTEXSETTINGSUSERDEFINEDINPUT_H
+
+#include <qwidget.h>
+
+class KListView;
+class KPushButton;
+class KDialogBase;
+
+namespace KBibTeX
+{
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class SettingsUserDefinedInput : public QWidget
+ {
+ Q_OBJECT
+ public:
+ SettingsUserDefinedInput( QWidget *parent = 0, const char *name = 0 );
+ ~SettingsUserDefinedInput();
+
+ void applyData();
+ void readData();
+
+ signals:
+ void configChanged();
+
+ private slots:
+ void slotNewField();
+ void slotEditField();
+ void slotDeleteField();
+ void slotMoveUpField();
+ void slotMoveDownField();
+ void updateGUI();
+ void updateDialogGUI();
+
+ private:
+ KListView *m_listFields;
+ KPushButton *m_buttonNewField;
+ KPushButton *m_buttonEditField;
+ KPushButton *m_buttonDeleteField;
+ KPushButton *m_buttonMoveUpField;
+ KPushButton *m_buttonMoveDownField;
+ KDialogBase *fieldDlg;
+ KLineEdit *m_lineEditLabel;
+ KLineEdit *m_lineEditName;
+
+ void setupGUI();
+ void fieldDialog( QListViewItem * item = NULL );
+ };
+
+}
+
+#endif
diff --git a/src/settingsz3950.cpp b/src/settingsz3950.cpp
new file mode 100644
index 0000000..d2c3858
--- /dev/null
+++ b/src/settingsz3950.cpp
@@ -0,0 +1,364 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_YAZ
+
+#include <qlayout.h>
+#include <qtimer.h>
+#include <qheader.h>
+#include <qlabel.h>
+#include <qspinbox.h>
+#include <qregexp.h>
+
+#include <klistview.h>
+#include <kpushbutton.h>
+#include <kiconloader.h>
+#include <kdialogbase.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+#include <kcombobox.h>
+#include <klineedit.h>
+
+#include "settingsz3950.h"
+
+namespace KBibTeX
+{
+
+ ServerListViewItem::ServerListViewItem( KListView *list, const QString &_id, Settings::Z3950Server& _server, bool _newItem )
+ : KListViewItem( list, _server.name, _server.database ), server( _server ), id( _id ), newItem( _newItem )
+ {
+ // nothing
+ }
+
+ ServerListViewItem::ServerListViewItem( KListViewItem *item, const QString &_id, Settings::Z3950Server& _server, bool _newItem )
+ : KListViewItem( item, _server.name, _server.database ), server( _server ), id( _id ), newItem( _newItem )
+ {
+ // nothing
+ }
+
+ void ServerListViewItem::refresh( )
+ {
+ setText( 0, server.name );
+ setText( 1, server.database );
+ }
+
+ SettingsZ3950Edit::SettingsZ3950Edit( QString &id, Settings::Z3950Server& _server, QWidget *parent, const char *name )
+ : QWidget( parent, name ), m_id( id ), m_server( _server ), m_lineEditId( NULL )
+ {
+ QGridLayout *layout = new QGridLayout( this, 10, 2 , 0, KDialog::spacingHint() );
+ QLabel *label = NULL;
+
+ label = new QLabel( i18n( "Name:" ), this );
+ layout->addWidget( label, 1, 0 );
+ m_lineEditName = new KLineEdit( m_server.name, this );
+ layout->addWidget( m_lineEditName, 1, 1 );
+ label->setBuddy( m_lineEditName );
+
+ label = new QLabel( i18n( "Database:" ), this );
+ layout->addWidget( label, 2, 0 );
+ m_lineEditDatabase = new KLineEdit( m_server.database, this );
+ layout->addWidget( m_lineEditDatabase, 2, 1 );
+ label->setBuddy( m_lineEditDatabase );
+
+ label = new QLabel( i18n( "Host:" ), this );
+ layout->addWidget( label, 3, 0 );
+ m_lineEditHost = new KLineEdit( m_server.host, this );
+ layout->addWidget( m_lineEditHost, 3, 1 );
+ label->setBuddy( m_lineEditHost );
+
+ label = new QLabel( i18n( "Port:" ), this );
+ layout->addWidget( label, 4, 0 );
+ m_spinBoxPort = new QSpinBox( this );
+ m_spinBoxPort->setMinValue( 1 );
+ m_spinBoxPort->setMaxValue( 65535 );
+ m_spinBoxPort->setValue( m_server.port );
+ layout->addWidget( m_spinBoxPort, 4, 1 );
+ label->setBuddy( m_spinBoxPort );
+
+ label = new QLabel( i18n( "User:" ), this );
+ layout->addWidget( label, 5, 0 );
+ m_lineEditUser = new KLineEdit( m_server.user, this );
+ layout->addWidget( m_lineEditUser, 5, 1 );
+ label->setBuddy( m_lineEditUser );
+
+ label = new QLabel( i18n( "Password:" ), this );
+ layout->addWidget( label, 6, 0 );
+ m_lineEditPassword = new KLineEdit( m_server.password, this );
+ layout->addWidget( m_lineEditPassword, 6, 1 );
+ label->setBuddy( m_lineEditPassword );
+
+ label = new QLabel( i18n( "Syntax:" ), this );
+ layout->addWidget( label, 7, 0 );
+ m_comboBoxSyntax = new KComboBox( true, this );
+ layout->addWidget( m_comboBoxSyntax, 7, 1 );
+ label->setBuddy( m_comboBoxSyntax );
+ m_comboBoxSyntax->insertItem( "grs-1" );
+ m_comboBoxSyntax->insertItem( "marc21" );
+ m_comboBoxSyntax->insertItem( "mods" );
+ m_comboBoxSyntax->insertItem( "unimarc" );
+ m_comboBoxSyntax->insertItem( "usmarc" );
+ m_comboBoxSyntax->setCurrentText( m_server.syntax );
+
+ label = new QLabel( i18n( "Locale:" ), this );
+ layout->addWidget( label, 8, 0 );
+ m_comboBoxLocale = new KComboBox( true, this );
+ m_comboBoxLocale->setCurrentText( m_server.locale );
+ layout->addWidget( m_comboBoxLocale, 8, 1 );
+ label->setBuddy( m_comboBoxLocale );
+
+ label = new QLabel( i18n( "Charset:" ), this );
+ layout->addWidget( label, 9, 0 );
+ m_comboBoxCharset = new KComboBox( true, this );
+ layout->addWidget( m_comboBoxCharset, 9, 1 );
+ label->setBuddy( m_comboBoxCharset );
+ m_comboBoxCharset->insertItem( "iso-5426" );
+ m_comboBoxCharset->insertItem( "iso-8859-1" );
+ m_comboBoxCharset->insertItem( "marc8" );
+ m_comboBoxCharset->insertItem( "marc-8" );
+ m_comboBoxCharset->insertItem( "utf-8" );
+ m_comboBoxCharset->setCurrentText( m_server.charset );
+ }
+
+ SettingsZ3950Edit::~SettingsZ3950Edit()
+ {
+ // nothing
+ }
+
+ int SettingsZ3950Edit::execute( QWidget *parent, QString &id, Settings::Z3950Server &server )
+ {
+ KDialogBase *dlg = new KDialogBase( parent, "SettingsZ3950Edit", true, i18n( "Edit Z39.50 Server" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, false );
+ SettingsZ3950Edit *edit = new SettingsZ3950Edit( id, server, dlg, "SettingsZ3950Edit" );
+ dlg->setMainWidget( edit );
+ connect( dlg, SIGNAL( apply() ), edit, SLOT( slotApply() ) );
+ connect( dlg, SIGNAL( okClicked() ), edit, SLOT( slotApply() ) );
+
+ return dlg->exec();
+ }
+
+ void SettingsZ3950Edit::slotApply()
+ {
+ m_server.charset = m_comboBoxCharset->currentText();
+ m_server.database = m_lineEditDatabase->text();
+ m_server.host = m_lineEditHost->text();
+ m_server.locale = m_comboBoxLocale->currentText();
+ m_server.name = m_lineEditName->text();
+ m_server.syntax = m_comboBoxSyntax->currentText();
+ m_server.user = m_lineEditUser->text();
+ m_server.password = m_lineEditPassword->text();
+ m_server.port = m_spinBoxPort->value();
+
+ if ( m_id.isEmpty() )
+ {
+ m_id = QString( m_server.name ).lower().replace( QRegExp( "[^a-z0-9]" ), "" );
+ qDebug( "Setting id to %s", m_id.latin1() );
+ }
+ }
+
+ SettingsZ3950::SettingsZ3950( QWidget *parent, const char *name )
+ : QWidget( parent, name )
+ {
+ setupGUI();
+ }
+
+ SettingsZ3950::~SettingsZ3950()
+ {
+ // nothing
+ }
+
+ void SettingsZ3950::applyData()
+ {
+ Settings *settings = Settings::self();
+ settings->z3950_ServerList.clear();
+
+ for ( QListViewItemIterator it( m_listServers ); it.current(); ++it )
+ {
+ ServerListViewItem *item = dynamic_cast<ServerListViewItem*>( *it );
+ settings->z3950_ServerList[item->id] = item->server;
+ }
+ }
+
+ void SettingsZ3950::readData()
+ {
+ Settings *settings = Settings::self();
+ m_listServers->clear();
+
+ for ( QMap<QString, Settings::Z3950Server>::Iterator it = settings->z3950_ServerList.begin(); it != settings-> z3950_ServerList.end(); ++it )
+ {
+ ServerListViewItem *item = new ServerListViewItem( m_listServers, it.key(), it.data(), false );
+ item->setPixmap( 0, SmallIcon( "server" ) );
+ }
+
+ updateGUI();
+ }
+
+ void SettingsZ3950::slotNewServer()
+ {
+ Settings::Z3950Server server;
+ server.port = 2100;
+ ServerListViewItem * item = new ServerListViewItem( m_listServers, "", server, true );
+ item->setPixmap( 0, SmallIcon( "server" ) );
+ m_listServers->setSelected( item, TRUE );
+ QTimer::singleShot( 100, this, SLOT( slotEditServer() ) );
+ }
+
+ void SettingsZ3950::slotEditServer()
+ {
+ ServerListViewItem * item = static_cast<ServerListViewItem*>( m_listServers->selectedItem() );
+ if ( item != NULL )
+ {
+ if ( SettingsZ3950Edit::execute( this, item->id, item->server ) == QDialog::Accepted )
+ {
+ item->refresh();
+ emit configChanged();
+ }
+ else if ( item->newItem )
+ {
+ delete item;
+ updateGUI();
+ }
+ }
+ }
+
+ void SettingsZ3950::slotDeleteServer()
+ {
+ delete m_listServers->selectedItem();
+ emit configChanged();
+ updateGUI();
+ }
+
+ void SettingsZ3950::slotMoveUpServer()
+ {
+ ServerListViewItem * item = dynamic_cast<ServerListViewItem*>( m_listServers->selectedItem() );
+ ServerListViewItem *itemAbove = NULL;
+ if ( item != NULL && ( itemAbove = dynamic_cast<ServerListViewItem*>( item->itemAbove() ) ) != NULL )
+ {
+ Settings::Z3950Server server = item->server;
+ item->server = itemAbove->server;
+ itemAbove->server = server;
+ QString id = item->id;
+ item->id = itemAbove->id;
+ itemAbove->id = id;
+ for ( int i = 0; i < 2; ++i )
+ {
+ QString swap = item->text( i );
+ item->setText( i, itemAbove->text( i ) );
+ itemAbove->setText( i, swap );
+ }
+ m_listServers->setCurrentItem( itemAbove );
+ m_listServers->ensureItemVisible( itemAbove );
+ }
+ }
+
+ void SettingsZ3950::slotMoveDownServer()
+ {
+ ServerListViewItem * item = dynamic_cast<ServerListViewItem*>( m_listServers->selectedItem() );
+ ServerListViewItem *itemBelow = NULL;
+ if ( item != NULL && ( itemBelow = dynamic_cast<ServerListViewItem*>( item->itemBelow() ) ) != NULL )
+ {
+ Settings::Z3950Server server = item->server;
+ item->server = itemBelow->server;
+ itemBelow->server = server;
+ QString id = item->id;
+ item->id = itemBelow->id;
+ itemBelow->id = id;
+ for ( int i = 0; i < 2; ++i )
+ {
+ QString swap = item->text( i );
+ item->setText( i, itemBelow->text( i ) );
+ itemBelow->setText( i, swap );
+ }
+ m_listServers->setCurrentItem( itemBelow );
+ m_listServers->ensureItemVisible( itemBelow );
+ }
+ }
+
+ void SettingsZ3950::slotResetToDefault()
+ {
+ if ( KMessageBox::warningContinueCancel( this, i18n( "All Z39.50 server configurations will be reset to defaults." ), i18n( "Reset to Default" ), KGuiItem( i18n( "Reset" ), "reload" ) ) == KMessageBox::Continue )
+ {
+ Settings *settings = Settings::self();
+ settings->z3950clearAll();
+ settings->z3950loadDefault();
+ readData();
+ }
+ }
+
+ void SettingsZ3950::updateGUI()
+ {
+ QListViewItem *item = m_listServers->selectedItem();
+ bool selected = item != NULL;
+ m_buttonEditServer->setEnabled( selected );
+ m_buttonDeleteServer->setEnabled( selected );
+ m_buttonMoveDownServer->setEnabled( selected && item->itemBelow() != NULL );
+ m_buttonMoveUpServer->setEnabled( selected && item->itemAbove() != NULL );
+ }
+
+ void SettingsZ3950::setupGUI()
+ {
+ QGridLayout * gridLayout = new QGridLayout( this, 7, 2, 0, KDialog::spacingHint(), "gridLayout" );
+ gridLayout->setRowStretch( 5, 1 );
+ gridLayout->setColStretch( 0, 1 );
+
+ m_listServers = new KListView( this );
+ m_listServers->setSorting( -1, FALSE );
+ m_listServers->addColumn( i18n( "z3950 server", "Name" ) );
+ m_listServers->addColumn( i18n( "z3950 server", "Database" ) );
+ m_listServers->header()->setClickEnabled( FALSE );
+ m_listServers->setFullWidth( true );
+ m_listServers->setAllColumnsShowFocus( true );
+ gridLayout->addMultiCellWidget( m_listServers, 0, 7, 0, 0 );
+ connect( m_listServers, SIGNAL( selectionChanged() ), this, SLOT( updateGUI() ) );
+ connect( m_listServers, SIGNAL( currentChanged( QListViewItem * ) ), this, SLOT( updateGUI() ) );
+ connect( m_listServers, SIGNAL( doubleClicked( QListViewItem*, const QPoint &, int ) ), this, SLOT( slotEditServer() ) );
+
+ m_buttonNewServer = new KPushButton( i18n( "z3950 server", "New" ), this );
+ m_buttonNewServer->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+ gridLayout->addWidget( m_buttonNewServer, 0, 1 );
+ connect( m_buttonNewServer, SIGNAL( clicked() ), this, SLOT( slotNewServer() ) );
+ m_buttonEditServer = new KPushButton( i18n( "z3950 server", "Edit" ), this );
+ m_buttonEditServer->setIconSet( QIconSet( SmallIcon( "edit" ) ) );
+ gridLayout->addWidget( m_buttonEditServer, 1, 1 );
+ connect( m_buttonEditServer, SIGNAL( clicked() ), this, SLOT( slotEditServer() ) );
+ m_buttonDeleteServer = new KPushButton( i18n( "z3950 server", "Delete" ), this );
+ m_buttonDeleteServer->setIconSet( QIconSet( SmallIcon( "editdelete" ) ) );
+ gridLayout->addWidget( m_buttonDeleteServer, 2, 1 );
+ connect( m_buttonDeleteServer, SIGNAL( clicked() ), this, SLOT( slotDeleteServer() ) );
+ m_buttonMoveUpServer = new KPushButton( i18n( "z3950 server", "Up" ), this );
+ m_buttonMoveUpServer->setIconSet( QIconSet( SmallIcon( "up" ) ) );
+ gridLayout->addWidget( m_buttonMoveUpServer, 3, 1 );
+ connect( m_buttonMoveUpServer, SIGNAL( clicked() ), this, SLOT( slotMoveUpServer() ) );
+ m_buttonMoveDownServer = new KPushButton( i18n( "z3950 server", "Down" ), this );
+ m_buttonMoveDownServer->setIconSet( QIconSet( SmallIcon( "down" ) ) );
+ gridLayout->addWidget( m_buttonMoveDownServer, 4, 1 );
+ connect( m_buttonMoveDownServer, SIGNAL( clicked() ), this, SLOT( slotMoveDownServer() ) );
+
+ m_buttonResetToDefault = new KPushButton( i18n( "z3950 server", "Reset" ), this );
+ m_buttonResetToDefault->setIconSet( QIconSet( SmallIcon( "reload" ) ) );
+ gridLayout->addWidget( m_buttonResetToDefault, 6, 1 );
+ connect( m_buttonResetToDefault, SIGNAL( clicked() ), this, SLOT( slotResetToDefault() ) );
+ }
+
+}
+#include "settingsz3950.moc"
+
+#endif // HAVE_YAZ
diff --git a/src/settingsz3950.h b/src/settingsz3950.h
new file mode 100644
index 0000000..1b694db
--- /dev/null
+++ b/src/settingsz3950.h
@@ -0,0 +1,128 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_YAZ
+
+#ifndef KBIBTEXSETTINGSZ3950_H
+#define KBIBTEXSETTINGSZ3950_H
+
+#include <qwidget.h>
+
+#include <settings.h>
+
+class QSpinBox;
+class KPushButton;
+class KListView;
+class KLineEdit;
+class KComboBox;
+
+namespace KBibTeX
+{
+ class ServerListViewItem: public KListViewItem
+ {
+ public:
+ ServerListViewItem( KListView *, const QString &, Settings::Z3950Server& server, bool newItem );
+ ServerListViewItem( KListViewItem *, const QString &, Settings::Z3950Server& server, bool newItem );
+
+ void refresh();
+
+ public:
+ Settings::Z3950Server server;
+ QString id;
+ bool newItem;
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class SettingsZ3950Edit : public QWidget
+ {
+ Q_OBJECT
+ public:
+ ~SettingsZ3950Edit();
+
+ static int execute( QWidget *parent, QString &id, Settings::Z3950Server &server );
+
+ protected slots:
+ void slotApply();
+
+ protected:
+ SettingsZ3950Edit( QString &id, Settings::Z3950Server&, QWidget *parent = 0, const char *name = 0 );
+
+ private:
+ QString& m_id;
+ Settings::Z3950Server& m_server;
+ KLineEdit *m_lineEditId;
+ KLineEdit *m_lineEditName;
+ KLineEdit *m_lineEditHost;
+ QSpinBox *m_spinBoxPort;
+ KLineEdit *m_lineEditDatabase;
+ KLineEdit *m_lineEditUser;
+ KLineEdit *m_lineEditPassword;
+ KComboBox *m_comboBoxSyntax;
+ KComboBox *m_comboBoxLocale;
+ KComboBox *m_comboBoxCharset;
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class SettingsZ3950 : public QWidget
+ {
+ Q_OBJECT
+ public:
+ SettingsZ3950( QWidget *parent = 0, const char *name = 0 );
+ ~SettingsZ3950();
+
+ void applyData();
+ void readData();
+
+ signals:
+ void configChanged();
+
+ private slots:
+ void slotNewServer();
+ void slotEditServer();
+ void slotDeleteServer();
+ void slotMoveUpServer();
+ void slotMoveDownServer();
+ void slotResetToDefault();
+ void updateGUI();
+
+ private:
+ KListView *m_listServers;
+ KPushButton *m_buttonNewServer;
+ KPushButton *m_buttonEditServer;
+ KPushButton *m_buttonDeleteServer;
+ KPushButton *m_buttonMoveUpServer;
+ KPushButton *m_buttonMoveDownServer;
+ KPushButton *m_buttonResetToDefault;
+
+ void setupGUI();
+ };
+
+}
+
+#endif
+
+#endif // HAVE_YAZ
diff --git a/src/sidebar.cpp b/src/sidebar.cpp
new file mode 100644
index 0000000..399cabf
--- /dev/null
+++ b/src/sidebar.cpp
@@ -0,0 +1,255 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlayout.h>
+#include <qcombobox.h>
+#include <qheader.h>
+#include <qapplication.h>
+#include <qtooltip.h>
+#include <qstring.h>
+#include <qtoolbutton.h>
+
+#include <kdebug.h>
+#include <kpopupmenu.h>
+#include <klistview.h>
+#include <kdialog.h>
+#include <klocale.h>
+#include <kiconloader.h>
+
+#include <settings.h>
+#include <entry.h>
+#include "sidebar.h"
+
+namespace KBibTeX
+{
+
+ const BibTeX::EntryField::FieldType SideBar::importantFields[ 6 ] =
+ {
+ BibTeX::EntryField::ftAuthor, BibTeX::EntryField::ftBookTitle, BibTeX::EntryField::ftJournal, BibTeX::EntryField::ftTitle, BibTeX::EntryField::ftYear, BibTeX::EntryField::ftKeywords
+ };
+
+ SideBar::SideBar( bool isReadOnly, QWidget *parent, const char *name )
+ : QWidget( parent, name ), m_bibtexFile( NULL ), m_isReadOnly( isReadOnly ), m_popupMenu( NULL )
+ {
+ setupGUI();
+ }
+
+ SideBar::~SideBar()
+ {
+ // nothing
+ }
+
+ void SideBar::restoreState()
+ {
+ Settings * settings = Settings::self();
+ if ( settings->editing_UseSpecialFont )
+ m_listAvailableItems->setFont( settings->editing_SpecialFont );
+ else
+ m_listAvailableItems->setFont( KGlobalSettings::generalFont() );
+ m_listAvailableItems->header() ->setFont( KGlobalSettings::generalFont() );
+ }
+
+ void SideBar::refreshLists( BibTeX::File *bibtexFile )
+ {
+ if ( bibtexFile != NULL )
+ m_bibtexFile = bibtexFile;
+
+ QApplication::setOverrideCursor( Qt::waitCursor );
+ setEnabled( FALSE );
+
+ BibTeX::EntryField::FieldType fieldType = m_buttonToggleShowAll->isOn() ? ( BibTeX::EntryField::FieldType )( m_listTypeList->currentItem() + ( int ) BibTeX::EntryField::ftAbstract ) : importantFields[ m_listTypeList->currentItem()];
+
+ m_listAvailableItems->clear();
+ if ( m_bibtexFile != NULL )
+ {
+ QMap<QString, int> allValues = m_bibtexFile->getAllValuesAsStringListWithCount( fieldType );
+ for ( QMap<QString, int>::ConstIterator it = allValues.constBegin(); it != allValues.constEnd();++it )
+ {
+ QString text = it.key();
+ if ( !text.startsWith( "other" ) )
+ new SideBarListViewItem( m_listAvailableItems, QString::number( it.data() ), text );
+ }
+ }
+
+ setEnabled( TRUE );
+ QApplication::restoreOverrideCursor();
+ }
+
+ void SideBar::resizeEvent( QResizeEvent *event )
+ {
+ QSize widgetSize = size();
+ setEnabled( widgetSize.width() > 3 && widgetSize.height() > 3 );
+ QWidget::resizeEvent( event );
+ }
+
+ void SideBar::setupGUI()
+ {
+ QGridLayout * layout = new QGridLayout( this, 2, 3, 0, KDialog::spacingHint() );
+ layout->setColStretch( 0, 0 );
+ layout->setColStretch( 1, 10 );
+ layout->setColStretch( 2, 0 );
+
+ m_buttonToggleShowAll = new QToolButton( this );
+ layout->addWidget( m_buttonToggleShowAll, 0, 0 );
+ QIconSet showAllPixmap = KGlobal::iconLoader() ->loadIconSet( "taskbar", KIcon::Small );
+ m_buttonToggleShowAll->setIconSet( showAllPixmap );
+ m_buttonToggleShowAll->setToggleButton( TRUE );
+ QToolTip::add( m_buttonToggleShowAll, i18n( "Toggle between showing all fields or only important fields" ) );
+
+ m_listTypeList = new QComboBox( FALSE, this );
+ layout->addWidget( m_listTypeList, 0, 1 );
+ QToolTip::add( m_listTypeList, i18n( "Filter this sidebar for a given field" ) );
+
+ m_buttonToggleMultiSelect = new QToolButton( this );
+ layout->addWidget( m_buttonToggleMultiSelect, 0, 2 );
+ showAllPixmap = KGlobal::iconLoader() ->loadIconSet( "planner", KIcon::Small );
+ m_buttonToggleMultiSelect->setIconSet( showAllPixmap );
+ m_buttonToggleMultiSelect->setToggleButton( TRUE );
+ QToolTip::add( m_buttonToggleMultiSelect, i18n( "Toggle between selecting only one item or multiple items (AND-connected in search)" ) );
+
+ m_listAvailableItems = new KListView( this );
+ m_listAvailableItems->addColumn( i18n( "#" ) );
+ m_listAvailableItems->addColumn( i18n( "Items" ) );
+ m_listAvailableItems->setAllColumnsShowFocus( TRUE );
+ m_listAvailableItems->setFullWidth( true );
+ m_listAvailableItems->setSorting( 1 );
+ layout->addMultiCellWidget( m_listAvailableItems, 1, 1, 0, 2 );
+
+ m_popupMenu = new KPopupMenu( m_listAvailableItems );
+ m_popupMenu->insertItem( i18n( "Rename all occurrences" ), this, SLOT( startRenaming() ) );
+
+ connect( m_listAvailableItems, SIGNAL( selectionChanged() ), this, SLOT( prepareSearch() ) );
+ connect( m_listTypeList, SIGNAL( activated( int ) ), this, SLOT( refreshLists() ) );
+ connect( m_buttonToggleShowAll, SIGNAL( toggled( bool ) ), this, SLOT( toggleShowAll( bool ) ) );
+ connect( m_buttonToggleMultiSelect, SIGNAL( toggled( bool ) ), this, SLOT( toggleMultiSelect( bool ) ) );
+ connect( m_listAvailableItems, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint&, int ) ), this, SLOT( showContextMenu( QListViewItem*, const QPoint& ) ) );
+ connect( m_listAvailableItems, SIGNAL( itemRenamed( QListViewItem*, int, const QString& ) ), this, SLOT( endRenaming( QListViewItem*, int, const QString& ) ) );
+
+ toggleShowAll( FALSE );
+ }
+
+ void SideBar::setReadOnly( bool isReadOnly )
+ {
+ m_isReadOnly = isReadOnly;
+ }
+
+
+ void SideBar::prepareSearch()
+ {
+ BibTeX::EntryField::FieldType fieldType = m_buttonToggleShowAll->isOn() ? ( BibTeX::EntryField::FieldType )( m_listTypeList->currentItem() + ( int ) BibTeX::EntryField::ftAbstract ) : importantFields[ m_listTypeList->currentItem()];
+
+ QString text = "";
+ int countSelected = 0;
+ for ( QListViewItemIterator it( m_listAvailableItems, QListViewItemIterator::Selected ); it.current(); ++it, ++countSelected )
+ {
+ if ( !text.isEmpty() ) text += " ";
+ text += it.current()->text( 1 );
+ }
+
+ emit selected( text, countSelected <= 1 ? BibTeX::Element::ftExact : BibTeX::Element::ftEveryWord, fieldType );
+ }
+
+ void SideBar::toggleShowAll( bool showAll )
+ {
+ m_listTypeList->clear();
+
+ if ( showAll )
+ {
+ for ( int i = ( int ) BibTeX::EntryField::ftAbstract; i <= ( int ) BibTeX::EntryField::ftYear; i++ )
+ {
+ BibTeX::EntryField::FieldType fieldType = ( BibTeX::EntryField::FieldType ) i;
+ m_listTypeList->insertItem( Settings::fieldTypeToI18NString( fieldType ) );
+ }
+ m_listTypeList->setCurrentItem(( int ) BibTeX::EntryField::ftAuthor );
+ }
+ else
+ {
+ for ( int i = 0; i < 6;i++ )
+ m_listTypeList->insertItem( Settings::fieldTypeToI18NString( importantFields[ i ] ) );
+ m_listTypeList->setCurrentItem( 0 );
+ }
+
+ refreshLists();
+ }
+
+ void SideBar::toggleMultiSelect( bool multiSelect )
+ {
+ m_listAvailableItems->setSelectionMode( multiSelect ? QListView::Extended : QListView::Single );
+ m_listAvailableItems->clearSelection();
+ prepareSearch();
+ }
+
+ void SideBar::showContextMenu( QListViewItem * item, const QPoint & pos )
+ {
+ if ( item != NULL && !m_isReadOnly && m_popupMenu != NULL )
+ m_popupMenu->exec( pos );
+ }
+
+ void SideBar::startRenaming()
+ {
+ QListViewItem * item = m_listAvailableItems->selectedItem();
+ if ( item == NULL )
+ item = m_listAvailableItems->currentItem();
+
+ if ( item != NULL )
+ {
+ m_oldText = item->text( 1 );
+ item->setRenameEnabled( 1, TRUE );
+ item->startRename( 1 );
+ }
+ }
+
+ void SideBar::endRenaming( QListViewItem * item, int , const QString & text )
+ {
+ item->setRenameEnabled( 1, FALSE );
+ BibTeX::EntryField::FieldType fieldType = m_buttonToggleShowAll->isOn() ? ( BibTeX::EntryField::FieldType )( m_listTypeList->currentItem() + ( int ) BibTeX::EntryField::ftAbstract ) : importantFields[ m_listTypeList->currentItem()];
+ m_bibtexFile->replaceValue( m_oldText, text, fieldType );
+
+ m_listAvailableItems->clearSelection();
+ m_listAvailableItems->setSelected( item, true );
+ prepareSearch();
+
+ emit valueRenamed();
+ }
+
+ SideBarListViewItem::SideBarListViewItem( QListView *parent, QString label1, QString label2 ) : QListViewItem( parent, label1, label2 )
+ {
+// nothing
+ }
+
+ int SideBarListViewItem::compare( QListViewItem* item, int column, bool ascending ) const
+ {
+ if ( column == 0 )
+ {
+ bool ok = FALSE;
+ int ownValue = text( 0 ).toInt( &ok );
+ if ( ok )
+ {
+ int otherValue = item->text( 0 ).toInt( &ok );
+ if ( ok )
+ {
+ return ownValue < otherValue ? -1 : ( ownValue > otherValue ? 1 : 0 );
+ }
+ }
+ }
+
+ return QListViewItem::compare( item, column, ascending );
+ }
+}
+#include "sidebar.moc"
diff --git a/src/sidebar.h b/src/sidebar.h
new file mode 100644
index 0000000..250cd8c
--- /dev/null
+++ b/src/sidebar.h
@@ -0,0 +1,89 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXSIDEBAR_H
+#define KBIBTEXSIDEBAR_H
+
+#include <qwidget.h>
+#include <qlistview.h>
+
+#include <entryfield.h>
+#include <file.h>
+
+class QComboBox;
+class QToolButton;
+class KListView;
+class QListViewItem;
+class KPopupMenu;
+
+namespace KBibTeX
+{
+ class SideBar : public QWidget
+ {
+ Q_OBJECT
+ public:
+ SideBar( bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~SideBar();
+
+ void restoreState();
+ void setReadOnly( bool isReadOnly );
+
+ signals:
+ void selected( const QString& text, BibTeX::Element::FilterType, BibTeX::EntryField::FieldType fieldType );
+ void valueRenamed();
+
+ public slots:
+ void refreshLists( BibTeX::File *bibtexFile = NULL );
+
+ protected:
+ void resizeEvent( QResizeEvent *event );
+
+ private:
+ BibTeX::File *m_bibtexFile;
+ QToolButton *m_buttonToggleShowAll;
+ QToolButton *m_buttonToggleMultiSelect;
+ QComboBox *m_listTypeList;
+ KListView *m_listAvailableItems;
+ static const BibTeX::EntryField::FieldType importantFields[ 6 ];
+ bool m_isReadOnly;
+ KPopupMenu *m_popupMenu;
+ QString m_oldText;
+
+ void setupGUI();
+
+ private slots:
+ void prepareSearch();
+ void toggleShowAll( bool showAll );
+ void toggleMultiSelect( bool showAll );
+ void showContextMenu( QListViewItem * item, const QPoint & pos );
+ void startRenaming();
+ void endRenaming( QListViewItem * item, int col, const QString & text );
+ };
+
+ class SideBarListViewItem: QListViewItem
+ {
+ public:
+ SideBarListViewItem( QListView *parent, QString label1, QString label2 );
+
+ int compare( QListViewItem* item, int column, bool ascending ) const;
+ };
+
+}
+
+#endif
diff --git a/src/value.cpp b/src/value.cpp
new file mode 100644
index 0000000..c31514e
--- /dev/null
+++ b/src/value.cpp
@@ -0,0 +1,465 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qregexp.h>
+#include <qstring.h>
+#include <qstringlist.h>
+
+#include "value.h"
+
+namespace BibTeX
+{
+
+ ValueTextInterface::ValueTextInterface( const ValueTextInterface* other ) : m_text( other->text() )
+ {
+// nothing
+ }
+
+ ValueTextInterface::ValueTextInterface( const QString& text ) : m_text( text )
+ {
+// nothing
+ }
+
+ void ValueTextInterface::setText( const QString& text )
+ {
+ m_text = text;
+ }
+
+ QString ValueTextInterface::text() const
+ {
+ return m_text;
+ }
+
+ QString ValueTextInterface::simplifiedText() const
+ {
+ return text().replace( QRegExp( "\\\\[A-Za-z0-9]+" ), "" ).replace( '{', "" ).replace( '}', "" );
+ }
+
+ void ValueTextInterface::replace( const QString &before, const QString &after )
+ {
+ if ( before == text() || before == simplifiedText() )
+ setText( after );
+ }
+
+ bool ValueTextInterface::containsPattern( const QString &pattern, bool caseSensitive )
+ {
+ return text().contains( pattern, caseSensitive ) || simplifiedText().contains( pattern, caseSensitive );
+ }
+
+ ValueItem::ValueItem( const QString& text ) : ValueTextInterface( text )
+ {
+// nothing
+ }
+
+ Keyword::Keyword( Keyword *other ) : ValueTextInterface( other )
+ {
+// nothing
+ }
+
+ Keyword::Keyword( const QString& text ) : ValueTextInterface( text )
+ {
+// nothing
+ }
+
+ Keyword *Keyword::clone()
+ {
+ return new Keyword( text() );
+ }
+
+ KeywordContainer::KeywordContainer(): ValueItem( "" )
+ {
+// nothing
+ }
+
+ KeywordContainer::KeywordContainer( const QString& text ) : ValueItem( text )
+ {
+ setText( text );
+ }
+
+ KeywordContainer::KeywordContainer( KeywordContainer *other ) : ValueItem( QString::null )
+ {
+ for ( QValueList<Keyword*>::Iterator it = other->keywords.begin(); it != other->keywords.end(); ++it )
+ keywords.append(( *it )->clone() );
+ }
+
+ KeywordContainer::KeywordContainer( const QStringList& list ) : ValueItem( QString::null )
+ {
+ setList( list );
+ }
+
+ ValueItem *KeywordContainer::clone()
+ {
+ return new KeywordContainer( this );
+ }
+
+ void KeywordContainer::setList( const QStringList& list )
+ {
+ keywords.clear();
+ for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
+ keywords.append( new Keyword( *it ) );
+ }
+
+ void KeywordContainer::append( const QString& text )
+ {
+ bool contains = FALSE;
+
+ for ( QValueList<Keyword*>::ConstIterator it = keywords.begin(); !contains && it != keywords.end(); ++it )
+ contains = QString::compare(( *it )->text(), text ) == 0;
+
+ if ( contains == 0 )
+ keywords.append( new Keyword( text ) );
+ }
+
+ void KeywordContainer::remove( const QString& text )
+ {
+ bool contains = FALSE;
+ for ( QValueList<Keyword*>::Iterator it = keywords.begin(); !contains && it != keywords.end(); ++it )
+ if ( QString::compare(( *it )->text(), text ) == 0 )
+ {
+ keywords.remove( it );
+ break;
+ }
+ }
+
+ void KeywordContainer::setText( const QString& text )
+ {
+ ValueItem::setText( text );
+
+ QRegExp splitRegExp;
+ if ( text.contains( ";" ) )
+ splitRegExp = QRegExp( "\\s*;\\s*" );
+ else
+ splitRegExp = QRegExp( "\\s*,\\s*" );
+
+ keywords.clear();
+ QStringList keywordList = QStringList::split( splitRegExp, text, FALSE );
+ for ( QStringList::ConstIterator it = keywordList.begin(); it != keywordList.end(); ++it )
+ keywords.append( new Keyword( *it ) );
+ }
+
+ QString KeywordContainer::text() const
+ {
+ QString result;
+ bool first = true;
+ for ( QValueList<Keyword*>::ConstIterator it = keywords.begin(); it != keywords.end(); ++it )
+ {
+ if ( !first )
+ result.append( "; " );
+ else first = false;
+ result.append(( *it )->text() );
+ }
+ return result;
+ }
+
+ void KeywordContainer::replace( const QString &before, const QString &after )
+ {
+ for ( QValueList<Keyword*>::ConstIterator it = keywords.begin(); it != keywords.end(); ++it )
+ ( *it )->replace( before, after );
+ }
+
+ Person::Person( const QString& text, bool firstNameFirst ) : ValueTextInterface( text ), m_firstNameFirst( firstNameFirst )
+ {
+ setText( text );
+ }
+
+ Person::Person( const QString& firstName, const QString& lastName, bool firstNameFirst ) : ValueTextInterface( QString( firstName ).append( " " ).append( lastName ) ), m_firstName( firstName ), m_lastName( lastName ), m_firstNameFirst( firstNameFirst )
+ {
+// nothing
+ }
+
+ Person *Person::clone()
+ {
+ return new Person( m_firstName, m_lastName, m_firstNameFirst );
+ }
+
+ void Person::setText( const QString& text )
+ {
+ ValueTextInterface::setText( text );
+
+ QStringList segments;
+ bool containsComma = splitName( text, segments );
+ m_firstName = "";
+ m_lastName = "";
+
+ if ( segments.isEmpty() )
+ return;
+
+ if ( !containsComma )
+ {
+ /** PubMed uses a special writing style for names, where the last name is followed by single capital letter, each being the first letter of each first name */
+ /** So, check how many single capital letters are at the end of the given segment list */
+ int singleCapitalLettersCounter = 0;
+ int p = segments.count() - 1;
+ while ( segments[p].length() == 1 && segments[p].compare( segments[p].upper() ) == 0 )
+ {
+ --p;
+ ++singleCapitalLettersCounter;
+ }
+
+ if ( singleCapitalLettersCounter > 0 )
+ {
+ /** this is a special case for names from PubMed, which are formatted like "Fischer T" */
+ /** all segment values until the first single letter segment are last name parts */
+ for ( int i = 0; i < p; ++i )
+ m_lastName.append( segments[i] ).append( " " );
+ m_lastName.append( segments[p] );
+ /** single letter segments are first name parts */
+ for ( unsigned int i = p + 1; i < segments.count() - 1; ++i )
+ m_firstName.append( segments[i] ).append( " " );
+ m_firstName.append( segments[segments.count() - 1] );
+ }
+ else
+ {
+ int from = segments.count() - 1;
+ m_lastName = segments[from];
+ /** check for lower case parts of the last name such as "van", "von", "de", ... */
+ while ( from > 0 )
+ {
+ if ( segments[from - 1].compare( segments[from - 1].lower() ) != 0 )
+ break;
+ --from;
+ m_lastName.prepend( " " );
+ m_lastName.prepend( segments[from] );
+ }
+
+ if ( from > 0 )
+ {
+ /** there are segments left for the first name */
+ m_firstName = *segments.begin();
+ for ( QStringList::Iterator it = ++segments.begin(); from > 1; ++it, --from )
+ {
+ m_firstName.append( " " );
+ m_firstName.append( *it );
+ }
+ }
+ }
+ }
+ else
+ {
+ bool inLastName = TRUE;
+ for ( unsigned int i = 0; i < segments.count();++i )
+ {
+ if ( segments[i] == "," )
+ inLastName = FALSE;
+ else if ( inLastName )
+ {
+ if ( !m_lastName.isEmpty() ) m_lastName.append( " " );
+ m_lastName.append( segments[i] );
+ }
+ else
+ {
+ if ( !m_firstName.isEmpty() ) m_firstName.append( " " );
+ m_firstName.append( segments[i] );
+ }
+ }
+ }
+ }
+
+ QString Person::text() const
+ {
+ return text( m_firstNameFirst );
+ }
+
+ QString Person::text( bool firstNameFirst ) const
+ {
+
+ if ( m_firstName.isEmpty() )
+ return m_lastName;
+ else
+ return firstNameFirst ? m_firstName + " " + m_lastName : m_lastName + ", " + m_firstName;
+ }
+
+ QString Person::firstName()
+ {
+ return m_firstName;
+ }
+ QString Person::lastName()
+ {
+ return m_lastName;
+ }
+
+ /** Splits a name into single words. If the name's text was reversed (Last, First), the result will be true and the comma will be added to segments. Otherwise the functions result will be false. This function respects protecting {...}. */
+ bool Person::splitName( const QString& text, QStringList& segments )
+ {
+ int bracketCounter = 0;
+ bool result = FALSE;
+ QString buffer = "";
+
+ for ( unsigned int pos = 0; pos < text.length(); ++pos )
+ {
+ if ( text[pos] == '{' )
+ ++bracketCounter;
+ else if ( text[pos] == '}' )
+ --bracketCounter;
+
+ if ( text[pos] == ' ' && bracketCounter == 0 )
+ {
+ if ( !buffer.isEmpty() )
+ {
+ segments.append( buffer );
+ buffer = "";
+ }
+ }
+ else if ( text[pos] == ',' && bracketCounter == 0 )
+ {
+ if ( !buffer.isEmpty() )
+ {
+ segments.append( buffer );
+ buffer = "";
+ }
+ segments.append( "," );
+ result = TRUE;
+ }
+ else
+ buffer.append( text[pos] );
+ }
+
+ if ( !buffer.isEmpty() )
+ segments.append( buffer );
+
+ return result;
+ }
+
+ PersonContainer::PersonContainer( bool firstNameFirst ) : ValueItem( QString::null ), m_firstNameFirst( firstNameFirst )
+ {
+ // nothing
+ }
+
+ PersonContainer::PersonContainer( const QString& text, bool firstNameFirst ) : ValueItem( text ), m_firstNameFirst( firstNameFirst )
+ {
+ persons.append( new Person( text, m_firstNameFirst ) );
+ }
+
+ ValueItem *PersonContainer::clone()
+ {
+ PersonContainer *result = new PersonContainer( m_firstNameFirst );
+ for ( QValueList<Person*>::ConstIterator it = persons.begin(); it != persons.end(); ++it )
+ result->persons.append(( *it )->clone() );
+
+ return result;
+ }
+
+ void PersonContainer::setText( const QString& text )
+ {
+ ValueTextInterface::setText( text );
+ qDebug( "You cannot set a text ('%s') to a Value object", text.latin1() );
+ }
+
+ QString PersonContainer::text() const
+ {
+ QString result;
+ bool first = TRUE;
+
+ for ( QValueList<Person*>::ConstIterator it = persons.begin(); it != persons.end(); ++it )
+ {
+ if ( !first )
+ result.append( " and " );
+ else
+ first = FALSE;
+ result.append(( *it )->text() );
+ }
+
+ return result;
+ }
+
+ void PersonContainer::replace( const QString &before, const QString &after )
+ {
+ for ( QValueList<Person*>::ConstIterator it = persons.begin(); it != persons.end(); ++it )
+ ( *it )->replace( before, after );
+ }
+
+ MacroKey::MacroKey( const QString& text ) : ValueItem( text )
+ {
+ m_isValid = isValidInternal();
+ }
+
+ ValueItem *MacroKey::clone()
+ {
+ return new MacroKey( text() );
+ }
+
+ void MacroKey::setText( const QString& text )
+ {
+ ValueItem::setText( text );
+ m_isValid = isValidInternal();
+ }
+
+ bool MacroKey::isValid()
+ {
+ return m_isValid;
+ }
+
+ bool MacroKey::isValidInternal()
+ {
+ return !text().contains( QRegExp( "![-.:/+_a-zA-Z0-9]" ) );
+ }
+
+ PlainText::PlainText( const QString& text ) : ValueItem( text )
+ {
+ // nothing
+ }
+
+ ValueItem *PlainText::clone()
+ {
+ return new PlainText( text() );
+ }
+
+ Value::Value() : ValueTextInterface( QString::null )
+ {
+ // nothing
+ }
+
+ Value::Value( const Value *other ) : ValueTextInterface( other )
+ {
+ for ( QValueList<ValueItem*>::ConstIterator it = other->items.begin(); it != other->items.end(); ++it )
+ items.append(( *it )->clone() );
+ }
+
+ Value::Value( const QString& text, bool isMacroKey ): ValueTextInterface( text )
+ {
+ ValueItem *item = NULL;
+ if ( isMacroKey )
+ item = new MacroKey( text );
+ else
+ item = new PlainText( text );
+ items.append( item );
+ }
+
+ void Value::setText( const QString& text )
+ {
+ ValueTextInterface::setText( text );
+ qDebug( "You cannot set a text ('%s') to a Value object", text.latin1() );
+ }
+
+ QString Value::text() const
+ {
+ QString result;
+
+ for ( QValueList<ValueItem*>::ConstIterator it = items.begin(); it != items.end(); ++it )
+ result.append(( *it )->text() );
+
+ return result;
+ }
+
+ void Value::replace( const QString &before, const QString &after )
+ {
+ for ( QValueList<ValueItem*>::ConstIterator it = items.begin(); it != items.end(); ++it )
+ ( *it )->replace( before, after );
+ }
+}
diff --git a/src/value.h b/src/value.h
new file mode 100644
index 0000000..3c7d876
--- /dev/null
+++ b/src/value.h
@@ -0,0 +1,162 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXVALUE_H
+#define BIBTEXVALUE_H
+
+#include <qvaluelist.h>
+
+class QStringList;
+
+namespace BibTeX
+{
+ class ValueTextInterface
+ {
+ public:
+ ValueTextInterface( const ValueTextInterface* other );
+ ValueTextInterface( const QString& text );
+ virtual ~ValueTextInterface() {};
+
+ virtual void setText( const QString& text );
+ virtual QString text() const;
+ QString simplifiedText() const;
+ virtual void replace( const QString &before, const QString &after );
+ virtual bool containsPattern( const QString &pattern, bool caseSensitive );
+
+ private:
+ QString m_text;
+ };
+
+ class ValueItem: public ValueTextInterface
+ {
+ public:
+ ValueItem( const QString& text );
+
+ virtual ValueItem *clone()
+ {
+ return NULL;
+ };
+ };
+
+ class Keyword: public ValueTextInterface
+ {
+ public:
+ Keyword( Keyword *other );
+ Keyword( const QString& text );
+
+ Keyword *clone();
+ };
+
+ class KeywordContainer: public ValueItem
+ {
+ public:
+ KeywordContainer();
+ KeywordContainer( const QString& text );
+ KeywordContainer( KeywordContainer *other );
+ KeywordContainer( const QStringList& list );
+
+ ValueItem *clone();
+ void setList( const QStringList& list );
+ void append( const QString& text );
+ void remove( const QString& text );
+ void setText( const QString& text );
+ QString text() const;
+ void replace( const QString &before, const QString &after );
+
+ QValueList<Keyword*> keywords;
+ };
+
+ class Person: public ValueTextInterface
+ {
+ public:
+ Person( const QString& text, bool firstNameFirst = FALSE );
+ Person( const QString& firstName, const QString& lastName, bool firstNameFirst = FALSE );
+
+ Person *clone();
+ void setText( const QString& text );
+ QString text() const;
+ QString text( bool firstNameFirst ) const;
+
+ QString firstName();
+ QString lastName();
+
+ protected:
+ QString m_firstName;
+ QString m_lastName;
+ bool m_firstNameFirst;
+
+ bool splitName( const QString& text, QStringList& segments );
+ };
+
+ class PersonContainer: public ValueItem
+ {
+ public:
+ PersonContainer( bool firstNameFirst = FALSE );
+ PersonContainer( const QString& text, bool firstNameFirst = FALSE );
+
+ ValueItem *clone();
+ void setText( const QString& text );
+ QString text() const;
+ void replace( const QString &before, const QString &after );
+
+ QValueList<Person*> persons;
+
+ private:
+ bool m_firstNameFirst;
+ };
+
+ class MacroKey: public ValueItem
+ {
+ private:
+ bool m_isValid;
+ bool isValidInternal();
+
+ public:
+ MacroKey( const QString& text );
+
+ ValueItem *clone();
+
+ void setText( const QString& text );
+ bool isValid();
+ };
+
+ class PlainText: public ValueItem
+ {
+ public:
+ PlainText( const QString& text );
+
+ ValueItem *clone();
+ };
+
+ class Value: public ValueTextInterface
+ {
+ public:
+ Value();
+ Value( const Value *other );
+ Value( const QString& text, bool isMacroKey = false );
+
+ void setText( const QString& text );
+ QString text() const;
+ void replace( const QString &before, const QString &after );
+
+ QValueList<ValueItem*> items;
+ };
+}
+
+#endif
diff --git a/src/valuewidget.cpp b/src/valuewidget.cpp
new file mode 100644
index 0000000..1455a9e
--- /dev/null
+++ b/src/valuewidget.cpp
@@ -0,0 +1,254 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qlistview.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qheader.h>
+#include <qpushbutton.h>
+
+#include <kdialogbase.h>
+#include <klocale.h>
+#include <kiconloader.h>
+
+#include <value.h>
+#include <settings.h>
+#include "valuewidget.h"
+
+namespace KBibTeX
+{
+
+ QDialog::DialogCode ValueWidget::execute( const QString& title, BibTeX::EntryField::FieldType fieldType, BibTeX::Value *value, bool isReadOnly, QWidget *parent, const char *name )
+ {
+ KDialogBase * dlg = new KDialogBase( parent, name, TRUE, QString( i18n( "Edit field '%1'" ) ).arg( title ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, TRUE );
+
+ ValueWidget* valueWidget = new ValueWidget( fieldType, value, isReadOnly, dlg, "kbibtexvaluewidget" );
+ dlg->setMainWidget( valueWidget );
+ connect( dlg, SIGNAL( okClicked() ), valueWidget, SLOT( apply() ) );
+
+ QDialog::DialogCode result = ( QDialog::DialogCode )dlg->exec();
+ if ( isReadOnly ) result = QDialog::Rejected;
+
+ delete( valueWidget );
+ delete( dlg );
+
+ return result;
+ }
+
+ ValueWidget::ValueWidget( BibTeX::EntryField::FieldType fieldType, BibTeX::Value *value, bool isReadOnly, QWidget *parent, const char *name )
+ : QWidget( parent, name ), m_fieldType( fieldType ), m_value( value ), m_newValueCounter( 0 ), m_isReadOnly( isReadOnly )
+ {
+ setupGUI();
+ reset();
+ updateGUI();
+ }
+
+
+ ValueWidget::~ValueWidget()
+ {
+ // nothing
+ }
+
+ void ValueWidget::applyList( QStringList& list )
+ {
+ if ( m_fieldType == BibTeX::EntryField::ftKeywords )
+ {
+ BibTeX::KeywordContainer *container = new BibTeX::KeywordContainer();
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ container->keywords.append( new BibTeX::Keyword( *it ) );
+ m_value->items.append( container );
+ }
+ else if ( m_fieldType == BibTeX::EntryField::ftAuthor || m_fieldType == BibTeX::EntryField::ftEditor )
+ {
+ Settings * settings = Settings::self();
+ BibTeX::PersonContainer *container = new BibTeX::PersonContainer();
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ container->persons.append( new BibTeX::Person( *it, settings->editing_FirstNameFirst ) );
+ m_value->items.append( container );
+ }
+ else
+ {
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ m_value->items.append( new BibTeX::PlainText( *it ) );
+ }
+
+ list.clear();
+ }
+
+ void ValueWidget::apply( )
+ {
+ if ( m_isReadOnly ) return;
+
+ QStringList list;
+ m_value->items.clear();
+ QListViewItem *item = m_listViewValue->firstChild();
+ while ( item != NULL )
+ {
+ QCheckListItem * checkItem = dynamic_cast<QCheckListItem*>( item );
+ QString text = checkItem->text( 0 );
+
+ if ( checkItem->state() == QCheckListItem::On )
+ {
+ if ( !list.isEmpty() ) applyList( list );
+ m_value->items.append( new BibTeX::MacroKey( text ) );
+ }
+ else
+ list.append( text );
+ item = item->nextSibling();
+ }
+
+ if ( !list.isEmpty() )
+ applyList( list );
+ }
+
+ void ValueWidget::reset( )
+ {
+ m_listViewValue->clear();
+
+ QCheckListItem *after = NULL;
+ for ( QValueList<BibTeX::ValueItem*>::ConstIterator it = m_value->items.begin(); it != m_value->items.end(); ++it )
+ {
+ BibTeX::MacroKey *macroKey = dynamic_cast<BibTeX::MacroKey*>( *it );
+ QCheckListItem *item = new QCheckListItem( m_listViewValue, after, ( *it )->text(), QCheckListItem::CheckBox );
+ after = item;
+ item->setState( macroKey != NULL ? QCheckListItem::On : QCheckListItem::Off );
+ item->setRenameEnabled( 0, !m_isReadOnly );
+ }
+ }
+
+ void ValueWidget::slotAdd()
+ {
+ QCheckListItem * item = new QCheckListItem( m_listViewValue, m_listViewValue->lastItem(), QString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewValue%1" ) ).arg( m_newValueCounter++ ), QCheckListItem::CheckBox );
+ item->setState( QCheckListItem::Off );
+ item->setRenameEnabled( 0, !m_isReadOnly );
+ m_listViewValue->setSelected( item, TRUE );
+ slotEdit();
+ }
+
+ void ValueWidget::slotEdit()
+ {
+ QListViewItem * item = m_listViewValue->selectedItem();
+ if ( item != NULL )
+ item->startRename( 0 );
+ }
+
+ void ValueWidget::slotToggle()
+ {
+ QListViewItem * item = m_listViewValue->selectedItem();
+ if ( item != NULL )
+ {
+ QCheckListItem * checkItem = dynamic_cast<QCheckListItem*>( item );
+ if ( checkItem != NULL )
+ checkItem->setOn( !checkItem->isOn() );
+ }
+ }
+
+ void ValueWidget::slotDelete()
+ {
+ QListViewItem * item = m_listViewValue->selectedItem();
+ if ( item != NULL )
+ delete item;
+ updateGUI();
+ }
+
+ void ValueWidget::slotUp()
+ {
+ QListViewItem * item = m_listViewValue->selectedItem();
+ if ( item != NULL && item -> itemAbove() != NULL )
+ {
+ item->itemAbove() ->moveItem( item );
+ updateGUI();
+ }
+ }
+
+ void ValueWidget::slotDown()
+ {
+ QListViewItem * item = m_listViewValue->selectedItem();
+ if ( item != NULL && item -> itemBelow() != NULL )
+ {
+ item->moveItem( item->itemBelow() );
+ updateGUI();
+ }
+ }
+
+ void ValueWidget::updateGUI()
+ {
+ bool isElementSelected = m_listViewValue->selectedItem() != NULL;
+ m_pushButtonEdit->setEnabled( !m_isReadOnly && isElementSelected );
+ m_pushButtonToggle->setEnabled( !m_isReadOnly && isElementSelected );
+ m_pushButtonDelete->setEnabled( !m_isReadOnly && isElementSelected );
+ m_pushButtonUp->setEnabled( !m_isReadOnly && isElementSelected && m_listViewValue->selectedItem() != m_listViewValue->firstChild() );
+ m_pushButtonDown->setEnabled( !m_isReadOnly && isElementSelected && m_listViewValue->selectedItem() != m_listViewValue->lastItem() );
+ }
+
+ void ValueWidget::setupGUI()
+ {
+ QGridLayout * layout = new QGridLayout( this, 8, 2, 0, KDialog::spacingHint() );
+ layout->setRowStretch( 7, 1 );
+
+ QLabel *label = new QLabel( i18n( "Checked entries are string keys, unchecked entries are quoted text." ), this );
+ layout->addWidget( label, 0, 0 );
+
+ m_listViewValue = new QListView( this );
+ layout->addMultiCellWidget( m_listViewValue, 1, 7, 0, 0 );
+ m_listViewValue->setDefaultRenameAction( m_isReadOnly ? QListView::Reject : QListView::Accept );
+ m_listViewValue->addColumn( i18n( "Text" ) );
+ m_listViewValue->setSorting( -1, TRUE );
+ m_listViewValue->setAllColumnsShowFocus( TRUE );
+ m_listViewValue->header() ->setClickEnabled( FALSE );
+ m_listViewValue->header() ->setStretchEnabled( TRUE, 0 );
+ m_listViewValue->setEnabled( !m_isReadOnly );
+ connect( m_listViewValue, SIGNAL( selectionChanged() ), this, SLOT( updateGUI() ) );
+ connect( m_listViewValue, SIGNAL( clicked( QListViewItem * ) ), this, SLOT( updateGUI() ) );
+ connect( m_listViewValue, SIGNAL( currentChanged( QListViewItem * ) ), this, SLOT( updateGUI() ) );
+
+ m_pushButtonAdd = new QPushButton( i18n( "Add" ), this );
+ layout->addWidget( m_pushButtonAdd, 1, 1 );
+ m_pushButtonAdd->setIconSet( QIconSet( SmallIcon( "add" ) ) );
+ m_pushButtonAdd->setEnabled( !m_isReadOnly );
+ connect( m_pushButtonAdd, SIGNAL( clicked() ), this, SLOT( slotAdd() ) );
+
+ m_pushButtonEdit = new QPushButton( i18n( "Edit" ), this );
+ layout->addWidget( m_pushButtonEdit, 2, 1 );
+ m_pushButtonEdit->setIconSet( QIconSet( SmallIcon( "edit" ) ) );
+ connect( m_pushButtonEdit, SIGNAL( clicked() ), this, SLOT( slotEdit() ) );
+
+ m_pushButtonToggle = new QPushButton( i18n( "Toggle" ), this );
+ layout->addWidget( m_pushButtonToggle, 3, 1 );
+ m_pushButtonToggle->setIconSet( QIconSet( SmallIcon( "flag" ) ) );
+ connect( m_pushButtonToggle, SIGNAL( clicked() ), this, SLOT( slotToggle() ) );
+
+ m_pushButtonDelete = new QPushButton( i18n( "Delete" ), this );
+ layout->addWidget( m_pushButtonDelete, 4, 1 );
+ m_pushButtonDelete->setIconSet( QIconSet( SmallIcon( "editdelete" ) ) );
+ connect( m_pushButtonDelete, SIGNAL( clicked() ), this, SLOT( slotDelete() ) );
+
+ m_pushButtonUp = new QPushButton( i18n( "Up" ), this );
+ layout->addWidget( m_pushButtonUp, 5, 1 );
+ m_pushButtonUp->setIconSet( QIconSet( SmallIcon( "up" ) ) );
+ connect( m_pushButtonUp, SIGNAL( clicked() ), this, SLOT( slotUp() ) );
+
+ m_pushButtonDown = new QPushButton( i18n( "Down" ), this );
+ layout->addWidget( m_pushButtonDown, 6, 1 );
+ m_pushButtonDown->setIconSet( QIconSet( SmallIcon( "down" ) ) );
+ connect( m_pushButtonDown, SIGNAL( clicked() ), this, SLOT( slotDown() ) );
+ }
+
+}
+#include "valuewidget.moc"
diff --git a/src/valuewidget.h b/src/valuewidget.h
new file mode 100644
index 0000000..094bf1a
--- /dev/null
+++ b/src/valuewidget.h
@@ -0,0 +1,77 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXVALUEWIDGET_H
+#define KBIBTEXVALUEWIDGET_H
+
+#include <qwidget.h>
+#include <qdialog.h>
+
+#include <value.h>
+#include <entryfield.h>
+
+class QListView;
+class QPushButton;
+
+namespace KBibTeX
+{
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class ValueWidget : public QWidget
+ {
+ Q_OBJECT
+ public:
+ static QDialog::DialogCode execute( const QString& title, BibTeX::EntryField::FieldType fieldType, BibTeX::Value *value, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+
+ private slots:
+ void apply( );
+ void reset( );
+ void slotAdd();
+ void slotEdit();
+ void slotToggle();
+ void slotDelete();
+ void slotUp();
+ void slotDown();
+ void updateGUI();
+
+ private:
+ BibTeX::EntryField::FieldType m_fieldType;
+ BibTeX::Value *m_value;
+ QListView *m_listViewValue;
+ QPushButton *m_pushButtonAdd;
+ QPushButton *m_pushButtonEdit;
+ QPushButton *m_pushButtonToggle;
+ QPushButton *m_pushButtonDelete;
+ QPushButton *m_pushButtonUp;
+ QPushButton *m_pushButtonDown;
+ int m_newValueCounter;
+ bool m_isReadOnly;
+
+ ValueWidget( BibTeX::EntryField::FieldType fieldType, BibTeX::Value *value, bool isReadOnly, QWidget *parent = 0, const char *name = 0 );
+ ~ValueWidget();
+
+ void setupGUI();
+ void applyList( QStringList& list );
+ };
+
+}
+
+#endif
diff --git a/src/webquery.cpp b/src/webquery.cpp
new file mode 100644
index 0000000..f1b44e3
--- /dev/null
+++ b/src/webquery.cpp
@@ -0,0 +1,637 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qtimer.h>
+#include <qheader.h>
+#include <qwidget.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qframe.h>
+#include <qwidgetstack.h>
+#include <qlabel.h>
+#include <qcheckbox.h>
+#include <qspinbox.h>
+#include <qapplication.h>
+#include <qeventloop.h>
+#include <qbuffer.h>
+
+#include <klocale.h>
+#include <kcombobox.h>
+#include <kiconloader.h>
+#include <kdebug.h>
+#include <kurllabel.h>
+#include <klineedit.h>
+#include <kapplication.h>
+#include <kpushbutton.h>
+#include <kprogress.h>
+#include <kcompletion.h>
+#include <kmessagebox.h>
+#include <kconfig.h>
+#include <kwin.h>
+
+#include <settings.h>
+#include <idsuggestions.h>
+#include <entrywidget.h>
+#include <webqueryarxiv.h>
+#include <webquerybibsonomy.h>
+#include <webquerycsb.h>
+#include <webquerycitebase.h>
+#include <webqueryciteseerx.h>
+#include <webquerydblp.h>
+#include <webquerygooglescholar.h>
+#include <webqueryieeexplore.h>
+#include <webquerymathscinet.h>
+#include <webquerypubmed.h>
+#include <webquerysciencedirect.h>
+#include <webqueryspireshep.h>
+#ifdef HAVE_YAZ
+#include <webqueryz3950.h>
+#endif // HAVE_YAZ
+#include <webqueryzmath.h>
+#include "webquery.h"
+
+#define min(a,b) ((a)>(b)?(b):(a))
+
+namespace KBibTeX
+{
+ WebQueryWidget::WebQueryWidget( QWidget *parent, const char *name )
+ : QWidget( parent, name ), lineEditQuery( NULL ), spinBoxMaxHits( NULL )
+ {
+// nothing
+ }
+
+ bool WebQueryWidget::searchPossible()
+ {
+ return lineEditQuery != NULL && !lineEditQuery->text().stripWhiteSpace().replace( '$', "" ).isEmpty();
+ }
+
+ void WebQueryWidget::init()
+ {
+ QVBoxLayout *vLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+
+ QHBoxLayout *hLayout = new QHBoxLayout( );
+ vLayout->addLayout( hLayout );
+
+ KPushButton *clearSearchText = new KPushButton( this );
+ clearSearchText->setIconSet( QIconSet( SmallIcon( "locationbar_erase" ) ) );
+ hLayout->addWidget( clearSearchText );
+ QLabel *label = new QLabel( i18n( "Search &term:" ), this );
+ hLayout->addWidget( label );
+ lineEditQuery = new KLineEdit( this );
+ hLayout->addWidget( lineEditQuery );
+ label->setBuddy( lineEditQuery );
+ hLayout->addSpacing( KDialog::spacingHint() * 2 );
+ connect( clearSearchText, SIGNAL( clicked() ), lineEditQuery, SLOT( clear() ) );
+ connect( lineEditQuery, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( const QString& ) ) );
+ hLayout->setStretchFactor( lineEditQuery, 4 );
+ KCompletion *completionQuery = lineEditQuery->completionObject();
+
+ label = new QLabel( i18n( "&Number of results:" ), this );
+ hLayout->addWidget( label );
+ spinBoxMaxHits = new QSpinBox( 1, 250, 1, this );
+ spinBoxMaxHits->setValue( 10 );
+ hLayout->addWidget( spinBoxMaxHits );
+ label->setBuddy( spinBoxMaxHits );
+
+ vLayout->addStretch( 0 );
+
+ connect( lineEditQuery, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) );
+ connect( lineEditQuery, SIGNAL( returnPressed( const QString& ) ), completionQuery, SLOT( addItem( const QString& ) ) );
+ }
+
+ void WebQueryWidget::slotTextChanged( const QString& text )
+ {
+ slotTextChanged( text, false );
+ }
+
+ void WebQueryWidget::slotTextChanged( const QString& text, bool delayed )
+ {
+ bool doEnable = !text.stripWhiteSpace().replace( '$', "" ).isEmpty();
+ if ( delayed && doEnable )
+ QTimer::singleShot( 100, this, SLOT( slotEnableSearchTrue() ) );
+ else if ( !delayed )
+ emit enableSearch( doEnable );
+ }
+
+ void WebQueryWidget::slotEnableSearchTrue()
+ {
+ emit enableSearch( true );
+ }
+
+ WebQuery::WebQuery( QWidget *parent ): QObject(), m_parent( parent ), m_progressDialog( NULL ), m_currentJob( NULL )
+ {
+// nothing
+ }
+
+ WebQuery::~WebQuery()
+ {
+ if ( m_progressDialog != NULL )
+ delete m_progressDialog;
+ }
+
+ void WebQuery::query()
+ {
+ if ( m_progressDialog != NULL )
+ delete m_progressDialog;
+ m_aborted = false;
+ m_progressDialog = new KProgressDialog( m_parent, "WebQuery_progressDialog", i18n( "Searching" ), QString( i18n( "Searching %1" ) ).arg( title() ) );
+ m_progressDialog->progressBar()->setMinimumWidth( 256 );
+ m_progressDialog->setAutoClose( true );
+ m_progressDialog->setMinimumDuration( 10 );
+ m_progressDialog->setEnabled( true );
+ connect( m_progressDialog, SIGNAL( cancelClicked() ), this, SLOT( slotCancelQuery() ) );
+ }
+
+ void WebQuery::cancelQuery()
+ {
+ // nothing
+ }
+
+ void WebQuery::slotCancelQuery()
+ {
+ m_aborted = true;
+ cancelQuery();
+ }
+
+ void WebQuery::setEndSearch( WebQuery::Status status )
+ {
+ if ( m_progressDialog != NULL )
+ m_progressDialog->hide();
+ emit endSearch( status );
+ }
+
+ void WebQuery::setNumStages( int numStages )
+ {
+ m_currentStage = 0;
+ m_numStages = numStages;
+ m_progressDialog->progressBar()->setTotalSteps( m_numStages * 100 );
+ }
+
+ void WebQuery::enterNextStage()
+ {
+ ++m_currentStage;
+ if ( m_progressDialog != NULL )
+ m_progressDialog->progressBar()->setProgress( m_currentStage * 100 );
+ }
+
+ QString WebQuery::download( const KURL& url )
+ {
+ QString data = downloadHTML( url );
+ if ( data == QString::null )
+ return QString::null;
+
+ /** post-processing */
+ if ( data != QString::null )
+ {
+ data.replace( QRegExp( "</?(p|br)[^>]*>" ), "\n" );
+ data.replace( QRegExp( "</?[^>]*>" ), "" );
+ data.replace( "@import", "" );/// JavaScript import?
+ }
+
+ return data;
+ }
+
+ QString WebQuery::downloadHTML( const KURL& url )
+ {
+ if ( m_currentJob != NULL ) return QString::null;
+
+ qDebug( "WebQuery::download( %s )", url.prettyURL().latin1() );
+
+ m_incomingData = "";
+ m_currentJobTotalSize = -1;
+ m_currentJob = KIO::get( url, false, false );
+ connect( m_currentJob, SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ), this, SLOT( slotSetJobTotalSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( m_currentJob, SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ), this, SLOT( slotSetJobProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( m_currentJob, SIGNAL( data( KIO::Job*, const QByteArray & ) ), this, SLOT( slotJobData( KIO::Job*, const QByteArray & ) ) );
+ connect( m_currentJob, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotJobFinished( KIO::Job* ) ) );
+
+ qApp->eventLoop()->enterLoop();
+
+ return m_incomingData;
+ }
+
+ BibTeX::File *WebQuery::downloadBibTeXFile( const KURL& url, QTextStream::Encoding encoding )
+ {
+ QString data = download( url );
+ if ( data == QString::null )
+ return NULL;
+
+ BibTeX::FileImporterBibTeX importer( FALSE );
+ importer.setIgnoreComments( TRUE );
+ QBuffer buffer;
+
+ buffer.open( IO_WriteOnly );
+ QTextStream ts( &buffer );
+ ts.setEncoding( encoding );
+ ts << data << endl;
+ buffer.close();
+
+ buffer.open( IO_ReadOnly );
+ BibTeX::File *result = importer.load( &buffer );
+ buffer.close();
+
+ return result;
+ }
+
+ void WebQuery::slotSetJobTotalSize( KIO::Job *job, KIO::filesize_t size )
+ {
+ if ( job != m_currentJob ) return;
+ m_currentJobTotalSize = size;
+ }
+
+ void WebQuery::slotSetJobProcessedSize( KIO::Job *job, KIO::filesize_t size )
+ {
+ if ( job != m_currentJob ) return;
+ if ( m_currentJobTotalSize <= 0 ) m_currentJobTotalSize = size;
+ m_progressDialog->progressBar()->setProgress( m_currentStage * 100 + min( 100, size * 100 / m_currentJobTotalSize ) );
+ }
+
+ void WebQuery::slotJobData( KIO::Job *job, const QByteArray &data )
+ {
+ if ( job != m_currentJob ) return;
+ QCString dataStr = QCString( data, data.size() + 1 );
+ if ( data.size() > 0 )
+ m_incomingData.append( dataStr );
+ }
+
+ void WebQuery::slotJobFinished( KIO::Job *job )
+ {
+ if ( job != m_currentJob ) return;
+ m_currentJob = NULL;
+ if ( job->error() )
+ {
+ job->showErrorDialog();
+ m_incomingData = QString::null;
+ }
+ enterNextStage();
+ qApp->eventLoop()->exitLoop();
+ }
+
+ WebQueryWizard::WebQueryWizard( KDialogBase *dlg, const char* name ) : QWidget( dlg, name ), m_dlg( dlg ), m_pushButtonSearch( NULL )
+ {
+ setupGUI( );
+
+ Settings *settings = Settings::self( NULL );
+ m_comboBoxEngines->setCurrentItem( settings->webQuery_LastEngine );
+ otherEngineSelected( settings->webQuery_LastEngine );
+ m_checkBoxImportAll->setChecked( settings->webQuery_ImportAll );
+ m_pushButtonSearch->setEnabled( false );
+ }
+
+ WebQueryWizard::~WebQueryWizard()
+ {
+ KConfig * config = kapp->config();
+ config->setGroup( "WebQueryWizard" );
+ saveWindowSize( config );
+ }
+
+ void WebQueryWizard::showEvent( QShowEvent * )
+ {
+ KConfig * config = kapp->config();
+ config->setGroup( "WebQueryWizard" );
+ restoreWindowSize( config );
+ }
+
+ int WebQueryWizard::execute( QWidget *parent, QValueList<BibTeX::Entry*> &results )
+ {
+ KDialogBase *dlg = new KDialogBase( parent, "WebQueryWizard", true, i18n( "Import" ), KDialogBase::Ok | KDialogBase::Cancel, ( KDialogBase::ButtonCode )0, true );
+ WebQueryWizard *wiz = new WebQueryWizard( dlg, "WebQueryWizard" );
+ dlg->setButtonOK( KGuiItem( i18n( "&Import" ), "import", i18n( "Import selected items" ) ) );
+ dlg->setMainWidget( wiz );
+ connect( wiz, SIGNAL( changeButtonOK( bool ) ), dlg, SLOT( enableButtonOK( bool ) ) );
+ dlg->enableButtonOK( false );
+
+ results.clear();
+ int result = dlg->exec();
+ if ( result == QDialog::Accepted )
+ {
+ QListViewItemIterator it = wiz->m_checkBoxImportAll->isChecked() ? QListViewItemIterator( wiz->m_listViewResults ) : QListViewItemIterator( wiz->m_listViewResults, QListViewItemIterator::Selected );
+ while ( it.current() )
+ {
+ ResultsListViewItem *item = dynamic_cast<ResultsListViewItem*>( it.current() );
+ results.append( new BibTeX::Entry( item->entry() ) );
+ ++it;
+ }
+ }
+
+ Settings *settings = Settings::self( NULL );
+ settings->webQuery_LastEngine = wiz->m_comboBoxEngines->currentItem();
+ settings->webQuery_ImportAll = wiz->m_checkBoxImportAll->isChecked();
+
+ delete dlg;
+
+ return result;
+ }
+
+ void WebQueryWizard::previewEntry( QListViewItem *item )
+ {
+ ResultsListViewItem *rlvi = dynamic_cast<ResultsListViewItem*>( item );
+ if ( rlvi != NULL )
+ {
+ BibTeX::Entry *entry = rlvi->entry();
+ KBibTeX::EntryWidget::execute( entry, NULL, TRUE, FALSE );
+ }
+ }
+
+ void WebQueryWizard::importEnableChanging( )
+ {
+ QListViewItemIterator it( m_listViewResults, QListViewItemIterator::Selected );
+
+ emit changeButtonOK(( m_checkBoxImportAll->isChecked() && m_listViewResults->childCount() > 0 ) || it.current() != NULL );
+ }
+
+ void WebQueryWizard::otherEngineSelected( int index )
+ {
+ if ( index < 0 || index >= ( int )m_webQueries.size() ) return;
+
+ m_pushButtonSearch->setCaption( QString( i18n( "Search %1" ) ).arg( m_webQueries[index]->title() ) );
+ m_disclaimerLabel->setText( m_webQueries[index]->disclaimer() );
+ m_disclaimerLabel->setURL( m_webQueries[index]->disclaimerURL() );
+ QToolTip::remove( m_disclaimerLabel );
+ QToolTip::add( m_disclaimerLabel, m_webQueries[index]->disclaimerURL() );
+ m_widgetStackQueries->raiseWidget( m_webQueries[index]->widget() );
+ m_pushButtonSearch->setEnabled( m_webQueries[index]->widget()->searchPossible() );
+ }
+
+ void WebQueryWizard::startSearch()
+ {
+ if ( !m_pushButtonSearch->isEnabled() )
+ {
+ kdDebug() << "WebQueryWizard::startSearch not enabled" << endl;
+ return;
+ }
+
+ int index = m_comboBoxEngines->currentItem();
+
+ setEnabled( FALSE );
+ m_dlg->enableButtonCancel( FALSE );
+ QApplication::setOverrideCursor( Qt::waitCursor );
+ m_listViewResults->clear();
+ connect( m_webQueries[index], SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, SLOT( addHit( BibTeX::Entry*, bool ) ) );
+ connect( m_webQueries[index], SIGNAL( endSearch( WebQuery::Status ) ), this, SLOT( endSearch( WebQuery::Status ) ) );
+
+ m_webQueries[index]->query();
+ }
+
+ void WebQueryWizard::endSearch( WebQuery::Status status )
+ {
+ int index = m_comboBoxEngines->currentItem();
+ disconnect( m_webQueries[index], SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, SLOT( addHit( BibTeX::Entry*, bool ) ) );
+ disconnect( m_webQueries[index], SIGNAL( endSearch( WebQuery::Status ) ), this, SLOT( endSearch( WebQuery::Status ) ) );
+ setEnabled( TRUE );
+ m_dlg->enableButtonCancel( TRUE );
+ importEnableChanging();
+ QApplication::restoreOverrideCursor();
+ if ( status == WebQuery::statusInsufficientPermissions )
+ KMessageBox::sorry( this, i18n( "You do not have the necessary permissions to query data from this service." ) );
+ }
+
+ void WebQueryWizard::addHit( BibTeX::Entry *entry, bool keepId )
+ {
+ Settings * settings = Settings::self();
+ if ( !keepId && settings->idSuggestions_default >= 0 )
+ entry->setId( IdSuggestions::createDefaultSuggestion( NULL, entry ) );
+ new ResultsListViewItem( m_listViewResults, new BibTeX::Entry( entry ) );
+ }
+
+ void WebQueryWizard::enableSearch( bool enabled )
+ {
+ m_pushButtonSearch->setEnabled( enabled );
+ }
+
+ void WebQueryWizard::openURL( const QString& url )
+ {
+ Settings::openUrl( KURL( url ), this );
+ }
+
+ void WebQueryWizard::setupGUI()
+ {
+ Settings * settings = Settings::self();
+ setMinimumSize( 640, 384 );
+ QGridLayout *layout = new QGridLayout( this, 5, 4, 0, KDialog::spacingHint() );
+ layout->setColStretch( 2, 1 );
+ layout->setRowStretch( 3, 1 );
+
+ QLabel *label = new QLabel( i18n( "&Engine:" ), this );
+ layout->addWidget( label, 0, 0 );
+ m_comboBoxEngines = new KComboBox( FALSE, this );
+ label->setBuddy( m_comboBoxEngines );
+ layout->addWidget( m_comboBoxEngines, 0, 1 );
+ connect( m_comboBoxEngines, SIGNAL( activated( int ) ), this, SLOT( otherEngineSelected( int ) ) );
+
+ m_widgetStackQueries = new QWidgetStack( this );
+ layout->addMultiCellWidget( m_widgetStackQueries, 1, 2, 0, 2 );
+ setupQueries();
+
+ m_pushButtonSearch = new KPushButton( i18n( "&Search" ), this );
+ layout->addWidget( m_pushButtonSearch, 0, 3 );
+ m_pushButtonSearch->setIconSet( QIconSet( SmallIcon( "find" ) ) );
+ m_pushButtonSearch->setEnabled( FALSE );
+
+ m_listViewResults = new KListView( this );
+ m_listViewResults->addColumn( i18n( "Year" ), 64 );
+ m_listViewResults->addColumn( i18n( "Author" ), 128 );
+ m_listViewResults->addColumn( i18n( "Title" ), 512 );
+ if ( settings->editing_UseSpecialFont )
+ m_listViewResults->setFont( settings->editing_SpecialFont );
+ else
+ m_listViewResults->setFont( KGlobalSettings::generalFont() );
+ m_listViewResults->header() ->setFont( KGlobalSettings::generalFont() );
+ m_listViewResults->setAllColumnsShowFocus( TRUE );
+ m_listViewResults->setFullWidth( true );
+ m_listViewResults->setSelectionMode( QListView::Extended );
+ layout->addMultiCellWidget( m_listViewResults, 3, 3, 0, 3 );
+ connect( m_listViewResults, SIGNAL( executed( QListViewItem* ) ), this, SLOT( previewEntry( QListViewItem* ) ) );
+ connect( m_listViewResults, SIGNAL( returnPressed( QListViewItem* ) ), this, SLOT( previewEntry( QListViewItem* ) ) );
+
+ QHBoxLayout *horizontalLayout = new QHBoxLayout();
+ layout->addMultiCellLayout( horizontalLayout, 4, 4, 0, 3 );
+ m_disclaimerLabel = new KURLLabel( this );
+ horizontalLayout->addWidget( m_disclaimerLabel );
+ horizontalLayout->setStretchFactor( m_disclaimerLabel, 4 );
+ m_checkBoxImportAll = new QCheckBox( i18n( "Import all hits" ), this );
+ m_checkBoxImportAll->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+ horizontalLayout->addWidget( m_checkBoxImportAll );
+
+ connect( m_disclaimerLabel, SIGNAL( leftClickedURL( const QString& ) ), this, SLOT( openURL( const QString& ) ) );
+ connect( m_listViewResults, SIGNAL( selectionChanged( ) ), this, SLOT( importEnableChanging( ) ) );
+ connect( m_listViewResults, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( importEnableChanging( ) ) );
+ connect( m_checkBoxImportAll, SIGNAL( toggled( bool ) ), this, SLOT( importEnableChanging( ) ) );
+ connect( m_pushButtonSearch, SIGNAL( clicked() ), this, SLOT( startSearch() ) );
+ }
+
+ void WebQueryWizard::setupQueries()
+ {
+ WebQuery *query = new WebQueryArXiv( this );
+ m_webQueries.append( query );
+ // query = new WebQueryAmatex( this );
+ // m_webQueries.append( query );
+ query = new WebQueryBibSonomy( this );
+ m_webQueries.append( query );
+ query = new WebQueryCitebase( this );
+ m_webQueries.append( query );
+ query = new WebQueryCiteSeerX( this );
+ m_webQueries.append( query );
+ query = new WebQueryCSB( this );
+ m_webQueries.append( query );
+ query = new WebQueryDBLP( this );
+ m_webQueries.append( query );
+ query = new WebQueryGoogleScholar( this );
+ m_webQueries.append( query );
+ query = new WebQueryIEEExplore( this );
+ m_webQueries.append( query );
+ query = new WebQueryMathSciNet( this );
+ m_webQueries.append( query );
+ query = new WebQueryPubMed( this );
+ m_webQueries.append( query );
+ query = new WebQueryScienceDirect( this );
+ m_webQueries.append( query );
+ query = new WebQuerySpiresHep( this );
+ m_webQueries.append( query );
+#ifdef HAVE_YAZ
+ query = new WebQueryZ3950( this );
+ m_webQueries.append( query );
+#endif // HAVE_YAZ
+ query = new WebQueryZMATH( this );
+ m_webQueries.append( query );
+
+ for ( QValueList<WebQuery*>::Iterator it = m_webQueries.begin(); it != m_webQueries.end(); ++it )
+ {
+ m_comboBoxEngines->insertItem(( *it )->title() );
+ m_widgetStackQueries->addWidget(( *it )->widget() );
+ connect(( *it )->widget(), SIGNAL( enableSearch( bool ) ), this, SLOT( enableSearch( bool ) ) );
+ connect(( *it )->widget(), SIGNAL( startSearch() ), this, SLOT( startSearch() ) );
+ }
+ }
+
+ /* This function was taken form KMainWindow of KDE 3.5 and modified to fit KBibTeX */
+ void WebQueryWizard::saveWindowSize( KConfig *config ) const
+ {
+ int scnum = QApplication::desktop()->screenNumber( parentWidget() );
+ QRect desk = QApplication::desktop()->screenGeometry( scnum );
+ int w, h;
+#if defined Q_WS_X11
+ // save maximalization as desktop size + 1 in that direction
+ KWin::WindowInfo info = KWin::windowInfo( m_dlg->winId(), NET::WMState );
+ w = info.state() & NET::MaxHoriz ? desk.width() + 1 : m_dlg->width();
+ h = info.state() & NET::MaxVert ? desk.height() + 1 : m_dlg->height();
+#else
+ if ( isMaximized() )
+ {
+ w = desk.width() + 1;
+ h = desk.height() + 1;
+ }
+ //TODO: add "Maximized" property instead "+1" hack
+#endif
+ QRect size( desk.width(), w, desk.height(), h );
+ bool defaultSize = false;//( size == d->defaultWindowSize );
+ QString widthString = QString::fromLatin1( "Width %1" ).arg( desk.width() );
+ QString heightString = QString::fromLatin1( "Height %1" ).arg( desk.height() );
+ if ( !config->hasDefault( widthString ) && defaultSize )
+ config->revertToDefault( widthString );
+ else
+ config->writeEntry( widthString, w );
+
+ if ( !config->hasDefault( heightString ) && defaultSize )
+ config->revertToDefault( heightString );
+ else
+ config->writeEntry( heightString, h );
+ }
+
+ /* This function was taken form KMainWindow of KDE 3.5 and modified to fit KBibTeX */
+ void WebQueryWizard::restoreWindowSize( KConfig *config )
+ {
+ // restore the size
+ int scnum = QApplication::desktop()->screenNumber( parentWidget() );
+ QRect desk = QApplication::desktop()->screenGeometry( scnum );
+ QSize size( config->readNumEntry( QString::fromLatin1( "Width %1" ).arg( desk.width() ), 0 ),
+ config->readNumEntry( QString::fromLatin1( "Height %1" ).arg( desk.height() ), 0 ) );
+ if ( size.isEmpty() )
+ {
+ // try the KDE 2.0 way
+ size = QSize( config->readNumEntry( QString::fromLatin1( "Width" ), 0 ),
+ config->readNumEntry( QString::fromLatin1( "Height" ), 0 ) );
+ if ( !size.isEmpty() )
+ {
+ // make sure the other resolutions don't get old settings
+ config->writeEntry( QString::fromLatin1( "Width" ), 0 );
+ config->writeEntry( QString::fromLatin1( "Height" ), 0 );
+ }
+ }
+ if ( !size.isEmpty() )
+ {
+#ifdef Q_WS_X11
+ int state = ( size.width() > desk.width() ? NET::MaxHoriz : 0 )
+ | ( size.height() > desk.height() ? NET::MaxVert : 0 );
+ if (( state & NET::Max ) == NET::Max )
+ ; // no resize
+ else if (( state & NET::MaxHoriz ) == NET::MaxHoriz )
+ m_dlg->resize( width(), size.height() );
+ else if (( state & NET::MaxVert ) == NET::MaxVert )
+ m_dlg->resize( size.width(), height() );
+ else
+ m_dlg->resize( size );
+ // QWidget::showMaximized() is both insufficient and broken
+ KWin::setState( m_dlg->winId(), state );
+#else
+ if ( size.width() > desk.width() || size.height() > desk.height() )
+ m_dlg->setWindowState( WindowMaximized );
+ else
+ m_dlg->resize( size );
+#endif
+ }
+ }
+
+ ResultsListViewItem::ResultsListViewItem( QListView * parent, BibTeX::Entry * entry ) : QListViewItem( parent ), m_entry( entry )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftTitle );
+ if ( field != NULL && field->value() != NULL )
+ setText( 2, field ->value() ->text().replace( '{', "" ).replace( '}', "" ).replace( '~', ' ' ) );
+ field = entry->getField( BibTeX::EntryField::ftAuthor );
+ if ( field != NULL && field->value() != NULL )
+ {
+ BibTeX::PersonContainer* personContainer = dynamic_cast<BibTeX::PersonContainer*>( field->value()->items.first() );
+ if ( personContainer != NULL )
+ {
+ QStringList authors;
+ QValueList<BibTeX::Person*> list = personContainer->persons;
+ for ( QValueList<BibTeX::Person*>::ConstIterator it = list.begin(); it != list.end(); ++it )
+ authors.append(( *it ) ->text() );
+ setText( 1, authors.join( " and " ).replace( '{', "" ).replace( '}', "" ).replace( '~', ' ' ) );
+ }
+ else setText( 1, field ->value() ->text().replace( '{', "" ).replace( '}', "" ).replace( '~', ' ' ) );
+ }
+ field = entry->getField( BibTeX::EntryField::ftYear );
+ if ( field != NULL && field->value() != NULL )
+ setText( 0, field ->value() ->text().replace( '{', "" ).replace( '}', "" ).replace( '~', ' ' ) );
+ }
+
+ ResultsListViewItem::~ResultsListViewItem()
+ {
+ if ( m_entry != NULL )
+ delete m_entry;
+ }
+
+ BibTeX::Entry* ResultsListViewItem::entry()
+ {
+ return m_entry;
+ }
+
+}
+#include "webquery.moc"
diff --git a/src/webquery.h b/src/webquery.h
new file mode 100644
index 0000000..f4b46b4
--- /dev/null
+++ b/src/webquery.h
@@ -0,0 +1,179 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXWEBQUERY_H
+#define KBIBTEXWEBQUERY_H
+
+#include <qobject.h>
+#include <qstring.h>
+
+#include <kdialogbase.h>
+#include <klistview.h>
+#include <klineedit.h>
+#include <kio/jobclasses.h>
+#include <kprogress.h>
+
+#include "entry.h"
+
+class QWidget;
+class QFrame;
+class QCheckBox;
+class QSpinBox;
+class KComboBox;
+class KListView;
+class KPushButton;
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryWidget : public QWidget
+ {
+ Q_OBJECT
+ public:
+ WebQueryWidget( QWidget *parent, const char *name = 0 );
+ virtual bool searchPossible();
+
+ KLineEdit *lineEditQuery;
+ QSpinBox *spinBoxMaxHits;
+
+ protected:
+ virtual void init();
+
+ signals:
+ void enableSearch( bool );
+ void startSearch();
+
+ protected slots:
+ void slotTextChanged( const QString& );
+ void slotTextChanged( const QString&, bool delayed );
+
+ private slots:
+ void slotEnableSearchTrue();
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQuery : public QObject
+ {
+ Q_OBJECT
+ public:
+ enum Status { statusSuccess, statusError, statusAborted, statusInvalidQuery, statusInsufficientPermissions };
+
+ WebQuery( QWidget *parent );
+ virtual ~WebQuery();
+
+ virtual void query();
+
+ virtual QString title() { return "no_title"; };
+ virtual QString disclaimer() = 0;
+ virtual QString disclaimerURL() = 0;
+
+ virtual WebQueryWidget *widget() = 0;
+
+ signals:
+ void foundEntry( BibTeX::Entry*, bool );
+ void endSearch( WebQuery::Status );
+
+ protected:
+ bool m_aborted;
+ QWidget *m_parent;
+ KProgressDialog *m_progressDialog;
+
+ virtual void cancelQuery();
+
+ void setEndSearch( WebQuery::Status );
+ void setNumStages( int numStages );
+ void enterNextStage();
+ QString download( const KURL& url );
+ QString downloadHTML( const KURL& url );
+ BibTeX::File *downloadBibTeXFile( const KURL& url, QTextStream::Encoding = QTextStream::UnicodeUTF8 );
+
+ private:
+ int m_currentStage;
+ int m_numStages;
+ KIO::TransferJob *m_currentJob;
+ int m_currentJobTotalSize;
+ QString m_incomingData;
+
+ private slots:
+ void slotCancelQuery();
+ void slotSetJobTotalSize( KIO::Job *job, KIO::filesize_t size );
+ void slotSetJobProcessedSize( KIO::Job *job, KIO::filesize_t size );
+ void slotJobData( KIO::Job *job, const QByteArray &data );
+ void slotJobFinished( KIO::Job *job );
+ };
+
+ class WebQueryWizard: public QWidget
+ {
+ Q_OBJECT
+ public:
+ ~WebQueryWizard();
+
+ static int execute( QWidget *parent, QValueList<BibTeX::Entry*> &results );
+
+ signals:
+ void changeButtonOK( bool state );
+
+ protected:
+ KListView *m_listViewResults;
+ KComboBox *m_comboBoxEngines;
+ QWidgetStack *m_widgetStackQueries;
+ KURLLabel *m_disclaimerLabel;
+ QCheckBox *m_checkBoxImportAll;
+ QValueList<WebQuery*> m_webQueries;
+ KDialogBase *m_dlg;
+
+ WebQueryWizard( KDialogBase *dlg, const char* name = 0 );
+ void showEvent( QShowEvent * );
+
+ private slots:
+ void previewEntry( QListViewItem *item );
+ void importEnableChanging( );
+ void otherEngineSelected( int index );
+ void startSearch();
+ void endSearch( WebQuery::Status );
+ void addHit( BibTeX::Entry*, bool keepId = false );
+ void enableSearch( bool );
+ void openURL( const QString& );
+
+ private:
+ KPushButton *m_pushButtonSearch;
+
+ void setupGUI( );
+ void setupQueries();
+ void restoreWindowSize( KConfig *config );
+ void saveWindowSize( KConfig *config ) const;
+ };
+
+ class ResultsListViewItem: public QListViewItem
+ {
+ public:
+ ResultsListViewItem( QListView * parent, BibTeX::Entry *entry );
+ ~ResultsListViewItem();
+
+ BibTeX::Entry* entry();
+ private:
+ BibTeX::Entry *m_entry;
+ };
+}
+
+#endif
diff --git a/src/webqueryamatex.cpp b/src/webqueryamatex.cpp
new file mode 100644
index 0000000..8fcbb31
--- /dev/null
+++ b/src/webqueryamatex.cpp
@@ -0,0 +1,123 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qfile.h>
+#include <qapplication.h>
+#include <qregexp.h>
+#include <qbuffer.h>
+#include <qspinbox.h>
+
+#include <klineedit.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kio/netaccess.h>
+#include <kurl.h>
+
+#include <fileimporterbibtex.h>
+#include "webqueryamatex.h"
+
+namespace KBibTeX
+{
+ WebQueryAmatexWidget::WebQueryAmatexWidget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name )
+ {
+ init();
+ }
+
+ WebQueryAmatex::WebQueryAmatex( QWidget* parent ): WebQuery( parent )
+ {
+ m_widget = new WebQueryAmatexWidget( parent );
+ }
+
+ WebQueryAmatex::~WebQueryAmatex()
+ {
+ delete m_widget;
+ }
+
+ QString WebQueryAmatex::title()
+ {
+ return i18n( "Amatex" );
+ }
+
+ QString WebQueryAmatex::disclaimer()
+ {
+ return i18n( "About Amatex" );
+ }
+
+ QString WebQueryAmatex::disclaimerURL()
+ {
+ return QString( "http://www.2ndminute.org:8080/amatex/pages/about.jsp" );
+ }
+
+ WebQueryWidget *WebQueryAmatex::widget()
+ {
+ return m_widget;
+ }
+
+ void WebQueryAmatex::query()
+ {
+ WebQuery::query();
+ int numberOfResults = m_widget->spinBoxMaxHits->value();
+ setNumStages( 1 );
+
+ QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" ).replace( '$', "" );
+ if ( searchTerm.isEmpty() )
+ {
+ setEndSearch( WebQuery::statusInvalidQuery );
+ return;
+ }
+
+ KURL url = KURL( QString( "http://www.2ndminute.org:8080/amatex/search.do?lang=US&querry=%1&suchart=kwd" ).arg( searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ) );
+
+ QString key = searchTerm.replace( QRegExp( "[^-_+A-Za-z0-9]" ), "" );
+ int count = 0;
+ BibTeX::File *tmpBibFile = downloadBibTeXFile( url );
+ if ( tmpBibFile != NULL && !m_aborted )
+ {
+ for ( BibTeX::File::ElementList::iterator it = tmpBibFile->begin(); !m_aborted && count < numberOfResults && it != tmpBibFile->end(); ++it )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( entry != NULL )
+ {
+ entry->setId( QString( "Amatex_%1_%2" ).arg( key ).arg( ++count ) );
+ emit foundEntry( entry, false );
+ }
+ }
+
+ delete tmpBibFile;
+ setEndSearch( WebQuery::statusSuccess );
+ }
+ else if ( !m_aborted )
+ {
+ QString message = KIO::NetAccess::lastErrorString();
+ if ( message.isEmpty() )
+ message.prepend( '\n' );
+ message.prepend( QString( i18n( "Querying database '%1' failed." ) ).arg( title() ) );
+ KMessageBox::error( m_parent, message );
+ setEndSearch( WebQuery::statusError );
+ }
+ else
+ emit endSearch( WebQuery::statusAborted );
+
+ if ( tmpBibFile != NULL )
+ delete tmpBibFile;
+ }
+
+}
+#include "webqueryamatex.moc"
diff --git a/src/webqueryamatex.h b/src/webqueryamatex.h
new file mode 100644
index 0000000..d2486da
--- /dev/null
+++ b/src/webqueryamatex.h
@@ -0,0 +1,64 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXWEBQUERYAMATEX_H
+#define KBIBTEXWEBQUERYAMATEX_H
+
+#include <webquery.h>
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryAmatexWidget : public WebQueryWidget
+ {
+ Q_OBJECT
+ public:
+ WebQueryAmatexWidget( QWidget *parent, const char *name = 0 );
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryAmatex : public WebQuery
+ {
+ Q_OBJECT
+ public:
+ WebQueryAmatex( QWidget* parent );
+ virtual ~WebQueryAmatex();
+
+ void query();
+
+ QString title();
+ QString disclaimer();
+ QString disclaimerURL();
+
+ WebQueryWidget *widget();
+
+ protected:
+ void cancelQuery() { /* nothing */ };
+
+ private:
+ WebQueryAmatexWidget *m_widget;
+ };
+
+}
+
+#endif
diff --git a/src/webqueryarxiv.cpp b/src/webqueryarxiv.cpp
new file mode 100644
index 0000000..f24fa44
--- /dev/null
+++ b/src/webqueryarxiv.cpp
@@ -0,0 +1,568 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qfile.h>
+#include <qbuffer.h>
+#include <qspinbox.h>
+
+#include <klocale.h>
+#include <klineedit.h>
+#include <kmessagebox.h>
+#include <kurl.h>
+
+#include <fileimporterbibtex.h>
+#include <encoderxml.h>
+#include <settings.h>
+#include "webqueryarxiv.h"
+
+namespace KBibTeX
+{
+ WebQueryArXivWidget::WebQueryArXivWidget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name )
+ {
+ init();
+
+ Settings *settings = Settings::self();
+ QString value = settings->getWebQueryDefault( "ArXiv" );
+ value = value == QString::null ? "" : value;
+ lineEditQuery->setText( value );
+ slotTextChanged( value, true );
+ }
+
+ WebQueryArXiv::WebQueryArXiv( QWidget* parent )
+ : WebQuery( parent ), m_arXivServer( "www.arxiv.org" ),
+
+ /** examples:
+ Journal of Inefficient Algorithms 5 (2003) 35-39
+ Astrophys.J. 578 (2002) L103-L106
+ New J. Phys. 10 (2008) 033023
+ Physics Letters A 297 (2002) 4-8
+ Appl.Phys. B75 (2002) 655-665
+ JHEP 0611 (2006) 045
+ */
+ m_jourRef1( "^([a-zA-Z. ]+[a-zA-Z.])\\s*(\\d+)\\s+\\((\\d{4})\\)\\s+([0-9A-Z]+)(-([0-9A-Z]+))?$" ),
+
+ /** examples:
+ Journal of Inefficient Algorithms, Vol. 93, No. 2 (2009), pp. 42-51
+ International Journal of Quantum Information, Vol. 1, No. 4 (2003) 427-441
+ Stud. Hist. Phil. Mod. Phys., Vol 33 no 3 (2003), pp. 441-468
+ */
+ m_jourRef2( "^([a-zA-Z. ]+[a-zA-Z.]),\\s+Vol\\.?\\s+(\\d+)[,]?\\s+No\\.?\\s+(\\d+)\\s+\\((\\d{4})\\)[,]?\\s+(pp\\.\\s+)?(\\d+)(-(\\d+))?$" ),
+
+ /** examples:
+ Journal of Inefficient Algorithms, volume 4, number 1, pp. 12-21, 2008
+ Scientometrics, volume 69, number 3, pp. 669-687, 2006
+ */
+ m_jourRef3( "^([a-zA-Z. ]+),\\s+volume\\s+(\\d+),\\s+number\\s+(\\d+),\\s+pp\\.\\s+(\\d+)(-(\\d+))?,\\s+(\\d{4})$" ),
+
+ /** examples:
+ Journal of Inefficient Algorithms 4(1): 101-122, 2010
+ JHEP0809:131,2008
+ Phys.Rev.D78:013004,2008
+ Lect.NotesPhys.690:107-127,2006
+ Europhys. Letters 70:1-7 (2005)
+ Journal of Conflict Resolution 51(1): 58 - 88 (2007)
+ Journal of Artificial Intelligence Research (JAIR), 9:247-293
+ */
+ m_jourRef4( "^([a-zA-Z. ()]+)[,]?\\s*(\\d+)(\\((\\d+)\\))?:\\s*(\\d+)(\\s*-\\s*(\\d+))?(,\\s*(\\d{4})|\\s+\\((\\d{4})\\))?$" ),
+
+ /** examples:
+ Journal of Inefficient Algorithms vol. 31, 4 2000
+ Phys. Rev. A 71, 032339 (2005)
+ Phys. Rev. Lett. 91, 027901 (2003)
+ Phys. Rev. A 78, 013620 (2008)
+ Phys. Rev. E 62, 1842 (2000)
+ Rev. Mod. Phys. 79, 555 (2007)
+ J. Math. Phys. 49, 032105 (2008)
+ New J. Phys. 8, 58 (2006)
+ Phys. Rev. Lett. 91, 217905 (2003).
+ Physical Review B vol. 66, 161320(R) (2002)
+ ??? Phys. Rev. Lett. 89, 057902(1--4) (2002).
+ ??? J. Mod. Opt., 54, 2211 (2007)
+ */
+ m_jourRef5( "^([a-zA-Z. ]+)\\s+(vol\\.\\s+)?(\\d+),\\s+(\\d+)(\\([A-Z]+\\))?\\s+\\((\\d{4})\\)[.]?$" ),
+
+ /** examples:
+ Journal of Inefficient Algorithms, 11(2) (1999) 42-55
+ Learned Publishing, 20(1) (January 2007) 16-22
+ */
+ m_jourRef6( "^([a-zA-Z. ]+),\\s+(\\d+)\\((\\d+)\\)\\s+(\\(([A-Za-z]+\\s+)?(\\d{4})\\))?\\s+(\\d+)(-(\\d+))?$" ),
+
+ m_reJour( "^([a-zA-Z. ]+)" ), m_reYear( "\\b((18|19|20)\\d{2})\\b" ), m_rePages( "\\b([1-9]\\d{0,2})\\s*[-]+\\s*([1-9]\\d{0,2})\\b" )
+ {
+ m_importer = new BibTeX::FileImporterBibTeX( FALSE );
+ m_importer->setIgnoreComments( TRUE );
+ m_widget = new WebQueryArXivWidget( parent );
+ }
+
+ WebQueryArXiv::~WebQueryArXiv()
+ {
+ delete m_widget;
+ delete m_importer;
+ }
+
+ QString WebQueryArXiv::title()
+ {
+ return i18n( "arXiv" );
+ }
+
+ QString WebQueryArXiv::disclaimer()
+ {
+ return i18n( "arXiv is an archive for preprints" );
+ }
+
+ QString WebQueryArXiv::disclaimerURL()
+ {
+ return "http://www.arxiv.org/";
+ }
+
+ WebQueryWidget *WebQueryArXiv::widget()
+ {
+ return m_widget;
+ }
+
+ void WebQueryArXiv::cancelQuery()
+ {
+ m_urls.clear();
+ // FIXME: The following code crashes KBibTeX:
+ // if ( m_currentJob != NULL ) m_currentJob->kill( FALSE );
+ }
+
+ void WebQueryArXiv::query()
+ {
+ WebQuery::query();
+ Settings *settings = Settings::self();
+ settings->setWebQueryDefault( "ArXiv", m_widget->lineEditQuery->text() );
+
+ m_urls.clear();
+ m_numberOfResults = m_widget->spinBoxMaxHits->value();
+ setNumStages( m_numberOfResults + 1 );
+
+ QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" );
+ QStringList queryWords = QStringList::split( QRegExp( "\\s+" ), searchTerm );
+ if ( searchTerm.isEmpty() || queryWords.size() == 0 )
+ {
+ setEndSearch( WebQuery::statusInvalidQuery );
+ return;
+ }
+
+ QString query;
+ for ( unsigned int i = 0; i < queryWords.size() - 1; ++i )
+ query = query.append( "AND " ).append( queryWords[i] ).append( " " );
+ query.append( queryWords[queryWords.size()-1] );
+
+ KURL url = KURL( QString( "http://www.arxiv.org/find/all/1/all:+%2/0/1/0/all/0/1?per_page=%1" ).arg( m_numberOfResults ).arg( query.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ) );
+ m_currentJobMutex.lock();
+ KIO::Job *job = KIO::storedGet( url, FALSE, FALSE );
+ connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( unlockJob( KIO::Job * ) ) );
+ connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( arXivResult( KIO::Job * ) ) );
+ }
+
+ void WebQueryArXiv::unlockJob( KIO::Job * )
+ {
+ m_currentJobMutex.unlock();
+ }
+
+ void WebQueryArXiv::arXivResult( KIO::Job *job )
+ {
+ if ( job->error() == 0 && !m_aborted )
+ {
+ enterNextStage();
+
+ QBuffer data;
+ data.open( IO_WriteOnly );
+ data.writeBlock( dynamic_cast<KIO::StoredTransferJob*>( job )->data() );
+ data.close();
+ data.open( IO_ReadOnly );
+ QTextStream ts( &data );
+ QString result = ts.read();
+ data.close();
+
+ int p = -1;
+ m_totalHits = 0;
+ m_receivedHits = 0;
+ while ( !m_aborted && ( int ) m_totalHits < m_numberOfResults && ( p = result.find( "arXiv:", p + 1 ) ) >= 0 )
+ {
+ int p2 = result.find( "<", p + 2 );
+ QString hit = result.mid( p + 6, p2 - p - 6 );
+ ++m_totalHits;
+ p = p2 + 1;
+
+
+ KURL url = KURL( QString( "http://%2/abs/%1" ).arg( hit ).arg( m_arXivServer ) );
+ m_urls.append( url );
+ }
+
+ if ( m_totalHits == 0 )
+ setEndSearch( WebQuery::statusSuccess );
+ else if ( !m_urls.isEmpty() )
+ {
+ KURL url = m_urls.first();
+ m_urls.remove( url );
+ fetchFromAbstract( url );
+ }
+ }
+ else
+ setEndSearch( WebQuery::statusError );
+ }
+
+ void WebQueryArXiv::fetchFromAbstract( const KURL &abstractURL )
+ {
+ m_aborted = false;
+ m_currentJobMutex.lock();
+ KIO::Job *job = KIO::storedGet( abstractURL, FALSE, FALSE );
+ connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( unlockJob( KIO::Job * ) ) );
+ connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( arXivAbstractResult( KIO::Job * ) ) );
+ }
+
+ void WebQueryArXiv::arXivAbstractResult( KIO::Job *job )
+ {
+ if ( job->error() == 0 && !m_aborted )
+ {
+ ++m_receivedHits;
+ enterNextStage();
+
+ QBuffer data;
+ data.open( IO_WriteOnly );
+ data.writeBlock( dynamic_cast<KIO::StoredTransferJob*>( job )->data() );
+ data.close();
+ data.open( IO_ReadOnly );
+ QTextStream ts( &data );
+ QString result = BibTeX::EncoderXML::currentEncoderXML()->decode( ts.read() );
+ data.close();
+
+ /** find id */
+ int p = result.find( "arXiv:", 0 );
+ if ( p < 0 ) return;
+ int p2 = result.find( "<", p + 2 );
+ if ( p2 < 0 ) return;
+ QString id = result.mid( p + 6, p2 - p - 6 );
+
+ /** find cite_as */
+ QString citeas = "";
+ p = result.find( "Cite&nbsp;as", 0 );
+ p = result.find( ">arXiv:", p );
+ p2 = result.find( "</", p );
+ if ( p >= 0 && p2 >= 0 )
+ citeas = result.mid( p + 7, p2 - p - 7 );
+
+ BibTeX::Entry * entry = new BibTeX::Entry( BibTeX::Entry::etMisc, citeas.isEmpty() ? ( id.isEmpty() ? QString( "arXiv" ).append( m_receivedHits ) : id ) : citeas );
+
+ /** find abstract */
+ p = result.find( "Abstract:</span>", 0 );
+ if ( p < 0 ) return;
+ p2 = result.find( "</blockq", p + 14 );
+ if ( p2 < 0 ) return;
+ QString abstract = result.mid( p + 16, p2 - p - 16 ).replace( QRegExp( "\\s+" ), " " ).replace( QRegExp( "^\\s+|\\s+$" ), "" ).replace( QRegExp( "<[^>]+>" ), "" );
+ BibTeX::EntryField * field = new BibTeX::EntryField( BibTeX::EntryField::ftAbstract );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( abstract ) );
+
+ /** find authors */
+ BibTeX::PersonContainer *personContainer = new BibTeX::PersonContainer( Settings::self()->editing_FirstNameFirst );
+ p = -1;
+ while (( p = result.find( "/au:", p + 1 ) ) > 0 )
+ {
+ p = result.find( ">", p + 1 );
+ p2 = result.find( "<", p + 1 );
+ QString author = result.mid( p + 1, p2 - p - 1 );
+ personContainer->persons.append( new BibTeX::Person( author ) );
+ }
+ if ( personContainer->persons.isEmpty() )
+ delete personContainer;
+ else
+ {
+ BibTeX::EntryField * field = new BibTeX::EntryField( BibTeX::EntryField::ftAuthor );
+ entry->addField( field );
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( personContainer );
+ field->setValue( value );
+ }
+
+ /** find title */
+ p = result.find( "Title:</span>", 0 );
+ p2 = result.find( "<", p + 10 );
+ if ( p >= 0 && p2 >= 0 )
+ {
+ QString title = result.mid( p + 13, p2 - p - 13 ).replace( QRegExp( "\\s+" ), " " ).replace( QRegExp( "^\\s+|\\s+$" ), "" );
+ BibTeX::EntryField * field = new BibTeX::EntryField( BibTeX::EntryField::ftTitle );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( title ) );
+ }
+
+ /** find month and year */
+ p = result.find( "Submitted on", 0 );
+ while (( p2 = result.find( "last revised", p + 1 ) ) >= 0 )
+ p = p2;
+ p2 = result.find( QRegExp( "\\d\\d\\d\\d" ), p );
+ bool ok = FALSE;
+ int year = result.mid( p2, 4 ).toInt( &ok );
+ if ( !ok ) year = 0;
+ if ( year > 1000 )
+ {
+ BibTeX::EntryField * field = new BibTeX::EntryField( BibTeX::EntryField::ftYear );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( QString::number( year ) ) );
+ }
+ p2 = result.find( QRegExp( "\\b[A-Z][a-z]{2}\\b" ), p );
+ if ( p2 >= 0 )
+ {
+ QString month = result.mid( p2, 3 ).lower();
+ BibTeX::EntryField * field = new BibTeX::EntryField( BibTeX::EntryField::ftMonth );
+ entry->addField( field );
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::MacroKey( month ) );
+ field->setValue( value );
+ }
+
+ /** find DOI */
+ p = result.find( "http://dx.doi.org/", 0 );
+ p2 = result.find( "\"", p + 1 );
+ if ( p >= 0 && p2 >= 0 )
+ {
+ QString doi = result.mid( p, p2 - p );
+ BibTeX::EntryField * field = new BibTeX::EntryField( BibTeX::EntryField::ftDoi );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( doi ) );
+ }
+
+ /** find keywords */
+ p = result.find( "<td class=\"tablecell subjects\">", 0 );
+ p2 = result.find( "</td>", p + 1 );
+ if ( p >= 0 && p2 >= 0 )
+ {
+ QString keywords = result.mid( p + 31, p2 - p - 31 ).replace( QRegExp( "</?span[^>]*>" ), "" );
+ BibTeX::EntryField * field = new BibTeX::EntryField( BibTeX::EntryField::ftKeywords );
+ entry->addField( field );
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::KeywordContainer( keywords ) );
+ field->setValue( value );
+ }
+
+ /** find ACM classes */
+ p = result.find( "<td class=\"tablecell acm-classes\">", 0 );
+ p2 = result.find( "</td>", p + 1 );
+ if ( p >= 0 && p2 >= 0 )
+ {
+ QString acmclasses = result.mid( p + 34, p2 - p - 34 );
+ BibTeX::EntryField * field = new BibTeX::EntryField( "acm-classes" );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( acmclasses ) );
+ }
+
+ /** find versions */
+ for ( int v = 1; !m_aborted && v < 20; ++v )
+ {
+ p = result.find( QString( ">[v%1]<" ).arg( v ), 0 );
+ if ( p < 0 ) break;
+
+ int p3 = result.findRev( "href=\"", p );
+ if ( p3 >= 0 && p3 > p - 40 )
+ {
+ p2 = result.find( "\">", p3 );
+ if ( p2 >= 0 )
+ {
+ QString url = result.mid( p3 + 6, p2 - p3 - 6 );
+ BibTeX::EntryField * field = new BibTeX::EntryField( QString( "v%1url" ).arg( v ) );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( QString( "http://www.arxiv.org" ).append( url ) ) );
+ }
+ }
+ p = result.find( "</b>", p + 1 );
+ p2 = result.find( "<br", p + 1 );
+ if ( p >= 0 && p2 >= 0 )
+ {
+ QString version = result.mid( p + 5, p2 - p - 5 );
+ BibTeX::EntryField * field = new BibTeX::EntryField( QString( "v%1descr" ).arg( v ) );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( version ) );
+ }
+ }
+
+ /** find tech report reference */
+ p = result.find( "<td class=\"tablecell report-number\">", 0 );
+ p2 = result.find( "</td>", p + 1 );
+ if ( p >= 0 && p2 >= 0 )
+ {
+ QString techRepNr = result.mid( p + 36, p2 - p - 36 );
+ BibTeX::EntryField * field = new BibTeX::EntryField( BibTeX::EntryField::ftNumber );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( techRepNr ) );
+ entry->setEntryType( BibTeX::Entry::etTechReport );
+ }
+
+ /** find journal reference */
+ p = result.find( "<td class=\"tablecell jref\">", 0 );
+ p2 = result.find( "</td>", p + 1 );
+ if ( p >= 0 && p2 >= 0 )
+ {
+ QString jref = result.mid( p + 27, p2 - p - 27 );
+ jref.replace( "\n", " " );
+
+ QString jTitle = "";
+ QString jVol = "";
+ QString jNo = "";
+ QString jYear = "";
+ QString jPage1 = "";
+ QString jPage2 = "";
+
+ // m_jourRef1( "^([a-zA-Z. ]+[a-zA-Z.])\\s*(\\d+)\\s+\\((\\d{4})\\)\\s+([0-9A-Z]+)(-([0-9A-Z]+))?$" )
+ if ( m_jourRef1.search( jref ) == 0 )
+ {
+ jTitle = m_jourRef1.cap( 1 );
+ jVol = m_jourRef1.cap( 2 );
+ jYear = m_jourRef1.cap( 3 );
+ jPage1 = m_jourRef1.cap( 4 );
+ jPage2 = m_jourRef1.cap( 6 );
+ }
+ // m_jourRef2( "^([a-zA-Z. ]+[a-zA-Z.]),\s+Vol[.]?\s+(\d+)[,]?\s+No[.]?\s+(\d+)\s+\((\d{4})\)[,]?\s+(pp\.\s+)?(\d+)(-(\d+))?$" )
+ else if ( m_jourRef2.search( jref ) == 0 )
+ {
+ jTitle = m_jourRef2.cap( 1 );
+ jVol = m_jourRef2.cap( 2 );
+ jNo = m_jourRef2.cap( 3 );
+ jYear = m_jourRef2.cap( 4 );
+ jPage1 = m_jourRef2.cap( 6 );
+ jPage2 = m_jourRef2.cap( 8 );
+ }
+ // m_jourRef3( "^([a-zA-Z. ]+),\\s+volume\\s+(\\d+),\\s+number\\s+(\\d+),\\s+pp\\.\\s+(\\d+)(-(\\d+))?,\\s+(\\d{4})$" )
+ else if ( m_jourRef3.search( jref ) == 0 )
+ {
+ jTitle = m_jourRef3.cap( 1 );
+ jVol = m_jourRef3.cap( 2 );
+ jNo = m_jourRef3.cap( 3 );
+ jPage1 = m_jourRef3.cap( 4 );
+ jPage2 = m_jourRef3.cap( 6 );
+ jYear = m_jourRef3.cap( 7 );
+ }
+ // m_jourRef4("^([a-zA-Z. ()]+[a-zA-Z.()])[,]?\\s*(\\d+)(\\((\\d+)\\))?:\\s*(\\d+)(\\s*-\\s*(\\d+))?(,\\s*(\\d{4})|\\s+\\((\\d{4})\\))?$")
+ else if ( m_jourRef4.search( jref ) == 0 )
+ {
+ jTitle = m_jourRef4.cap( 1 );
+ jVol = m_jourRef4.cap( 2 );
+ jNo = m_jourRef4.cap( 4 );
+ jPage1 = m_jourRef4.cap( 5 );
+ jPage2 = m_jourRef4.cap( 7 );
+ jYear = m_jourRef4.cap( 9 ).append( m_jourRef4.cap( 10 ) );
+ }
+ // m_jourRef5("^([a-zA-Z. ]+)\\s+(vol\\.\\s+)?(\\d+),\\s+(\\d+)(\\([A-Z]+\\))?\\s+\\((\\d{4})\\)[.]?$")
+ else if ( m_jourRef5.search( jref ) == 0 )
+ {
+ jTitle = m_jourRef5.cap( 1 );
+ jVol = m_jourRef5.cap( 3 );
+ jPage1 = m_jourRef5.cap( 4 );
+ jYear = m_jourRef5.cap( 6 );
+ }
+ // m_jourRef6("^([a-zA-Z. ]+),\\s+(\\d+)\\((\\d+)\\)\\s+(\\(([A-Za-z]+\\s+)?(\\d{4})\\))?\\s+(\\d+)(-(\\d+))?$")
+ else if ( m_jourRef6.search( jref ) == 0 )
+ {
+ jTitle = m_jourRef6.cap( 1 );
+ jVol = m_jourRef6.cap( 2 );
+ jNo = m_jourRef6.cap( 3 );
+ jYear = m_jourRef6.cap( 6 );
+ jPage1 = m_jourRef6.cap( 7 );
+ jPage2 = m_jourRef6.cap( 9 );
+ }
+ else
+ {
+ if ( m_reJour.search( jref ) == 0 )
+ jTitle = m_reJour.cap( 1 );
+ if ( m_reYear.search( jref ) == 0 )
+ jYear = m_reYear.cap( 1 );
+ if ( m_rePages.search( jref ) > -1 )
+ {
+ jPage1 = m_rePages.cap( 1 );
+ jPage2 = m_rePages.cap( 2 );
+ }
+ }
+
+ if ( !jTitle.isEmpty() )
+ {
+ entry->deleteField( BibTeX::EntryField::ftJournal );
+ BibTeX::EntryField * field = new BibTeX::EntryField( BibTeX::EntryField::ftJournal );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( jTitle ) );
+ entry->setEntryType( BibTeX::Entry::etArticle );
+ }
+ if ( !jVol.isEmpty() )
+ {
+ entry->deleteField( BibTeX::EntryField::ftVolume );
+ BibTeX::EntryField * field = new BibTeX::EntryField( BibTeX::EntryField::ftVolume );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( jVol ) );
+ }
+ if ( !jNo.isEmpty() )
+ {
+ entry->deleteField( BibTeX::EntryField::ftNumber );
+ BibTeX::EntryField * field = new BibTeX::EntryField( BibTeX::EntryField::ftNumber );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( jNo ) );
+ }
+ if ( !jYear.isEmpty() )
+ {
+ entry->deleteField( BibTeX::EntryField::ftYear );
+ entry->deleteField( BibTeX::EntryField::ftMonth );
+ BibTeX::EntryField * field = new BibTeX::EntryField( BibTeX::EntryField::ftYear );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( jYear ) );
+ }
+ if ( !jPage1.isEmpty() )
+ {
+ entry->deleteField( BibTeX::EntryField::ftPages );
+ BibTeX::EntryField * field = new BibTeX::EntryField( BibTeX::EntryField::ftPages );
+ entry->addField( field );
+ QString text = jPage1;
+ if ( !jPage2.isEmpty() ) text.append( "--" ).append( jPage2 );
+ field->setValue( new BibTeX::Value( text ) );
+ }
+ }
+
+ if ( result.find( QRegExp( "Ph\\.?D\\.? Thesis", FALSE ), 0 ) >= 0 )
+ entry->setEntryType( BibTeX::Entry::etPhDThesis );
+
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftURL );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( QString( "http://arxiv.org/abs/%1" ).arg( id ) ) );
+
+ field = new BibTeX::EntryField( "pdf" );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( QString( "http://arxiv.org/pdf/%1" ).arg( id ) ) );
+
+ emit foundEntry( entry, false );
+
+ if ( m_totalHits == m_receivedHits )
+ setEndSearch( WebQuery::statusSuccess );
+ else if ( !m_urls.isEmpty() )
+ {
+ KURL url = m_urls.first();
+ m_urls.remove( url );
+ m_currentJobMutex.lock();
+ KIO::Job *job = KIO::storedGet( url, FALSE, FALSE );
+ connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( unlockJob( KIO::Job * ) ) );
+ connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( arXivAbstractResult( KIO::Job * ) ) );
+ }
+ else
+ setEndSearch( WebQuery::statusSuccess );
+ }
+ else
+ setEndSearch( WebQuery::statusError );
+ }
+
+}
+#include "webqueryarxiv.moc"
diff --git a/src/webqueryarxiv.h b/src/webqueryarxiv.h
new file mode 100644
index 0000000..6bebb9b
--- /dev/null
+++ b/src/webqueryarxiv.h
@@ -0,0 +1,87 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXWEBQUERYARXIV_H
+#define KBIBTEXWEBQUERYARXIV_H
+
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qregexp.h>
+
+#include <kio/job.h>
+
+#include <fileimporterbibtex.h>
+#include <webquery.h>
+
+class QBuffer;
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryArXivWidget : public WebQueryWidget
+ {
+ Q_OBJECT
+ public:
+ WebQueryArXivWidget( QWidget *parent, const char *name = 0 );
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryArXiv : public WebQuery
+ {
+ Q_OBJECT
+ public:
+ WebQueryArXiv( QWidget* parent );
+ virtual ~WebQueryArXiv();
+
+ void query();
+
+ QString title();
+ QString disclaimer();
+ QString disclaimerURL();
+
+ WebQueryWidget *widget();
+
+ void fetchFromAbstract( const KURL &abstractURL );
+
+ protected:
+ void cancelQuery();
+
+ private slots:
+ void arXivResult( KIO::Job *job );
+ void unlockJob( KIO::Job *job );
+ void arXivAbstractResult( KIO::Job *job );
+
+ private:
+ QString m_lastHit;
+ BibTeX::FileImporterBibTeX *m_importer;
+ QString m_arXivServer;
+ int m_numberOfResults, m_totalHits, m_receivedHits;
+ QMutex m_currentJobMutex;
+ QValueList<KURL> m_urls;
+ WebQueryArXivWidget *m_widget;
+
+ QRegExp m_jourRef1, m_jourRef2, m_jourRef3, m_jourRef4, m_jourRef5, m_jourRef6, m_reJour, m_reYear, m_rePages;
+ };
+}
+
+#endif
diff --git a/src/webquerybibsonomy.cpp b/src/webquerybibsonomy.cpp
new file mode 100644
index 0000000..135d72b
--- /dev/null
+++ b/src/webquerybibsonomy.cpp
@@ -0,0 +1,127 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qapplication.h>
+#include <qfile.h>
+#include <qregexp.h>
+#include <qstring.h>
+#include <qspinbox.h>
+
+#include <klocale.h>
+#include <klineedit.h>
+#include <kmessagebox.h>
+#include <kio/netaccess.h>
+#include <kurl.h>
+
+#include <settings.h>
+#include <fileimporterbibtex.h>
+#include "webquerybibsonomy.h"
+
+namespace KBibTeX
+{
+ WebQueryBibSonomyWidget::WebQueryBibSonomyWidget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name )
+ {
+ init();
+
+ Settings *settings = Settings::self();
+ QString value = settings->getWebQueryDefault( "BibSonomy" );
+ value = value == QString::null ? "" : value;
+ lineEditQuery->setText( value );
+ slotTextChanged( value, true );
+ }
+
+
+ WebQueryBibSonomy::WebQueryBibSonomy( QWidget* parent ): WebQuery( parent )
+ {
+ m_widget = new WebQueryBibSonomyWidget( parent );
+ }
+
+ WebQueryBibSonomy::~WebQueryBibSonomy()
+ {
+ delete m_widget;
+ }
+
+ QString WebQueryBibSonomy::title()
+ {
+ return i18n( "BibSonomy" );
+ }
+
+ QString WebQueryBibSonomy::disclaimer()
+ {
+ return i18n( "BibSonomy bookmark sharing system" );
+ }
+
+ QString WebQueryBibSonomy::disclaimerURL()
+ {
+ return "http://www.bibsonomy.org/help/about/";
+ }
+
+ WebQueryWidget *WebQueryBibSonomy::widget()
+ {
+ return m_widget;
+ }
+
+ void WebQueryBibSonomy::query()
+ {
+ WebQuery::query();
+ Settings *settings = Settings::self();
+ settings->setWebQueryDefault( "BibSonomy", m_widget->lineEditQuery->text() );
+
+ setNumStages( 1 );
+
+ QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" );
+ if ( searchTerm.isEmpty() )
+ {
+ setEndSearch( WebQuery::statusInvalidQuery );
+ return;
+ }
+
+ int numberOfResults = m_widget->spinBoxMaxHits->value();
+
+ KURL url = KURL( QString( "http://www.bibsonomy.org/bib/search/%2?items=%1" ).arg( numberOfResults ) .arg( searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ) );
+
+ BibTeX::File *bibFile = downloadBibTeXFile( url );
+ if ( bibFile != NULL && !m_aborted )
+ {
+ for ( BibTeX::File::ElementList::iterator it = bibFile->begin(); it != bibFile->end(); ++it )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( entry != NULL )
+ emit foundEntry( entry, false );
+ }
+ setEndSearch( WebQuery::statusSuccess );
+ }
+ else if ( !m_aborted )
+ {
+ QString message = KIO::NetAccess::lastErrorString();
+ if ( message.isEmpty() )
+ message.prepend( '\n' );
+ message.prepend( QString( i18n( "Querying database '%1' failed." ) ).arg( title() ) );
+ KMessageBox::error( m_parent, message );
+ setEndSearch( WebQuery::statusError );
+ }
+ else
+ setEndSearch( WebQuery::statusAborted );
+
+ if ( bibFile != NULL )
+ delete bibFile;
+ }
+}
+#include "webquerybibsonomy.moc"
diff --git a/src/webquerybibsonomy.h b/src/webquerybibsonomy.h
new file mode 100644
index 0000000..216771a
--- /dev/null
+++ b/src/webquerybibsonomy.h
@@ -0,0 +1,64 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXWEBQUERYBIBSONOMY_H
+#define KBIBTEXWEBQUERYBIBSONOMY_H
+
+#include <webquery.h>
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryBibSonomyWidget : public WebQueryWidget
+ {
+ Q_OBJECT
+ public:
+ WebQueryBibSonomyWidget( QWidget *parent, const char *name = 0 );
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+
+ class WebQueryBibSonomy : public WebQuery
+ {
+ Q_OBJECT
+ public:
+ WebQueryBibSonomy( QWidget* parent );
+ virtual ~WebQueryBibSonomy();
+
+ void query();
+
+ QString title();
+ QString disclaimer();
+ QString disclaimerURL();
+
+ WebQueryWidget *widget();
+
+ protected:
+ void cancelQuery() { /* nothing */ };
+
+ private:
+ WebQueryBibSonomyWidget *m_widget;
+ };
+}
+
+#endif
diff --git a/src/webquerycitebase.cpp b/src/webquerycitebase.cpp
new file mode 100644
index 0000000..a12f400
--- /dev/null
+++ b/src/webquerycitebase.cpp
@@ -0,0 +1,129 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qapplication.h>
+#include <qfile.h>
+#include <qstring.h>
+#include <qspinbox.h>
+
+#include <klineedit.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kio/netaccess.h>
+#include <kurl.h>
+
+#include <settings.h>
+#include <fileimporterbibtex.h>
+#include "webquerycitebase.h"
+
+namespace KBibTeX
+{
+ WebQueryCitebaseWidget::WebQueryCitebaseWidget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name )
+ {
+ init();
+
+ Settings *settings = Settings::self();
+ QString value = settings->getWebQueryDefault( "Citebase" );
+ value = value == QString::null ? "" : value;
+ lineEditQuery->setText( value );
+ slotTextChanged( value, true );
+ }
+
+
+ WebQueryCitebase::WebQueryCitebase( QWidget* parent ): WebQuery( parent )
+ {
+ m_widget = new WebQueryCitebaseWidget( parent );
+ }
+
+ WebQueryCitebase::~WebQueryCitebase()
+ {
+ delete m_widget;
+ }
+
+ QString WebQueryCitebase::title()
+ {
+ return i18n( "Citebase" );
+ }
+
+ QString WebQueryCitebase::disclaimer()
+ {
+ return i18n( "Citebase citation index" );
+ }
+
+ QString WebQueryCitebase::disclaimerURL()
+ {
+ return "http://www.citebase.org/";
+ }
+
+ WebQueryWidget *WebQueryCitebase::widget()
+ {
+ return m_widget;
+ }
+
+ void WebQueryCitebase::query()
+ {
+ WebQuery::query();
+ Settings *settings = Settings::self();
+ settings->setWebQueryDefault( "Citebase", m_widget->lineEditQuery->text() );
+
+ setNumStages( 1 );
+ int numberOfResults = m_widget->spinBoxMaxHits->value();
+
+ QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" );
+ if ( searchTerm.isEmpty() )
+ {
+ setEndSearch( WebQuery::statusInvalidQuery );
+ return;
+ }
+
+ KURL url = KURL( QString( "http://www.citebase.org/search?submitted=Search&author=&maxrows=%1&yearfrom=&format=BibTeX&order=DESC&type=metadata&title=%2&publication=&yearuntil=&rank=paperimpact" ).arg( numberOfResults ).arg( searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ) );
+ BibTeX::File *tmpBibFile = downloadBibTeXFile( url );
+ if ( tmpBibFile != NULL && !m_aborted )
+ {
+ int count = numberOfResults;
+ for ( BibTeX::File::ElementList::iterator it = tmpBibFile->begin(); count > 0 && it != tmpBibFile->end(); ++it )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( entry != NULL )
+ {
+ emit foundEntry( new BibTeX::Entry( entry ), false );
+ --count;
+ }
+ }
+
+ setEndSearch( WebQuery::statusSuccess );
+ }
+ else if ( !m_aborted )
+ {
+ QString message = KIO::NetAccess::lastErrorString();
+ if ( message.isEmpty() )
+ message.prepend( '\n' );
+ message.prepend( QString( i18n( "Querying database '%1' failed." ) ).arg( title() ) );
+ KMessageBox::error( m_parent, message );
+ setEndSearch( WebQuery::statusError );
+ }
+ else
+ setEndSearch( WebQuery::statusAborted );
+
+ if ( tmpBibFile != NULL )
+ delete tmpBibFile;
+ }
+}
+#include "webquerycitebase.moc"
diff --git a/src/webquerycitebase.h b/src/webquerycitebase.h
new file mode 100644
index 0000000..346d1e4
--- /dev/null
+++ b/src/webquerycitebase.h
@@ -0,0 +1,64 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXWEBQUERYCITEBASE_H
+#define KBIBTEXWEBQUERYCITEBASE_H
+
+#include <webquery.h>
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryCitebaseWidget : public WebQueryWidget
+ {
+ Q_OBJECT
+ public:
+ WebQueryCitebaseWidget( QWidget *parent, const char *name = 0 );
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryCitebase : public WebQuery
+ {
+ Q_OBJECT
+ public:
+ WebQueryCitebase( QWidget* parent );
+ virtual ~WebQueryCitebase();
+
+ void query();
+
+ QString title();
+ QString disclaimer();
+ QString disclaimerURL();
+
+ WebQueryWidget *widget();
+
+ protected:
+ void cancelQuery() { /* nothing */ };
+
+ private:
+ WebQueryCitebaseWidget *m_widget;
+ };
+
+}
+
+#endif
diff --git a/src/webqueryciteseerx.cpp b/src/webqueryciteseerx.cpp
new file mode 100644
index 0000000..d5d244e
--- /dev/null
+++ b/src/webqueryciteseerx.cpp
@@ -0,0 +1,318 @@
+/***************************************************************************
+ * Copyright (C) 2008 by Jacob Kanev <j_kanev@arcor.de>, *
+ * Thomas Fischer <fischer@unix-ag.uni-kl.de> *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qfile.h>
+#include <qregexp.h>
+#include <qbuffer.h>
+#include <qspinbox.h>
+
+#include <klocale.h>
+#include <klineedit.h>
+#include <kmessagebox.h>
+#include <kurl.h>
+#include <kdebug.h>
+
+#include <fileimporterbibtex.h>
+#include <encoderxml.h>
+#include <settings.h>
+#include "webqueryciteseerx.h"
+
+using BibTeX::Value;
+using BibTeX::Entry;
+using BibTeX::EntryField;
+
+namespace KBibTeX
+{
+
+ //_______________________________________________________________________________________________________________
+ // Construct widget
+
+ WebQueryCiteSeerXWidget::WebQueryCiteSeerXWidget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name )
+ {
+ init();
+
+ Settings *settings = Settings::self();
+ QString value = settings->getWebQueryDefault( "CiteSeerX" );
+ value = value == QString::null ? "" : value;
+ lineEditQuery->setText( value );
+ slotTextChanged( value, true );
+ }
+
+
+ //_______________________________________________________________________________________________________________
+ // Construct
+
+ WebQueryCiteSeerX::WebQueryCiteSeerX( QWidget* parent )
+ : WebQuery( parent ), m_citeSeerXServer( "citeseerx.ist.psu.edu" )
+ {
+ m_widget = new WebQueryCiteSeerXWidget( parent );
+ }
+
+
+ //_______________________________________________________________________________________________________________
+ // Destroy
+
+ WebQueryCiteSeerX::~WebQueryCiteSeerX()
+ {
+ delete m_widget;
+ }
+
+
+ //_______________________________________________________________________________________________________________
+ // GUI string
+
+ QString WebQueryCiteSeerX::title()
+ {
+ return i18n( "CiteSeerX" );
+ }
+
+
+ //_______________________________________________________________________________________________________________
+ // GUI info
+
+ QString WebQueryCiteSeerX::disclaimer()
+ {
+ return i18n( "About CiteSeerX" );
+ }
+
+
+ //_______________________________________________________________________________________________________________
+ // URL for disclaimer
+
+ QString WebQueryCiteSeerX::disclaimerURL()
+ {
+ return "http://citeseerx.ist.psu.edu/about/site";
+ }
+
+
+ //_______________________________________________________________________________________________________________
+ // return pointer to widget
+
+ WebQueryWidget *WebQueryCiteSeerX::widget()
+ {
+ return m_widget;
+ }
+
+
+ //_______________________________________________________________________________________________________________
+ // user has pressed "Cancel"
+
+ void WebQueryCiteSeerX::cancelQuery()
+ {
+ m_queryQueue.clear();
+ }
+
+
+ //_______________________________________________________________________________________________________________
+ // main function -- collects all queries for one search
+
+ void WebQueryCiteSeerX::query()
+ {
+ // store CiteSeerX as future default
+ WebQuery::query();
+ Settings *settings = Settings::self();
+ settings->setWebQueryDefault( "CiteSeerX", m_widget->lineEditQuery->text() );
+
+ // read number of desired results from GUI
+ m_queryQueue.clear();
+ m_desiredHits = m_widget->spinBoxMaxHits->value();
+ // one for each entry, and one for each page of 10 links
+ setNumStages( m_desiredHits + ( m_desiredHits / 10 + 1 ) );
+
+ // prepare search term
+ QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" );
+ QStringList queryWords = QStringList::split( QRegExp( "\\s+" ), searchTerm );
+
+ if ( searchTerm.isEmpty() || queryWords.size() == 0 )
+ {
+ setEndSearch( WebQuery::statusInvalidQuery );
+ return;
+ }
+
+ // build query from search term
+ QString query;
+
+ for ( uint i = 0; i < queryWords.size(); ++i )
+ {
+ if ( i ) query += " AND ";
+
+ query += queryWords[i];
+ }
+
+ query = query.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" );
+
+ // schedule jobs
+ DataRequest dr;
+ dr.url = KURL( QString( "http://citeseerx.ist.psu.edu/search?q=" ).append( query ).append( "&submit=Search&sort=rel" ) );
+ dr.parser = &WebQueryCiteSeerX::parseSummaryPage;
+ m_queryQueue.push_back( dr );
+
+ // start job queue
+ nextJob();
+ }
+
+
+ //_______________________________________________________________________________________________________________
+ // process results from current job
+
+ void WebQueryCiteSeerX::parseSummaryPage( const QString& data )
+ {
+ // regexp. for finding paper entries (example: href="/viewdoc/summary;jsessionid=12345ABCD?doi=10.1.1.108.9937")
+ QRegExp paperXpr( "href=\"(/viewdoc/summary[^?]*\\?doi=[^\"]+)\"" );
+
+ // count paper results and schedule single paper URLs
+
+ for ( int p = paperXpr.search( data ); p >= 0; p = paperXpr.search( data, p + paperXpr.matchedLength() ) )
+ {
+ if ( ++m_receivedHits > m_desiredHits )
+ break;
+
+ DataRequest dr;
+
+ dr.url = KURL( QString( "http://" ) + m_citeSeerXServer + paperXpr.cap( 1 ) );
+
+ dr.parser = &WebQueryCiteSeerX::parsePaperPage;
+
+ m_queryQueue.push_back( dr );
+ }
+
+ // if we haven't reached the desired number of hits, schedule the next summary page
+ QRegExp nextSummaryXpr( "<a href=\"([^\"]+)\">Next 10" );
+
+ if ( m_receivedHits < m_desiredHits )
+ if ( nextSummaryXpr.search( data ) >= 0 )
+ {
+ DataRequest dr;
+ dr.url = KURL( QString( "http://" ) + m_citeSeerXServer + nextSummaryXpr.cap( 1 ).replace( "&amp;", "&" ) );
+ dr.parser = &WebQueryCiteSeerX::parseSummaryPage;
+ m_queryQueue.push_back( dr );
+ }
+ }
+
+
+ //_______________________________________________________________________________________________________________
+ // process the result of one single paper link
+
+ void WebQueryCiteSeerX::parsePaperPage( const QString& data )
+ {
+ // find type and id: @XXX{ YYY
+ QRegExp typeIdXpr( "@(.*)\\{(.*)," );
+ typeIdXpr.setMinimal( true );
+ typeIdXpr.search( data );
+ QString typeStr = typeIdXpr.cap( 1 );
+ QString id = typeIdXpr.cap( 2 );
+
+ // create entry
+ Entry *entry = new BibTeX::Entry( typeIdXpr.cap( 1 ), typeIdXpr.cap( 2 ) );
+
+ // find abstract: <..>Abstract:</..> <..> XXX </..>
+ parseForSingleExpression( "<[^<]+>Abstract:</[^<]+>\\s*<[^<]+>([^<]+)</[^<]+>", data, entry, BibTeX::EntryField::ftAbstract );
+
+ // find title: title = {XXX}
+ parseForSingleExpression( "title = \\{([^}]+)\\}", data, entry, BibTeX::EntryField::ftTitle );
+
+ // find author: author = {XXX}
+ parseForSingleExpression( "author = \\{([^}]+)\\}", data, entry, BibTeX::EntryField::ftAuthor );
+
+ // find year: year = {XXX}
+ parseForSingleExpression( "year = \\{([^}]+)\\}", data, entry, BibTeX::EntryField::ftYear );
+
+ // find journal: journal = {XXX}
+ parseForSingleExpression( "journal = \\{([^}]+)\\}", data, entry, BibTeX::EntryField::ftJournal );
+
+ // find pages: pages = {XXX}
+ parseForSingleExpression( "pages = \\{([^}]+)\\}", data, entry, BibTeX::EntryField::ftPages );
+
+ // publish what we've found
+ emit foundEntry( entry, false );
+ }
+
+
+ //_______________________________________________________________________________________________________________
+ // find single bibtex field in html page and add to entry
+
+ void WebQueryCiteSeerX::parseForSingleExpression( QString description, const QString &data, Entry *entry, BibTeX::EntryField::FieldType type )
+ {
+ // search, and add to entry if found
+ QRegExp xpr( description );
+
+ if ( xpr.search( data ) + 1 )
+ {
+ EntryField *field = new EntryField( type );
+ field->setValue( new Value( xpr.cap( 1 ), false ) );
+ entry->addField( field );
+ }
+ }
+
+
+ //_______________________________________________________________________________________________________________
+ // read data from the job and start the current parser
+
+ void WebQueryCiteSeerX::getData( KIO::Job *job )
+ {
+ // advance GUI progress bar
+ enterNextStage();
+
+ if ( job && !job->error() && !m_aborted )
+ {
+
+ // read data
+ QBuffer data;
+ data.open( IO_WriteOnly );
+ data.writeBlock( dynamic_cast<KIO::StoredTransferJob*>( job )->data() );
+ data.close();
+ data.open( IO_ReadOnly );
+ QTextStream ts( &data );
+ QString result = ts.read();
+ data.close();
+
+ // hand the read data over to the parser
+ ( this->*m_currentParser )( result );
+ }
+
+ // proceed
+ nextJob();
+ }
+
+
+ //_______________________________________________________________________________________________________________
+ // call the next job
+
+ void WebQueryCiteSeerX::nextJob()
+ {
+ // no more requests: finished
+ if ( !m_queryQueue.size() )
+ {
+ setEndSearch( WebQuery::statusSuccess );
+ m_receivedHits = 0;
+ }
+ // else: take the next request from queue and start it
+ else if ( !m_aborted )
+ {
+ m_currentParser = m_queryQueue.front().parser;
+ KIO::Job *job = KIO::storedGet( m_queryQueue.front().url, FALSE, FALSE );
+ m_queryQueue.pop_front();
+ connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( getData( KIO::Job * ) ) );
+ }
+ }
+
+}
+
+#include "webqueryciteseerx.moc"
diff --git a/src/webqueryciteseerx.h b/src/webqueryciteseerx.h
new file mode 100644
index 0000000..458e188
--- /dev/null
+++ b/src/webqueryciteseerx.h
@@ -0,0 +1,141 @@
+/***************************************************************************
+ * Copyright (C) 2008 by Jacob Kanev <j_kanev@arcor.de>, *
+ * Thomas Fischer <fischer@unix-ag.uni-kl.de> *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXWEBQUERYCITESEERX_H
+#define KBIBTEXWEBQUERYCITESEERX_H
+
+#include <qstring.h>
+#include <qstringlist.h>
+
+#include <kio/job.h>
+
+#include <fileimporterbibtex.h>
+#include <webquery.h>
+
+#include <deque>
+
+class QBuffer;
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+
+ class WebQueryCiteSeerXWidget : public WebQueryWidget
+ {
+ Q_OBJECT
+
+ public:
+ WebQueryCiteSeerXWidget( QWidget *parent, const char *name = 0 );
+ };
+
+
+ /// Convinience typedef for member pointer to parsing function
+
+ class WebQueryCiteSeerX;
+ typedef void ( WebQueryCiteSeerX::* DataParser )( const QString & );
+
+ /// Query the citeseer database.
+ /** This class is used for querying the citeseer data base. CiteSeerX is still beta, so this class has to be adapted as soon as the CiteSeer people change their web interface. After entering the search term, citeseer returns a page with 10 links (one for each paper), and one link for the next 10 hits. This class uses a queue to schedule each reading job, and two parsing functions, one for the summary page and one for each paper result. BibTeX fields abstract, title, author, year, journal, and pages are found.
+ @author Jacob Kanev <j_kanev@arcor.de> */
+
+ class WebQueryCiteSeerX : public WebQuery
+ {
+ Q_OBJECT
+
+ public:
+
+ struct DataRequest
+ {
+ KURL url;
+ DataParser parser;
+ };
+
+ /// Construct.
+ WebQueryCiteSeerX( QWidget* parent );
+
+ /// Destroy.
+ virtual ~WebQueryCiteSeerX();
+
+ /// Main function: start query.
+ void query();
+
+ /// Return title.
+ QString title();
+
+ /// Return disclaimer.
+ QString disclaimer();
+
+ /// Return disclaimer URL.
+ QString disclaimerURL();
+
+ /// Return GUI element.
+ WebQueryWidget *widget();
+
+ protected:
+ /// Callback for cancelling.
+ void cancelQuery();
+
+ private slots:
+
+ /// Callback when the job is finished.
+ /**Reads the data from the job, and hands it over to the currently set parser. */
+ void getData( KIO::Job *job );
+
+ private:
+
+ /// Parses the main page and schedules single-paper reading jobs.
+ /** Function parses the summary page, and schedules one job for each paper link, and one job for the "Next 10" summary page. */
+ void parseSummaryPage( const QString &data );
+
+ /// Parses single-paper pages.
+ /** Function reads the "Abstract:" and the "@entrytype{" strings found in the html page. */
+ void parsePaperPage( const QString &data );
+
+ /// Execute next waiting job.
+ /** Takes the next query out of the queue, sets the appropriate parser, and schedules getData with the URL. */
+ void nextJob();
+
+ /// Find single bibtex field in html page and add to entry.
+ /** Function uses the first collected text from the description (a regular expression), and adds it as type "type" to the "entry". */
+ void parseForSingleExpression( QString description, const QString &data, BibTeX::Entry *entry, BibTeX::EntryField::FieldType type );
+
+ /// The currently active parser.
+ DataParser m_currentParser;
+
+ /// The internet address of CiteSeerX.
+ QString m_citeSeerXServer;
+
+ /// Number of hits desired by user.
+ int m_desiredHits;
+
+ /// Number of hits read from summary pages.
+ int m_receivedHits;
+
+ /// List with waiting queries
+ std::deque<DataRequest> m_queryQueue;
+
+ /// Pointer to QT-dialog.
+ WebQueryCiteSeerXWidget *m_widget;
+ };
+
+}
+
+#endif
diff --git a/src/webquerycsb.cpp b/src/webquerycsb.cpp
new file mode 100644
index 0000000..2a5ac54
--- /dev/null
+++ b/src/webquerycsb.cpp
@@ -0,0 +1,289 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qregexp.h>
+#include <qbuffer.h>
+#include <qcstring.h>
+#include <qiodevice.h>
+#include <qspinbox.h>
+#include <qcheckbox.h>
+#include <qfile.h>
+#include <qdatetime.h>
+
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kio/netaccess.h>
+#include <klineedit.h>
+#include <kcombobox.h>
+#include <kpushbutton.h>
+#include <kiconloader.h>
+
+#include <settings.h>
+#include "webquerycsb.h"
+
+namespace KBibTeX
+{
+ WebQueryCSBWidget::WebQueryCSBWidget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name )
+ {
+ init();
+
+ Settings *settings = Settings::self();
+ QString value = settings->getWebQueryDefault( "CSB_query" );
+ value = value == QString::null ? "" : value;
+ lineEditQuery->setText( value );
+ value = settings->getWebQueryDefault( "CSB_field" );
+ value = value == QString::null || value.isEmpty() ? "0" : value;
+ comboBoxField->setCurrentItem( value.toInt() );
+ value = settings->getWebQueryDefault( "CSB_yearCheck" );
+ value = value == QString::null || value.isEmpty() ? "0" : value;
+ checkBoxYear->setChecked( value == "1" );
+ value = settings->getWebQueryDefault( "CSB_yearType" );
+ value = value == QString::null || value.isEmpty() ? "0" : value;
+ comboBoxYear->setCurrentItem( value.toInt() );
+ value = settings->getWebQueryDefault( "CSB_yearValue" );
+ value = value == QString::null ? "2000" : value;
+ spinBoxYear->setValue( value.toInt() );
+ value = settings->getWebQueryDefault( "CSB_sortBy" );
+ value = value == QString::null || value.isEmpty() ? "0" : value;
+ comboBoxSortBy->setCurrentItem( value.toInt() );
+ value = settings->getWebQueryDefault( "CSB_onlinePapersOnly" );
+ value = value == QString::null || value.isEmpty() ? "0" : value;
+ checkBoxOnlinePapersOnly->setChecked( value == "1" );
+ slotTextChanged( value, true );
+ }
+
+ void WebQueryCSBWidget::init()
+ {
+ QVBoxLayout *vLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+
+ QHBoxLayout *hLayout = new QHBoxLayout( );
+ vLayout->addLayout( hLayout );
+ KPushButton *clearSearchText = new KPushButton( this );
+ clearSearchText->setIconSet( QIconSet( SmallIcon( "locationbar_erase" ) ) );
+ hLayout->addWidget( clearSearchText );
+ QLabel *label = new QLabel( i18n( "Search &term:" ), this );
+ hLayout->addWidget( label );
+ lineEditQuery = new KLineEdit( this );
+ KCompletion *completionQuery = lineEditQuery->completionObject();
+ hLayout->addWidget( lineEditQuery );
+ label->setBuddy( lineEditQuery );
+ hLayout->addSpacing( KDialog::spacingHint() * 2 );
+ label = new QLabel( i18n( "Here, \"Field\" refers to a parameter for the CSB search (author, title, any)", "&Field:" ), this );
+ hLayout->addWidget( label );
+ comboBoxField = new KComboBox( false, this );
+ hLayout->addWidget( comboBoxField );
+ label->setBuddy( comboBoxField );
+ connect( clearSearchText, SIGNAL( clicked() ), lineEditQuery, SLOT( clear() ) );
+ connect( lineEditQuery, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( const QString& ) ) );
+ hLayout->setStretchFactor( lineEditQuery, 5 );
+ connect( lineEditQuery, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) );
+ connect( lineEditQuery, SIGNAL( returnPressed( const QString& ) ), completionQuery, SLOT( addItem( const QString& ) ) );
+
+ hLayout = new QHBoxLayout( );
+ vLayout->addLayout( hLayout );
+ label = new QLabel( i18n( "&Number of results:" ), this );
+ hLayout->addWidget( label );
+ spinBoxMaxHits = new QSpinBox( 1, 500, 1, this );
+ spinBoxMaxHits->setValue( 10 );
+ hLayout->setStretchFactor( spinBoxMaxHits, 3 );
+ hLayout->addWidget( spinBoxMaxHits );
+ label->setBuddy( spinBoxMaxHits );
+ hLayout->addSpacing( KDialog::spacingHint() * 2 );
+ checkBoxYear = new QCheckBox( i18n( "&Year:" ), this );
+ hLayout->setStretchFactor( checkBoxYear, 1 );
+ checkBoxYear->setChecked( true );
+ hLayout->addWidget( checkBoxYear );
+ connect( checkBoxYear, SIGNAL( toggled( bool ) ), this, SLOT( slotYearCheckToggled() ) );
+ comboBoxYear = new KComboBox( false, this );
+ hLayout->setStretchFactor( comboBoxYear, 3 );
+ hLayout->addWidget( comboBoxYear );
+ spinBoxYear = new QSpinBox( 1800, 2100, 1, this );
+ spinBoxYear->setValue( QDate::currentDate().year() );
+ hLayout->setStretchFactor( spinBoxYear, 6 );
+ hLayout->addWidget( spinBoxYear );
+
+ hLayout->addSpacing( KDialog::spacingHint() * 2 );
+ label = new QLabel( i18n( "Sort &by:" ), this );
+ hLayout->addWidget( label );
+ comboBoxSortBy = new KComboBox( false, this );
+ hLayout->setStretchFactor( comboBoxSortBy, 8 );
+ hLayout->addWidget( comboBoxSortBy );
+ label->setBuddy( comboBoxSortBy );
+
+ hLayout = new QHBoxLayout( );
+ vLayout->addLayout( hLayout );
+ checkBoxOnlinePapersOnly = new QCheckBox( i18n( "Online papers only" ), this );
+ hLayout->addWidget( checkBoxOnlinePapersOnly );
+
+ comboBoxField->insertItem( i18n( "any" ) );
+ comboBoxField->insertItem( i18n( "author" ) );
+ comboBoxField->insertItem( i18n( "title" ) );
+ comboBoxYear->insertItem( i18n( "exact" ) );
+ comboBoxYear->insertItem( i18n( "until" ) );
+ comboBoxYear->insertItem( i18n( "from" ) );
+ comboBoxYear->setCurrentItem( 1 );
+ comboBoxSortBy->insertItem( i18n( "none" ) );
+ comboBoxSortBy->insertItem( i18n( "score" ) );
+ comboBoxSortBy->insertItem( i18n( "year" ) );
+ }
+
+ void WebQueryCSBWidget::slotYearCheckToggled()
+ {
+ bool yearEnabled = checkBoxYear->isChecked();
+ comboBoxYear->setEnabled( yearEnabled );
+ spinBoxYear->setEnabled( yearEnabled );
+ }
+
+ WebQueryCSB::WebQueryCSB( QWidget* parent ): WebQuery( parent )
+ {
+ m_importer = new BibTeX::FileImporterBibTeX( FALSE );
+ m_importer->setIgnoreComments( TRUE );
+ m_widget = new WebQueryCSBWidget( parent );
+ }
+
+ WebQueryCSB::~WebQueryCSB()
+ {
+ delete m_widget;
+ delete m_importer;
+ }
+
+ QString WebQueryCSB::title()
+ {
+ return i18n( "Computer Science Bibliographies" );
+ }
+
+ QString WebQueryCSB::disclaimer()
+ {
+ return i18n( "Copyright for the Bibliography Collection" );
+ }
+
+ QString WebQueryCSB::disclaimerURL()
+ {
+ return "http://liinwww.ira.uka.de/bibliography/Copyright.html";
+ }
+
+ WebQueryWidget *WebQueryCSB::widget()
+ {
+ return m_widget;
+ }
+
+ void WebQueryCSB::query()
+ {
+ WebQuery::query();
+
+ Settings *settings = Settings::self();
+ settings->setWebQueryDefault( "CSB_query", m_widget->lineEditQuery->text() );
+ settings->setWebQueryDefault( "CSB_field", QString::number( m_widget->comboBoxField->currentItem() ) );
+ settings->setWebQueryDefault( "CSB_yearCheck", m_widget->checkBoxYear->isChecked() ? "1" : "0" );
+ settings->setWebQueryDefault( "CSB_yearType", QString::number( m_widget->comboBoxYear->currentItem() ) );
+ settings->setWebQueryDefault( "CSB_yearValue", QString::number( m_widget->spinBoxYear->value() ) );
+ settings->setWebQueryDefault( "CSB_sortBy", QString::number( m_widget->comboBoxSortBy->currentItem() ) );
+ settings->setWebQueryDefault( "CSB_onlinePapersOnly", m_widget->checkBoxOnlinePapersOnly->isChecked() ? "1" : "0" );
+
+ setNumStages( 1 );
+
+ int numberOfResults = m_widget->spinBoxMaxHits->value();
+ QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" );
+
+ QString year;
+ if ( m_widget->checkBoxYear->isChecked() )
+ {
+ switch ( m_widget->comboBoxYear->currentItem() )
+ {
+ case 1: year = QString( "before=%1" ).arg( m_widget->spinBoxYear->value() ); break;
+ case 2: year = QString( "since=%1" ).arg( m_widget->spinBoxYear->value() ); break;
+ default: year = QString( "year=%1" ).arg( m_widget->spinBoxYear->value() ); break;
+ }
+ }
+
+ QString field;
+ switch ( m_widget->comboBoxField->currentItem() )
+ {
+ case 1: field = "au"; break;
+ case 2: field = "ti"; break;
+ default: field = ""; break;
+ }
+
+ QString sortBy;
+ switch ( m_widget->comboBoxSortBy->currentItem() )
+ {
+ case 1: sortBy = "&sort=score"; break;
+ case 2: sortBy = "&sort=year"; break;
+ default: sortBy = ""; break;
+ }
+
+ QString onlinePapersOnly = m_widget->checkBoxOnlinePapersOnly->isChecked() ? "&online=on" : "";
+
+ KURL url = KURL( QString( "http://liinwww.ira.uka.de/csbib?query=%4&results=bibtex&maxnum=%1&%2&field=%3" ).arg( numberOfResults ).arg( year ).arg( field ).arg( searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ).append( onlinePapersOnly ).append( sortBy ) );
+
+ QString rawText = download( url );
+ if ( rawText != NULL && !m_aborted )
+ {
+ QRegExp removeXML( "<[^>]+>" );
+ rawText.replace( removeXML, "" );
+
+ BibTeX::FileImporterBibTeX importer( FALSE );
+ importer.setIgnoreComments( TRUE );
+ QBuffer buffer;
+
+ buffer.open( IO_WriteOnly );
+ QTextStream ts( &buffer );
+ ts.setEncoding( QTextStream::UnicodeUTF8 );
+ ts << rawText << endl;
+ buffer.close();
+
+ buffer.open( IO_ReadOnly );
+ BibTeX::File *tmpBibFile = importer.load( &buffer );
+ buffer.close();
+
+ if ( tmpBibFile != NULL && tmpBibFile->count() > 0 )
+ {
+ for ( BibTeX::File::ElementList::iterator it = tmpBibFile->begin(); !m_aborted && it != tmpBibFile->end(); ++it )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( entry != NULL )
+ emit foundEntry( new BibTeX::Entry( entry ), false );
+ }
+
+ setEndSearch( WebQuery::statusSuccess );
+ }
+ else
+ setEndSearch( WebQuery::statusError );
+
+ if ( tmpBibFile != NULL )
+ delete tmpBibFile;
+ }
+ else if ( !m_aborted )
+ {
+ QString message = KIO::NetAccess::lastErrorString();
+ if ( message.isEmpty() )
+ message.prepend( '\n' );
+ message.prepend( QString( i18n( "Querying database '%1' failed." ) ).arg( title() ) );
+ KMessageBox::error( m_parent, message );
+ setEndSearch( WebQuery::statusError );
+ }
+ else
+ setEndSearch( WebQuery::statusAborted );
+ }
+
+}
+#include "webquerycsb.moc"
diff --git a/src/webquerycsb.h b/src/webquerycsb.h
new file mode 100644
index 0000000..bedc3cc
--- /dev/null
+++ b/src/webquerycsb.h
@@ -0,0 +1,89 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXWEBQUERYCSB_H
+#define KBIBTEXWEBQUERYCSB_H
+
+#include <kio/job.h>
+
+#include <fileimporterbibtex.h>
+#include <webquery.h>
+
+class QSpinBox;
+class QCheckBox;
+
+class KLineEdit;
+class KComboBox;
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryCSBWidget : public WebQueryWidget
+ {
+ Q_OBJECT
+ public:
+ WebQueryCSBWidget( QWidget *parent, const char *name = 0 );
+
+ KComboBox *comboBoxField;
+ QCheckBox *checkBoxYear;
+ KComboBox *comboBoxYear;
+ QSpinBox *spinBoxYear;
+ KComboBox *comboBoxSortBy;
+ QCheckBox *checkBoxOnlinePapersOnly;
+
+ protected:
+ virtual void init();
+
+ private slots:
+ void slotYearCheckToggled();
+ };
+
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryCSB : public WebQuery
+ {
+ Q_OBJECT
+ public:
+ WebQueryCSB( QWidget* parent );
+ virtual ~WebQueryCSB();
+
+ void query();
+
+ QString title();
+ QString disclaimer();
+ QString disclaimerURL();
+
+ WebQueryWidget *widget();
+
+ protected:
+ void cancelQuery() { /* nothing */ };
+
+ private:
+ BibTeX::FileImporterBibTeX *m_importer;
+ WebQueryCSBWidget *m_widget;
+
+ };
+
+}
+
+#endif
diff --git a/src/webquerydblp.cpp b/src/webquerydblp.cpp
new file mode 100644
index 0000000..38d6492
--- /dev/null
+++ b/src/webquerydblp.cpp
@@ -0,0 +1,213 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qfile.h>
+#include <qapplication.h>
+#include <qspinbox.h>
+#include <qregexp.h>
+#include <qcheckbox.h>
+#include <qlabel.h>
+#include <qlayout.h>
+
+#include <klocale.h>
+#include <klineedit.h>
+#include <kpushbutton.h>
+#include <kiconloader.h>
+#include <kcombobox.h>
+#include <kmessagebox.h>
+#include <kio/netaccess.h>
+#include <kurl.h>
+
+#include <settings.h>
+#include <fileimporterbibtex.h>
+#include "webquerydblp.h"
+
+namespace KBibTeX
+{
+ WebQueryDBLPWidget::WebQueryDBLPWidget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name )
+ {
+ init();
+
+ Settings *settings = Settings::self();
+ QString value = settings->getWebQueryDefault( "DBLP_query" );
+ value = value == QString::null ? "" : value;
+ lineEditQuery->setText( value );
+ slotTextChanged( value, true );
+ value = settings->getWebQueryDefault( "DBLP_keepSeparate" );
+ value = value == QString::null || value.isEmpty() ? "0" : value;
+ checkBoxKeepEntriesSeparate->setChecked( value == "1" );
+ }
+
+ void WebQueryDBLPWidget::init()
+ {
+ QVBoxLayout *vLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+
+ QHBoxLayout *hLayout = new QHBoxLayout( );
+ vLayout->addLayout( hLayout );
+
+ KPushButton *clearSearchText = new KPushButton( this );
+ clearSearchText->setIconSet( QIconSet( SmallIcon( "locationbar_erase" ) ) );
+ hLayout->addWidget( clearSearchText );
+ QLabel *label = new QLabel( i18n( "Search &term:" ), this );
+ hLayout->addWidget( label );
+ lineEditQuery = new KLineEdit( this );
+ hLayout->addWidget( lineEditQuery );
+ label->setBuddy( lineEditQuery );
+ hLayout->addSpacing( KDialog::spacingHint() * 2 );
+ connect( clearSearchText, SIGNAL( clicked() ), lineEditQuery, SLOT( clear() ) );
+ connect( lineEditQuery, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( const QString& ) ) );
+ hLayout->setStretchFactor( lineEditQuery, 4 );
+ KCompletion *completionQuery = lineEditQuery->completionObject();
+
+ label = new QLabel( i18n( "&Number of results:" ), this );
+ hLayout->addWidget( label );
+ spinBoxMaxHits = new QSpinBox( 1, 250, 1, this );
+ spinBoxMaxHits->setValue( 10 );
+ hLayout->addWidget( spinBoxMaxHits );
+ label->setBuddy( spinBoxMaxHits );
+
+ hLayout = new QHBoxLayout( );
+ vLayout->addLayout( hLayout );
+
+ checkBoxKeepEntriesSeparate = new QCheckBox( i18n( "Do not merge corresponding entries" ), this );
+ hLayout->addWidget( checkBoxKeepEntriesSeparate );
+
+ vLayout->addStretch( 0 );
+
+ connect( lineEditQuery, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) );
+ connect( lineEditQuery, SIGNAL( returnPressed( const QString& ) ), completionQuery, SLOT( addItem( const QString& ) ) );
+ }
+
+ WebQueryDBLP::WebQueryDBLP( QWidget* parent ): WebQuery( parent )
+ {
+ m_widget = new WebQueryDBLPWidget( parent );
+ }
+
+ WebQueryDBLP::~WebQueryDBLP()
+ {
+ delete m_widget;
+ }
+
+ QString WebQueryDBLP::title()
+ {
+ return i18n( "DBLP" );
+ }
+
+ QString WebQueryDBLP::disclaimer()
+ {
+ return i18n( "DBLP - Copyright" );
+ }
+
+ QString WebQueryDBLP::disclaimerURL()
+ {
+ return "http://www.informatik.uni-trier.de/~ley/db/copyright.html";
+ }
+
+ WebQueryWidget *WebQueryDBLP::widget()
+ {
+ return m_widget;
+ }
+
+ void WebQueryDBLP::query()
+ {
+ WebQuery::query();
+ Settings *settings = Settings::self();
+ settings->setWebQueryDefault( "DBLP_query", m_widget->lineEditQuery->text() );
+ settings->setWebQueryDefault( "DBLP_keepSeparate", m_widget->checkBoxKeepEntriesSeparate->isChecked() ? "1" : "0" );
+
+ int numberOfResults = m_widget->spinBoxMaxHits->value();
+ setNumStages( numberOfResults + 1 );
+
+ QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" );
+ if ( searchTerm.isEmpty() )
+ {
+ setEndSearch( WebQuery::statusInvalidQuery );
+ return;
+ }
+
+ KURL url = KURL( QString( "http://dblp.l3s.de/?newsearch=1&q=%1&search_opt=all&synt_query_exp=full" ).arg( searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ) );
+
+ QString completeText = download( url );
+ if ( completeText != QString::null && !m_aborted )
+ {
+ QRegExp findBibTeXurl( "<a href=\"(http://dblp.uni-trier.de/rec/bibtex/[^\"]+)\"" );
+ findBibTeXurl.search( completeText );
+ int pos = findBibTeXurl.pos( 1 );
+
+ int maxCount = numberOfResults;
+ while ( !m_aborted && pos > -1 && ( maxCount-- ) > 0 )
+ {
+ KURL keyUrl = KURL( findBibTeXurl.cap( 1 ) );
+ BibTeX::File *tmpBibFile = downloadBibTeXFile( keyUrl );
+ if ( tmpBibFile != NULL && !m_aborted )
+ {
+ if ( tmpBibFile->count() == 2 )
+ {
+ /** if the data returned from DBLP contains only two entry, check if they are InCollection and Book. In this case, one is the conference article and the other is the conference proceedings. */
+ BibTeX::Entry *firstEntry = dynamic_cast<BibTeX::Entry*>( *tmpBibFile->begin() );
+ BibTeX::Entry *secondEntry = dynamic_cast<BibTeX::Entry*>( *( ++tmpBibFile->begin() ) );
+
+ if ( !m_widget->checkBoxKeepEntriesSeparate->isChecked() && firstEntry != NULL && secondEntry != NULL && ( firstEntry->entryType() == BibTeX::Entry::etInProceedings || firstEntry->entryType() == BibTeX::Entry::etInCollection ) && ( secondEntry->entryType() == BibTeX::Entry::etBook || secondEntry->entryType() == BibTeX::Entry::etProceedings ) )
+ {
+ /** We merge both conference article and proceedings, as otherwise 2*n entries will be shown in the search result and it is no longer clear, which conference and with article match. */
+ BibTeX::Entry *myEntry = tmpBibFile->completeReferencedFieldsConst( firstEntry );
+ myEntry->merge( secondEntry, BibTeX::Entry::msAddNew );
+ myEntry->deleteField( BibTeX::EntryField::ftCrossRef );
+ emit foundEntry( myEntry, false );
+ }
+ else
+ {
+ emit foundEntry( new BibTeX::Entry( firstEntry ), false );
+ emit foundEntry( new BibTeX::Entry( secondEntry ), m_widget->checkBoxKeepEntriesSeparate->isChecked() );
+ }
+ }
+ else
+ for ( BibTeX::File::ElementList::iterator it = tmpBibFile->begin(); it != tmpBibFile->end(); ++it )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( entry != NULL )
+ emit foundEntry( new BibTeX::Entry( entry ), false );
+ }
+ }
+
+ if ( tmpBibFile != NULL )
+ delete tmpBibFile;
+
+ findBibTeXurl.search( completeText, pos + 1 );
+ pos = findBibTeXurl.pos( 1 );
+ }
+
+ setEndSearch( WebQuery::statusSuccess );
+ }
+ else if ( !m_aborted )
+ {
+ QString message = KIO::NetAccess::lastErrorString();
+ if ( message.isEmpty() )
+ message.prepend( '\n' );
+ message.prepend( QString( i18n( "Querying database '%1' failed." ) ).arg( title() ) );
+ KMessageBox::error( m_parent, message );
+ setEndSearch( WebQuery::statusError );
+ }
+ else
+ setEndSearch( WebQuery::statusAborted );
+ }
+
+}
+#include "webquerydblp.moc"
diff --git a/src/webquerydblp.h b/src/webquerydblp.h
new file mode 100644
index 0000000..f52ef3d
--- /dev/null
+++ b/src/webquerydblp.h
@@ -0,0 +1,70 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXWEBQUERYDBLP_H
+#define KBIBTEXWEBQUERYDBLP_H
+
+#include <webquery.h>
+
+class QCheckBox;
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryDBLPWidget : public WebQueryWidget
+ {
+ Q_OBJECT
+ public:
+ WebQueryDBLPWidget( QWidget *parent, const char *name = 0 );
+ QCheckBox *checkBoxKeepEntriesSeparate;
+
+ protected:
+ virtual void init();
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryDBLP : public WebQuery
+ {
+ Q_OBJECT
+ public:
+ WebQueryDBLP( QWidget* parent );
+ virtual ~WebQueryDBLP();
+
+ void query();
+
+ QString title();
+ QString disclaimer();
+ QString disclaimerURL();
+
+ WebQueryWidget *widget();
+
+ protected:
+ void cancelQuery() { /* nothing */ };
+
+ private:
+ WebQueryDBLPWidget *m_widget;
+ };
+
+}
+
+#endif
diff --git a/src/webquerygooglescholar.cpp b/src/webquerygooglescholar.cpp
new file mode 100644
index 0000000..a1c2d52
--- /dev/null
+++ b/src/webquerygooglescholar.cpp
@@ -0,0 +1,469 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qfile.h>
+#include <qapplication.h>
+#include <qregexp.h>
+#include <qtimer.h>
+#include <qmap.h>
+#include <qspinbox.h>
+#include <kconfig.h>
+
+#include <klineedit.h>
+#include <klocale.h>
+#include <kdebug.h>
+#include <kmessagebox.h>
+#include <kio/job.h>
+
+#include <dcopref.h>
+
+#include <settings.h>
+#include "webquerygooglescholar.h"
+
+namespace KBibTeX
+{
+ WebQueryGoogleScholarWidget::WebQueryGoogleScholarWidget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name )
+ {
+ init();
+
+ Settings *settings = Settings::self();
+ QString value = settings->getWebQueryDefault( "GoogleScholar" );
+ value = value == QString::null ? "" : value;
+ lineEditQuery->setText( value );
+ slotTextChanged( value, true );
+ }
+
+ WebQueryGoogleScholar::WebQueryGoogleScholar( QWidget* parent )
+ : WebQuery( parent ), m_transferJob( NULL ), m_transferJobBuffer( NULL )
+ {
+ m_importer = new BibTeX::FileImporterBibTeX( FALSE );
+ m_importer->setIgnoreComments( TRUE );
+ m_widget = new WebQueryGoogleScholarWidget( parent );
+ }
+
+ WebQueryGoogleScholar::~WebQueryGoogleScholar()
+ {
+ delete m_widget;
+ delete m_importer;
+ }
+
+ QString WebQueryGoogleScholar::title()
+ {
+ return i18n( "Google Scholar" );
+ }
+
+ QString WebQueryGoogleScholar::disclaimer()
+ {
+ return i18n( "About Google Scholar" );
+ }
+
+ QString WebQueryGoogleScholar::disclaimerURL()
+ {
+ return "http://scholar.google.com/intl/en/scholar/about.html";
+ }
+
+ WebQueryWidget *WebQueryGoogleScholar::widget()
+ {
+ return m_widget;
+ }
+
+ void WebQueryGoogleScholar::query()
+ {
+ WebQuery::query();
+
+ /** save search term in settings */
+ Settings *settings = Settings::self();
+ settings->setWebQueryDefault( "GoogleScholar", m_widget->lineEditQuery->text() );
+
+ /** generate web-save search term */
+ m_searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" );
+ m_searchTerm = m_searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" );
+ if ( m_searchTerm.isEmpty() )
+ {
+ setEndSearch( WebQuery::statusInvalidQuery );
+ return;
+ }
+
+ /** initialize variables */
+ m_abort = false;
+ m_numberOfResults = m_widget->spinBoxMaxHits->value();
+ setNumStages( m_numberOfResults + 5 );
+
+ /** reset KDE configuration for cookie handling */
+ readAndChangeConfig();
+
+ /** prepare HTTP request (buffer, signals, job) */
+ m_transferJobBuffer = new QBuffer();
+ m_transferJobBuffer->open( IO_WriteOnly );
+ KIO::TransferJob* m_transferJob = KIO::get( KURL( "http://scholar.google.com/scholar_ncr" ), false, false );
+ connect( m_transferJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotData( KIO::Job *, const QByteArray & ) ) );
+ connect( m_transferJob, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinishedStartpage( KIO::Job * ) ) );
+ }
+
+ void WebQueryGoogleScholar::cancelQuery()
+ {
+ /** user aborted search */
+ m_abort = true;
+ if ( m_transferJob != NULL ) m_transferJob->kill( false );
+ setEndSearch( WebQuery::statusError );
+ }
+
+ void WebQueryGoogleScholar::slotFinishedStartpage( KIO::Job *job )
+ {
+ /** close and delete buffer (content does not matter) */
+ m_transferJobBuffer->close();
+ delete m_transferJobBuffer;
+
+ /** if aborted in the mean time, clean up everything */
+ if ( m_abort )
+ {
+ restoreConfig();
+ return;
+ }
+
+ /** error occurred */
+ if ( job->error() != 0 )
+ {
+ restoreConfig();
+ kdDebug() << "Error in slotFinishedStartpage: " << job->error() << endl;
+ setEndSearch( statusError );
+ return;
+ }
+
+ /** update progress bar */
+ enterNextStage();
+
+ /** prepare next HTTP request for preferences page (buffer, signals, job) */
+ m_transferJobBuffer = new QBuffer();
+ m_transferJobBuffer->open( IO_WriteOnly );
+ KIO::TransferJob* m_transferJob = KIO::get( KURL( "http://scholar.google.com/scholar_preferences?hl=en" ), false, false );
+ connect( m_transferJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotData( KIO::Job *, const QByteArray & ) ) );
+ connect( m_transferJob, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinishedLoadingSettings( KIO::Job * ) ) );
+
+ }
+
+ void WebQueryGoogleScholar::slotFinishedLoadingSettings( KIO::Job *job )
+ {
+ /** close and delete buffer (content does not matter) */
+ m_transferJobBuffer->close();
+ QString htmlCode = textFromBuffer( m_transferJobBuffer );
+ delete m_transferJobBuffer;
+
+ /** if aborted in the mean time, clean up everything */
+ if ( m_abort )
+ {
+ restoreConfig();
+ return;
+ }
+
+ /** error occurred */
+ if ( job->error() != 0 )
+ {
+ restoreConfig();
+ kdDebug() << "Error in slotFinishedLoadingSettings: " << job->error() << endl;
+ setEndSearch( statusError );
+ return;
+ }
+
+ /** update progress bar */
+ enterNextStage();
+
+ /** parse html code to get form values */
+ QMap<QString, QString> keyValues = evalFormFields( htmlCode );
+ /** set form values for BibTeX search */
+ keyValues["scis"] = "yes";
+ keyValues["scisf"] = "4";
+ keyValues["submit"] = "Save+Preferences";
+ keyValues["num"] = QString::number( m_numberOfResults );
+
+ /** prepare next HTTP request to submit preferences (buffer, signals, job) */
+ KURL nextUrl( formFieldsToUrl( "http://scholar.google.com/scholar_setprefs", keyValues ) );
+ m_transferJobBuffer = new QBuffer();
+ m_transferJobBuffer->open( IO_WriteOnly );
+ KIO::TransferJob* m_transferJob = KIO::get( nextUrl, false, false );
+ connect( m_transferJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotData( KIO::Job *, const QByteArray & ) ) );
+ connect( m_transferJob, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinishedSavingSettings( KIO::Job * ) ) );
+ }
+
+ void WebQueryGoogleScholar::slotFinishedSavingSettings( KIO::Job *job )
+ {
+ /** close and delete buffer (content does not matter) */
+ m_transferJobBuffer->close();
+ QString htmlCode = textFromBuffer( m_transferJobBuffer );
+ delete m_transferJobBuffer;
+
+ /** if aborted in the mean time, clean up everything */
+ if ( m_abort )
+ {
+ restoreConfig();
+ return;
+ }
+
+ /** error occurred */
+ if ( job->error() != 0 )
+ {
+ restoreConfig();
+ kdDebug() << "Error in slotFinishedSavingSettings: " << job->error() << endl;
+ setEndSearch( statusError );
+ return;
+ }
+
+ /** update progress bar */
+ enterNextStage();
+
+ /** parse html code to get form values */
+ QMap<QString, QString> keyValues = evalFormFields( htmlCode );
+ /** set form values for search */
+ keyValues["q"] = m_searchTerm;
+ keyValues["num"] = QString::number( m_numberOfResults );
+
+ /** prepare next HTTP request for actual search (buffer, signals, job) */
+ KURL nextUrl( formFieldsToUrl( "http://scholar.google.com/scholar", keyValues ) );
+ m_transferJobBuffer = new QBuffer();
+ m_transferJobBuffer->open( IO_WriteOnly );
+ KIO::TransferJob* m_transferJob = KIO::get( nextUrl, false, false );
+ connect( m_transferJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotData( KIO::Job *, const QByteArray & ) ) );
+ connect( m_transferJob, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinishedReceivingResultOverview( KIO::Job * ) ) );
+ }
+
+ void WebQueryGoogleScholar::slotFinishedReceivingResultOverview( KIO::Job *job )
+ {
+ /** close and delete buffer (content does not matter) */
+ m_transferJobBuffer->close();
+ QString htmlCode = textFromBuffer( m_transferJobBuffer );
+ delete m_transferJobBuffer;
+
+ /** if aborted in the mean time, clean up everything */
+ if ( m_abort )
+ {
+ restoreConfig();
+ return;
+ }
+
+ /** error occurred */
+ if ( job->error() != 0 )
+ {
+ restoreConfig();
+ kdDebug() << "Error in slotFinishedReceivingResultOverview: " << job->error() << endl;
+ setEndSearch( statusError );
+ return;
+ }
+
+ /** update progress bar */
+ enterNextStage();
+
+ /** find all links to BibTeX files in result page */
+ QRegExp reBibUrl( "/scholar.bib[^ \">]+" );
+ int pos = 0;
+ while ( !m_aborted && ( pos = htmlCode.find( reBibUrl, pos + 1 ) ) > 0 )
+ {
+ /** download individual BibTeX file for each search hit */
+ KURL bibUrl( "http://scholar.google.com" + reBibUrl.cap( 0 ).replace( "&amp;", "&" ) );
+ BibTeX::File *tmpBibFile = downloadBibTeXFile( bibUrl );
+
+ /** update progress bar */
+ enterNextStage();
+
+ /** parse, evaluate and store first BibTeX entry */
+ if ( tmpBibFile != NULL )
+ {
+ BibTeX::File::ElementList::iterator it = tmpBibFile->begin();
+ if ( it != tmpBibFile->end() )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( entry != NULL )
+ emit foundEntry( new BibTeX::Entry( entry ), false );
+ }
+ delete tmpBibFile;
+ }
+ }
+
+ /** restore old cookie configuration */
+ restoreConfig();
+
+ /** set result status */
+ if ( m_aborted )
+ setEndSearch( statusAborted );
+ else
+ setEndSearch( statusSuccess );
+ }
+
+ void WebQueryGoogleScholar::readAndChangeConfig()
+ {
+ KConfig cfg( "kcookiejarrc" );
+ cfg.setGroup( "Cookie Policy" );
+ m_originalEnableCookies = cfg.readBoolEntry( "Cookies", true );
+ m_originalSessionCookies = cfg.readBoolEntry( "AcceptSessionCookies", true );
+ QStringList cookieSettingsList = QStringList::split( ',', cfg.readEntry( "CookieDomainAdvice", "" ) );
+ m_originalCookieGlobalAdvice = cfg.readEntry( "CookieGlobalAdvice", "Accept" );
+
+ for ( QStringList::Iterator it = cookieSettingsList.begin(); it != cookieSettingsList.end(); ++it )
+ {
+ QStringList keyValue = QStringList::split( ':', *it );
+ if ( keyValue.size() == 2 )
+ {
+ m_originalCookieMap[keyValue[0]] = keyValue[1];
+ }
+ }
+
+ cfg.writeEntry( "Cookies", true );
+ cfg.writeEntry( "CookieGlobalAdvice", "Accept" );
+ cfg.writeEntry( "AcceptSessionCookies", true );
+ cookieSettingsList.clear();
+ for ( QMap<QString, QString>::Iterator it = m_originalCookieMap.begin(); it != m_originalCookieMap.end(); ++it )
+ {
+ QString value = it.key().contains( ".google." ) ? "Accept" : it.data();
+ cookieSettingsList << it.key() + ":" + value;
+ }
+ cfg.writeEntry( "CookieDomainAdvice", cookieSettingsList.join( "," ) );
+ cfg.sync();
+
+ ( void )DCOPRef( "kded", "kcookiejar" ).send( "reloadPolicy" );
+ }
+
+ void WebQueryGoogleScholar::restoreConfig()
+ {
+ KConfig cfg( "kcookiejarrc" );
+ cfg.setGroup( "Cookie Policy" );
+ cfg.writeEntry( "CookieGlobalAdvice", m_originalCookieGlobalAdvice );
+ cfg.writeEntry( "Cookies", m_originalEnableCookies );
+ cfg.writeEntry( "AcceptSessionCookies", m_originalSessionCookies );
+ QStringList cookieSettingsList;
+ for ( QMap<QString, QString>::Iterator it = m_originalCookieMap.begin(); it != m_originalCookieMap.end(); ++it )
+ cookieSettingsList << it.key() + ":" + it.data();
+ cfg.writeEntry( "CookieDomainAdvice", cookieSettingsList.join( "," ) );
+ cfg.sync();
+
+ if ( !m_originalEnableCookies )
+ ( void )DCOPRef( "kded", "kcookiejar" ).send( "shutdown" );
+ else
+ ( void )DCOPRef( "kded", "kcookiejar" ).send( "reloadPolicy" );
+ }
+
+ QString WebQueryGoogleScholar::textFromBuffer( QBuffer *buffer )
+ {
+ QString htmlCode = "";
+ buffer->open( IO_ReadOnly );
+ QTextStream ts( buffer );
+ while ( !ts.atEnd() )
+ htmlCode.append( ts.readLine() );
+ buffer->close();
+ return htmlCode;
+ }
+
+ QMap <QString, QString> WebQueryGoogleScholar::evalFormFields( const QString &htmlCode )
+ {
+ QMap<QString, QString> keyValues;
+
+ QRegExp reInput( "<input[^>]+>" );
+ QRegExp reSplit( "[<>=\" ]+" );
+ int pos = 0;
+ while (( pos = htmlCode.find( reInput, pos + 1 ) ) > 5 )
+ {
+ QStringList elements = QStringList::split( reSplit, reInput.cap( 0 ) );
+ bool checked = false;
+ bool isCheckable = false;
+ bool isSubmit = false;
+ QString key = QString::null;
+ QString value = QString::null;
+ for ( QStringList::Iterator it = elements.begin(); it != elements.end(); ++it )
+ {
+ if ( *it == "name" )
+ {
+ ++it; if ( it != elements.end() ) key = *it; else break;
+ }
+ if ( *it == "value" )
+ {
+ ++it; if ( it != elements.end() ) value = *it; else
+ {
+ value = ""; break;
+ }
+ }
+ if ( *it == "checked" )
+ checked = true;
+ if ( *it == "type" )
+ {
+ ++it;
+ if ( it == elements.end() ) break;
+ isCheckable = *it == "radio" || *it == "checkbox";
+ isSubmit = *it == "submit";
+ }
+ }
+ if (( !isCheckable || checked ) && ( !isSubmit || value == "submit" ) && value != QString::null && key != QString::null )
+ {
+ keyValues[key] = value;
+ }
+ }
+
+ QRegExp reSelect( "<select name=([^ >\"]+).*</select>" );
+ reSelect.setMinimal( true );
+ QRegExp reOption( "<option[^>]+>" );
+ int pos3 = 0;
+ while (( pos3 = htmlCode.find( reSelect, pos3 + 1 ) ) > 5 )
+ {
+ QString key = reSelect.cap( 1 );
+ QString sub = reSelect.cap( 0 );
+ int pos2 = 0;
+ while (( pos2 = sub.find( reOption, pos2 + 1 ) ) > 5 )
+ {
+ QStringList elements = QStringList::split( reSplit, reOption.cap( 0 ) );
+ bool selected = false;
+ QString value = QString::null;
+ for ( QStringList::Iterator it = elements.begin(); it != elements.end(); ++it )
+ {
+ if ( *it == "value" )
+ {
+ ++it; if ( it != elements.end() ) value = *it; else
+ {
+ value = ""; break;
+ }
+ }
+ if ( *it == "selected" )
+ selected = true;
+ }
+ if ( selected && value != QString::null && key != QString::null )
+ {
+ keyValues[key] = value;
+ }
+ }
+ }
+
+ return keyValues;
+ }
+
+ QString WebQueryGoogleScholar::formFieldsToUrl( const QString &prefix, const QMap<QString, QString> &keyValues )
+ {
+ bool first = true;
+ QString nextUrl = prefix;
+ for ( QMap<QString, QString>::ConstIterator it = keyValues.begin(); it != keyValues.end(); ++it )
+ {
+ if ( first )
+ nextUrl.append( "?" );
+ else
+ nextUrl.append( "&" );
+ first = false;
+ nextUrl.append( it.key() + "=" + it.data() );
+ }
+
+ return nextUrl;
+ }
+
+}
+#include "webquerygooglescholar.moc"
diff --git a/src/webquerygooglescholar.h b/src/webquerygooglescholar.h
new file mode 100644
index 0000000..6d9065a
--- /dev/null
+++ b/src/webquerygooglescholar.h
@@ -0,0 +1,111 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXWEBQUERYGOOGLESCHOLAR_H
+#define KBIBTEXWEBQUERYGOOGLESCHOLAR_H
+
+#include <qstringlist.h>
+#include <qbuffer.h>
+
+#include <kurl.h>
+
+#include <fileimporterbibtex.h>
+#include <webquery.h>
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryGoogleScholarWidget : public WebQueryWidget
+ {
+ Q_OBJECT
+ public:
+ WebQueryGoogleScholarWidget( QWidget *parent, const char *name = 0 );
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryGoogleScholar : public WebQuery
+ {
+ Q_OBJECT
+ public:
+ WebQueryGoogleScholar( QWidget* parent );
+ virtual ~WebQueryGoogleScholar();
+
+ void query();
+
+ QString title();
+ QString disclaimer();
+ QString disclaimerURL();
+
+ WebQueryWidget *widget();
+
+ protected:
+ void cancelQuery();
+
+ private slots:
+ void slotData( KIO::Job *, const QByteArray &data )
+ {
+ m_transferJobBuffer->writeBlock( data.data(), data.size() );
+ };
+
+ /** Google Scholar's start page has been loaded */
+ void slotFinishedStartpage( KIO::Job *job );
+ /** Settings page has been loaded */
+ void slotFinishedLoadingSettings( KIO::Job *job );
+ /** Settings page upload and search mask loaded */
+ void slotFinishedSavingSettings( KIO::Job *job );
+ /** page with results loaded */
+ void slotFinishedReceivingResultOverview( KIO::Job *job );
+
+ private:
+ WebQueryGoogleScholarWidget *m_widget;
+
+ bool m_abort;
+ QString m_searchTerm;
+ int m_numberOfResults;
+ BibTeX::FileImporterBibTeX *m_importer;
+ bool m_originalEnableCookies;
+ bool m_originalSessionCookies;
+ QMap <QString, QString> m_originalCookieMap;
+ QString m_originalCookieGlobalAdvice;
+
+ KIO::TransferJob *m_transferJob;
+ QBuffer *m_transferJobBuffer;
+
+ /** load KDE's cookie configuration, store values, and reset with Google-friendly values */
+ void readAndChangeConfig();
+ /** restore previous configuration values by saving old cookie configuration */
+ void restoreConfig();
+
+ /** extract text from a QBuffer object */
+ QString textFromBuffer( QBuffer *buffer );
+
+ /** parse HTML code and get all key-value pairs from <input..> and <select><option ...></select> */
+ QMap <QString, QString> evalFormFields( const QString &htmlCode );
+
+ /** glue together URL from key-value pairs in form */
+ QString formFieldsToUrl( const QString &prefix, const QMap<QString, QString> &keyValues );
+ };
+
+}
+
+#endif
diff --git a/src/webqueryieeexplore.cpp b/src/webqueryieeexplore.cpp
new file mode 100644
index 0000000..070f8ca
--- /dev/null
+++ b/src/webqueryieeexplore.cpp
@@ -0,0 +1,267 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qspinbox.h>
+#include <qfile.h>
+
+#include <kio/jobclasses.h>
+#include <kio/job.h>
+#include <kio/netaccess.h>
+#include <klineedit.h>
+#include <kurl.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+
+#include <settings.h>
+#include <entryfield.h>
+#include <file.h>
+#include <fileimporterbibtex.h>
+#include "webqueryieeexplore.h"
+
+#define min(a,b) ((a)>(b)?(b):(a))
+
+namespace KBibTeX
+{
+ WebQueryIEEExploreWidget::WebQueryIEEExploreWidget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name )
+ {
+ init();
+
+ Settings *settings = Settings::self();
+ QString value = settings->getWebQueryDefault( "IEEE" );
+ value = value == QString::null ? "" : value;
+ lineEditQuery->setText( value );
+ slotTextChanged( value, true );
+ }
+
+ WebQueryIEEExplore::WebQueryIEEExplore( QWidget* parent ): WebQuery( parent ), m_numberOfMatches( "Your search matched <strong>(\\d+)</strong> of" ), m_findArNumber( "srchabstract.jsp\\?arnumber=(\\d+)" ), m_date( "(?:([A-Z][a-z]{2,3})(?:(?:/|-\\d+\\s+)([A-Z][a-z]{2,3}))?)?\\.?\\s*(\\d{4})$" ), m_risURL( "http://ieeexplore.ieee.org/xpls/citationAct" )
+ {
+ m_widget = new WebQueryIEEExploreWidget( parent );
+ m_bibtexImporter = new BibTeX::FileImporterBibTeX( false );
+ }
+
+ WebQueryIEEExplore::~WebQueryIEEExplore()
+ {
+ delete m_bibtexImporter;
+ delete m_widget;
+ }
+
+ QString WebQueryIEEExplore::title()
+ {
+ return i18n( "IEEExplore" );
+ }
+
+ QString WebQueryIEEExplore::disclaimer()
+ {
+ return i18n( "What is IEEE Xplore?" );
+ }
+
+ QString WebQueryIEEExplore::disclaimerURL()
+ {
+ return "http://ieeexplore.ieee.org/guide/g_oview_faq.jsp";
+ }
+
+ WebQueryWidget *WebQueryIEEExplore::widget()
+ {
+ return m_widget;
+ }
+
+ void WebQueryIEEExplore::query()
+ {
+ WebQuery::query();
+ Settings *settings = Settings::self();
+ settings->setWebQueryDefault( "IEEE", m_widget->lineEditQuery->text() );
+
+ m_arnumList.clear();
+ m_numMaxHits = min( 50, m_widget->spinBoxMaxHits->value() );
+ setNumStages( m_numMaxHits + 1 );
+ QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" );
+ if ( searchTerm.isEmpty() )
+ {
+ setEndSearch( WebQuery::statusInvalidQuery );
+ return;
+ }
+
+ QString category = "metadata";
+ KURL url = KURL( QString( "http://ieeexplore.ieee.org/search/freesearchresult.jsp?queryText=" ).append( searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ).append( "+%3Cin%3E+" ).append( category ).append( "&ResultCount=" ).append( QString::number( m_numMaxHits ) ).append( "&ResultStart=0" ) );
+
+ QString completeText = downloadHTML( url );
+ if ( completeText != QString::null && !m_aborted )
+ {
+ if ( completeText.find( "You have entered an invalid search" ) > -1 )
+ {
+ KMessageBox::information( m_widget, i18n( "You have entered an invalid search." ), i18n( "Search Error" ) );
+ setEndSearch( WebQuery::statusInvalidQuery );
+ return;
+ }
+ else if ( completeText.find( "No results" ) > -1 )
+ {
+ setEndSearch( WebQuery::statusSuccess );
+ return;
+ }
+
+ m_numberOfMatches.search( completeText );
+ bool ok;
+ m_numMatches = m_numberOfMatches.cap( 1 ).toInt( &ok );
+ if ( !ok ) m_numMatches = 0;
+
+ if ( m_numMatches <= 0 )
+ {
+ setEndSearch( WebQuery::statusSuccess );
+ return;
+ }
+
+ m_findArNumber.search( completeText );
+ for ( int i = 0; i < m_numMatches; ++i )
+ {
+ if ( m_findArNumber.cap( 1 ).isEmpty() ) break;
+ int arnum = m_findArNumber.cap( 1 ).toInt( &ok );
+ if ( !ok || arnum <= 0 ) break;
+ m_arnumList.append( arnum );
+
+ m_findArNumber.search( completeText, m_findArNumber.pos( 1 ) + 1 );
+ }
+
+ if ( !m_arnumList.isEmpty() )
+ {
+ m_hitCounter = 1;
+ fetchNext();
+ }
+ else
+ {
+ setEndSearch( WebQuery::statusSuccess );
+ }
+ }
+ else if ( !m_aborted )
+ {
+ QString message = KIO::NetAccess::lastErrorString();
+ if ( message.isEmpty() )
+ message.prepend( '\n' );
+ message.prepend( QString( i18n( "Querying database '%1' failed." ) ).arg( title() ) );
+ KMessageBox::error( m_parent, message );
+ setEndSearch( WebQuery::statusError );
+ }
+ else
+ {
+ setEndSearch( WebQuery::statusSuccess );
+ }
+ }
+
+ void WebQueryIEEExplore::fetchNext()
+ {
+ if ( m_arnumList.isEmpty() ) return;
+
+ int arnum = m_arnumList.first();
+ m_arnumList.remove( m_arnumList.begin() );
+
+ m_incomingData = "";
+ QString data = "dlSelect=cite&fileFormate=BibTex&arnumber=%3Carnumber%3E" + QString::number( arnum ) + "%3C%2Farnumber%3E&Submit=Download";
+
+ KIO::TransferJob *job = KIO::http_post( m_risURL, data.utf8(), false );
+ job->addMetaData( "content-type", "Content-Type: application/x-www-form-urlencoded" );
+ connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotData( KIO::Job *, const QByteArray & ) ) );
+ connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+ }
+
+ void WebQueryIEEExplore::slotData( KIO::Job *, const QByteArray &data )
+ {
+ if ( data.size() > 0 )
+ m_incomingData.append( QCString( data, data.size() + 1 ) );
+ }
+
+ void WebQueryIEEExplore::slotResult( KIO::Job *job )
+ {
+ QRegExp m_date( "^(((\\d{1,2}(-\\d{1,2}))\\s+)?(([A-Z][a-z]{2,3})(/([A-Z][a-z]{2,3}))?)\\.?\\s+)?(\\d{4})$" );
+ if ( job->error() )
+ {
+ job->showErrorDialog();
+ return;
+ }
+
+ enterNextStage();
+ m_incomingData.replace( "<br>", "" );
+
+ BibTeX::File *bibtexFile = m_bibtexImporter->load( m_incomingData );
+ if ( bibtexFile != NULL )
+ {
+ for ( BibTeX::File::ElementList::iterator it = bibtexFile->begin(); it != bibtexFile->end(); ++it )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( entry != NULL )
+ {
+ fixDate( entry );
+ emit foundEntry( new BibTeX::Entry( entry ), false );
+ }
+ }
+ delete bibtexFile;
+ }
+
+ if ( !m_arnumList.isEmpty() )
+ fetchNext();
+ else
+ {
+ setEndSearch( WebQuery::statusSuccess );
+ }
+ }
+
+ void WebQueryIEEExplore::fixDate( BibTeX::Entry *entry )
+ {
+ m_date.search( entry->getField( BibTeX::EntryField::ftYear )->value()->text() );
+
+ if ( !m_date.cap( 3 ).isNull() && !m_date.cap( 3 ).isEmpty() )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftYear );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftJournal );
+ entry->addField( field );
+ }
+ field->setValue( new BibTeX::Value( m_date.cap( 3 ), true ) );
+ }
+
+ QString newMonth = QString::null;
+ if ( !m_date.cap( 1 ).isNull() && !m_date.cap( 1 ).isEmpty() && ( newMonth = parseMonth( m_date.cap( 1 ) ) ) != QString::null )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftMonth );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftJournal );
+ entry->addField( field );
+ }
+
+ field->setValue( new BibTeX::Value( newMonth, true ) );
+
+ newMonth = QString::null;
+ if ( !m_date.cap( 2 ).isNull() && !m_date.cap( 2 ).isEmpty() && ( newMonth = parseMonth( m_date.cap( 2 ) ) ) != QString::null )
+ {
+ field->value()->items.append( new BibTeX::PlainText( "/" ) );
+ field->value()->items.append( new BibTeX::MacroKey( newMonth ) );
+ }
+ }
+ }
+
+ QString WebQueryIEEExplore::parseMonth( const QString &month )
+ {
+ for ( unsigned int i = 0; i < sizeof( BibTeX::MonthsTriple ) / sizeof( BibTeX::MonthsTriple[0] ); ++i )
+ if ( month.startsWith( BibTeX::MonthsTriple[i], false ) ) return BibTeX::MonthsTriple[i];
+ return QString::null;
+ }
+
+}
+#include "webqueryieeexplore.moc"
diff --git a/src/webqueryieeexplore.h b/src/webqueryieeexplore.h
new file mode 100644
index 0000000..d07f504
--- /dev/null
+++ b/src/webqueryieeexplore.h
@@ -0,0 +1,83 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXWEBQUERYIEEEXPLORE_H
+#define KBIBTEXWEBQUERYIEEEXPLORE_H
+
+#include <qregexp.h>
+
+#include <webquery.h>
+#include <fileimporter.h>
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryIEEExploreWidget : public WebQueryWidget
+ {
+ Q_OBJECT
+ public:
+ WebQueryIEEExploreWidget( QWidget *parent, const char *name = 0 );
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+
+ class WebQueryIEEExplore : public WebQuery
+ {
+ Q_OBJECT
+ public:
+ WebQueryIEEExplore( QWidget* parent );
+ virtual ~WebQueryIEEExplore();
+
+ void query();
+
+ QString title();
+ QString disclaimer();
+ QString disclaimerURL();
+
+ WebQueryWidget *widget();
+
+ protected:
+ void cancelQuery() { /* nothing */ };
+
+ private:
+ BibTeX::FileImporter *m_bibtexImporter;
+ WebQueryIEEExploreWidget *m_widget;
+ QRegExp m_numberOfMatches;
+ QRegExp m_findArNumber;
+ QRegExp m_date;
+ KURL m_risURL;
+ QValueList<int> m_arnumList;
+ QString m_incomingData;
+ int m_numMaxHits, m_numMatches, m_hitCounter;
+
+ void fetchNext();
+ void fixDate( BibTeX::Entry *entry );
+ QString parseMonth( const QString &month );
+
+ private slots:
+ void slotData( KIO::Job *job, const QByteArray &data );
+ void slotResult( KIO::Job *job );
+ };
+}
+
+#endif
diff --git a/src/webquerymathscinet.cpp b/src/webquerymathscinet.cpp
new file mode 100644
index 0000000..ef6349a
--- /dev/null
+++ b/src/webquerymathscinet.cpp
@@ -0,0 +1,188 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include "webquerymathscinet.h"
+
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qregexp.h>
+#include <qspinbox.h>
+
+#include <kpushbutton.h>
+#include <klocale.h>
+#include <kiconloader.h>
+#include <kurl.h>
+#include <kdebug.h>
+#include <kio/netaccess.h>
+#include <kmessagebox.h>
+
+#include <settings.h>
+
+namespace KBibTeX
+{
+ WebQueryMathSciNetWidget::WebQueryMathSciNetWidget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name )
+ {
+ init();
+
+ Settings *settings = Settings::self();
+ QString value = settings->getWebQueryDefault( "MathSciNet" );
+ value = value == QString::null ? "" : value;
+ lineEditQuery->setText( value );
+ slotTextChanged( value, true );
+ }
+
+ void WebQueryMathSciNetWidget::init()
+ {
+ QVBoxLayout *vLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+
+ QHBoxLayout *hLayout = new QHBoxLayout( );
+ vLayout->addLayout( hLayout );
+
+ KPushButton *clearSearchText = new KPushButton( this );
+ clearSearchText->setIconSet( QIconSet( SmallIcon( "locationbar_erase" ) ) );
+ hLayout->addWidget( clearSearchText );
+ QLabel *label = new QLabel( i18n( "Search &term:" ), this );
+ hLayout->addWidget( label );
+ lineEditQuery = new KLineEdit( this );
+ hLayout->addWidget( lineEditQuery );
+ label->setBuddy( lineEditQuery );
+ hLayout->addSpacing( KDialog::spacingHint() * 2 );
+ connect( clearSearchText, SIGNAL( clicked() ), lineEditQuery, SLOT( clear() ) );
+ connect( lineEditQuery, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( const QString& ) ) );
+ hLayout->setStretchFactor( lineEditQuery, 4 );
+ KCompletion *completionQuery = lineEditQuery->completionObject();
+
+/*
+ label = new QLabel( i18n( "&Number of results:" ), this );
+ hLayout->addWidget( label );
+ spinBoxMaxHits = new QSpinBox( 1, 250, 1, this );
+ spinBoxMaxHits->setValue( 10 );
+ hLayout->addWidget( spinBoxMaxHits );
+ label->setBuddy( spinBoxMaxHits );
+*/
+
+ label = new QLabel( i18n( "<qt>Use the same synatx as for <a href=\"http://www.math.tamu.edu/~comech/tools/bibget/\">BIBGET</a>. For spaces within a search element, use \"<tt>+</tt>\".<br/>Example: <tt>a=gilkey t=invariance book 1984</tt></qt>" ), this );
+ vLayout->addWidget( label );
+
+ vLayout->addStretch( 0 );
+
+ connect( lineEditQuery, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) );
+ connect( lineEditQuery, SIGNAL( returnPressed( const QString& ) ), completionQuery, SLOT( addItem( const QString& ) ) );
+ }
+
+ WebQueryMathSciNet::WebQueryMathSciNet( QWidget* parent ): WebQuery( parent )
+ {
+ m_widget = new WebQueryMathSciNetWidget( parent );
+ }
+
+ WebQueryMathSciNet::~WebQueryMathSciNet()
+ {
+ delete m_widget;
+ }
+
+ QString WebQueryMathSciNet::title()
+ {
+ return i18n( "MathSciNet" );
+ }
+
+ QString WebQueryMathSciNet::disclaimer()
+ {
+ return i18n( "American Mathematical Society" );
+ }
+
+ QString WebQueryMathSciNet::disclaimerURL()
+ {
+ return "http://www.ams.org/ams/copyright.html";
+ }
+
+ WebQueryWidget *WebQueryMathSciNet::widget()
+ {
+ return m_widget;
+ }
+
+ void WebQueryMathSciNet::query()
+ {
+ WebQuery::query();
+ Settings *settings = Settings::self();
+ settings->setWebQueryDefault( "MathSciNet", m_widget->lineEditQuery->text() );
+
+ setNumStages( 1 );
+
+ QStringList searchTerms = QStringList::split( QRegExp( "\\s+" ), m_widget->lineEditQuery->text().stripWhiteSpace() );
+ if ( searchTerms.isEmpty() )
+ {
+ setEndSearch( WebQuery::statusInvalidQuery );
+ return;
+ }
+
+ QStringList queryTerms;
+ int count = 1;
+ for ( QStringList::ConstIterator it = searchTerms.constBegin(); it != searchTerms.constEnd(); ++it )
+ {
+ const QString term=*it;
+ if ( term.startsWith( "a=" ) )
+ queryTerms << QString( "pg%1=AUCN" ).arg( count ) << QString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) );
+ else if ( term.startsWith( "t=" ) )
+ queryTerms << QString( "pg%1=TI" ).arg( count ) << QString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) );
+ else if ( term.startsWith( "k=" ) )
+ queryTerms << QString( "pg%1=ALLF" ).arg( count ) << QString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) );
+ else if ( term.startsWith( "r=" ) )
+ queryTerms << QString( "pg%1=MR" ).arg( count ) << QString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) );
+ else if ( term.startsWith( "j=" ) )
+ queryTerms << QString( "pg%1=JOUR" ).arg( count ) << QString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) );
+ else
+ queryTerms << QString( "pg%1=ALLF" ).arg( count ) << QString( "s%1=%2" ).arg( count ).arg( term );
+ ++count;
+ }
+
+ KURL url( QString( "http://www.ams.org/msnmain?fn=130&fmt=bibtex&l=100&extend=1&" ).append( queryTerms.join( "&" ) ) );
+ kdDebug()<<"url="<<url.prettyURL()<<endl;
+
+ BibTeX::File *bibFile = downloadBibTeXFile( url );
+ enterNextStage();
+
+ if ( bibFile != NULL && !m_aborted )
+ {
+ for ( BibTeX::File::ElementList::iterator it = bibFile->begin(); it != bibFile->end(); ++it )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( entry != NULL )
+ emit foundEntry( entry, false );
+ }
+ setEndSearch( WebQuery::statusSuccess );
+ }
+ else if ( !m_aborted )
+ {
+ QString message = KIO::NetAccess::lastErrorString();
+ if ( message.isEmpty() )
+ message.prepend( '\n' );
+ message.prepend( QString( i18n( "Querying database '%1' failed." ) ).arg( title() ) );
+ KMessageBox::error( m_parent, message );
+ setEndSearch( WebQuery::statusError );
+ }
+ else
+ setEndSearch( WebQuery::statusAborted );
+
+ if ( bibFile != NULL )
+ delete bibFile;
+ }
+
+}
+#include "webquerymathscinet.moc" \ No newline at end of file
diff --git a/src/webquerymathscinet.h b/src/webquerymathscinet.h
new file mode 100644
index 0000000..9b92f7c
--- /dev/null
+++ b/src/webquerymathscinet.h
@@ -0,0 +1,67 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXWEBQUERYMATHSCINET_H
+#define KBIBTEXWEBQUERYMATHSCINET_H
+
+#include <webquery.h>
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryMathSciNetWidget : public WebQueryWidget
+ {
+ Q_OBJECT
+ public:
+ WebQueryMathSciNetWidget( QWidget *parent, const char *name = 0 );
+
+ protected:
+ virtual void init();
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryMathSciNet : public WebQuery
+ {
+ Q_OBJECT
+ public:
+ WebQueryMathSciNet( QWidget* parent );
+ virtual ~WebQueryMathSciNet();
+
+ void query();
+
+ QString title();
+ QString disclaimer();
+ QString disclaimerURL();
+
+ WebQueryWidget *widget();
+
+ protected:
+ void cancelQuery() { /* nothing */ };
+
+ private:
+ WebQueryMathSciNetWidget *m_widget;
+ };
+
+}
+
+#endif // KBIBTEXWEBQUERYMATHSCINET_H
diff --git a/src/webquerypubmed.cpp b/src/webquerypubmed.cpp
new file mode 100644
index 0000000..f3dcb82
--- /dev/null
+++ b/src/webquerypubmed.cpp
@@ -0,0 +1,535 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <qwidget.h>
+#include <qdom.h>
+#include <qapplication.h>
+#include <qstringlist.h>
+#include <qbuffer.h>
+#include <qcstring.h>
+#include <qregexp.h>
+#include <qspinbox.h>
+
+#include <klineedit.h>
+#include <kdialog.h>
+#include <klocale.h>
+#include <kurl.h>
+#include <kmessagebox.h>
+#include <kio/netaccess.h>
+
+#include <entryfield.h>
+#include <value.h>
+#include <settings.h>
+#include "webquerypubmed.h"
+
+namespace KBibTeX
+{
+ WebQueryPubMedWidget::WebQueryPubMedWidget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name )
+ {
+ init();
+
+ Settings *settings = Settings::self();
+ QString value = settings->getWebQueryDefault( "PubMed" );
+ value = value == QString::null ? "" : value;
+ lineEditQuery->setText( value );
+ slotTextChanged( value, true );
+ }
+
+ WebQueryPubMed::WebQueryPubMed( QWidget *parent ) : WebQuery( parent )
+ {
+ m_widget = new WebQueryPubMedWidget( parent );
+ }
+
+ WebQueryPubMed::~WebQueryPubMed()
+ {
+ delete m_widget;
+ }
+
+ QString WebQueryPubMed::title()
+ {
+ return i18n( "NCBI (PubMed)" );
+ }
+
+ QString WebQueryPubMed::disclaimer()
+ {
+ return i18n( "NCBI's Disclaimer and Copyright" );
+ }
+
+ QString WebQueryPubMed::disclaimerURL()
+ {
+ return "http://eutils.ncbi.nlm.nih.gov/About/disclaimer.html";
+ }
+
+ WebQueryWidget *WebQueryPubMed::widget()
+ {
+ return m_widget;
+ }
+
+ void WebQueryPubMed::query()
+ {
+ WebQuery::query();
+ Settings *settings = Settings::self();
+ settings->setWebQueryDefault( "PubMed", m_widget->lineEditQuery->text() );
+
+ setNumStages( 2 );
+ int numberOfResults = m_widget->spinBoxMaxHits->value();
+
+ QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" );
+ if ( searchTerm.isEmpty() )
+ {
+ setEndSearch( WebQuery::statusInvalidQuery );
+ return;
+ }
+
+ searchTerm = searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" );
+ KURL url = KURL( QString( "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=%2&retmax=%1&tool=KBibTeX&email=kbibtex@unix-ag.uni-kl.de" ).arg( numberOfResults ).arg( searchTerm ) );
+
+ QString data = downloadHTML( url );
+ if ( data != QString::null && !m_aborted )
+ {
+ QBuffer buffer;
+ buffer.open( IO_WriteOnly );
+ QTextStream ts( &buffer );
+ ts.setEncoding( QTextStream::UnicodeUTF8 );
+ ts << data << endl;
+ buffer.close();
+
+ buffer.open( IO_ReadOnly );
+ QValueList<int> intList;
+ QXmlInputSource inputSource( &buffer );
+ QXmlSimpleReader reader;
+ WebQueryPubMedStructureParserQuery handler( &intList );
+ reader.setContentHandler( &handler );
+ reader.parse( &inputSource );
+ buffer.close();
+
+ QString ids;
+ QValueList<int>::iterator it = intList.begin();
+ if ( it != intList.end() )
+ {
+ ids.append( QString::number( *it ) );
+ ++it;
+ for ( ; it != intList.end(); ++it )
+ {
+ ids.append( "," );
+ ids.append( QString::number( *it ) );
+ }
+ }
+
+ url = KURL( QString( "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&retmode=xml&id=%1&tool=KBibTeX&email=kbibtex@unix-ag.uni-kl.de" ).arg( ids ) );
+ data = downloadHTML( url );
+ if ( data != QString::null && !m_aborted )
+ {
+ buffer.open( IO_WriteOnly );
+ QTextStream ts( &buffer );
+ ts.setEncoding( QTextStream::UnicodeUTF8 );
+ ts << data << endl;
+ buffer.close();
+
+ buffer.open( IO_ReadOnly );
+ QDomDocument doc( "efetch'ed" );
+ doc.setContent( &buffer );
+ QDomElement docElem = doc.documentElement();
+ WebQueryPubMedResultParser resultParser;
+ connect( &resultParser, SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, SIGNAL( foundEntry( BibTeX::Entry*, bool ) ) );
+ resultParser.parse( docElem );
+ buffer.close();
+ setEndSearch( WebQuery::statusSuccess );
+ }
+ else if ( !m_aborted )
+ {
+ QString message = KIO::NetAccess::lastErrorString();
+ message.prepend( QString( i18n( "Querying database '%1' failed." ) ).arg( title() ) );
+ KMessageBox::error( m_parent, message );
+ setEndSearch( WebQuery::statusError );
+ }
+ else
+ setEndSearch( WebQuery::statusAborted );
+ }
+ else if ( !m_aborted )
+ {
+ QString message = KIO::NetAccess::lastErrorString();
+ if ( message.isEmpty() )
+ message.prepend( '\n' );
+ message.prepend( QString( i18n( "Querying database '%1' failed." ) ).arg( title() ) );
+ KMessageBox::error( m_parent, message );
+ setEndSearch( WebQuery::statusError );
+ }
+ else
+ setEndSearch( WebQuery::statusAborted );
+ }
+
+ WebQueryPubMedStructureParserQuery::WebQueryPubMedStructureParserQuery( QValueList<int> *intList ) : QXmlDefaultHandler(), m_intList( intList )
+ {
+ m_intList->clear();
+ }
+
+ WebQueryPubMedStructureParserQuery::~WebQueryPubMedStructureParserQuery( )
+ {
+ // nothing
+ }
+
+ bool WebQueryPubMedStructureParserQuery::startElement( const QString & /*namespaceURI*/, const QString & /*localName*/, const QString & /*qName*/, const QXmlAttributes & /*atts*/ )
+ {
+ concatString = QString();
+ return TRUE;
+ }
+
+ bool WebQueryPubMedStructureParserQuery::endElement( const QString & /*namespaceURI*/, const QString & /*localName*/, const QString & qName )
+ {
+ if ( qName == "Id" )
+ {
+ bool ok;
+ int id = concatString.toInt( &ok );
+ if ( ok && id > 0 && m_intList != NULL )
+ m_intList->append( id );
+ }
+
+ return TRUE;
+ }
+
+ bool WebQueryPubMedStructureParserQuery::characters( const QString & ch )
+ {
+ concatString.append( ch );
+ return TRUE;
+ }
+
+ WebQueryPubMedResultParser::WebQueryPubMedResultParser( ) : QObject()
+ {
+ // nothing
+ }
+
+ void WebQueryPubMedResultParser::parse( const QDomElement& rootElement )
+ {
+ if ( rootElement.tagName() == "PubmedArticleSet" )
+ for ( QDomNode n = rootElement.firstChild(); !n.isNull(); n = n.nextSibling() )
+ {
+ QDomElement e = n.toElement();
+ if ( !e.isNull() && e.tagName() == "PubmedArticle" )
+ {
+ BibTeX::Entry * entry = new BibTeX::Entry( BibTeX::Entry::etMisc, "PubMed" );
+ parsePubmedArticle( e, entry );
+ emit foundEntry( entry, false );
+ }
+ }
+ }
+
+ WebQueryPubMedResultParser::~WebQueryPubMedResultParser()
+ {
+ // nothing
+ }
+
+ void WebQueryPubMedResultParser::parsePubmedArticle( const QDomElement& element, BibTeX::Entry *entry )
+ {
+ for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+ {
+ QDomElement e = n.toElement();
+ if ( !e.isNull() && e.tagName() == "MedlineCitation" )
+ parseMedlineCitation( e, entry );
+ }
+ }
+
+ void WebQueryPubMedResultParser::parseMedlineCitation( const QDomElement& element, BibTeX::Entry *entry )
+ {
+ for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+ {
+ QDomElement e = n.toElement();
+ if ( !e.isNull() )
+ {
+ if ( e.tagName() == "PMID" )
+ {
+ entry->setId( QString( "PubMed_%1" ).arg( e.text() ) );
+
+ /** add url to pubmed website */
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftURL );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftURL );
+ entry->addField( field );
+ }
+ field->setValue( new BibTeX::Value( QString( "http://www.ncbi.nlm.nih.gov/pubmed/" ).append( e.text() ) ) );
+ }
+ else if ( e.tagName() == "Article" )
+ parseArticle( e, entry );
+ else if ( e.tagName() == "MedlineJournalInfo" )
+ {
+ for ( QDomNode n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() )
+ {
+ QDomElement e2 = n2.toElement();
+ if ( e2.tagName() == "MedlineTA" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftJournal );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftJournal );
+ entry->addField( field );
+ }
+ field->setValue( new BibTeX::Value( e2.text() ) );
+ }
+ }
+ }
+ }
+ }
+
+ }
+
+ void WebQueryPubMedResultParser::parseArticle( const QDomElement& element, BibTeX::Entry *entry )
+ {
+ for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+ {
+ QDomElement e = n.toElement();
+
+ if ( e.tagName() == "Journal" )
+ {
+ parseJournal( e, entry );
+ entry->setEntryType( BibTeX::Entry::etArticle );
+ }
+ else if ( e.tagName() == "ArticleTitle" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftTitle );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftTitle );
+ entry->addField( field );
+ }
+ field->setValue( new BibTeX::Value( e.text() ) );
+ }
+ else if ( e.tagName() == "Pagination" )
+ {
+ QDomElement medlinePgn = e.firstChild().toElement(); // may fail?
+ if ( !medlinePgn.text().isEmpty() )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftPages );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftPages );
+ entry->addField( field );
+ }
+ field->setValue( new BibTeX::Value( medlinePgn.text() ) );
+ }
+ }
+ else if ( e.tagName() == "Abstract" )
+ {
+ QDomElement abstractText = e.firstChild().toElement();
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftAbstract );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftAbstract );
+ entry->addField( field );
+ }
+ field->setValue( new BibTeX::Value( abstractText.text() ) );
+ }
+ else if ( e.tagName() == "Affiliation" )
+ {
+ BibTeX::EntryField * field = entry->getField( "affiliation" );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( "affiliation" );
+ entry->addField( field );
+ }
+ field->setValue( new BibTeX::Value( e.text() ) );
+ }
+ else if ( e.tagName() == "AuthorList" )
+ parseAuthorList( e, entry );
+ }
+ }
+
+ void WebQueryPubMedResultParser::parseJournal( const QDomElement& element, BibTeX::Entry *entry )
+ {
+ for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+ {
+ QDomElement e = n.toElement();
+
+ if ( e.tagName() == "ISSN" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftISSN );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftISSN );
+ entry->addField( field );
+ }
+ field->setValue( new BibTeX::Value( e.text() ) );
+ }
+ else if ( e.tagName() == "JournalIssue" )
+ parseJournalIssue( e, entry );
+ else if ( e.tagName() == "Title" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftJournal );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftJournal );
+ entry->addField( field );
+ }
+ field->setValue( new BibTeX::Value( e.text() ) );
+ }
+ }
+ }
+
+ void WebQueryPubMedResultParser::parseJournalIssue( const QDomElement& element, BibTeX::Entry *entry )
+ {
+ for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+ {
+ QDomElement e = n.toElement();
+
+ if ( e.tagName() == "Volume" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftVolume );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftVolume );
+ entry->addField( field );
+ }
+ field->setValue( new BibTeX::Value( e.text() ) );
+ }
+ else if ( e.tagName() == "Issue" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftNumber );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftNumber );
+ entry->addField( field );
+ }
+ field->setValue( new BibTeX::Value( e.text() ) );
+ }
+ else if ( e.tagName() == "PubDate" )
+ parsePubDate( e, entry );
+ }
+ }
+
+ void WebQueryPubMedResultParser::parsePubDate( const QDomElement& element, BibTeX::Entry *entry )
+ {
+ for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+ {
+ QDomElement e = n.toElement();
+
+ if ( e.tagName() == "Year" )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftYear );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftYear );
+ entry->addField( field );
+ }
+ field->setValue( new BibTeX::Value( e.text() ) );
+ }
+ else if ( e.tagName() == "Month" )
+ {
+ QString month = e.text().lower();
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftMonth );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftMonth );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::MacroKey( month ) );
+ field->setValue( value );
+ }
+ else if ( e.tagName() == "MedlineDate" )
+ {
+ QStringList frags = QStringList::split( QRegExp( "\\s+" ), e.text() );
+ for ( QStringList::Iterator it = frags.begin(); it != frags.end(); ++it )
+ {
+ bool ok;
+ int num = ( *it ).toInt( &ok );
+ if ( ok && num > 1000 && num < 3000 )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftYear );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftYear );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::MacroKey( QString::number( num ) ) );
+ field->setValue( value );
+ }
+ else if ( !ok && ( *it ).length() == 3 )
+ {
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftMonth );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftMonth );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ value->items.append( new BibTeX::MacroKey(( *it ).lower() ) );
+ field->setValue( value );
+ }
+ }
+ }
+ }
+ }
+
+ void WebQueryPubMedResultParser::parseAuthorList( const QDomElement& element, BibTeX::Entry *entry )
+ {
+ if ( element.attribute( "CompleteYN", "Y" ) == "Y" )
+ {
+ QStringList authorList;
+ for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+ {
+ QDomElement e = n.toElement();
+ if ( e.tagName() == "Author" && e.attribute( "ValidYN", "Y" ) == "Y" )
+ {
+ QString lastName = QString::null, firstName = QString::null;
+ for ( QDomNode n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() )
+ {
+ QDomElement e2 = n2.toElement();
+ if ( e2.tagName() == "LastName" )
+ lastName = e2.text();
+ else if ( e2.tagName() == "CollectiveName" )
+ lastName = e2.text();
+ else if ( e2.tagName() == "FirstName" || e2.tagName() == "ForeName" )
+ firstName = e2.text();
+ }
+ QString name = lastName;
+ if ( !firstName.isNull() && !firstName.isEmpty() )
+ {
+ if ( name.isNull() ) name = "UNSET";
+ name.prepend( "|" ).prepend( firstName );
+ }
+ if ( !name.isNull() )
+ authorList.append( name );
+ }
+ }
+
+ BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftAuthor );
+ if ( field == NULL )
+ {
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftAuthor );
+ entry->addField( field );
+ }
+ BibTeX::Value *value = new BibTeX::Value();
+ Settings *settings = Settings::self();
+ BibTeX::PersonContainer *personContainer = new BibTeX::PersonContainer( settings->editing_FirstNameFirst );
+ value->items.append( personContainer );
+ for ( QStringList::Iterator sli = authorList.begin(); sli != authorList.end(); ++sli )
+ {
+ QStringList nameParts = QStringList::split( '|', *sli );
+ QString firstName = nameParts.count() > 1 ? nameParts[0] : "";
+ QString lastName = nameParts[nameParts.count() - 1];
+ personContainer->persons.append( new BibTeX::Person( firstName, lastName, settings->editing_FirstNameFirst ) );
+ }
+ field->setValue( value );
+ }
+ }
+
+}
+#include "webquerypubmed.moc"
diff --git a/src/webquerypubmed.h b/src/webquerypubmed.h
new file mode 100644
index 0000000..86d0326
--- /dev/null
+++ b/src/webquerypubmed.h
@@ -0,0 +1,106 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef KBIBTEXWEBQUERYPUBMED_H
+#define KBIBTEXWEBQUERYPUBMED_H
+
+#include <qwidget.h>
+#include <qxml.h>
+#include <qvaluelist.h>
+
+#include <webquery.h>
+
+class QStringList;
+class QDomElement;
+class QDate;
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryPubMedWidget : public WebQueryWidget
+ {
+ Q_OBJECT
+ public:
+ WebQueryPubMedWidget( QWidget *parent, const char *name = 0 );
+ };
+
+ class WebQueryPubMedStructureParserQuery : public QXmlDefaultHandler
+ {
+ public:
+ WebQueryPubMedStructureParserQuery( QValueList<int> *intList );
+ ~WebQueryPubMedStructureParserQuery( );
+
+ bool startElement( const QString&, const QString&, const QString&, const QXmlAttributes& );
+ bool endElement( const QString&, const QString&, const QString& );
+ bool characters( const QString & ch );
+
+ private:
+ QValueList<int> *m_intList;
+ QString concatString;
+ };
+
+ class WebQueryPubMedResultParser: public QObject
+ {
+ Q_OBJECT
+ public:
+ WebQueryPubMedResultParser();
+ ~WebQueryPubMedResultParser();
+
+ void parse( const QDomElement& rootElement );
+
+ signals:
+ void foundEntry( BibTeX::Entry*, bool );
+
+ private:
+ void parsePubmedArticle( const QDomElement& element, BibTeX::Entry *entry );
+ void parseMedlineCitation( const QDomElement& element, BibTeX::Entry *entry );
+ void parseArticle( const QDomElement& element, BibTeX::Entry *entry );
+ void parseJournal( const QDomElement& element, BibTeX::Entry *entry );
+ void parseJournalIssue( const QDomElement& element, BibTeX::Entry *entry );
+ void parsePubDate( const QDomElement& element, BibTeX::Entry *entry );
+ void parseAuthorList( const QDomElement& element, BibTeX::Entry *entry );
+ };
+
+ class WebQueryPubMed : public WebQuery
+ {
+ Q_OBJECT
+ public:
+ WebQueryPubMed( QWidget *parent );
+ virtual ~WebQueryPubMed();
+
+ void query();
+
+ QString title();
+ QString disclaimer();
+ QString disclaimerURL();
+
+ WebQueryWidget *widget();
+
+ protected:
+ void cancelQuery() { /* nothing */ };
+
+ private:
+ WebQueryPubMedWidget *m_widget;
+ };
+
+}
+
+#endif
diff --git a/src/webquerysciencedirect.cpp b/src/webquerysciencedirect.cpp
new file mode 100644
index 0000000..152d05b
--- /dev/null
+++ b/src/webquerysciencedirect.cpp
@@ -0,0 +1,425 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qspinbox.h>
+#include <qbuffer.h>
+#include <qfile.h>
+
+#include <kpushbutton.h>
+#include <klocale.h>
+#include <kcombobox.h>
+#include <kiconloader.h>
+#include <kio/jobclasses.h>
+#include <kio/job.h>
+#include <kio/netaccess.h>
+
+#include <settings.h>
+#include <fileimporterris.h>
+#include "webquerysciencedirect.h"
+
+namespace KBibTeX
+{
+ WebQueryScienceDirectWidget::WebQueryScienceDirectWidget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name )
+ {
+ init();
+
+ QString allValues;
+ Settings *settings = Settings::self();
+ QString value = settings->getWebQueryDefault( "ScienceDirect_title" );
+ value = value == QString::null ? "" : value;
+ lineEditQuery->setText( value );
+ allValues += value;
+ value = settings->getWebQueryDefault( "ScienceDirect_author" );
+ value = value == QString::null ? "" : value;
+ lineEditAuthor->setText( value );
+ allValues += value;
+ value = settings->getWebQueryDefault( "ScienceDirect_journal" );
+ value = value == QString::null ? "" : value;
+ lineEditJournal->setText( value );
+ allValues += value;
+ value = settings->getWebQueryDefault( "ScienceDirect_volume" );
+ value = value == QString::null ? "" : value;
+ lineEditVolume->setText( value );
+ allValues += value;
+ value = settings->getWebQueryDefault( "ScienceDirect_issue" );
+ value = value == QString::null ? "" : value;
+ lineEditIssue->setText( value );
+ allValues += value;
+ value = settings->getWebQueryDefault( "ScienceDirect_page" );
+ value = value == QString::null ? "" : value;
+ lineEditPage->setText( value );
+ allValues += value;
+
+ slotTextChanged( allValues, true );
+ }
+
+ void WebQueryScienceDirectWidget::init()
+ {
+ QVBoxLayout *vLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+
+ QHBoxLayout *hLayout = new QHBoxLayout( );
+ vLayout->addLayout( hLayout );
+ KPushButton *clearSearchText = new KPushButton( this );
+ clearSearchText->setIconSet( QIconSet( SmallIcon( "locationbar_erase" ) ) );
+ hLayout->addWidget( clearSearchText );
+ QLabel *label = new QLabel( i18n( "Title, abstract, keywords:" ), this );
+ hLayout->addWidget( label );
+ lineEditQuery = new KLineEdit( this );
+ KCompletion *completionQuery = lineEditQuery->completionObject();
+ hLayout->addWidget( lineEditQuery );
+ label->setBuddy( lineEditQuery );
+ connect( clearSearchText, SIGNAL( clicked() ), lineEditQuery, SLOT( clear() ) );
+ connect( lineEditQuery, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChangedSD( ) ) );
+ hLayout->setStretchFactor( lineEditQuery, 7 );
+ connect( lineEditQuery, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) );
+ connect( lineEditQuery, SIGNAL( returnPressed( const QString& ) ), completionQuery, SLOT( addItem( const QString& ) ) );
+
+
+ hLayout = new QHBoxLayout( );
+ vLayout->addLayout( hLayout );
+
+ KPushButton *clearAuthor = new KPushButton( this );
+ clearAuthor->setIconSet( QIconSet( SmallIcon( "locationbar_erase" ) ) );
+ hLayout->addWidget( clearAuthor );
+ label = new QLabel( i18n( "Author:" ), this );
+ hLayout->addWidget( label );
+ lineEditAuthor = new KLineEdit( this );
+ completionQuery = lineEditAuthor->completionObject();
+ hLayout->addWidget( lineEditAuthor );
+ label->setBuddy( lineEditAuthor );
+ connect( clearAuthor, SIGNAL( clicked() ), lineEditAuthor, SLOT( clear() ) );
+ connect( lineEditAuthor, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChangedSD( ) ) );
+ hLayout->setStretchFactor( lineEditAuthor, 7 );
+ connect( lineEditAuthor, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) );
+ connect( lineEditAuthor, SIGNAL( returnPressed( const QString& ) ), completionQuery, SLOT( addItem( const QString& ) ) );
+
+ hLayout->addSpacing( KDialog::spacingHint() * 2 );
+
+ KPushButton *clearJournal = new KPushButton( this );
+ clearJournal->setIconSet( QIconSet( SmallIcon( "locationbar_erase" ) ) );
+ hLayout->addWidget( clearJournal );
+ label = new QLabel( i18n( "Journal/book title:" ), this );
+ hLayout->addWidget( label );
+ lineEditJournal = new KLineEdit( this );
+ completionQuery = lineEditJournal->completionObject();
+ hLayout->addWidget( lineEditJournal );
+ label->setBuddy( lineEditJournal );
+ connect( clearJournal, SIGNAL( clicked() ), lineEditJournal, SLOT( clear() ) );
+ connect( lineEditJournal, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChangedSD( ) ) );
+ hLayout->setStretchFactor( lineEditJournal, 4 );
+ connect( lineEditJournal, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) );
+ connect( lineEditJournal, SIGNAL( returnPressed( const QString& ) ), completionQuery, SLOT( addItem( const QString& ) ) );
+
+ hLayout = new QHBoxLayout( );
+ vLayout->addLayout( hLayout );
+
+ label = new QLabel( i18n( "Volume:" ), this );
+ hLayout->addWidget( label );
+ lineEditVolume = new KLineEdit( this );
+ hLayout->addWidget( lineEditVolume );
+ hLayout->setStretchFactor( lineEditVolume, 1 );
+ label->setBuddy( lineEditVolume );
+ connect( lineEditVolume, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) );
+
+ hLayout->addSpacing( KDialog::spacingHint() * 2 );
+
+ label = new QLabel( i18n( "Issue:" ), this );
+ hLayout->addWidget( label );
+ lineEditIssue = new KLineEdit( this );
+ hLayout->addWidget( lineEditIssue );
+ label->setBuddy( lineEditIssue );
+ hLayout->setStretchFactor( lineEditIssue, 1 );
+ connect( lineEditIssue, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) );
+
+ hLayout->addSpacing( KDialog::spacingHint() * 2 );
+
+ label = new QLabel( i18n( "Page:" ), this );
+ hLayout->addWidget( label );
+ lineEditPage = new KLineEdit( this );
+ hLayout->addWidget( lineEditPage );
+ hLayout->setStretchFactor( lineEditPage, 1 );
+ label->setBuddy( lineEditPage );
+ connect( lineEditPage, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) );
+
+ hLayout->addSpacing( KDialog::spacingHint() * 2 );
+
+ label = new QLabel( i18n( "&Number of results:" ), this );
+ hLayout->addWidget( label );
+ spinBoxMaxHits = new QSpinBox( 1, 100, 1, this );
+ spinBoxMaxHits->setValue( 10 );
+ hLayout->addWidget( spinBoxMaxHits );
+ hLayout->setStretchFactor( spinBoxMaxHits, 1 );
+ label->setBuddy( spinBoxMaxHits );
+ hLayout->addStretch( 5 );
+ }
+
+ void WebQueryScienceDirectWidget::slotTextChangedSD()
+ {
+ QString text = lineEditQuery->text().stripWhiteSpace().append( lineEditAuthor->text().stripWhiteSpace() ).append( lineEditJournal->text().stripWhiteSpace() ).replace( '$', "" );
+ emit enableSearch( !text.isEmpty() );
+ }
+
+ WebQueryScienceDirect::WebQueryScienceDirect( QWidget* parent ): WebQuery( parent )
+ {
+ m_importer = new BibTeX::FileImporterBibTeX( FALSE );
+ m_importer->setIgnoreComments( TRUE );
+ m_widget = new WebQueryScienceDirectWidget( parent );
+ }
+
+ WebQueryScienceDirect::~WebQueryScienceDirect()
+ {
+ delete m_widget;
+ delete m_importer;
+ }
+
+ QString WebQueryScienceDirect::title()
+ {
+ return i18n( "ScienceDirect" );
+ }
+
+ QString WebQueryScienceDirect::disclaimer()
+ {
+ return i18n( "About ScienceDirect" );
+ }
+
+ QString WebQueryScienceDirect::disclaimerURL()
+ {
+ return "http://info.sciencedirect.com/";
+ }
+
+ WebQueryWidget *WebQueryScienceDirect::widget()
+ {
+ return m_widget;
+ }
+
+ void WebQueryScienceDirect::query()
+ {
+ WebQuery::query();
+
+ Settings *settings = Settings::self();
+ settings->setWebQueryDefault( "ScienceDirect_author", m_widget->lineEditAuthor->text() );
+ settings->setWebQueryDefault( "ScienceDirect_journal", m_widget->lineEditJournal->text() );
+ settings->setWebQueryDefault( "ScienceDirect_volume", m_widget->lineEditVolume->text() );
+ settings->setWebQueryDefault( "ScienceDirect_issue", m_widget->lineEditIssue->text() );
+ settings->setWebQueryDefault( "ScienceDirect_page", m_widget->lineEditPage->text() );
+
+ QString tak = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" ).replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" );
+ QString author = m_widget->lineEditAuthor->text().stripWhiteSpace().replace( '$', "" ).replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" );
+ QString journal = m_widget->lineEditJournal->text().stripWhiteSpace().replace( '$', "" ).replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" );
+ QString volume = m_widget->lineEditVolume->text().stripWhiteSpace().replace( '$', "" ).replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" );
+ QString issue = m_widget->lineEditIssue->text().stripWhiteSpace().replace( '$', "" ).replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" );
+ QString page = m_widget->lineEditPage->text().stripWhiteSpace().replace( '$', "" ).replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" );
+
+ if ( tak.isEmpty() && author.isEmpty() && journal.isEmpty() )
+ {
+ setEndSearch( WebQuery::statusInvalidQuery );
+ return;
+ }
+
+ setNumStages( 4 );
+
+ if ( !getStartPage() ) return;
+
+ if ( !getResultPage( tak, author, journal, volume, issue, page ) ) return;
+
+ if ( !getArticleListPage() ) return;
+
+ if ( !getRISFile() ) return;
+ }
+
+ bool WebQueryScienceDirect::getStartPage()
+ {
+ QString startPage = downloadHTML( KURL( "http://www.sciencedirect.com/" ) );
+ if ( m_aborted )
+ {
+ setEndSearch( WebQuery::statusAborted );
+ return false;
+ }
+ else if ( startPage == QString::null )
+ {
+ setEndSearch( WebQuery::statusError );
+ return false;
+ }
+
+ int pos = startPage.find( "<input type=\"hidden\" name=\"_acct\" value=\"" );
+ if ( pos < 0 )
+ {
+ setEndSearch( WebQuery::statusError );
+ return false;
+ }
+ m_account = startPage.mid( pos + 41, startPage.find( "\"", pos + 43 ) - pos - 41 );
+ pos = startPage.find( "<input type=\"hidden\" name=\"md5\" value=\"" );
+ if ( pos < 0 )
+ {
+ setEndSearch( WebQuery::statusError );
+ return false;
+ }
+ m_md5 = startPage.mid( pos + 39, startPage.find( "\"", pos + 41 ) - pos - 39 );
+
+ return true;
+ }
+
+ bool WebQueryScienceDirect::getResultPage( const QString &tak, const QString &author, const QString &journal, const QString &volume, const QString &issue, const QString &page )
+ {
+ KURL url = KURL( QString( "http://www.sciencedirect.com/science?_ob=QuickSearchURL&_method=submitForm&qs_tak=" ).append( tak ).append( "&qs_author=" ).append( author ).append( "&qs_title=" ).append( journal ).append( "&qs_vol=" ).append( volume ).append( "&qs_issue=" ).append( issue ).append( "&qs_pages=" ).append( page ).append( "&_acct=" ).append( m_account ).append( "&md5=" ).append( m_md5 ).append( "&x=0&y=0&=Submit" ) );
+ QString resultPage = downloadHTML( url );
+ if ( m_aborted )
+ {
+ setEndSearch( WebQuery::statusAborted );
+ return false;
+ }
+ else if ( resultPage == QString::null )
+ {
+ setEndSearch( WebQuery::statusError );
+ return false;
+ }
+
+ int pos = resultPage.find( "<input type=\"hidden\" name=\"_ArticleListID\" value=" );
+ if ( pos < 0 )
+ {
+ setEndSearch( WebQuery::statusError );
+ return false;
+ }
+ m_articleListID = resultPage.mid( pos + 49, resultPage.find( ">", pos + 50 ) - pos - 49 );
+ pos = resultPage.find( "<input type=\"hidden\" name=\"md5\" value=\"" );
+ pos = resultPage.find( "<input type=\"hidden\" name=\"md5\" value=\"" , pos + 2 );
+ if ( pos < 0 )
+ {
+ setEndSearch( WebQuery::statusError );
+ return false;
+ }
+ m_md5 = resultPage.mid( pos + 39, 32 );
+ pos = resultPage.find( "_userid=" );
+ if ( pos < 0 )
+ {
+ setEndSearch( WebQuery::statusError );
+ return false;
+ }
+ m_userid = resultPage.mid( pos + 8, resultPage.find( "&", pos + 9 ) - pos - 8 );
+
+ return true;
+ }
+
+ bool WebQueryScienceDirect::getArticleListPage()
+ {
+ KURL url = KURL( QString( "http://www.sciencedirect.com/science?_ob=ArticleListURL&_method=tag&refSource=search&_st=13&_chunk=0&NEXT_LIST=1&view=c&md5=%1&_ArticleListID=%2&sisr_search=&sisrterm=&export=Export+Citations&count=%3" ).arg( m_md5 ).arg( m_articleListID ).arg( m_widget->spinBoxMaxHits->value() ) );
+ QString articleListPage = downloadHTML( url );
+ if ( m_aborted )
+ {
+ setEndSearch( WebQuery::statusAborted );
+ return false;
+ }
+ else if ( articleListPage == QString::null )
+ {
+ setEndSearch( WebQuery::statusError );
+ return false;
+ }
+ else if ( articleListPage.find( "subscription does not entitle" ) >= 0 )
+ {
+ qWarning( "Your subscription does not entitle you to access the download feature of ScienceDirect" );
+ setEndSearch( WebQuery::statusInsufficientPermissions );
+ return false;
+ }
+
+ int pos = articleListPage.find( "<input type=hidden name=md5 value=" );
+ if ( pos < 0 )
+ {
+ setEndSearch( WebQuery::statusError );
+ return false;
+ }
+ m_md5 = articleListPage.mid( pos + 34, articleListPage.find( ">", pos + 36 ) - pos - 34 );
+ pos = articleListPage.find( "<input type=hidden name=_ArticleListID value=" );
+ if ( pos < 0 )
+ {
+ setEndSearch( WebQuery::statusError );
+ return false;
+ }
+ m_articleListID = articleListPage.mid( pos + 45, articleListPage.find( ">", pos + 46 ) - pos - 45 );
+
+ return true;
+ }
+
+ bool WebQueryScienceDirect::getRISFile()
+ {
+ m_incomingData = "";
+ QString data = QString( "_ob=DownloadURL&_method=finish&_acct=%1&_userid=%2&_ArticleListID=%3&count=10&md5=%4&JAVASCRIPT_ON=&format=cite&citation-type=RIS&RETURN_URL=http://www.sciencedirect.com/science/home" ).arg( m_account ).arg( m_userid ).arg( m_articleListID ).arg( m_md5 );
+ KURL url = KURL( "http://www.sciencedirect.com/science" );
+ KIO::TransferJob *job = KIO::http_post( url, data.utf8(), false );
+ job->addMetaData( "content-type", "Content-Type: application/x-www-form-urlencoded" );
+ connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotData( KIO::Job *, const QByteArray & ) ) );
+ connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+
+ return true;
+ }
+
+ void WebQueryScienceDirect::slotData( KIO::Job *, const QByteArray &data )
+ {
+ if ( data.size() > 0 )
+ m_incomingData.append( QCString( data, data.size() + 1 ) );
+ }
+
+ void WebQueryScienceDirect::slotResult( KIO::Job *job )
+ {
+ if ( job->error() )
+ {
+ setEndSearch( WebQuery::statusError );
+ return;
+ }
+
+ BibTeX::FileImporterRIS importer;
+ QBuffer buffer;
+
+ buffer.open( IO_WriteOnly );
+ QTextStream ts( &buffer );
+ ts.setEncoding( QTextStream::UnicodeUTF8 );
+ ts << m_incomingData << endl;
+ buffer.close();
+
+ buffer.open( IO_ReadOnly );
+ BibTeX::File *tmpBibFile = importer.load( &buffer );
+ buffer.close();
+
+ if ( tmpBibFile != NULL )
+ {
+ int count = m_widget->spinBoxMaxHits->value();
+ for ( BibTeX::File::ElementList::iterator it = tmpBibFile->begin(); count > 0 && it != tmpBibFile->end(); ++it )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( entry != NULL )
+ {
+ emit foundEntry( new BibTeX::Entry( entry ), false );
+ --count;
+ }
+ }
+
+ delete tmpBibFile;
+ }
+ else
+ {
+ setEndSearch( WebQuery::statusError );
+ return;
+ }
+
+ setEndSearch( WebQuery::statusSuccess );
+ }
+}
+#include "webquerysciencedirect.moc"
diff --git a/src/webquerysciencedirect.h b/src/webquerysciencedirect.h
new file mode 100644
index 0000000..b43a221
--- /dev/null
+++ b/src/webquerysciencedirect.h
@@ -0,0 +1,90 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXWEBQUERYSCIENCEDIRECT_H
+#define KBIBTEXWEBQUERYSCIENCEDIRECT_H
+
+#include <fileimporterbibtex.h>
+#include <webquery.h>
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryScienceDirectWidget : public WebQueryWidget
+ {
+ Q_OBJECT
+ public:
+ WebQueryScienceDirectWidget( QWidget *parent, const char *name = 0 );
+
+ KLineEdit *lineEditAuthor;
+ KLineEdit *lineEditJournal;
+ KLineEdit *lineEditVolume;
+ KLineEdit *lineEditIssue;
+ KLineEdit *lineEditPage;
+
+ protected:
+ virtual void init();
+
+ private slots:
+ void slotTextChangedSD();
+ };
+
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryScienceDirect : public WebQuery
+ {
+ Q_OBJECT
+ public:
+ WebQueryScienceDirect( QWidget* parent );
+ virtual ~WebQueryScienceDirect();
+
+ void query();
+
+ QString title();
+ QString disclaimer();
+ QString disclaimerURL();
+
+ WebQueryWidget *widget();
+
+ protected:
+ void cancelQuery() { /* nothing */ };
+
+ private:
+ BibTeX::FileImporterBibTeX *m_importer;
+ WebQueryScienceDirectWidget *m_widget;
+ QString m_incomingData;
+ QString m_md5, m_userid, m_articleListID, m_account;
+
+ bool getStartPage();
+ bool getResultPage( const QString &tak, const QString &author, const QString &journal, const QString &volume, const QString &issue, const QString &page );
+ bool getArticleListPage();
+ bool getRISFile();
+
+ private slots:
+ void slotData( KIO::Job *job, const QByteArray &data );
+ void slotResult( KIO::Job *job );
+ };
+
+}
+
+#endif
diff --git a/src/webqueryspireshep.cpp b/src/webqueryspireshep.cpp
new file mode 100644
index 0000000..61d9c48
--- /dev/null
+++ b/src/webqueryspireshep.cpp
@@ -0,0 +1,248 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qfile.h>
+#include <qapplication.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qcheckbox.h>
+
+#include <kiconloader.h>
+#include <kcombobox.h>
+#include <kpushbutton.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <klineedit.h>
+#include <kio/netaccess.h>
+#include <kurl.h>
+
+#include <settings.h>
+#include <fileimporterbibtex.h>
+#include "webqueryspireshep.h"
+
+namespace KBibTeX
+{
+
+ const QString WebQuerySpiresHep::mirrorNames[] = {i18n( "DESY (Germany)" ), i18n( "FNAL (U.S.A.)" ), i18n( "IHEP (Russia)" ), i18n( "Durham U (U.K.)" ), i18n( "SLAC (U.S.A.)" ), i18n( "YITP (Japan)" ), i18n( "LIPI (Indonesia)" )};
+ const QString WebQuerySpiresHep::mirrorURLs[] = {"http://www-library.desy.de/cgi-bin/spiface", "http://www-spires.fnal.gov/spires", "http://usparc.ihep.su/spires", "http://www-spires.dur.ac.uk/spires", "http://www.slac.stanford.edu/spires", "http://www.yukawa.kyoto-u.ac.jp/spires", "http://www.spires.lipi.go.id/spires"};
+
+ WebQuerySpiresHepWidget::WebQuerySpiresHepWidget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name )
+ {
+ init();
+
+ Settings *settings = Settings::self();
+ QString value = settings->getWebQueryDefault( "SpiresHep_query" );
+ value = value == QString::null ? "" : value;
+ lineEditQuery->setText( value );
+ slotTextChanged( value, true );
+ value = settings->getWebQueryDefault( "SpiresHep_mirror" );
+ value = value == QString::null || value.isEmpty() ? "0" : value;
+ comboBoxMirror->setCurrentItem( value.toInt() );
+ value = settings->getWebQueryDefault( "SpiresHep_type" );
+ value = value == QString::null || value.isEmpty() ? "0" : value;
+ comboBoxType->setCurrentItem( value.toInt() );
+ }
+
+ void WebQuerySpiresHepWidget::init()
+ {
+ QVBoxLayout *vLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+
+ QHBoxLayout *hLayout = new QHBoxLayout( );
+ vLayout->addLayout( hLayout );
+
+ comboBoxMirror = new KComboBox( false, this );
+ hLayout->addWidget( comboBoxMirror );
+ hLayout->setStretchFactor( comboBoxMirror, 7 );
+ hLayout->addSpacing( KDialog::spacingHint() * 2 );
+ for ( unsigned int i = 0; i < sizeof( WebQuerySpiresHep::mirrorNames ) / sizeof( WebQuerySpiresHep::mirrorNames[0] ); ++i )
+ comboBoxMirror->insertItem( WebQuerySpiresHep::mirrorNames[i] );
+ comboBoxMirror->setCurrentItem( 0 );
+
+ QLabel *label = new QLabel( i18n( "Type:" ), this );
+ hLayout->addWidget( label );
+ hLayout->setStretchFactor( label, 1 );
+ comboBoxType = new KComboBox( false, this );
+ label->setBuddy( comboBoxType );
+ hLayout->addWidget( comboBoxType );
+ hLayout->setStretchFactor( comboBoxType, 5 );
+ comboBoxType->insertItem( i18n( "raw query" ) );
+ comboBoxType->insertItem( i18n( "author" ) );
+ comboBoxType->insertItem( i18n( "title" ) );
+ comboBoxType->insertItem( i18n( "journal" ) );
+ comboBoxType->insertItem( i18n( "EPrint number" ) );
+ comboBoxType->insertItem( i18n( "report number" ) );
+ comboBoxType->insertItem( i18n( "keywords" ) );
+ comboBoxType->setCurrentItem( 0 );
+
+ hLayout = new QHBoxLayout( );
+ vLayout->addLayout( hLayout );
+ KPushButton *clearSearchText = new KPushButton( this );
+ clearSearchText->setIconSet( QIconSet( SmallIcon( "locationbar_erase" ) ) );
+ hLayout->addWidget( clearSearchText );
+ label = new QLabel( i18n( "Search &term:" ), this );
+ hLayout->addWidget( label );
+ lineEditQuery = new KLineEdit( this );
+ hLayout->addWidget( lineEditQuery );
+ label->setBuddy( lineEditQuery );
+ connect( clearSearchText, SIGNAL( clicked() ), lineEditQuery, SLOT( clear() ) );
+ connect( lineEditQuery, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( const QString& ) ) );
+ hLayout->setStretchFactor( lineEditQuery, 4 );
+ KCompletion *completionQuery = lineEditQuery->completionObject();
+
+ m_checkBoxFetchAbstracts = new QCheckBox( i18n( "Include abstracts from arxiv.org if available" ), this );
+ vLayout->addWidget( m_checkBoxFetchAbstracts );
+
+ connect( lineEditQuery, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) );
+ connect( lineEditQuery, SIGNAL( returnPressed( const QString& ) ), completionQuery, SLOT( addItem( const QString& ) ) );
+
+ vLayout->addStretch( 1 );
+ }
+
+ WebQuerySpiresHep::WebQuerySpiresHep( QWidget* parent ): WebQuery( parent )
+ {
+ m_widget = new WebQuerySpiresHepWidget( parent );
+ }
+
+ WebQuerySpiresHep::~WebQuerySpiresHep()
+ {
+ delete m_widget;
+ }
+
+ QString WebQuerySpiresHep::title()
+ {
+ return i18n( "SPIRES-HEP" );
+ }
+
+ QString WebQuerySpiresHep::disclaimer()
+ {
+ return i18n( "SPIRES-HEP Search" );
+ }
+
+ QString WebQuerySpiresHep::disclaimerURL()
+ {
+ return "http://www.slac.stanford.edu/spires/";
+ }
+
+ WebQueryWidget *WebQuerySpiresHep::widget()
+ {
+ return m_widget;
+ }
+
+ void WebQuerySpiresHep::query()
+ {
+ const int maxEntries = 25;
+ bool doFetchAbstracts = m_widget->m_checkBoxFetchAbstracts->isChecked();
+ int mirrorIdx = m_widget->comboBoxMirror->currentItem();
+
+ WebQuery::query();
+ Settings *settings = Settings::self();
+ settings->setWebQueryDefault( "SpiresHep_query", m_widget->lineEditQuery->text() );
+ settings->setWebQueryDefault( "SpiresHep_mirror", QString::number( m_widget->comboBoxMirror->currentItem() ) );
+ settings->setWebQueryDefault( "SpiresHep_type", QString::number( m_widget->comboBoxType->currentItem() ) );
+
+ setNumStages( 1 + doFetchAbstracts ? maxEntries : 0 );
+
+ QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" );
+ if ( searchTerm.isEmpty() )
+ {
+ setEndSearch( WebQuery::statusInvalidQuery );
+ return;
+ }
+
+ switch ( m_widget->comboBoxType->currentItem() )
+ {
+ case 1: searchTerm = searchTerm.prepend( "fin a " ); break;
+ case 2: searchTerm = searchTerm.prepend( "fin t " ); break;
+ case 3: searchTerm = searchTerm.prepend( "fin j " ); break;
+ case 4: searchTerm = searchTerm.prepend( "fin eprint " ); break;
+ case 5: searchTerm = searchTerm.prepend( "fin r" ); break;
+ case 6: searchTerm = searchTerm.prepend( "fin k" ); break;
+ default: ;// nothing
+ }
+
+ KURL url = KURL( QString( "%1/find/hep/www?rawcmd=%2&FORMAT=WWWBRIEFBIBTEX&SEQUENCE=" ).arg( mirrorURLs[mirrorIdx] ).arg( searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ) );
+ qDebug( "url=%s", url.prettyURL().latin1() );
+
+ BibTeX::File *tmpBibFile = downloadBibTeXFile( url );
+ if ( tmpBibFile != NULL && !m_aborted )
+ {
+ int count = 0;
+ for ( BibTeX::File::ElementList::iterator it = tmpBibFile->begin(); count < maxEntries && it != tmpBibFile->end(); ++it, ++count )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( doFetchAbstracts )
+ {
+ fetchArxivAbstract( entry );
+ enterNextStage();
+ }
+ if ( entry != NULL )
+ emit foundEntry( new BibTeX::Entry( entry ), false );
+ }
+
+ setEndSearch( WebQuery::statusSuccess );
+ }
+ else if ( !m_aborted )
+ {
+ QString message = KIO::NetAccess::lastErrorString();
+ if ( message.isEmpty() )
+ message.prepend( '\n' );
+ message.prepend( QString( i18n( "Querying database '%1' failed." ) ).arg( title() ) );
+ KMessageBox::error( m_parent, message );
+ setEndSearch( WebQuery::statusError );
+ }
+ else
+ setEndSearch( WebQuery::statusAborted );
+
+ if ( tmpBibFile != NULL )
+ delete tmpBibFile;
+ }
+
+ void WebQuerySpiresHep::fetchArxivAbstract( BibTeX::Entry *entry )
+ {
+ BibTeX::EntryField *field = NULL;
+ BibTeX::Value *value = NULL;
+ QString eprint = (( field = entry->getField( "eprint" ) ) ) && (( value = field->value() ) ) ? value->text() : QString::null;
+ QString archivePrefix = (( field = entry->getField( "archivePrefix" ) ) ) && (( value = field->value() ) ) ? value->text() : QString::null;
+
+ if ( archivePrefix == "arXiv" && !eprint.isNull() )
+ {
+ KURL absURL( QString( "http://arxiv.org/abs/" ).append( eprint ) );
+ QString abstract = download( absURL );
+ int p = abstract.find( "Abstract:</span>" );
+ if ( p > -1 )
+ {
+ int p2 = abstract.find( "</", p + 14 );
+ abstract = abstract.mid( p + 16, p2 - p - 16 ).simplifyWhiteSpace();
+ BibTeX::EntryField * field = new BibTeX::EntryField( BibTeX::EntryField::ftAbstract );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( abstract ) );
+
+ field = new BibTeX::EntryField( "pdf" );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( QString( "http://arxiv.org/pdf/" ).append( eprint ) ) );
+
+ field = new BibTeX::EntryField( BibTeX::EntryField::ftURL );
+ entry->addField( field );
+ field->setValue( new BibTeX::Value( QString( "http://arxiv.org/abs/" ).append( eprint ) ) );
+ }
+ }
+ }
+}
+#include "webqueryspireshep.moc"
diff --git a/src/webqueryspireshep.h b/src/webqueryspireshep.h
new file mode 100644
index 0000000..968a20e
--- /dev/null
+++ b/src/webqueryspireshep.h
@@ -0,0 +1,76 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXWEBQUERYSPIRESHEP_H
+#define KBIBTEXWEBQUERYSPIRESHEP_H
+
+#include <webquery.h>
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQuerySpiresHepWidget : public WebQueryWidget
+ {
+ Q_OBJECT
+ public:
+ WebQuerySpiresHepWidget( QWidget *parent, const char *name = 0 );
+
+ KComboBox *comboBoxMirror;
+ KComboBox *comboBoxType;
+ QCheckBox *m_checkBoxFetchAbstracts;
+
+ protected:
+ virtual void init();
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQuerySpiresHep : public WebQuery
+ {
+ Q_OBJECT
+ public:
+ WebQuerySpiresHep( QWidget* parent );
+ virtual ~WebQuerySpiresHep();
+
+ void query();
+
+ QString title();
+ QString disclaimer();
+ QString disclaimerURL();
+
+ WebQueryWidget *widget();
+
+ static const QString mirrorNames[];
+ static const QString mirrorURLs[];
+
+ protected:
+ void cancelQuery() { /* nothing */ };
+
+ private:
+ WebQuerySpiresHepWidget *m_widget;
+
+ void fetchArxivAbstract( BibTeX::Entry *entry );
+ };
+
+}
+
+#endif
diff --git a/src/webqueryz3950.cpp b/src/webqueryz3950.cpp
new file mode 100644
index 0000000..1b62129
--- /dev/null
+++ b/src/webqueryz3950.cpp
@@ -0,0 +1,397 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * based on code from or inspired by *
+ * - Tellico by Robby Stephenson *
+ * - kbib by Thach Nguyen *
+ * *
+ * 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. *
+ * *
+ * *
+ * This code is based on code from Tellico 1.2.10 *
+ * by Robby Stephenson <robby@periapsis.org> *
+ * Tellico is released under the GNU GPL 2, too. *
+ * http://www.periapsis.org/tellico/ *
+ ***************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <qfile.h>
+#include <qapplication.h>
+#include <qspinbox.h>
+#include <qlayout.h>
+#include <qlabel.h>
+
+#include <klocale.h>
+#include <kstandarddirs.h>
+#include <klineedit.h>
+#include <kcombobox.h>
+#include <kmessagebox.h>
+#include <kpushbutton.h>
+#include <kiconloader.h>
+#include <kio/netaccess.h>
+#include <kapplication.h>
+#include <kdebug.h>
+#include <kurl.h>
+
+#include <fileimporterbibutils.h>
+#include <settings.h>
+#include "webqueryz3950.h"
+
+namespace KBibTeX
+{
+ const QString WebQueryZ3950Widget::attributesI18N[] = { i18n( "any" ), i18n( "title" ), i18n( "author" ), i18n( "publisher" )};
+
+ WebQueryZ3950Widget::WebQueryZ3950Widget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name ), lineEditQuery2( NULL )
+ {
+ init();
+
+ Settings *settings = Settings::self();
+ QString value = settings->getWebQueryDefault( "Z3950_server" );
+ value = value == QString::null || value.isEmpty() ? "0" : value;
+ comboBoxServers->setCurrentItem( value.toInt() );
+ value = settings->getWebQueryDefault( "Z3950_query1" );
+ value = value == QString::null ? "" : value;
+ lineEditQuery->setText( value );
+ slotTextChanged( value, true );
+ value = settings->getWebQueryDefault( "Z3950_attr1" );
+ value = value == QString::null ? "1" : value;
+ comboBoxInAttribute->setCurrentItem( value.toInt() );
+ value = settings->getWebQueryDefault( "Z3950_query2" );
+ lineEditQuery2->setText( value == QString::null ? "" : value );
+ value = settings->getWebQueryDefault( "Z3950_attr2" );
+ value = value == QString::null ? "1" : value;
+ comboBoxInAttribute2->setCurrentItem( value.toInt() );
+ value = settings->getWebQueryDefault( "Z3950_booleanOp" );
+ value = value == QString::null || value.isEmpty() ? "0" : value;
+ comboBoxBooleanOp->setCurrentItem( value.toInt() );
+ }
+
+ void WebQueryZ3950Widget::init()
+ {
+ QVBoxLayout *vLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+
+ QHBoxLayout *hLayout = new QHBoxLayout( );
+ vLayout->addLayout( hLayout );
+
+ QLabel *label = new QLabel( i18n( "Server:" ), this );
+ hLayout->setStretchFactor( label, 1 );
+ hLayout->addWidget( label );
+ comboBoxServers = new KComboBox( false, this );
+ hLayout->addWidget( comboBoxServers );
+ hLayout->setStretchFactor( comboBoxServers, 7 );
+ label->setBuddy( comboBoxServers );
+ hLayout->addSpacing( KDialog::spacingHint() * 2 );
+ label = new QLabel( i18n( "&Number of results:" ), this );
+ hLayout->addWidget( label );
+ hLayout->setStretchFactor( label, 1 );
+ spinBoxMaxHits = new QSpinBox( 1, 50, 1, this );
+ spinBoxMaxHits->setValue( 10 );
+ hLayout->addWidget( spinBoxMaxHits );
+ hLayout->setStretchFactor( spinBoxMaxHits, 3 );
+ label->setBuddy( spinBoxMaxHits );
+
+ QGridLayout *layout = new QGridLayout( vLayout, 2, 6, KDialog::spacingHint() );
+
+ KPushButton *clearSearchText = new KPushButton( this );
+ clearSearchText->setIconSet( QIconSet( SmallIcon( "locationbar_erase" ) ) );
+ layout->addWidget( clearSearchText, 0, 1 );
+ label = new QLabel( i18n( "Search term 1:" ), this );
+ layout->addWidget( label, 0, 2 );
+ lineEditQuery = new KLineEdit( this );
+ layout->addWidget( lineEditQuery, 0, 3 );
+ label->setBuddy( lineEditQuery );
+ connect( clearSearchText, SIGNAL( clicked() ), lineEditQuery, SLOT( clear() ) );
+ connect( lineEditQuery, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( const QString& ) ) );
+ KCompletion *completionQuery = lineEditQuery->completionObject();
+ connect( lineEditQuery, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) );
+ connect( lineEditQuery, SIGNAL( returnPressed( const QString& ) ), completionQuery, SLOT( addItem( const QString& ) ) );
+ label = new QLabel( i18n( "Search in:" ), this );
+ layout->addWidget( label, 0, 4 );
+ comboBoxInAttribute = new KComboBox( false, this );
+ layout->addWidget( comboBoxInAttribute, 0, 5 );
+ label->setBuddy( comboBoxInAttribute );
+
+ comboBoxBooleanOp = new KComboBox( false, this );
+ layout->addWidget( comboBoxBooleanOp, 1, 0 );
+
+ clearSearchText = new KPushButton( this );
+ clearSearchText->setIconSet( QIconSet( SmallIcon( "locationbar_erase" ) ) );
+ layout->addWidget( clearSearchText, 1, 1 );
+ label = new QLabel( i18n( "Search term 2:" ), this );
+ layout->addWidget( label, 1, 2 );
+ lineEditQuery2 = new KLineEdit( this );
+ layout->addWidget( lineEditQuery2, 1, 3 );
+ label->setBuddy( lineEditQuery2 );
+ connect( clearSearchText, SIGNAL( clicked() ), lineEditQuery2, SLOT( clear() ) );
+ completionQuery = lineEditQuery->completionObject();
+ connect( lineEditQuery2, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) );
+ connect( lineEditQuery2, SIGNAL( returnPressed( const QString& ) ), completionQuery, SLOT( addItem( const QString& ) ) );
+ label = new QLabel( i18n( "Search in:" ), this );
+ layout->addWidget( label, 1, 4 );
+ comboBoxInAttribute2 = new KComboBox( false, this );
+ layout->addWidget( comboBoxInAttribute2, 1, 5 );
+ label->setBuddy( comboBoxInAttribute2 );
+
+#ifdef HAVE_YAZ
+ Settings *settings = Settings::self();
+ for ( QMap<QString, Settings::Z3950Server>::Iterator it = settings->z3950_ServerList.begin(); it != settings->z3950_ServerList.end(); ++it )
+ comboBoxServers->insertItem( it.data().name );
+#endif // HAVE_YAZ
+ for ( unsigned int i = 0; i < sizeof( attributesI18N ) / sizeof( attributesI18N[0] ); ++i )
+ {
+ comboBoxInAttribute->insertItem( attributesI18N[i] );
+ comboBoxInAttribute2->insertItem( attributesI18N[i] );
+ }
+ comboBoxBooleanOp->insertItem( i18n( "and" ) );
+ comboBoxBooleanOp->insertItem( i18n( "or" ) );
+ }
+
+ WebQueryZ3950::WebQueryZ3950( QWidget* parent ) : WebQuery( parent )
+#ifdef HAVE_YAZ
+ , m_marc21transformer( NULL ), m_unimarctransformer( NULL ), m_modsImporter( NULL ), m_conn( NULL )
+#endif // HAVE_YAZ
+ {
+ m_widget = new WebQueryZ3950Widget( parent );
+ }
+
+ WebQueryZ3950::~WebQueryZ3950()
+ {
+#ifdef HAVE_YAZ
+ if ( m_modsImporter != NULL ) delete m_modsImporter;
+ if ( m_marc21transformer != NULL ) delete m_marc21transformer;
+ if ( m_unimarctransformer != NULL ) delete m_unimarctransformer;
+ if ( m_conn != NULL ) delete m_conn;
+#endif // HAVE_YAZ
+// delete m_widget; FIXME Why does delete fail here?
+ }
+
+ QString WebQueryZ3950::title()
+ {
+ return i18n( "Z39.50" );
+ }
+
+ QString WebQueryZ3950::disclaimer()
+ {
+ return i18n( "Z39.50" );
+ }
+
+ QString WebQueryZ3950::disclaimerURL()
+ {
+ return "http://[127.0.0.1]/";
+ }
+
+ WebQueryWidget *WebQueryZ3950::widget()
+ {
+ return m_widget;
+ }
+
+ void WebQueryZ3950::query()
+ {
+ WebQuery::query();
+
+ Settings *settings = Settings::self();
+ settings->setWebQueryDefault( "Z3950_server", QString::number( m_widget->comboBoxServers->currentItem() ) );
+ settings->setWebQueryDefault( "Z3950_query1", m_widget->lineEditQuery->text() );
+ settings->setWebQueryDefault( "Z3950_attr1", QString::number( m_widget->comboBoxInAttribute->currentItem() ) );
+ settings->setWebQueryDefault( "Z3950_query2", m_widget->lineEditQuery2->text() );
+ settings->setWebQueryDefault( "Z3950_attr2", QString::number( m_widget->comboBoxInAttribute2->currentItem() ) );
+ settings->setWebQueryDefault( "Z3950_booleanOp", QString::number( m_widget->comboBoxBooleanOp->currentItem() ) );
+
+#ifdef HAVE_YAZ
+
+ QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace();
+ if ( searchTerm.isEmpty() )
+ {
+ setNumStages( 1 );
+ setEndSearch( WebQuery::statusError );
+ return;
+ }
+
+ QString query = queryClause( searchTerm, m_widget->comboBoxInAttribute->currentItem() );
+
+ searchTerm = m_widget->lineEditQuery2->text().stripWhiteSpace();
+ if ( !searchTerm.isEmpty() )
+ {
+ if ( m_widget->comboBoxBooleanOp->currentItem() == 0 )
+ query = query.prepend( "@and " );
+ else
+ query = query.prepend( "@or " );
+ query = query.append( queryClause( searchTerm, m_widget->comboBoxInAttribute2->currentItem() ) );
+ }
+
+ kdDebug() << "query = " << query << endl;
+
+ m_conn = NULL;
+ settings = Settings::self();
+ for ( QMap<QString, Settings::Z3950Server>::Iterator it = settings->z3950_ServerList.begin(); m_conn == NULL && it != settings->z3950_ServerList.end(); ++it )
+ {
+ if ( it.data().name.compare( m_widget->comboBoxServers->currentText() ) == 0 )
+ {
+ m_syntax = it.data().syntax;
+ m_conn = new KBibTeX::Z3950Connection( this, it.data().host, it.data().port, it.data().database, it.data().charset, m_syntax, "f" );
+ m_conn->setUserPassword( it.data().user, it.data().password );
+ }
+ }
+
+ if ( m_conn != NULL )
+ {
+ setNumStages( m_widget->spinBoxMaxHits->value() );
+ m_started = true;
+
+ m_conn->setQuery( query, m_widget->spinBoxMaxHits->value() );
+ m_modsList.clear();
+ m_hitCounter = 0;
+ m_conn->start();
+ kdDebug() << "WebQueryZ3950::query: started" << endl;
+ }
+ else
+#else // HAVE_YAZ
+ kdDebug() << "HAVE_YAZ not defined" << endl;
+#endif // HAVE_YAZ
+ {
+ setNumStages( 1 );
+ setEndSearch( WebQuery::statusSuccess );
+ }
+ }
+
+ void WebQueryZ3950::cancelQuery()
+ {
+#ifdef HAVE_YAZ
+ if ( m_started && m_conn != NULL )
+ {
+ m_started = false;
+ m_conn->abort();
+ m_conn->wait( 10000 );
+ setEndSearch( WebQuery::statusError );
+ }
+#endif // HAVE_YAZ
+ }
+
+#ifdef HAVE_YAZ
+ QString WebQueryZ3950::queryClause( const QString& text, int field )
+ {
+ QString result = "@attr 1=";
+ switch ( field )
+ {
+ case 1: result.append( "4" ); break;
+ case 2: result.append( "1003" ); break;
+ case 3: result.append( "1006" ); break;
+ case 4: result.append( "1016" ); break;
+ default: result.append( "1018" ); break;
+ }
+ result.append( " @attr 2=3 \"" ).append( text ).append( "\" " );
+
+ return result;
+ }
+#endif // HAVE_YAZ
+
+ void WebQueryZ3950::customEvent( QCustomEvent* event )
+ {
+ kdDebug() << "WebQueryZ3950::customEvent of type " << event->type() << endl;
+
+#ifdef HAVE_YAZ
+ if ( !m_conn )
+ {
+ return;
+ }
+
+ if ( event->type() == KBibTeX::Z3950ResultFound::uid() )
+ {
+ KBibTeX::Z3950ResultFound* e = static_cast<KBibTeX::Z3950ResultFound*>( event );
+ kdDebug() << "Z3950ResultFound: " << e->result().left( 24 ) << " [..] " << e->result().right( 24 ) << endl;
+ storeResult( e->result(), m_syntax );
+ m_hitCounter++;
+ enterNextStage();
+ }
+
+ else if ( event->type() == KBibTeX::Z3950ConnectionDone::uid() )
+ {
+ KBibTeX::Z3950ConnectionDone* e = static_cast<KBibTeX::Z3950ConnectionDone*>( event );
+ kdDebug() << "Z3950ConnectionDone: " << e->message() << " (" << e->messageType() << ")" << endl;
+ if ( e->messageType() > -1 )
+ KMessageBox::error( m_widget, QString( i18n( "The server returned the following message:\n\n%1" ) ).arg( e->message() ), i18n( "Error querying Z39.50 server" ) );
+
+ m_started = false;
+ if ( m_conn != NULL )
+ m_conn->wait();
+
+ if ( !m_aborted )
+ {
+ evalStoredResults();
+ setEndSearch( e->messageType() > -1 ? WebQuery::statusError : WebQuery::statusSuccess );
+ }
+ }
+
+ qApp->processEvents();
+#endif // HAVE_YAZ
+ }
+
+#ifdef HAVE_YAZ
+ void WebQueryZ3950::storeResult( const QString& resultText, const QString& syntax )
+ {
+ if ( resultText.isEmpty() ) return;
+ QString convertedResultText = QString::null;
+
+ if ( syntax == "mods" )
+ convertedResultText = resultText;
+ else if ( syntax == "usmarc" || syntax == "marc21" )
+ {
+ if ( m_marc21transformer == NULL ) m_marc21transformer = new BibTeX::XSLTransform( KGlobal::dirs()->findResource( "data", "kbibtexpart/xslt/MARC21slim2MODS3.xsl" ) );
+ convertedResultText = m_marc21transformer->transform( resultText );
+ }
+ else if ( syntax == "unimarc" )
+ {
+ if ( m_unimarctransformer == NULL ) m_unimarctransformer = new BibTeX::XSLTransform( KGlobal::dirs()->findResource( "data", "kbibtexpart/xslt/UNIMARC2MODS3.xsl" ) );
+ convertedResultText = m_unimarctransformer->transform( resultText );
+ }
+
+ m_modsList.append( convertedResultText );
+ }
+
+ void WebQueryZ3950::evalStoredResults()
+ {
+ if ( m_modsImporter == NULL )
+ m_modsImporter = new BibTeX::FileImporterBibUtils( BibTeX::File::formatMODS );
+
+ for ( QStringList::Iterator it = m_modsList.begin(); it != m_modsList.end();++it )
+ {
+ BibTeX::File *bibtexFile = m_modsImporter->load( *it );
+ if ( bibtexFile != NULL )
+ {
+ for ( BibTeX::File::ElementList::iterator it = bibtexFile->begin(); it != bibtexFile->end(); ++it )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( entry != NULL )
+ {
+ BibTeX::Entry *newEntry = new BibTeX::Entry( entry );
+ kdDebug() << "entry= " << newEntry->text() << endl;
+ emit foundEntry( newEntry, false );
+ }
+ }
+
+ delete bibtexFile;
+ }
+ }
+ }
+#endif // HAVE_YAZ
+
+}
+#include "webqueryz3950.moc"
diff --git a/src/webqueryz3950.h b/src/webqueryz3950.h
new file mode 100644
index 0000000..93d8999
--- /dev/null
+++ b/src/webqueryz3950.h
@@ -0,0 +1,122 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * based on code from or inspired by *
+ * - Tellico by Robby Stephenson *
+ * - kbib by Thach Nguyen *
+ * *
+ * 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. *
+ * *
+ * *
+ * This code is based on code from Tellico 1.2.10 *
+ * by Robby Stephenson <robby@periapsis.org> *
+ * Tellico is released under the GNU GPL 2, too. *
+ * http://www.periapsis.org/tellico/ *
+ ***************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifndef KBIBTEXWEBQUERYZ3950_H
+#define KBIBTEXWEBQUERYZ3950_H
+
+#include <qevent.h>
+#include <qdeepcopy.h>
+#include <qthread.h>
+
+#include <ksharedptr.h>
+
+#include <fileimporter.h>
+#include <webquery.h>
+#include <xsltransform.h>
+#include <z3950connection.h>
+
+class KComboBox;
+
+namespace KBibTeX
+{
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryZ3950Widget : public WebQueryWidget
+ {
+ Q_OBJECT
+ public:
+ WebQueryZ3950Widget( QWidget *parent, const char *name = 0 );
+
+ KComboBox *comboBoxServers;
+ KComboBox *comboBoxInAttribute;
+ KComboBox *comboBoxBooleanOp;
+ KLineEdit *lineEditQuery2;
+ KComboBox *comboBoxInAttribute2;
+
+ protected:
+ virtual void init();
+
+ private:
+ static const QString attributesI18N[];
+ };
+
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryZ3950 : public WebQuery
+ {
+ Q_OBJECT
+ public:
+ WebQueryZ3950( QWidget* parent );
+ virtual ~WebQueryZ3950();
+
+ void query();
+
+ QString title();
+ QString disclaimer();
+ QString disclaimerURL();
+
+ WebQueryWidget *widget();
+
+ private:
+ WebQueryZ3950Widget *m_widget;
+
+ protected:
+ void cancelQuery();
+
+ protected:
+ virtual void customEvent( QCustomEvent* event );
+
+#ifdef HAVE_YAZ
+ private:
+ BibTeX::XSLTransform *m_marc21transformer;
+ BibTeX::XSLTransform *m_unimarctransformer;
+ BibTeX::FileImporter *m_modsImporter;
+ KBibTeX::Z3950Connection *m_conn;
+ bool m_started;
+ bool m_waitingRetrieveRange;
+ QString m_syntax;
+ QStringList m_modsList;
+ int m_hitCounter;
+
+ void storeResult( const QString& resultText, const QString& syntax );
+ void evalStoredResults();
+ QString queryClause( const QString& text, int field );
+#endif // HAVE_YAZ
+ };
+}
+
+#endif
diff --git a/src/webqueryzmath.cpp b/src/webqueryzmath.cpp
new file mode 100644
index 0000000..9e8a78e
--- /dev/null
+++ b/src/webqueryzmath.cpp
@@ -0,0 +1,124 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <qfile.h>
+#include <qapplication.h>
+#include <qspinbox.h>
+
+#include <klocale.h>
+#include <klineedit.h>
+#include <kcombobox.h>
+#include <kmessagebox.h>
+#include <kio/netaccess.h>
+#include <kurl.h>
+
+#include <settings.h>
+#include <fileimporterbibtex.h>
+#include "webqueryzmath.h"
+
+namespace KBibTeX
+{
+ WebQueryZMATHWidget::WebQueryZMATHWidget( QWidget *parent, const char *name )
+ : WebQueryWidget( parent, name )
+ {
+ init();
+
+ Settings *settings = Settings::self();
+ QString value = settings->getWebQueryDefault( "ZMATH" );
+ value = value == QString::null ? "" : value;
+ lineEditQuery->setText( value );
+ slotTextChanged( value, true );
+ }
+
+ WebQueryZMATH::WebQueryZMATH( QWidget* parent ): WebQuery( parent )
+ {
+ m_widget = new WebQueryZMATHWidget( parent );
+ }
+
+ WebQueryZMATH::~WebQueryZMATH()
+ {
+ delete m_widget;
+ }
+
+ QString WebQueryZMATH::title()
+ {
+ return i18n( "Zentralblatt MATH" );
+ }
+
+ QString WebQueryZMATH::disclaimer()
+ {
+ return i18n( "About Zentralblatt MATH" );
+ }
+
+ QString WebQueryZMATH::disclaimerURL()
+ {
+ return "http://www.zentralblatt-math.org/zmath/en/";
+ }
+
+ WebQueryWidget *WebQueryZMATH::widget()
+ {
+ return m_widget;
+ }
+
+ void WebQueryZMATH::query()
+ {
+ WebQuery::query();
+ Settings *settings = Settings::self();
+ settings->setWebQueryDefault( "ZMATH", m_widget->lineEditQuery->text() );
+
+ int numberOfResults = m_widget->spinBoxMaxHits->value();
+ setNumStages( 1 );
+
+ QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" );
+ if ( searchTerm.isEmpty() )
+ {
+ setEndSearch( WebQuery::statusInvalidQuery );
+ return;
+ }
+
+ KURL url = KURL( QString( "http://www.zentralblatt-math.org/zmath/en/search/?q=%2&count=%1&type=bibtex&format=short&display=all" ).arg( numberOfResults ).arg( searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ) );
+ BibTeX::File *bibtexFile = downloadBibTeXFile( url );
+ if ( bibtexFile != NULL && !m_aborted )
+ {
+ for ( BibTeX::File::ElementList::iterator it = bibtexFile->begin(); it != bibtexFile->end(); ++it )
+ {
+ BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
+ if ( entry != NULL )
+ emit foundEntry( new BibTeX::Entry( entry ), false );
+ }
+
+ setEndSearch( WebQuery::statusSuccess );
+ }
+ else if ( !m_aborted )
+ {
+ QString message = KIO::NetAccess::lastErrorString();
+ if ( message.isEmpty() )
+ message.prepend( '\n' );
+ message.prepend( QString( i18n( "Querying database '%1' failed." ) ).arg( title() ) );
+ KMessageBox::error( m_parent, message );
+ setEndSearch( WebQuery::statusError );
+ }
+ else
+ setEndSearch( WebQuery::statusAborted );
+
+ if ( bibtexFile != NULL ) delete bibtexFile;
+ }
+
+}
+#include "webqueryzmath.moc"
diff --git a/src/webqueryzmath.h b/src/webqueryzmath.h
new file mode 100644
index 0000000..e6e7625
--- /dev/null
+++ b/src/webqueryzmath.h
@@ -0,0 +1,64 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef KBIBTEXWEBQUERYZMATH_H
+#define KBIBTEXWEBQUERYZMATH_H
+
+#include <webquery.h>
+
+namespace KBibTeX
+{
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryZMATHWidget : public WebQueryWidget
+ {
+ Q_OBJECT
+ public:
+ WebQueryZMATHWidget( QWidget *parent, const char *name = 0 );
+ };
+
+ /**
+ @author Thomas Fischer <fischer@unix-ag.uni-kl.de>
+ */
+ class WebQueryZMATH : public WebQuery
+ {
+ Q_OBJECT
+ public:
+ WebQueryZMATH( QWidget* parent );
+ virtual ~WebQueryZMATH();
+
+ void query();
+
+ QString title();
+ QString disclaimer();
+ QString disclaimerURL();
+
+ WebQueryWidget *widget();
+
+ protected:
+ void cancelQuery() { /* nothing */ };
+
+ private:
+ WebQueryZMATHWidget *m_widget;
+ };
+
+}
+
+#endif
diff --git a/src/xsltransform.cpp b/src/xsltransform.cpp
new file mode 100644
index 0000000..fbb4fce
--- /dev/null
+++ b/src/xsltransform.cpp
@@ -0,0 +1,81 @@
+/***************************************************************************
+* Copyright (C) 2004-2009 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xmlstring.h>
+#include <libxslt/transform.h>
+#include <libxslt/xsltutils.h>
+
+#include <qfile.h>
+#include <qstring.h>
+
+#include "xsltransform.h"
+
+namespace BibTeX
+{
+
+ XSLTransform::XSLTransform( const QString& xsltFilename )
+ {
+ m_xlstStylesheet = xsltParseStylesheetFile(( const xmlChar* ) xsltFilename.latin1() );
+ if ( m_xlstStylesheet == NULL )
+ qDebug( "Could not load XSLT file '%s'.", xsltFilename.latin1() );
+ }
+
+ XSLTransform::~XSLTransform()
+ {
+ xsltFreeStylesheet( m_xlstStylesheet );
+ }
+
+ QString XSLTransform::transform( const QString& xmlText )
+ {
+ QString result = QString::null;
+ QCString xmlCText = xmlText.utf8();
+ xmlDocPtr document = xmlParseMemory( xmlCText, xmlCText.length() );
+ if ( document )
+ {
+ if ( m_xlstStylesheet )
+ {
+ xmlDocPtr resultDocument = xsltApplyStylesheet( m_xlstStylesheet, document, NULL );
+ if ( resultDocument )
+ {
+ // Save the result into the QString
+ xmlChar * mem;
+ int size;
+ xmlDocDumpMemoryEnc( resultDocument, &mem, &size, "UTF-8" );
+ result = QString::fromUtf8( QCString(( char * )( mem ), size + 1 ) );
+ xmlFree( mem );
+
+ xmlFreeDoc( resultDocument );
+ }
+ else
+ qDebug( "Applying XSLT stylesheet to XML document failed" );
+ }
+ else
+ qDebug( "XSLT stylesheet is not available or not valid" );
+
+ xmlFreeDoc( document );
+ }
+ else
+ qDebug( "XML document is not available or not valid" );
+
+ return result;
+ }
+
+}
diff --git a/src/xsltransform.h b/src/xsltransform.h
new file mode 100644
index 0000000..73dd4ec
--- /dev/null
+++ b/src/xsltransform.h
@@ -0,0 +1,46 @@
+/***************************************************************************
+* Copyright (C) 2004-2006 by Thomas Fischer *
+* fischer@unix-ag.uni-kl.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+***************************************************************************/
+#ifndef BIBTEXXSLTRANSFORM_H
+#define BIBTEXXSLTRANSFORM_H
+
+#include <libxslt/xsltInternals.h>
+
+class QString;
+
+namespace BibTeX
+{
+
+ class XSLTransform
+ {
+
+ public:
+ XSLTransform( const QString& xsltFilename );
+ ~XSLTransform();
+
+ QString transform( const QString& xmlText );
+
+ private:
+ xsltStylesheetPtr m_xlstStylesheet;
+
+ };
+
+}
+
+#endif
diff --git a/src/z3950-servers.cfg b/src/z3950-servers.cfg
new file mode 100644
index 0000000..7d106f0
--- /dev/null
+++ b/src/z3950-servers.cfg
@@ -0,0 +1,263 @@
+[CalStateLib]
+Charset=iso-8859-1
+Database=Marion
+Host=vax.lib.state.ca.us
+Locale=
+Name=California State Library
+Password=
+Port=210
+Syntax=
+User=
+
+[KOBV]
+Charset=marc8
+Database=U-KBV90
+Host=z3950.kobv.de
+Locale=
+Name=kobv
+Password=[XX]
+Port=9991
+Syntax=usmarc
+User=[XX]
+
+[OCLC]
+Charset=iso-8859-1
+Database=insp
+Host=fsz3950.oclc.org
+Locale=
+Name=Inspec (OCLC)
+Password=
+Port=210
+Syntax=marc21
+User=
+
+[RMIT]
+Charset=iso-8859-1
+Database=VOYAGER
+Host=zcat.lib.rmit.edu.au
+Locale=
+Name=RMIT University
+Password=
+Port=7090
+Syntax=usmarc
+User=
+
+[SSGJUR]
+Charset=utf-8
+Database=SSGJUR
+Host=z3950.gbv.de
+Locale=
+Name=SSGJUR
+Password=abc
+Port=20012
+Syntax=usmarc
+User=999
+
+[University of Sydney]
+Charset=iso-8859-1
+Database=INNOPAC
+Host=129.78.72.7
+Locale=
+Name=University of Sydney
+Password=
+Port=210
+Syntax=marc21
+User=
+
+[York]
+Charset=
+Database=unicorn
+Host=theta.library.yorku.ca
+Locale=
+Name=York University
+Password=
+Port=2200
+Syntax=marc21
+User=
+
+[aberdeen]
+Charset=iso-8859-1
+Database=ABN01
+Host=aulib.abdn.ac.uk
+Locale=
+Name=Aberdeen University
+Password=
+Port=9991
+Syntax=marc21
+User=
+
+[amicus]
+Charset=iso-8859-1
+Database=NL
+Host=amicus.collectionscanada.ca
+Locale=ca
+Name=National Library of Canada
+Password=
+Port=210
+Syntax=marc21
+User=
+
+[bibsys]
+Charset=iso-8859-1
+Database=BIBSYS
+Host=z3950.bibsys.no
+Locale=no
+Name=BIBSYS (Norway)
+Password=
+Port=2100
+Syntax=usmarc
+User=
+
+[blzcat]
+Charset=marc-8
+Database=BLAC
+Host=3950cat.bl.uk
+Locale=en_GB
+Name=The British Library
+Password=
+Port=9909
+Syntax=
+User=
+
+[copac]
+Charset=utf-8
+Database=COPAC
+Host=z3950.copac.ac.uk
+Locale=uk,ie,en
+Name=Copac (UK and Ireland)
+Password=
+Port=210
+Syntax=mods
+User=
+
+[gvk]
+Charset=utf-8
+Database=gvk
+Host=z3950.gbv.de
+Locale=
+Name=gvk
+Password=abc
+Port=20012
+Syntax=usmarc
+User=999
+
+[hochschuledarmstadt]
+Charset=iso-8859-1
+Database=hebis
+Host=tolk.hebis.de
+Locale=
+Name=Hochschule Darmstadt
+Password=
+Port=210
+Syntax=usmarc
+User=
+
+[iul]
+Charset=utf-8
+Database=ULI02
+Host=libnet.ac.il
+Locale=il
+Name=Israel Union List
+Password=
+Port=9991
+Syntax=marc21
+User=
+
+[libis]
+Charset=utf-8
+Database=knygos
+Host=z3950.libis.lt
+Locale=lt
+Name=National Library of Lithuania
+Password=
+Port=210
+Syntax=unimarc
+User=
+
+[loc]
+Charset=utf-8
+Database=Voyager
+Host=z3950.loc.gov
+Locale=en
+Name=Library of Congress (US)
+Password=
+Port=7090
+Syntax=mods
+User=
+
+[mitlibrariescatalog]
+Charset=iso-8859-1
+Database=mit01pub
+Host=library.mit.edu
+Locale=
+Name=MIT Libraries' Catalog
+Password=
+Port=9909
+Syntax=usmarc
+User=
+
+[naul]
+Charset=utf-8
+Database=Voyager
+Host=catalogue.nla.gov.au
+Locale=au
+Name=National Library of Australia
+Password=
+Port=7090
+Syntax=marc21
+User=
+
+[nlp]
+Charset=iso6937
+Database=INNOPAC
+Host=alpha.bn.org.pl
+Locale=pl
+Name=National Library of Poland
+Password=
+Port=210
+Syntax=usmarc
+User=
+
+[porbase]
+Charset=iso-8859-1
+Database=bnd
+Host=z3950.bn.pt
+Locale=pt
+Name=Portuguese National Library
+Password=
+Port=210
+Syntax=unimarc
+User=
+
+[sbn]
+Charset=iso-8859-1
+Database=nopac
+Host=opac.sbn.it
+Locale=it
+Name=Italian National Library
+Password=
+Port=3950
+Syntax=unimarc
+User=
+
+[stabikat]
+Charset=iso-8859-1
+Database=STABIKAT
+Host=z3950.gbv.de
+Locale=
+Name=STABIKAT
+Password=abc
+Port=20010
+Syntax=usmarc
+User=999
+
+[sudoc]
+Charset=iso-5426
+Database=ABES-Z39-PUBLIC
+Host=carmin.sudoc.abes.fr
+Locale=fr
+Name=Sudoc (France)
+Password=
+Port=210
+Syntax=usmarc
+User=
diff --git a/src/z3950connection.cpp b/src/z3950connection.cpp
new file mode 100644
index 0000000..ada2a1d
--- /dev/null
+++ b/src/z3950connection.cpp
@@ -0,0 +1,589 @@
+/***************************************************************************
+ copyright : (C) 2005-2006 by Robby Stephenson
+ email : $EMAIL
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This file has been modified to match the requirements of KBibTeX. *
+ * In case of problems or bugs arising from this implementation, please *
+ * contact the KBibTeX team first. *
+ * Thomas Fischer <fischer@unix-ag.uni-kl.de> *
+ * *
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+#include "z3950connection.h"
+// #include "z3950fetcher.h"
+#include "messagehandler.h"
+#include "latin1literal.h"
+#include <kdebug.h>
+#include "iso5426converter.h"
+#include "iso6937converter.h"
+
+#include <qapplication.h>
+
+#include <config.h>
+
+#ifdef HAVE_YAZ
+extern "C"
+{
+#include <yaz/zoom.h>
+#include <yaz/marcdisp.h>
+#include <yaz/yaz-version.h>
+}
+#endif
+
+#include <klocale.h>
+
+#include <qfile.h>
+
+namespace
+{
+ static const size_t Z3950_DEFAULT_MAX_RECORDS = 20;
+}
+
+using KBibTeX::Z3950ResultFound;
+using KBibTeX::Z3950Connection;
+
+Z3950ResultFound::Z3950ResultFound( const QString& s ) : QCustomEvent( uid() )
+ , m_result( QDeepCopy<QString>( s ) )
+{
+ ++Z3950Connection::resultsLeft;
+}
+
+Z3950ResultFound::~Z3950ResultFound()
+{
+ --Z3950Connection::resultsLeft;
+}
+
+class Z3950Connection::Private
+{
+public:
+ Private() {}
+#ifdef HAVE_YAZ
+ ~Private()
+ {
+ ZOOM_options_destroy( conn_opt );
+ ZOOM_connection_destroy( conn );
+ };
+
+ ZOOM_options conn_opt;
+ ZOOM_connection conn;
+#endif
+};
+
+int Z3950Connection::resultsLeft = 0;
+
+// since the character set goes into a yaz api call
+// I'm paranoid about user insertions, so just grab 64
+// characters at most
+Z3950Connection::Z3950Connection( QObject* fetcher,
+ const QString& host,
+ uint port,
+ const QString& dbname,
+ const QString& sourceCharSet,
+ const QString& syntax,
+ const QString& esn )
+ : QThread()
+ , d( new Private() )
+ , m_connected( false )
+ , m_aborted( false )
+ , m_fetcher( fetcher )
+ , m_host( QDeepCopy<QString>( host ) )
+ , m_port( port )
+ , m_dbname( QDeepCopy<QString>( dbname ) )
+ , m_sourceCharSet( QDeepCopy<QString>( sourceCharSet.left( 64 ) ) )
+ , m_syntax( QDeepCopy<QString>( syntax ) )
+ , m_esn( QDeepCopy<QString>( esn ) )
+ , m_start( 0 )
+ , m_limit( Z3950_DEFAULT_MAX_RECORDS )
+ , m_hasMore( false )
+{
+}
+
+Z3950Connection::~Z3950Connection()
+{
+ m_connected = false;
+ delete d;
+ d = 0;
+}
+
+void Z3950Connection::reset()
+{
+ m_start = 0;
+ m_limit = Z3950_DEFAULT_MAX_RECORDS;
+}
+
+void Z3950Connection::setQuery( const QString& query_, unsigned int numHits )
+{
+ m_pqn = QDeepCopy<QString>( query_ );
+ m_limit = Z3950_DEFAULT_MAX_RECORDS < numHits ? Z3950_DEFAULT_MAX_RECORDS : numHits;
+}
+
+void Z3950Connection::setUserPassword( const QString& user_, const QString& pword_ )
+{
+ m_user = QDeepCopy<QString>( user_ );
+ m_password = QDeepCopy<QString>( pword_ );
+}
+
+void Z3950Connection::run()
+{
+// kdDebug() << "Z3950Connection::run() - " << m_fetcher->source() << endl;
+ m_aborted = false;
+ m_hasMore = false;
+ resultsLeft = 0;
+#ifdef HAVE_YAZ
+
+ if ( !makeConnection() )
+ {
+ done();
+ return;
+ }
+
+ ZOOM_query query = ZOOM_query_create();
+ kdDebug() << "Z3950Connection::run() - pqn = " << toCString( m_pqn ) << endl;
+ int errcode = ZOOM_query_prefix( query, toCString( m_pqn ) );
+ if ( errcode != 0 )
+ {
+ kdDebug() << "Z3950Connection::run() - query error: " << m_pqn << endl;
+ ZOOM_query_destroy( query );
+ QString s = i18n( "Query error!" );
+ s += ' ' + m_pqn;
+ done( s, MessageHandler::Error );
+ return;
+ }
+
+ ZOOM_resultset resultSet = ZOOM_connection_search( d->conn, query );
+
+ // check abort status
+ if ( m_aborted )
+ {
+ done();
+ return;
+ }
+
+ // I know the LOC wants the syntax = "xml" and esn = "mods"
+ // to get MODS data, that seems a bit odd...
+ // esn only makes sense for marc and grs-1
+ // if syntax is mods, set esn to mods too
+ QCString type = "raw";
+ if ( m_syntax == Latin1Literal( "mods" ) )
+ {
+ m_syntax = QString::fromLatin1( "xml" );
+ ZOOM_resultset_option_set( resultSet, "elementSetName", "mods" );
+ type = "xml";
+ }
+ else
+ {
+ ZOOM_resultset_option_set( resultSet, "elementSetName", m_esn.latin1() );
+ }
+ ZOOM_resultset_option_set( resultSet, "start", QCString().setNum( m_start ) );
+ ZOOM_resultset_option_set( resultSet, "count", QCString().setNum( m_limit - m_start ) );
+ // search in default syntax, unless syntax is already set
+ if ( !m_syntax.isEmpty() )
+ {
+ ZOOM_resultset_option_set( resultSet, "preferredRecordSyntax", m_syntax.latin1() );
+ }
+
+ const char* errmsg;
+ const char* addinfo;
+ errcode = ZOOM_connection_error( d->conn, &errmsg, &addinfo );
+ if ( errcode != 0 )
+ {
+ ZOOM_resultset_destroy( resultSet );
+ ZOOM_query_destroy( query );
+ m_connected = false;
+
+ QString s = i18n( "Connection search error %1: %2" ).arg( errcode ).arg( toString( errmsg ) );
+ if ( !QCString( addinfo ).isEmpty() )
+ {
+ s += " (" + toString( addinfo ) + ")";
+ }
+ kdDebug() << "Z3950Connection::run() - " << s << endl;
+ done( s, MessageHandler::Error );
+ return;
+ }
+
+ const size_t numResults = ZOOM_resultset_size( resultSet );
+
+ QString newSyntax = m_syntax;
+ if ( numResults > 0 )
+ {
+ kdDebug() << "Z3950Connection::run() - current syntax is " << m_syntax << " (" << numResults << " results)" << endl;
+ // so now we know that results exist, might have to check syntax
+ int len;
+ ZOOM_record rec = ZOOM_resultset_record( resultSet, 0 );
+ // want raw unless it's mods
+ ZOOM_record_get( rec, type, &len );
+ if ( len > 0 && m_syntax.isEmpty() )
+ {
+ newSyntax = QString::fromLatin1( ZOOM_record_get( rec, "syntax", &len ) ).lower();
+ kdDebug() << "Z3950Connection::run() - syntax guess is " << newSyntax << endl;
+ if ( newSyntax == Latin1Literal( "mods" ) || newSyntax == Latin1Literal( "xml" ) )
+ {
+ m_syntax = QString::fromLatin1( "xml" );
+ ZOOM_resultset_option_set( resultSet, "elementSetName", "mods" );
+ }
+ else if ( newSyntax == Latin1Literal( "grs-1" ) )
+ {
+ // if it's defaulting to grs-1, go ahead and change it to try to get a marc
+ // record since grs-1 is a last resort for us
+ newSyntax.truncate( 0 );
+ }
+ }
+ // right now, we just understand mods, unimarc, marc21/usmarc, and grs-1
+ if ( newSyntax != Latin1Literal( "xml" ) &&
+ newSyntax != Latin1Literal( "usmarc" ) &&
+ newSyntax != Latin1Literal( "marc21" ) &&
+ newSyntax != Latin1Literal( "unimarc" ) &&
+ newSyntax != Latin1Literal( "grs-1" ) )
+ {
+ kdDebug() << "Z3950Connection::run() - changing z39.50 syntax to MODS" << endl;
+ newSyntax = QString::fromLatin1( "xml" );
+ ZOOM_resultset_option_set( resultSet, "elementSetName", "mods" );
+ ZOOM_resultset_option_set( resultSet, "preferredRecordSyntax", newSyntax.latin1() );
+ rec = ZOOM_resultset_record( resultSet, 0 );
+ ZOOM_record_get( rec, "xml", &len );
+ if ( len == 0 )
+ {
+ // change set name back
+ ZOOM_resultset_option_set( resultSet, "elementSetName", m_esn.latin1() );
+ newSyntax = QString::fromLatin1( "usmarc" ); // try usmarc
+ kdDebug() << "Z3950Connection::run() - changing z39.50 syntax to USMARC" << endl;
+ ZOOM_resultset_option_set( resultSet, "preferredRecordSyntax", newSyntax.latin1() );
+ rec = ZOOM_resultset_record( resultSet, 0 );
+ ZOOM_record_get( rec, "raw", &len );
+ }
+ if ( len == 0 )
+ {
+ newSyntax = QString::fromLatin1( "marc21" ); // try marc21
+ kdDebug() << "Z3950Connection::run() - changing z39.50 syntax to MARC21" << endl;
+ ZOOM_resultset_option_set( resultSet, "preferredRecordSyntax", newSyntax.latin1() );
+ rec = ZOOM_resultset_record( resultSet, 0 );
+ ZOOM_record_get( rec, "raw", &len );
+ }
+ if ( len == 0 )
+ {
+ newSyntax = QString::fromLatin1( "unimarc" ); // try unimarc
+ kdDebug() << "Z3950Connection::run() - changing z39.50 syntax to UNIMARC" << endl;
+ ZOOM_resultset_option_set( resultSet, "preferredRecordSyntax", newSyntax.latin1() );
+ rec = ZOOM_resultset_record( resultSet, 0 );
+ ZOOM_record_get( rec, "raw", &len );
+ }
+ if ( len == 0 )
+ {
+ newSyntax = QString::fromLatin1( "grs-1" ); // try grs-1
+ kdDebug() << "Z3950Connection::run() - changing z39.50 syntax to GRS-1" << endl;
+ ZOOM_resultset_option_set( resultSet, "preferredRecordSyntax", newSyntax.latin1() );
+ rec = ZOOM_resultset_record( resultSet, 0 );
+ ZOOM_record_get( rec, "raw", &len );
+ }
+ if ( len == 0 )
+ {
+ kdDebug() << "Z3950Connection::run() - giving up" << endl;
+ ZOOM_resultset_destroy( resultSet );
+ ZOOM_query_destroy( query );
+ done( i18n( "Record syntax error" ), MessageHandler::Error );
+ return;
+ }
+ kdDebug() << "Z3950Connection::run() - final syntax is " << newSyntax << endl;
+ }
+ }
+
+ // go back to fooling ourselves and calling it mods
+ if ( m_syntax == Latin1Literal( "xml" ) )
+ {
+ m_syntax = QString::fromLatin1( "mods" );
+ }
+ if ( newSyntax == Latin1Literal( "xml" ) )
+ {
+ newSyntax = QString::fromLatin1( "mods" );
+ }
+ // save syntax change for next time
+ if ( m_syntax != newSyntax )
+ {
+ qApp->postEvent( m_fetcher, new Z3950SyntaxChange( newSyntax ) );
+ m_syntax = newSyntax;
+ }
+
+ if ( m_sourceCharSet.isEmpty() )
+ {
+ m_sourceCharSet = QString::fromLatin1( "marc-8" );
+ }
+
+ const size_t realLimit = QMIN( numResults, m_limit );
+
+ for ( size_t i = m_start; i < realLimit && !m_aborted; ++i )
+ {
+ kdDebug() << "Z3950Connection::run() - grabbing index " << i << endl;
+ ZOOM_record rec = ZOOM_resultset_record( resultSet, i );
+ if ( !rec )
+ {
+ kdDebug() << "Z3950Connection::run() - no record returned for index " << i << endl;
+ continue;
+ }
+ int len;
+ QString data;
+ if ( m_syntax == Latin1Literal( "mods" ) )
+ {
+ data = toString( ZOOM_record_get( rec, "xml", &len ) );
+ }
+ else if ( m_syntax == Latin1Literal( "grs-1" ) ) // grs-1
+ {
+ // we're going to parse the rendered data, very ugly...
+ data = toString( ZOOM_record_get( rec, "render", &len ) );
+ }
+ else
+ {
+#if 0
+ kdWarning() << "Remove debug from z3950connection.cpp" << endl;
+ {
+ QFile f1( QString::fromLatin1( "/tmp/z3950.raw" ) );
+ if ( f1.open( IO_WriteOnly ) )
+ {
+ QDataStream t( &f1 );
+ t << ZOOM_record_get( rec, "raw", &len );
+ }
+ f1.close();
+ }
+#endif
+ data = toXML( ZOOM_record_get( rec, "raw", &len ), m_sourceCharSet );
+ }
+ Z3950ResultFound* ev = new Z3950ResultFound( data );
+ QApplication::postEvent( m_fetcher, ev );
+ }
+
+ ZOOM_resultset_destroy( resultSet );
+ ZOOM_query_destroy( query );
+
+ m_hasMore = m_limit < numResults;
+ if ( m_hasMore )
+ {
+ m_start = m_limit;
+ m_limit += Z3950_DEFAULT_MAX_RECORDS;
+ }
+#endif
+ done();
+}
+
+bool Z3950Connection::makeConnection()
+{
+ if ( m_connected )
+ {
+ return true;
+ }
+// kdDebug() << "Z3950Connection::makeConnection() - " << m_fetcher->source() << endl;
+// I don't know what to do except assume database, user, and password are in locale encoding
+#ifdef HAVE_YAZ
+ d->conn_opt = ZOOM_options_create();
+ ZOOM_options_set( d->conn_opt, "implementationName", "KBibTeX" );
+ ZOOM_options_set( d->conn_opt, "databaseName", toCString( m_dbname ) );
+ ZOOM_options_set( d->conn_opt, "user", toCString( m_user ) );
+ ZOOM_options_set( d->conn_opt, "password", toCString( m_password ) );
+
+ d->conn = ZOOM_connection_create( d->conn_opt );
+ ZOOM_connection_connect( d->conn, m_host.latin1(), m_port );
+
+ int errcode;
+ const char* errmsg; // unused: carries same info as 'errcode'
+ const char* addinfo;
+ errcode = ZOOM_connection_error( d->conn, &errmsg, &addinfo );
+ if ( errcode != 0 )
+ {
+ ZOOM_options_destroy( d->conn_opt );
+ ZOOM_connection_destroy( d->conn );
+ m_connected = false;
+
+ QString s = i18n( "Connection error %1: %2" ).arg( errcode ).arg( toString( errmsg ) );
+ if ( !QCString( addinfo ).isEmpty() )
+ {
+ s += " (" + toString( addinfo ) + ")";
+ }
+ kdDebug() << "Z3950Connection::makeConnection() - " << s << endl;
+ done( s, MessageHandler::Error );
+ return false;
+ }
+#endif
+ m_connected = true;
+ return true;
+}
+
+void Z3950Connection::done()
+{
+ checkPendingEvents();
+ qApp->postEvent( m_fetcher, new Z3950ConnectionDone( m_hasMore ) );
+}
+
+void Z3950Connection::done( const QString& msg_, int type_ )
+{
+ checkPendingEvents();
+ if ( m_aborted )
+ {
+ qApp->postEvent( m_fetcher, new Z3950ConnectionDone( m_hasMore ) );
+ }
+ else
+ {
+ qApp->postEvent( m_fetcher, new Z3950ConnectionDone( m_hasMore, msg_, type_ ) );
+ }
+}
+
+void Z3950Connection::checkPendingEvents()
+{
+ // if there's still some pending result events, go ahead and just wait 1 second
+ if ( resultsLeft > 0 )
+ {
+ sleep( 1 );
+ }
+}
+
+inline
+QCString Z3950Connection::toCString( const QString& text_ )
+{
+ return iconvRun( text_.utf8(), QString::fromLatin1( "utf-8" ), m_sourceCharSet );
+}
+
+inline
+QString Z3950Connection::toString( const QCString& text_ )
+{
+ return QString::fromUtf8( iconvRun( text_, m_sourceCharSet, QString::fromLatin1( "utf-8" ) ) );
+}
+
+// static
+QCString Z3950Connection::iconvRun( const QCString& text_, const QString& fromCharSet_, const QString& toCharSet_ )
+{
+#ifdef HAVE_YAZ
+ if ( text_.isEmpty() )
+ {
+ return text_;
+ }
+
+ if ( fromCharSet_ == toCharSet_ )
+ {
+ return text_;
+ }
+
+ yaz_iconv_t cd = yaz_iconv_open( toCharSet_.latin1(), fromCharSet_.latin1() );
+ if ( !cd )
+ {
+ // maybe it's iso 5426, which we sorta support
+ QString charSetLower = fromCharSet_.lower();
+ charSetLower.remove( '-' ).remove( ' ' );
+ if ( charSetLower == Latin1Literal( "iso5426" ) )
+ {
+ return iconvRun( Iso5426Converter::toUtf8( text_ ).utf8(), QString::fromLatin1( "utf-8" ), toCharSet_ );
+ }
+ else if ( charSetLower == Latin1Literal( "iso6937" ) )
+ {
+ return iconvRun( Iso6937Converter::toUtf8( text_ ).utf8(), QString::fromLatin1( "utf-8" ), toCharSet_ );
+ }
+ kdWarning() << "Z3950Connection::iconvRun() - conversion from " << fromCharSet_
+ << " to " << toCharSet_ << " is unsupported" << endl;
+ return text_;
+ }
+
+ const char* input = text_;
+ size_t inlen = text_.length();
+
+ size_t outlen = 2 * inlen; // this is enough, right?
+ QMemArray<char> result0( outlen );
+ char* result = result0.data();
+
+ int r = yaz_iconv( cd, const_cast<char**>( &input ), &inlen, &result, &outlen );
+ if ( r <= 0 )
+ {
+ kdDebug() << "Z3950Connection::iconvRun() - can't decode buffer" << endl;
+ return text_;
+ }
+ // bug in yaz, need to flush buffer to catch last character
+ yaz_iconv( cd, 0, 0, &result, &outlen );
+
+ // length is pointer difference
+ size_t len = result - result0;
+
+ QCString output = QCString( result0, len + 1 );
+// kdDebug() << "-------------------------------------------" << endl;
+// kdDebug() << output << endl;
+// kdDebug() << "-------------------------------------------" << endl;
+ yaz_iconv_close( cd );
+ return output;
+#endif
+ return text_;
+}
+
+QString Z3950Connection::toXML( const QCString& marc_, const QString& charSet_ )
+{
+#ifdef HAVE_YAZ
+ if ( marc_.isEmpty() )
+ {
+ kdDebug() << "Z3950Connection::toXML() - empty string" << endl;
+ return QString::null;
+ }
+
+ yaz_iconv_t cd = yaz_iconv_open( "utf-8", charSet_.latin1() );
+ if ( !cd )
+ {
+ // maybe it's iso 5426, which we sorta support
+ QString charSetLower = charSet_.lower();
+ charSetLower.remove( '-' ).remove( ' ' );
+ if ( charSetLower == Latin1Literal( "iso5426" ) )
+ {
+ return toXML( Iso5426Converter::toUtf8( marc_ ).utf8(), QString::fromLatin1( "utf-8" ) );
+ }
+ else if ( charSetLower == Latin1Literal( "iso6937" ) )
+ {
+ return toXML( Iso6937Converter::toUtf8( marc_ ).utf8(), QString::fromLatin1( "utf-8" ) );
+ }
+ kdWarning() << "Z3950Connection::toXML() - conversion from " << charSet_ << " is unsupported" << endl;
+ return QString::null;
+ }
+
+ yaz_marc_t mt = yaz_marc_create();
+ yaz_marc_iconv( mt, cd );
+ yaz_marc_xml( mt, YAZ_MARC_MARCXML );
+
+ // first 5 bytes are length
+ bool ok;
+#if YAZ_VERSIONL < 0x030000
+ int len = marc_.left( 5 ).toInt( &ok );
+#else
+ size_t len = marc_.left( 5 ).toInt( &ok );
+#endif
+ if ( ok && ( len < 25 || len > 100000 ) )
+ {
+ kdDebug() << "Z3950Connection::toXML() - bad length: " << ( ok ? len : -1 ) << endl;
+ return QString::null;
+ }
+
+#if YAZ_VERSIONL < 0x030000
+ char* result;
+#else
+ const char* result;
+#endif
+ int r = yaz_marc_decode_buf( mt, marc_, -1, &result, &len );
+ if ( r <= 0 )
+ {
+ kdDebug() << "Z3950Connection::toXML() - can't decode buffer" << endl;
+ return QString::null;
+ }
+
+ QString output = QString::fromLatin1( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" );
+ output += QString::fromUtf8( QCString( result, len + 1 ), len + 1 );
+// kdDebug() << QCString(result) << endl;
+// kdDebug() << "-------------------------------------------" << endl;
+// kdDebug() << output << endl;
+ yaz_iconv_close( cd );
+ yaz_marc_destroy( mt );
+
+ return output;
+#else // no yaz
+ return QString::null;
+#endif
+}
diff --git a/src/z3950connection.h b/src/z3950connection.h
new file mode 100644
index 0000000..8019f40
--- /dev/null
+++ b/src/z3950connection.h
@@ -0,0 +1,131 @@
+/***************************************************************************
+ copyright : (C) 2005-2006 by Robby Stephenson
+ email : robby@periapsis.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This file has been modified to match the requirements of KBibTeX. *
+ * In case of problems or bugs arising from this implementation, please *
+ * contact the KBibTeX team first. *
+ * Thomas Fischer <fischer@unix-ag.uni-kl.de> *
+ * *
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of version 2 of the GNU General Public License as *
+ * published by the Free Software Foundation; *
+ * *
+ ***************************************************************************/
+
+#ifndef KBIBTEX_Z3950CONNECTION_H
+#define KBIBTEX_Z3950CONNECTION_H
+
+#include <qthread.h>
+#include <qevent.h>
+#include <qdeepcopy.h>
+
+#include <ksharedptr.h>
+
+namespace KBibTeX {
+class Z3950ResultFound : public QCustomEvent {
+public:
+ Z3950ResultFound(const QString& s);
+ ~Z3950ResultFound();
+ const QString& result() const { return m_result; }
+
+ static int uid() { return User + 11111; }
+
+private:
+ QString m_result;
+};
+
+class Z3950ConnectionDone : public QCustomEvent {
+public:
+ Z3950ConnectionDone(bool more) : QCustomEvent(uid()), m_type(-1), m_hasMore(more) {}
+ Z3950ConnectionDone(bool more, const QString& s, int t) : QCustomEvent(uid()), m_msg(QDeepCopy<QString>(s)), m_type(t), m_hasMore(more) {}
+
+ const QString& message() const { return m_msg; }
+ int messageType() const { return m_type; }
+ bool hasMoreResults() const { return m_hasMore; }
+
+ static int uid() { return User + 22222; }
+
+private:
+ QString m_msg;
+ int m_type;
+ bool m_hasMore;
+};
+
+class Z3950SyntaxChange : public QCustomEvent {
+public:
+ Z3950SyntaxChange(const QString& s) : QCustomEvent(uid()), m_syntax(QDeepCopy<QString>(s)) {}
+ const QString& syntax() const { return m_syntax; }
+
+ static int uid() { return User + 33333; }
+
+private:
+ QString m_syntax;
+};
+
+/**
+ * @author Robby Stephenson
+ */
+class Z3950Connection : public QThread {
+public:
+ Z3950Connection(QObject* fetcher,
+ const QString& host,
+ uint port,
+ const QString& dbname,
+ const QString& sourceCharSet,
+ const QString& syntax,
+ const QString& esn);
+ ~Z3950Connection();
+
+ void reset();
+ void setQuery(const QString& query, unsigned int numHits);
+ void setUserPassword(const QString& user, const QString& pword);
+ void run();
+
+ void abort() { m_aborted = true; }
+
+private:
+ static QCString iconvRun(const QCString& text, const QString& fromCharSet, const QString& toCharSet);
+ static QString toXML(const QCString& marc, const QString& fromCharSet);
+
+ bool makeConnection();
+ void done();
+ void done(const QString& message, int type);
+ QCString toCString(const QString& text);
+ QString toString(const QCString& text);
+ void checkPendingEvents();
+
+ class Private;
+ Private* d;
+
+ bool m_connected;
+ bool m_aborted;
+
+ QObject* m_fetcher;
+ QString m_host;
+ uint m_port;
+ QString m_dbname;
+ QString m_user;
+ QString m_password;
+ QString m_sourceCharSet;
+ QString m_syntax;
+ QString m_pqn;
+ QString m_esn;
+ size_t m_start;
+ size_t m_limit;
+ bool m_hasMore;
+
+ friend class Z3950ResultFound;
+ static int resultsLeft;
+};
+
+} // end namespace
+
+#endif
diff --git a/stamp-h.in b/stamp-h.in
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/stamp-h.in
diff --git a/subdirs b/subdirs
new file mode 100644
index 0000000..b5e9c8e
--- /dev/null
+++ b/subdirs
@@ -0,0 +1,5 @@
+doc
+man
+po
+src
+xslt
diff --git a/templates/cpp b/templates/cpp
new file mode 100644
index 0000000..6f13496
--- /dev/null
+++ b/templates/cpp
@@ -0,0 +1,19 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
diff --git a/templates/h b/templates/h
new file mode 100644
index 0000000..6f13496
--- /dev/null
+++ b/templates/h
@@ -0,0 +1,19 @@
+/***************************************************************************
+ * Copyright (C) 2004-2009 by Thomas Fischer *
+ * fischer@unix-ag.uni-kl.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
diff --git a/xslt/MARC21slim2MODS3.xsl b/xslt/MARC21slim2MODS3.xsl
new file mode 100644
index 0000000..fe78601
--- /dev/null
+++ b/xslt/MARC21slim2MODS3.xsl
@@ -0,0 +1,2795 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns="http://www.loc.gov/mods/v3" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xlink marc">
+ <xsl:include href="MARC21slimUtils.xsl"/>
+ <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
+
+ <!--
+Revision 1.11 datafield 028 fixed attribute placement 2006/12/07 ntra
+Revision 1.10 subfield $h in 245 suppressed from mods:title 2006/03/23 ntra
+
+Revision 1.9 subfield $y was added to field 242 2004/09/02 10:57 jrad
+
+Revision 1.8 Subject chopPunctuation expanded and attribute fixes 2004/08/12 jrad
+
+Revision 1.7 2004/03/25 08:29 jrad
+
+Revision 1.6 various validation fixes 2004/02/20 ntra
+
+Revision 1.5 2003/10/02 16:18:58 ntra
+MODS2 to MODS3 updates, language unstacking and
+de-duping, chopPunctuation expanded
+
+Revision 1.3 2003/04/03 00:07:19 ntra
+Revision 1.3 Additional Changes not related to MODS Version 2.0 by ntra
+
+Revision 1.2 2003/03/24 19:37:42 ckeith
+Added Log Comment
+
+-->
+ <xsl:template match="/">
+ <xsl:choose>
+ <xsl:when test="marc:collection">
+ <modsCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-0.xsd">
+ <xsl:for-each select="marc:collection/marc:record">
+ <mods version="3.0">
+ <xsl:call-template name="marcRecord"/>
+ </mods>
+ </xsl:for-each>
+ </modsCollection>
+ </xsl:when>
+ <xsl:otherwise>
+ <mods version="3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-0.xsd">
+ <xsl:for-each select="marc:record">
+ <xsl:call-template name="marcRecord"/>
+ </xsl:for-each>
+ </mods>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="marcRecord">
+ <xsl:variable name="leader" select="marc:leader"/>
+ <xsl:variable name="leader6" select="substring($leader,7,1)"/>
+ <xsl:variable name="leader7" select="substring($leader,8,1)"/>
+ <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
+ <xsl:variable name="typeOf008">
+ <xsl:choose>
+ <xsl:when test="$leader6='a'">
+ <xsl:choose>
+ <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
+ <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">SE</xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$leader6='t'">BK</xsl:when>
+ <xsl:when test="$leader6='p'">MM</xsl:when>
+ <xsl:when test="$leader6='m'">CF</xsl:when>
+ <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
+ <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">VM</xsl:when>
+ <xsl:when test="$leader6='c' or $leader6='d' or $leader6='i' or $leader6='j'">MU</xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:for-each select="marc:datafield[@tag=245]">
+ <titleInfo>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code='b']">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">b</xsl:with-param>
+ <xsl:with-param name="beforeCodes">afgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abfgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="$title"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="@ind2&gt;0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1,@ind2)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop,@ind2+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop"/>
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="marc:subfield[@code='b']">
+ <subTitle>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">b</xsl:with-param>
+ <xsl:with-param name="anyCodes">b</xsl:with-param>
+ <xsl:with-param name="afterCodes">afgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </subTitle>
+ </xsl:if>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=210]">
+ <titleInfo type="abbreviated">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">a</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="subtitle"/>
+ </titleInfo>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=242]">
+ <titleInfo type="translated">
+ <!--09/01/04 Added subfield $y-->
+ <xsl:for-each select="marc:subfield[@code='y']">
+ <xsl:attribute name="lang">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <title>
+
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <!-- 1/04 removed $h, b -->
+ <xsl:with-param name="codes">a</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+
+
+ <!-- 1/04 fix -->
+ <xsl:call-template name="subtitle"/>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=246]">
+ <titleInfo type="alternative">
+ <xsl:for-each select="marc:subfield[@code='i']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <!-- 1/04 removed $h, $b -->
+ <xsl:with-param name="codes">af</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="subtitle"/>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
+ <titleInfo type="uniform">
+ <title>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="(contains('adfklmor',@code) and (not(../marc:subfield[@code='n' or @code='p']) or (following-sibling::marc:subfield[@code='n' or @code='p'])))">
+ <xsl:value-of select="text()"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=740][@ind2!=2]">
+ <titleInfo type="alternative">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ah</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=100]">
+ <name type="personal">
+ <xsl:call-template name="nameABCDQ"/>
+ <xsl:call-template name="affiliation"/>
+ <role>
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
+ </role>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=110]">
+ <name type="corporate">
+ <xsl:call-template name="nameABCDN"/>
+ <role>
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
+ </role>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=111]">
+ <name type="conference">
+ <xsl:call-template name="nameACDEQ"/>
+ <role>
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
+ </role>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=700][not(marc:subfield[@code='t'])]">
+ <name type="personal">
+ <xsl:call-template name="nameABCDQ"/>
+ <xsl:call-template name="affiliation"/>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=710][not(marc:subfield[@code='t'])]">
+ <name type="corporate">
+ <xsl:call-template name="nameABCDN"/>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=711][not(marc:subfield[@code='t'])]">
+ <name type="conference">
+ <xsl:call-template name="nameACDEQ"/>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=720][not(marc:subfield[@code='t'])]">
+ <name>
+ <xsl:if test="@ind1=1">
+ <xsl:attribute name="type">
+ <xsl:text>personal</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <namePart>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </namePart>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+
+ <typeOfResource>
+ <xsl:if test="$leader7='c'">
+ <xsl:attribute name="collection">yes</xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">
+ <xsl:attribute name="manuscript">yes</xsl:attribute>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>
+ <xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>
+ <xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>
+ <xsl:when test="$leader6='i'">sound recording-nonmusical</xsl:when>
+ <xsl:when test="$leader6='j'">sound recording-musical</xsl:when>
+ <xsl:when test="$leader6='k'">still image</xsl:when>
+ <xsl:when test="$leader6='g'">moving image</xsl:when>
+ <xsl:when test="$leader6='r'">three dimensional object</xsl:when>
+ <xsl:when test="$leader6='m'">software, multimedia</xsl:when>
+ <xsl:when test="$leader6='p'">mixed material</xsl:when>
+ </xsl:choose>
+ </typeOfResource>
+
+ <xsl:if test="substring($controlField008,26,1)='d'">
+ <genre authority="marc">globe</genre>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
+ <genre authority="marc">remote sensing image</genre>
+ </xsl:if>
+
+ <xsl:if test="$typeOf008='MP'">
+ <xsl:variable name="controlField008-25" select="substring($controlField008,26,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-25='a' or $controlField008-25='b' or $controlField008-25='c' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
+ <genre authority="marc">map</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-25='e' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
+ <genre authority="marc">atlas</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="$typeOf008='SE'">
+ <xsl:variable name="controlField008-21" select="substring($controlField008,22,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-21='d'">
+ <genre authority="marc">database</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='l'">
+ <genre authority="marc">loose-leaf</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='m'">
+ <genre authority="marc">series</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='n'">
+ <genre authority="marc">newspaper</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='p'">
+ <genre authority="marc">periodical</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='w'">
+ <genre authority="marc">web site</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="$typeOf008='BK' or $typeOf008='SE'">
+ <xsl:variable name="controlField008-24" select="substring($controlField008,25,4)"/>
+ <xsl:choose>
+ <xsl:when test="contains($controlField008-24,'a')">
+ <genre authority="marc">abstract or summary</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'b')">
+ <genre authority="marc">bibliography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'c')">
+ <genre authority="marc">catalog</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'d')">
+ <genre authority="marc">dictionary</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'e')">
+ <genre authority="marc">encyclopedia</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'f')">
+ <genre authority="marc">handbook</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'g')">
+ <genre authority="marc">legal article</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'i')">
+ <genre authority="marc">index</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'k')">
+ <genre authority="marc">discography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'l')">
+ <genre authority="marc">legislation</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'m')">
+ <genre authority="marc">theses</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'n')">
+ <genre authority="marc">survey of literature</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'o')">
+ <genre authority="marc">review</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'p')">
+ <genre authority="marc">programmed text</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'q')">
+ <genre authority="marc">filmography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'r')">
+ <genre authority="marc">directory</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'s')">
+ <genre authority="marc">statistics</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'t')">
+ <genre authority="marc">technical report</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'v')">
+ <genre authority="marc">legal case and case notes</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'w')">
+ <genre authority="marc">law report or digest</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'z')">
+ <genre authority="marc">treaty</genre>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-29='1'">
+ <genre authority="marc">conference publication</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="$typeOf008='CF'">
+ <xsl:variable name="controlField008-26" select="substring($controlField008,27,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-26='a'">
+ <genre authority="marc">numeric data</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='e'">
+ <genre authority="marc">database</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='f'">
+ <genre authority="marc">font</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='g'">
+ <genre authority="marc">game</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="$typeOf008='BK'">
+ <xsl:if test="substring($controlField008,25,1)='j'">
+ <genre authority="marc">patent</genre>
+ </xsl:if>
+ <xsl:if test="substring($controlField008,31,1)='1'">
+ <genre authority="marc">festschrift</genre>
+ </xsl:if>
+
+ <xsl:variable name="controlField008-34" select="substring($controlField008,35,1)"/>
+ <xsl:if test="$controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d'">
+ <genre authority="marc">biography</genre>
+ </xsl:if>
+
+ <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-33='e'">
+ <genre authority="marc">essay</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='d'">
+ <genre authority="marc">drama</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='c'">
+ <genre authority="marc">comic strip</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='l'">
+ <genre authority="marc">fiction</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='h'">
+ <genre authority="marc">humor, satire</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='i'">
+ <genre authority="marc">letter</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='f'">
+ <genre authority="marc">novel</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='j'">
+ <genre authority="marc">short story</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='s'">
+ <genre authority="marc">speech</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="$typeOf008='MU'">
+ <xsl:variable name="controlField008-30-31" select="substring($controlField008,31,2)"/>
+ <xsl:if test="contains($controlField008-30-31,'b')">
+ <genre authority="marc">biography</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'c')">
+ <genre authority="marc">conference publication</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'d')">
+ <genre authority="marc">drama</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'e')">
+ <genre authority="marc">essay</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'f')">
+ <genre authority="marc">fiction</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'o')">
+ <genre authority="marc">folktale</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'h')">
+ <genre authority="marc">history</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'k')">
+ <genre authority="marc">humor, satire</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'m')">
+ <genre authority="marc">memoir</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'p')">
+ <genre authority="marc">poetry</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'r')">
+ <genre authority="marc">rehearsal</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'g')">
+ <genre authority="marc">reporting</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'s')">
+ <genre authority="marc">sound</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'l')">
+ <genre authority="marc">speech</genre>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="$typeOf008='VM'">
+ <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-33='a'">
+ <genre authority="marc">art original</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='b'">
+ <genre authority="marc">kit</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='c'">
+ <genre authority="marc">art reproduction</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='d'">
+ <genre authority="marc">diorama</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='f'">
+ <genre authority="marc">filmstrip</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='g'">
+ <genre authority="marc">legal article</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='i'">
+ <genre authority="marc">picture</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='k'">
+ <genre authority="marc">graphic</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='l'">
+ <genre authority="marc">technical drawing</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='m'">
+ <genre authority="marc">motion picture</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='n'">
+ <genre authority="marc">chart</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='o'">
+ <genre authority="marc">flash card</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='p'">
+ <genre authority="marc">microscope slide</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='q' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
+ <genre authority="marc">model</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='r'">
+ <genre authority="marc">realia</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='s'">
+ <genre authority="marc">slide</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='t'">
+ <genre authority="marc">transparency</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='v'">
+ <genre authority="marc">videorecording</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='w'">
+ <genre authority="marc">toy</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:for-each select="marc:datafield[@tag=655]">
+ <genre authority="marc">
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:attribute>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abvxyz</xsl:with-param>
+ <xsl:with-param name="delimeter">-</xsl:with-param>
+ </xsl:call-template>
+ </genre>
+ </xsl:for-each>
+
+ <originInfo>
+ <xsl:variable name="MARCpublicationCode" select="normalize-space(substring($controlField008,16,3))"/>
+
+ <xsl:if test="translate($MARCpublicationCode,'|','')">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">marccountry</xsl:attribute>
+ <xsl:value-of select="$MARCpublicationCode"/>
+ </placeTerm>
+ </place>
+ </xsl:if>
+
+ <xsl:for-each select="marc:datafield[@tag=044]/marc:subfield[@code='c']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">iso3166</xsl:attribute>
+ <xsl:value-of select="."/>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='a']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">text</xsl:attribute>
+ <xsl:call-template name="chopPunctuationFront">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='m']">
+ <dateValid point="start">
+ <xsl:value-of select="."/>
+ </dateValid>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='n']">
+ <dateValid point="end">
+ <xsl:value-of select="."/>
+ </dateValid>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='j']">
+ <dateModified>
+ <xsl:value-of select="."/>
+ </dateModified>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='b' or @code='c' or @code='g']">
+ <xsl:choose>
+ <xsl:when test="@code='b'">
+ <publisher>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ <xsl:with-param name="punctuation">
+ <xsl:text>:,;/ </xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </publisher>
+ </xsl:when>
+ <xsl:when test="@code='c'">
+ <dateIssued>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </dateIssued>
+ </xsl:when>
+ <xsl:when test="@code='g'">
+ <dateCreated>
+ <xsl:value-of select="."/>
+ </dateCreated>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+
+ <xsl:variable name="dataField260c">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="marc:datafield[@tag=260]/marc:subfield[@code='c']"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="controlField008-7-10" select="normalize-space(substring($controlField008, 8, 4))"/>
+ <xsl:variable name="controlField008-11-14" select="normalize-space(substring($controlField008, 12, 4))"/>
+ <xsl:variable name="controlField008-6" select="normalize-space(substring($controlField008, 7, 1))"/>
+
+ <xsl:if test="$controlField008-6='e' or $controlField008-6='p' or $controlField008-6='r' or $controlField008-6='t' or $controlField008-6='s'">
+ <xsl:if test="$controlField008-7-10 and ($controlField008-7-10 != $dataField260c)">
+ <dateIssued encoding="marc">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">
+ <xsl:if test="$controlField008-7-10">
+ <dateIssued encoding="marc" point="start">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">
+ <xsl:if test="$controlField008-11-14">
+ <dateIssued encoding="marc" point="end">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="$controlField008-6='q'">
+ <xsl:if test="$controlField008-7-10">
+ <dateIssued encoding="marc" point="start" qualifier="questionable">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="$controlField008-6='q'">
+ <xsl:if test="$controlField008-11-14">
+ <dateIssued encoding="marc" point="end" qualifier="questionable">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="$controlField008-6='t'">
+ <xsl:if test="$controlField008-11-14">
+ <copyrightDate encoding="marc">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </copyrightDate>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:for-each select="marc:datafield[@tag=033][@ind1=0 or @ind1=1]/marc:subfield[@code='a']">
+ <dateCaptured encoding="iso8601">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][1]">
+ <dateCaptured encoding="iso8601" point="start">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][2]">
+ <dateCaptured encoding="iso8601" point="end">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=250]/marc:subfield[@code='a']">
+ <edition>
+ <xsl:value-of select="."/>
+ </edition>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:leader">
+ <issuance>
+ <xsl:choose>
+ <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">monographic</xsl:when>
+ <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">continuing</xsl:when>
+ </xsl:choose>
+ </issuance>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=310]|marc:datafield[@tag=321]">
+ <frequency>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </frequency>
+ </xsl:for-each>
+ </originInfo>
+ <xsl:variable name="controlField008-35-37" select="normalize-space(translate(substring($controlField008,36,3),'|#',''))"/>
+ <xsl:if test="$controlField008-35-37">
+ <language>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="substring($controlField008,36,3)"/>
+ </languageTerm>
+ </language>
+ </xsl:if>
+
+ <xsl:for-each select="marc:datafield[@tag=041]">
+
+ <!-- <xsl:variable name="langCodes">
+ <xsl:copy-of select="marc:subfield[@code='a'or @code='d' or @code='e' or @code='2']"/>
+ </xsl:variable>
+ -->
+ <xsl:variable name="langCodes" select="marc:subfield[@code='a'or @code='d' or @code='e' or @code='2']"/>
+
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code='2']='rfc3066'">
+ <!-- not stacked but could be repeated -->
+ <xsl:call-template name="rfcLanguages">
+ <xsl:with-param name="nodeNum">
+ <xsl:value-of select="1"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:text></xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="controlField008-35-37">
+ <xsl:value-of select="$controlField008-35-37"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- iso -->
+ <xsl:variable name="allLanguages">
+ <xsl:copy-of select="$langCodes"/>
+ </xsl:variable>
+ <xsl:variable name="currentLanguage">
+ <xsl:value-of select="substring($allLanguages,1,3)"/>
+ </xsl:variable>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($allLanguages,1,3)"/>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of select="substring($allLanguages,4,string-length($allLanguages)-3)"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:if test="$controlField008-35-37">
+ <xsl:value-of select="$controlField008-35-37"/>
+ </xsl:if>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+
+ <xsl:variable name="physicalDescription">
+ <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='a' or substring(.,12,1)='b']">
+ <digitalOrigin>reformatted digital</digitalOrigin>
+ </xsl:if>
+
+ <xsl:variable name="controlField008-23" select="substring($controlField008,24,1)"/>
+ <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>
+
+ <xsl:variable name="check008-23">
+ <xsl:if test="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='SE' or $typeOf008='MM'">
+ <xsl:value-of select="true()"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="check008-29">
+ <xsl:if test="$typeOf008='MP' or $typeOf008='VM'">
+ <xsl:value-of select="true()"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">
+ <form authority="marcform">braille</form>
+ </xsl:when>
+ <xsl:when test="($controlField008-23=' ' and ($leader6='c' or $leader6='d')) or (($typeOf008='BK' or $typeOf008='SE') and ($controlField008-23=' ' or $controlField008='r'))">
+ <form authority="marcform">print</form>
+ </xsl:when>
+ <xsl:when test="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">
+ <form authority="marcform">electronic</form>
+ </xsl:when>
+ <xsl:when test="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">
+ <form authority="marcform">microfiche</form>
+ </xsl:when>
+ <xsl:when test="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">
+ <form authority="marcform">microfilm</form>
+ </xsl:when>
+ </xsl:choose>
+ <!-- 1/04 fix -->
+ <xsl:if test="marc:datafield[@tag=130]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=130]/marc:subfield[@code='h']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+
+ <xsl:if test="marc:datafield[@tag=240]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=240]/marc:subfield[@code='h']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=242]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=242]/marc:subfield[@code='h']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=245]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='h']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=246]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=246]/marc:subfield[@code='h']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=730]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=730]/marc:subfield[@code='h']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=256]/marc:subfield[@code='a']">
+ <form>
+ <xsl:value-of select="."/>
+ </form>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:controlfield[@tag=007][substring(text(),1,1)='c']">
+ <xsl:choose>
+ <xsl:when test="substring(text(),14,1)='a'">
+ <reformattingQuality>access</reformattingQuality>
+ </xsl:when>
+ <xsl:when test="substring(text(),14,1)='p'">
+ <reformattingQuality>preservation</reformattingQuality>
+ </xsl:when>
+ <xsl:when test="substring(text(),14,1)='r'">
+ <reformattingQuality>replacement</reformattingQuality>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q'][string-length(.)&gt;1]">
+ <internetMediaType>
+ <xsl:value-of select="."/>
+ </internetMediaType>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=300]">
+ <extent>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abce</xsl:with-param>
+ </xsl:call-template>
+ </extent>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="string-length(normalize-space($physicalDescription))">
+ <physicalDescription>
+ <xsl:copy-of select="$physicalDescription"/>
+ </physicalDescription>
+ </xsl:if>
+
+ <xsl:for-each select="marc:datafield[@tag=520]">
+ <abstract>
+ <xsl:call-template name="uri"/>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </abstract>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=505]">
+ <tableOfContents>
+ <xsl:call-template name="uri"/>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">agrt</xsl:with-param>
+ </xsl:call-template>
+ </tableOfContents>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=521]">
+ <targetAudience>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </targetAudience>
+ </xsl:for-each>
+
+ <xsl:if test="$typeOf008='BK' or $typeOf008='CF' or $typeOf008='MU' or $typeOf008='VM'">
+ <xsl:variable name="controlField008-22" select="substring($controlField008,23,1)"/>
+ <xsl:choose>
+ <!-- 01/04 fix -->
+ <xsl:when test="$controlField008-22='d'">
+ <targetAudience authority="marctarget">adolescent</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='e'">
+ <targetAudience authority="marctarget">adult</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='g'">
+ <targetAudience authority="marctarget">general</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='b' or $controlField008-22='c' or $controlField008-22='j'">
+ <targetAudience authority="marctarget">juvenile</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='a'">
+ <targetAudience authority="marctarget">preschool</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='f'">
+ <targetAudience authority="marctarget">specialized</targetAudience>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:for-each select="marc:datafield[@tag=245]/marc:subfield[@code='c']">
+ <note type="statement of responsibility">
+ <xsl:value-of select="."/>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=500]">
+ <note>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ <xsl:call-template name="uri"/>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=511]">
+ <note type="performers">
+ <xsl:call-template name="uri"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=518]">
+ <note type="venue">
+ <xsl:call-template name="uri"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=501 or @tag=502 or @tag=504 or @tag=506 or @tag=507 or @tag=508 or @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=530 or @tag=533 or @tag=534 or @tag=535 or @tag=536 or @tag=538 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=583 or @tag=584 or @tag=585 or @tag=586]">
+ <note>
+ <xsl:call-template name="uri"/>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."/>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=034][marc:subfield[@code='d' or @code='e' or @code='f' or @code='g']]">
+ <subject>
+ <cartographics>
+ <coordinates>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">defg</xsl:with-param>
+ </xsl:call-template>
+ </coordinates>
+ </cartographics>
+ </subject>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=043]">
+ <subject>
+ <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='c']">
+ <geographicCode>
+ <xsl:attribute name="authority">
+ <xsl:if test="@code='a'">
+ <xsl:text>marcgac</xsl:text>
+ </xsl:if>
+ <xsl:if test="@code='b'">
+ <xsl:value-of select="following-sibling::marc:subfield[@code=2]"/>
+ </xsl:if>
+ <xsl:if test="@code='c'">
+ <xsl:text>iso3166</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ <xsl:value-of select="self::marc:subfield"/>
+ </geographicCode>
+ </xsl:for-each>
+ </subject>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=255]">
+ <subject>
+ <cartographics>
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <coordinates>
+ <xsl:value-of select="."/>
+ </coordinates>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <scale>
+ <xsl:value-of select="."/>
+ </scale>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <projection>
+ <xsl:value-of select="."/>
+ </projection>
+ </xsl:for-each>
+ </cartographics>
+ </subject>
+ </xsl:for-each>
+
+ <xsl:apply-templates select="marc:datafield[653 &gt;= @tag and @tag &gt;= 600]"/>
+
+ <xsl:apply-templates select="marc:datafield[@tag=656]"/>
+
+ <xsl:for-each select="marc:datafield[@tag=752]">
+ <subject>
+ <hierarchicalGeographic>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <country>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </country>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <state>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </state>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <county>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </county>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='d']">
+ <city>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </city>
+ </xsl:for-each>
+ </hierarchicalGeographic>
+ </subject>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=045][marc:subfield[@code='b']]">
+ <subject>
+
+ <xsl:choose>
+
+ <xsl:when test="@ind1=2">
+
+ <temporal encoding="iso8601" point="start">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='b'][1]"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ <temporal encoding="iso8601" point="end">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+
+
+ <xsl:value-of select="marc:subfield[@code='b'][2]"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <temporal encoding="iso8601">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </temporal>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </subject>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=050]">
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <classification authority="lcc">
+ <xsl:value-of select="preceding-sibling::marc:subfield[@code='a'][1]"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="text()"/>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='a'][not(following-sibling::marc:subfield[@code='b'])]">
+ <classification authority="lcc">
+ <xsl:value-of select="text()"/>
+ </classification>
+ </xsl:for-each>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=082]">
+ <classification authority="ddc">
+ <xsl:if test="marc:subfield[@code='2']">
+ <xsl:attribute name="edition">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=080]">
+ <classification authority="udc">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abx</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=060]">
+ <classification authority="nlm">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=086][@ind1=0]">
+ <classification authority="sudocs">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </classification>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=086][@ind1=1]">
+ <classification authority="candoc">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </classification>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=086]">
+ <classification>
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:attribute>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </classification>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=084]">
+ <classification>
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:attribute>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=440]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">av</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">av</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=510]">
+ <relatedItem type="isReferencedBy">
+ <note>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcx3</xsl:with-param>
+ </xsl:call-template>
+ </note>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=534]">
+ <relatedItem type="original">
+ <xsl:call-template name="relatedTitle"/>
+ <xsl:call-template name="relatedName"/>
+ <xsl:if test="marc:subfield[@code='b' or @code='c']">
+ <originInfo>
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <publisher>
+ <xsl:value-of select="."/>
+ </publisher>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <edition>
+ <xsl:value-of select="."/>
+ </edition>
+ </xsl:for-each>
+ </originInfo>
+ </xsl:if>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ <xsl:for-each select="marc:subfield[@code='z']">
+ <identifier type="isbn">
+ <xsl:value-of select="."/>
+ </identifier>
+ </xsl:for-each>
+ <xsl:call-template name="relatedNote"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=700][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <name type="personal">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aq</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"/>
+ <xsl:call-template name="nameDate"/>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=710][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">dg</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"/>
+ </titleInfo>
+ <name type="corporate">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:variable name="tempNamePart">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">c</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">dgn</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="normalize-space($tempNamePart)">
+ <namePart>
+ <xsl:value-of select="$tempNamePart"/>
+ </namePart>
+ </xsl:if>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=711][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"/>
+ </titleInfo>
+ <name type="conference">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aqdc</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">gn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=730][@ind2=2]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=740][@ind2=2]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=760]|marc:datafield[@tag=762]">
+ <relatedItem type="series">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=765]|marc:datafield[@tag=767]|marc:datafield[@tag=777]|marc:datafield[@tag=787]">
+ <relatedItem>
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=775]">
+ <relatedItem type="otherVersion">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=770]|marc:datafield[@tag=774]">
+ <relatedItem type="constituent">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=772]|marc:datafield[@tag=773]">
+ <relatedItem type="host">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=776]">
+ <relatedItem type="otherFormat">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=780]">
+ <relatedItem type="preceding">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=785]">
+ <relatedItem type="succeeding">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=786]">
+ <relatedItem type="original">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=800]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <name type="personal">
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aq</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"/>
+ <xsl:call-template name="nameDate"/>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=810]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">dg</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"/>
+ </titleInfo>
+ <name type="corporate">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">c</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">dgn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=811]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"/>
+ </titleInfo>
+ <name type="conference">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aqdc</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">gn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=830]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=856][@ind2=2]/marc:subfield[@code='q']">
+ <relatedItem>
+ <internetMediaType>
+ <xsl:value-of select="."/>
+ </internetMediaType>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=020]">
+ <identifier type="isbn">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=024][@ind1=0]">
+ <identifier type="isrc">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=024][@ind1=2]">
+ <identifier type="ismn">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=022]">
+ <identifier type="issn">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=010]">
+ <identifier type="lccn">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="normalize-space(marc:subfield[@code='a'])"/>
+ </identifier>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=028]">
+ <identifier>
+ <xsl:attribute name="type">
+ <xsl:choose>
+ <xsl:when test="@ind1=0">issue number</xsl:when>
+ <xsl:when test="@ind1=1">matrix number</xsl:when>
+ <xsl:when test="@ind1=2">music plate</xsl:when>
+ <xsl:when test="@ind1=3">music publisher</xsl:when>
+ <xsl:when test="@ind1=4">videorecording identifier</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:call-template name="isInvalid"/>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">
+ <xsl:choose>
+ <xsl:when test="@ind1=0">ba</xsl:when>
+ <xsl:otherwise>ab</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=024][@ind1='4']">
+ <identifier type="sici">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=037]">
+ <identifier type="stock number">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=856][marc:subfield[@code='u']]">
+ <identifier>
+ <xsl:attribute name="type">
+ <xsl:choose>
+ <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:doi') or starts-with(marc:subfield[@code='u'],'doi')">doi</xsl:when>
+ <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl') or starts-with(marc:subfield[@code='u'],'http://hdl.loc.gov')">hdl</xsl:when>
+ <xsl:otherwise>uri</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl') or starts-with(marc:subfield[@code='u'],'http://hdl.loc.gov') ">
+ <xsl:value-of select="concat('hdl:',substring-after(marc:subfield[@code='u'],'http://hdl.loc.gov/'))"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="marc:subfield[@code='u']"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </identifier>
+ <xsl:if test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl')">
+ <identifier type="hdl">
+ <xsl:if test="marc:subfield[@code='y' or @code='3' or @code='z']">
+ <xsl:attribute name="displayLabel">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">y3z</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="concat('hdl:',substring-after(marc:subfield[@code='u'],'http://hdl.loc.gov/'))"/>
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=024][@ind1=1]">
+ <identifier type="upc">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:for-each>
+ <!-- 1/04 fix added $y -->
+ <xsl:for-each select="marc:datafield[@tag=856][marc:subfield[@code='u']]">
+ <location>
+ <url>
+ <xsl:if test="marc:subfield[@code='y' or @code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">y3</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="marc:subfield[@code='u']"/>
+ </url>
+ </location>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=852]">
+ <location>
+ <physicalLocation>
+ <xsl:call-template name="displayLabel"/>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abje</xsl:with-param>
+ </xsl:call-template>
+ </physicalLocation>
+ </location>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=506]">
+ <accessCondition type="restrictionOnAccess">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcd35</xsl:with-param>
+ </xsl:call-template>
+ </accessCondition>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=540]">
+ <accessCondition type="useAndReproduction">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcde35</xsl:with-param>
+ </xsl:call-template>
+ </accessCondition>
+ </xsl:for-each>
+
+ <recordInfo>
+ <xsl:for-each select="marc:datafield[@tag=040]">
+ <recordContentSource authority="marcorg">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </recordContentSource>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:controlfield[@tag=008]">
+ <recordCreationDate encoding="marc">
+ <xsl:value-of select="substring(.,1,6)"/>
+ </recordCreationDate>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:controlfield[@tag=005]">
+ <recordChangeDate encoding="iso8601">
+ <xsl:value-of select="."/>
+ </recordChangeDate>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:controlfield[@tag=001]">
+ <recordIdentifier>
+ <xsl:if test="../marc:controlfield[@tag=003]">
+ <xsl:attribute name="source">
+ <xsl:value-of select="../marc:controlfield[@tag=003]"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </recordIdentifier>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=040]/marc:subfield[@code='b']">
+ <languageOfCataloging>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="."/>
+ </languageTerm>
+ </languageOfCataloging>
+ </xsl:for-each>
+ </recordInfo>
+ </xsl:template>
+
+ <xsl:template name="displayForm">
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <displayForm>
+ <xsl:value-of select="."/>
+ </displayForm>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="affiliation">
+ <xsl:for-each select="marc:subfield[@code='u']">
+ <affiliation>
+ <xsl:value-of select="."/>
+ </affiliation>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="uri">
+ <xsl:for-each select="marc:subfield[@code='u']">
+ <xsl:attribute name="xlink:href">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="role">
+ <xsl:for-each select="marc:subfield[@code='e']">
+ <role>
+ <roleTerm type="text">
+ <xsl:value-of select="."/>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='4']">
+ <role>
+ <roleTerm authority="marcrelator" type="code">
+ <xsl:value-of select="."/>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="part">
+ <xsl:variable name="partNumber">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">n</xsl:with-param>
+ <xsl:with-param name="anyCodes">n</xsl:with-param>
+ <xsl:with-param name="afterCodes">fgkdlmor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="partName">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">p</xsl:with-param>
+ <xsl:with-param name="anyCodes">p</xsl:with-param>
+ <xsl:with-param name="afterCodes">fgkdlmor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="string-length(normalize-space($partNumber))">
+ <partNumber>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$partNumber"/>
+ </xsl:call-template>
+ </partNumber>
+ </xsl:if>
+ <xsl:if test="string-length(normalize-space($partName))">
+ <partName>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$partName"/>
+ </xsl:call-template>
+ </partName>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="relatedPart">
+ <xsl:if test="@tag=773">
+ <xsl:for-each select="marc:subfield[@code='g']">
+ <part>
+ <text>
+ <xsl:value-of select="."/>
+ </text>
+ </part>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='q']">
+ <part>
+ <xsl:call-template name="parsePart"/>
+ </part>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="relatedPartNumName">
+ <xsl:variable name="partNumber">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">g</xsl:with-param>
+ <xsl:with-param name="anyCodes">g</xsl:with-param>
+ <xsl:with-param name="afterCodes">pst</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="partName">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">p</xsl:with-param>
+ <xsl:with-param name="anyCodes">p</xsl:with-param>
+ <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="string-length(normalize-space($partNumber))">
+ <partNumber>
+ <xsl:value-of select="$partNumber"/>
+ </partNumber>
+ </xsl:if>
+ <xsl:if test="string-length(normalize-space($partName))">
+ <partName>
+ <xsl:value-of select="$partName"/>
+ </partName>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="relatedName">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <name>
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </name>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedForm">
+ <xsl:for-each select="marc:subfield[@code='h']">
+ <physicalDescription>
+ <form>
+ <xsl:value-of select="."/>
+ </form>
+ </physicalDescription>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedExtent">
+ <xsl:for-each select="marc:subfield[@code='h']">
+ <physicalDescription>
+ <extent>
+ <xsl:value-of select="."/>
+ </extent>
+ </physicalDescription>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedNote">
+ <xsl:for-each select="marc:subfield[@code='n']">
+ <note>
+ <xsl:value-of select="."/>
+ </note>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedSubject">
+ <xsl:for-each select="marc:subfield[@code='j']">
+ <subject>
+ <temporal encoding="iso8601">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </temporal>
+ </subject>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedIdentifierISSN">
+ <xsl:for-each select="marc:subfield[@code='x']">
+ <identifier type="issn">
+ <xsl:value-of select="."/>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedIdentifierLocal">
+ <xsl:for-each select="marc:subfield[@code='w']">
+ <identifier type="local">
+ <xsl:value-of select="."/>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedIdentifier">
+ <xsl:for-each select="marc:subfield[@code='o']">
+ <identifier>
+ <xsl:value-of select="."/>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedItem76X-78X">
+ <xsl:call-template name="displayLabel"/>
+ <xsl:call-template name="relatedTitle76X-78X"/>
+ <xsl:call-template name="relatedName"/>
+ <xsl:call-template name="relatedOriginInfo"/>
+ <xsl:call-template name="relatedLanguage"/>
+ <xsl:call-template name="relatedExtent"/>
+ <xsl:call-template name="relatedNote"/>
+ <xsl:call-template name="relatedSubject"/>
+ <xsl:call-template name="relatedIdentifier"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ <xsl:call-template name="relatedIdentifierLocal"/>
+ <xsl:call-template name="relatedPart"/>
+ </xsl:template>
+
+ <xsl:template name="subjectGeographicZ">
+ <geographic>
+
+
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </geographic>
+ </xsl:template>
+
+ <xsl:template name="subjectTemporalY">
+ <temporal>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </temporal>
+ </xsl:template>
+
+ <xsl:template name="subjectTopic">
+ <topic>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </topic>
+ </xsl:template>
+
+ <xsl:template name="nameABCDN">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">cdn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="nameABCDQ">
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">aq</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="punctuation">
+ <xsl:text>:,;/ </xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"/>
+ <xsl:call-template name="nameDate"/>
+ </xsl:template>
+
+ <xsl:template name="nameACDEQ">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">acdeq</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:template>
+
+ <xsl:template name="constituentOrRelatedType">
+ <xsl:if test="@ind2=2">
+ <xsl:attribute name="type">constituent</xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="relatedTitle">
+ <xsl:for-each select="marc:subfield[@code='t']">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ </titleInfo>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedTitle76X-78X">
+ <xsl:for-each select="marc:subfield[@code='t']">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"/>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='p']">
+ <titleInfo type="abbreviated">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"/>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='s']">
+ <titleInfo type="uniform">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"/>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedOriginInfo">
+ <xsl:if test="marc:subfield[@code='b' or @code='d'] or marc:subfield[@code='f']">
+ <originInfo>
+ <xsl:if test="@tag=775">
+ <xsl:for-each select="marc:subfield[@code='f']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">marcgac</xsl:attribute>
+ <xsl:value-of select="."/>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:for-each select="marc:subfield[@code='d']">
+ <publisher>
+ <xsl:value-of select="."/>
+ </publisher>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <edition>
+ <xsl:value-of select="."/>
+ </edition>
+ </xsl:for-each>
+ </originInfo>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="relatedLanguage">
+ <xsl:for-each select="marc:subfield[@code='e']">
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="nameDate">
+ <xsl:for-each select="marc:subfield[@code='d']">
+ <namePart type="date">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </namePart>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="subjectAuthority">
+
+ <xsl:if test="@ind2!=4">
+ <xsl:if test="@ind2!=' '">
+ <xsl:if test="@ind2!=8">
+ <xsl:if test="@ind2!=9">
+ <xsl:attribute name="authority">
+ <xsl:choose>
+
+ <xsl:when test="@ind2=0">lcsh</xsl:when>
+ <xsl:when test="@ind2=1">lcshac</xsl:when>
+ <xsl:when test="@ind2=2">mesh</xsl:when>
+ <!-- 1/04 fix -->
+ <xsl:when test="@ind2=3">nal</xsl:when>
+ <xsl:when test="@ind2=5">csh</xsl:when>
+ <xsl:when test="@ind2=6">rvm</xsl:when>
+ <xsl:when test="@ind2=7">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="subjectAnyOrder">
+ <xsl:for-each select="marc:subfield[@code='v' or @code='x' or @code='y' or @code='z']">
+ <xsl:choose>
+ <xsl:when test="@code='v'">
+ <xsl:call-template name="subjectTopic"/>
+ </xsl:when>
+ <xsl:when test="@code='x'">
+ <xsl:call-template name="subjectTopic"/>
+ </xsl:when>
+ <xsl:when test="@code='y'">
+ <xsl:call-template name="subjectTemporalY"/>
+ </xsl:when>
+ <xsl:when test="@code='z'">
+ <xsl:call-template name="subjectGeographicZ"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="specialSubfieldSelect">
+ <xsl:param name="anyCodes"/>
+ <xsl:param name="axis"/>
+ <xsl:param name="beforeCodes"/>
+ <xsl:param name="afterCodes"/>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="contains($anyCodes, @code) or (contains($beforeCodes,@code) and following-sibling::marc:subfield[@code=$axis]) or (contains($afterCodes,@code) and preceding-sibling::marc:subfield[@code=$axis])">
+ <xsl:value-of select="text()"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </xsl:template>
+
+ <xsl:template match="marc:datafield[@tag=600]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <name type="personal">
+ <xsl:call-template name="termsOfAddress"/>
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">aq</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="nameDate"/>
+ <xsl:call-template name="affiliation"/>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+
+ <xsl:template match="marc:datafield[@tag=610]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <name type="corporate">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:if test="marc:subfield[@code='c' or @code='d' or @code='n' or @code='p']">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">cdnp</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:if>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+
+ <xsl:template match="marc:datafield[@tag=611]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <name type="conference">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcdeqnp</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:for-each select="marc:subfield[@code='4']">
+ <role>
+ <roleTerm authority="marcrelator" type="code">
+ <xsl:value-of select="."/>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+
+ <xsl:template match="marc:datafield[@tag=630]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfhklor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:call-template name="part"/>
+ </title>
+ </titleInfo>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+
+ <xsl:template match="marc:datafield[@tag=650]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <topic>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcd</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </topic>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+
+ <xsl:template match="marc:datafield[@tag=651]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <xsl:for-each select="marc:subfield[@code='a']">
+
+ <geographic>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </geographic>
+ </xsl:for-each>
+
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+
+ <xsl:template match="marc:datafield[@tag=653]">
+ <subject>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <topic>
+ <xsl:value-of select="."/>
+ </topic>
+ </xsl:for-each>
+ </subject>
+ </xsl:template>
+
+ <xsl:template match="marc:datafield[@tag=656]">
+ <subject>
+ <xsl:if test="marc:subfield[@code=2]">
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code=2]"/>
+ </xsl:attribute>
+ </xsl:if>
+ <occupation>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </occupation>
+ </subject>
+ </xsl:template>
+
+ <xsl:template name="termsOfAddress">
+ <xsl:if test="marc:subfield[@code='b' or @code='c']">
+ <namePart type="termsOfAddress">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">bc</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="displayLabel">
+ <xsl:if test="marc:subfield[@code='i']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="marc:subfield[@code='i']"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="marc:subfield[@code='3']"/>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="isInvalid">
+ <xsl:if test="marc:subfield[@code='z']">
+ <xsl:attribute name="invalid">yes</xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="subtitle">
+ <xsl:if test="marc:subfield[@code='b']">
+ <subTitle>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='b']"/>
+
+ <!--<xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">b</xsl:with-param>
+ </xsl:call-template>-->
+ </xsl:with-param>
+ </xsl:call-template>
+ </subTitle>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="script">
+ <xsl:param name="scriptCode"/>
+ <xsl:attribute name="script">
+ <xsl:choose>
+ <xsl:when test="$scriptCode='(3'">Arabic</xsl:when>
+ <xsl:when test="$scriptCode='(B'">Latin</xsl:when>
+ <xsl:when test="$scriptCode='$1'">Chinese, Japanese, Korean</xsl:when>
+ <xsl:when test="$scriptCode='(N'">Cyrillic</xsl:when>
+ <xsl:when test="$scriptCode='(2'">Hebrew</xsl:when>
+ <xsl:when test="$scriptCode='(S'">Greek</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template name="parsePart">
+ <!-- assumes 773$q= 1:2:3<4
+ with up to 3 levels and one optional start page
+ -->
+ <xsl:variable name="level1">
+ <xsl:choose>
+ <xsl:when test="contains(text(),':')">
+ <!-- 1:2 -->
+ <xsl:value-of select="substring-before(text(),':')"/>
+ </xsl:when>
+ <xsl:when test="not(contains(text(),':'))">
+ <!-- 1 or 1<3 -->
+ <xsl:if test="contains(text(),'&lt;')">
+ <!-- 1<3 -->
+ <xsl:value-of select="substring-before(text(),'&lt;')"/>
+ </xsl:if>
+ <xsl:if test="not(contains(text(),'&lt;'))">
+ <!-- 1 -->
+ <xsl:value-of select="text()"/>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="sici2">
+ <xsl:choose>
+ <xsl:when test="starts-with(substring-after(text(),$level1),':')">
+ <xsl:value-of select="substring(substring-after(text(),$level1),2)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-after(text(),$level1)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="level2">
+ <xsl:choose>
+ <xsl:when test="contains($sici2,':')">
+ <!-- 2:3<4 -->
+ <xsl:value-of select="substring-before($sici2,':')"/>
+ </xsl:when>
+ <xsl:when test="contains($sici2,'&lt;')">
+ <!-- 1: 2<4 -->
+ <xsl:value-of select="substring-before($sici2,'&lt;')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$sici2"/>
+ <!-- 1:2 -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="sici3">
+ <xsl:choose>
+ <xsl:when test="starts-with(substring-after($sici2,$level2),':')">
+ <xsl:value-of select="substring(substring-after($sici2,$level2),2)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-after($sici2,$level2)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="level3">
+ <xsl:choose>
+ <xsl:when test="contains($sici3,'&lt;')">
+ <!-- 2<4 -->
+ <xsl:value-of select="substring-before($sici3,'&lt;')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$sici3"/>
+ <!-- 3 -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="page">
+ <xsl:if test="contains(text(),'&lt;')">
+ <xsl:value-of select="substring-after(text(),'&lt;')"/>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:if test="$level1">
+ <detail level="1">
+ <number>
+ <xsl:value-of select="$level1"/>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$level2">
+ <detail level="2">
+ <number>
+ <xsl:value-of select="$level2"/>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$level3">
+ <detail level="3">
+ <number>
+ <xsl:value-of select="$level3"/>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$page">
+ <extent unit="page">
+ <start>
+ <xsl:value-of select="$page"/>
+ </start>
+ </extent>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="getLanguage">
+ <xsl:param name="langString"/>
+ <xsl:param name="controlField008-35-37"/>
+ <xsl:variable name="length" select="string-length($langString)"/>
+ <xsl:choose>
+ <xsl:when test="$length=0"/>
+ <xsl:when test="$controlField008-35-37=substring($langString,1,3)">
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString" select="substring($langString,4,$length)"/>
+ <xsl:with-param name="controlField008-35-37" select="$controlField008-35-37"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <language>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="substring($langString,1,3)"/>
+ </languageTerm>
+ </language>
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString" select="substring($langString,4,$length)"/>
+ <xsl:with-param name="controlField008-35-37" select="$controlField008-35-37"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="isoLanguage">
+ <xsl:param name="currentLanguage"/>
+ <xsl:param name="usedLanguages"/>
+ <xsl:param name="remainingLanguages"/>
+ <xsl:choose>
+ <xsl:when test="string-length($currentLanguage)=0"/>
+ <xsl:when test="not(contains($usedLanguages, $currentLanguage))">
+ <language>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="$currentLanguage"/>
+ </languageTerm>
+ </language>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($remainingLanguages,1,3)"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:value-of select="concat($usedLanguages,$currentLanguage)"/>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of select="substring($remainingLanguages,4,string-length($remainingLanguages))"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($remainingLanguages,1,3)"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:value-of select="concat($usedLanguages,$currentLanguage)"/>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of select="substring($remainingLanguages,4,string-length($remainingLanguages))"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="chopBrackets">
+ <xsl:param name="chopString"/>
+ <xsl:variable name="string">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$chopString"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="substring($string, 1,1)='['">
+ <xsl:value-of select="substring($string,2, string-length($string)-2)"/>
+ </xsl:if>
+ <xsl:if test="substring($string, 1,1)!='['">
+ <xsl:value-of select="$string"/>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="rfcLanguages">
+ <xsl:param name="nodeNum"/>
+ <xsl:param name="usedLanguages"/>
+ <xsl:param name="controlField008-35-37"/>
+ <!-- ??? xalan -->
+
+ <xsl:variable name="currentLanguage" select="marc:subfield[position()=$nodeNum]/text()"/>
+ <xsl:choose>
+ <xsl:when test="not($currentLanguage)"/>
+ <xsl:when test="$currentLanguage!=$controlField008-35-37 and $currentLanguage!='rfc3066'">
+ <xsl:if test="not(contains($usedLanguages,$currentLanguage))">
+ <language>
+ <languageTerm authority="rfc3066" type="code">
+ <xsl:value-of select="$currentLanguage"/>
+ </languageTerm>
+ </language>
+ </xsl:if>
+ <xsl:call-template name="rfcLanguages">
+ <!-- ??? xalan -->
+ <xsl:with-param name="nodeNum">
+ <xsl:value-of select="$nodeNum+1"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:value-of select="concat($usedLanguages,'|',$currentLanguage)"/>
+ </xsl:with-param>
+ <xsl:with-param name="controlField008-35-37">
+ <xsl:value-of select="$controlField008-35-37"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="rfcLanguages">
+ <xsl:with-param name="nodeNum">
+ <xsl:value-of select="$nodeNum+1"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:value-of select="concat($usedLanguages,$currentLanguage)"/>
+ </xsl:with-param>
+ <xsl:with-param name="controlField008-35-37">
+ <xsl:value-of select="$controlField008-35-37"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2005. Progress Software Corporation. All rights reserved.
+<metaInformation>
+<scenarios ><scenario default="no" name="Apr 02 Test" userelativepaths="yes" externalpreview="no" url="file:///n:/jackie/test_files/v3.xml" htmlbaseurl="" outputurl="file:///n:/temp/x.xml" processortype="xalan" useresolver="no" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/><scenario default="yes" name="v3Test1" userelativepaths="yes" externalpreview="yes" url="MARCTest2.xml" htmlbaseurl="" outputurl="file:///n:/jackie/test_files/modsv3Converted.xml" processortype="internal" useresolver="no" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/><scenario default="no" name="Scenario1" userelativepaths="yes" externalpreview="no" url="file:///n:/ckeith/DESKTOP/test.xml" htmlbaseurl="" outputurl="" processortype="xalan" useresolver="no" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/><scenario default="no" name="Test" userelativepaths="yes" externalpreview="no" url="file:///n:/jackie/MARCXML/marcxmlfile.xml" htmlbaseurl="" outputurl="" processortype="xalan" useresolver="no" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
+</metaInformation>
+-->
+
diff --git a/xslt/MARC21slimUtils.xsl b/xslt/MARC21slimUtils.xsl
new file mode 100644
index 0000000..b85a257
--- /dev/null
+++ b/xslt/MARC21slimUtils.xsl
@@ -0,0 +1,82 @@
+<?xml version='1.0'?>
+<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- This file is in the public domain. -->
+
+<!-- 8/19/04: ntra added "marc:" prefix to datafield element -->
+ <xsl:template name="datafield">
+ <xsl:param name="tag"/>
+ <xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
+ <xsl:param name="ind2"><xsl:text> </xsl:text></xsl:param>
+ <xsl:param name="subfields"/>
+ <xsl:element name="marc:datafield">
+ <xsl:attribute name="tag">
+ <xsl:value-of select="$tag"/>
+ </xsl:attribute>
+ <xsl:attribute name="ind1">
+ <xsl:value-of select="$ind1"/>
+ </xsl:attribute>
+ <xsl:attribute name="ind2">
+ <xsl:value-of select="$ind2"/>
+ </xsl:attribute>
+ <xsl:copy-of select="$subfields"/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template name="subfieldSelect">
+ <xsl:param name="codes"/>
+ <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="contains($codes, @code)">
+ <xsl:value-of select="text()"/><xsl:value-of select="$delimeter"/>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
+ </xsl:template>
+
+ <xsl:template name="buildSpaces">
+ <xsl:param name="spaces"/>
+ <xsl:param name="char"><xsl:text> </xsl:text></xsl:param>
+ <xsl:if test="$spaces>0">
+ <xsl:value-of select="$char"/>
+ <xsl:call-template name="buildSpaces">
+ <xsl:with-param name="spaces" select="$spaces - 1"/>
+ <xsl:with-param name="char" select="$char"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="chopPunctuation">
+ <xsl:param name="chopString"/>
+ <xsl:param name="punctuation"><xsl:text>.:,;/ </xsl:text></xsl:param>
+ <xsl:variable name="length" select="string-length($chopString)"/>
+ <xsl:choose>
+ <xsl:when test="$length=0"/>
+ <xsl:when test="contains($punctuation, substring($chopString,$length,1))">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
+ <xsl:with-param name="punctuation" select="$punctuation"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="not($chopString)"/>
+ <xsl:otherwise><xsl:value-of select="$chopString"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="chopPunctuationFront">
+ <xsl:param name="chopString"/>
+ <xsl:variable name="length" select="string-length($chopString)"/>
+ <xsl:choose>
+ <xsl:when test="$length=0"/>
+ <xsl:when test="contains('.:,;/[ ', substring($chopString,1,1))">
+ <xsl:call-template name="chopPunctuationFront">
+ <xsl:with-param name="chopString" select="substring($chopString,2,$length - 1)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="not($chopString)"/>
+ <xsl:otherwise><xsl:value-of select="$chopString"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/xslt/Makefile.am b/xslt/Makefile.am
new file mode 100644
index 0000000..4fec92b
--- /dev/null
+++ b/xslt/Makefile.am
@@ -0,0 +1,2 @@
+kbibtex_xslt_DATA = html.xsl MARC21slim2MODS3.xsl MARC21slimUtils.xsl UNIMARC2MODS3.xsl
+kbibtex_xsltdir = $(kde_datadir)/kbibtexpart/xslt
diff --git a/xslt/Makefile.in b/xslt/Makefile.in
new file mode 100644
index 0000000..f1bc492
--- /dev/null
+++ b/xslt/Makefile.in
@@ -0,0 +1,589 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 483858 $
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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 = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = xslt
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(kbibtex_xsltdir)"
+kbibtex_xsltDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(kbibtex_xslt_DATA)
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSCCONFIG = @ARTSCCONFIG@
+AUTOCONF = @AUTOCONF@
+AUTODIRS = @AUTODIRS@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOPIDLNG = @DCOPIDLNG@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KCFG_DEPENDENCIES = @KCFG_DEPENDENCIES@
+KCONFIG_COMPILER = @KCONFIG_COMPILER@
+KDECONFIG = @KDECONFIG@
+KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_RPATH = @KDE_RPATH@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_FPIE = @KDE_USE_FPIE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+KDE_USE_PIE = @KDE_USE_PIE@
+KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@
+LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LIBXSLT_CFLAGS = @LIBXSLT_CFLAGS@
+LIBXSLT_LIBS = @LIBXSLT_LIBS@
+LIBYAZ_CFLAGS = @LIBYAZ_CFLAGS@
+LIBYAZ_LIBS = @LIBYAZ_LIBS@
+LIBYAZ_RPATH = @LIBYAZ_RPATH@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KABC = @LIB_KABC@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDED = @LIB_KDED@
+LIB_KDEPIM = @LIB_KDEPIM@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KDNSSD = @LIB_KDNSSD@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIMPROXY = @LIB_KIMPROXY@
+LIB_KIO = @LIB_KIO@
+LIB_KJS = @LIB_KJS@
+LIB_KNEWSTUFF = @LIB_KNEWSTUFF@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_KUNITTEST = @LIB_KUNITTEST@
+LIB_KUTILS = @LIB_KUTILS@
+LIB_POLL = @LIB_POLL@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LIB_XRENDER = @LIB_XRENDER@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKEKDEWIDGETS = @MAKEKDEWIDGETS@
+MCOPIDL = @MCOPIDL@
+MEINPROC = @MEINPROC@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJEXT = @OBJEXT@
+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@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+QTE_NORTTI = @QTE_NORTTI@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+XGETTEXT = @XGETTEXT@
+XMKMF = @XMKMF@
+XMLLINT = @XMLLINT@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+X_PRE_LIBS = @X_PRE_LIBS@
+X_RPATH = @X_RPATH@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+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@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+include_ARTS_FALSE = @include_ARTS_FALSE@
+include_ARTS_TRUE = @include_ARTS_TRUE@
+include_x11_FALSE = @include_x11_FALSE@
+include_x11_TRUE = @include_x11_TRUE@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_kcfgdir = @kde_kcfgdir@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+kdeinitdir = @kdeinitdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@
+unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+xdg_appsdir = @xdg_appsdir@
+xdg_directorydir = @xdg_directorydir@
+xdg_menudir = @xdg_menudir@
+kbibtex_xslt_DATA = html.xsl MARC21slim2MODS3.xsl MARC21slimUtils.xsl UNIMARC2MODS3.xsl
+kbibtex_xsltdir = $(kde_datadir)/kbibtexpart/xslt
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu xslt/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu xslt/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu xslt/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu xslt/Makefile
+ cd $(top_srcdir) && perl admin/am_edit xslt/Makefile.in
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+install-kbibtex_xsltDATA: $(kbibtex_xslt_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(kbibtex_xsltdir)" || $(mkdir_p) "$(DESTDIR)$(kbibtex_xsltdir)"
+ @list='$(kbibtex_xslt_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(kbibtex_xsltDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(kbibtex_xsltdir)/$$f'"; \
+ $(kbibtex_xsltDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(kbibtex_xsltdir)/$$f"; \
+ done
+
+uninstall-kbibtex_xsltDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(kbibtex_xslt_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(kbibtex_xsltdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(kbibtex_xsltdir)/$$f"; \
+ done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+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"; \
+ $(mkdir_p) "$(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 $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(kbibtex_xsltdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || 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
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libtool mostlyclean-am
+#>+ 1
+clean-am: clean-bcheck 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:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-kbibtex_xsltDATA
+
+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-kbibtex_xsltDATA
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-exec install-exec-am \
+ install-info install-info-am install-kbibtex_xsltDATA \
+ 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-kbibtex_xsltDATA
+
+# 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:
+
+#>+ 2
+KDE_DIST=MARC21slim2MODS3.xsl Makefile.in UNIMARC2MODS3.xsl html.xsl MARC21slimUtils.xsl Makefile.am
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu xslt/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu xslt/Makefile
+ cd $(top_srcdir) && perl admin/am_edit xslt/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXX) $(DEFS) -I. -I$(srcdir) -I$(top_builddir) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/xslt/UNIMARC2MODS3.xsl b/xslt/UNIMARC2MODS3.xsl
new file mode 100644
index 0000000..af008cb
--- /dev/null
+++ b/xslt/UNIMARC2MODS3.xsl
@@ -0,0 +1,2920 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns="http://www.loc.gov/mods/v3" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xlink marc">
+ <xsl:include href="MARC21slimUtils.xsl"/>
+ <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
+
+<!-- This file is in the public domain. -->
+
+<!--
+
+Revised version of MARC21slim2MODS3.xsl from Library of Congress
+with input from Yves Pratter's version of UNIMARC2MODS.xsl
+
+-->
+ <xsl:template match="/">
+ <modsCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-1.xsd">
+ <xsl:for-each select=".//marc:record">
+ <mods version="3.1">
+ <xsl:call-template name="marcRecord"/>
+ </mods>
+ </xsl:for-each>
+ </modsCollection>
+ </xsl:template>
+
+ <xsl:template name="marcRecord">
+ <xsl:variable name="leader" select="marc:leader"/>
+ <xsl:variable name="leader6" select="substring($leader,7,1)"/>
+ <xsl:variable name="leader7" select="substring($leader,8,1)"/>
+ <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
+ <xsl:variable name="typeOf008">
+ <xsl:choose>
+ <xsl:when test="$leader6='a'">
+ <xsl:choose>
+ <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
+ <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">SE</xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$leader6='t'">BK</xsl:when>
+ <xsl:when test="$leader6='p'">MM</xsl:when>
+ <xsl:when test="$leader6='m'">CF</xsl:when>
+ <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
+ <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">VM</xsl:when>
+ <xsl:when test="$leader6='c' or $leader6='d' or $leader6='i' or $leader6='j'">MU</xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- MARC21 tag 245 - TITLE STATEMENT -->
+ <xsl:for-each select="marc:datafield[@tag=200]">
+ <titleInfo>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code='e']">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">e</xsl:with-param>
+ <xsl:with-param name="beforeCodes">a</xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ae</xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="$title"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="@ind2&gt;0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1,@ind2)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop,@ind2+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:when test="contains($title,'ˆ') and contains($title,'‰')">
+ <nonSort>
+ <xsl:value-of select="substring(substring-before($title,'‰'),2)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring-after($title,'‰')"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop"/>
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="marc:subfield[@code='e']">
+ <subTitle>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">e</xsl:with-param>
+ <xsl:with-param name="anyCodes">e</xsl:with-param>
+ <xsl:with-param name="afterCodes">a</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </subTitle>
+ </xsl:if>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+
+ <!-- MARC21 - ABBREVIATED TITLE / tag 210 ab -->
+ <xsl:for-each select="marc:datafield[@tag=531]">
+ <titleInfo type="abbreviated">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">a</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="subtitle"/>
+ </titleInfo>
+ </xsl:for-each>
+
+ <!-- MARC21 - translated title / 242 -->
+ <xsl:for-each select="marc:datafield[@tag=541]">
+ <titleInfo type="translated">
+ <!-- 541/z is 242/y -->
+ <xsl:for-each select="marc:subfield[@code='z']">
+ <xsl:attribute name="lang">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <title>
+
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">a</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ </title>
+
+
+ <!-- 1/04 fix -->
+ <xsl:call-template name="subtitle"/>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+
+ <!-- MARC21 - Expanded title / 246 -->
+ <xsl:for-each select="marc:datafield[@tag=532]|marc:datafield[@tag=540]">
+ <titleInfo type="alternative">
+ <xsl:for-each select="marc:subfield[@code='i']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <!-- 1/04 removed $h, $b -->
+ <xsl:with-param name="codes">af</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="subtitle"/>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+
+ <!-- MARC21 - Expanded title / 130, 240, 730i2 -->
+ <xsl:for-each select="marc:datafield[@tag=500]">
+ <titleInfo type="uniform">
+ <title>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="(contains('anklmrtuv',@code) and (not(../marc:subfield[@code='h' or @code='s' or @code='i']) or (following-sibling::marc:subfield[@code='h' or @code='s' or @code='i'])))">
+ <xsl:value-of select="text()"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+
+ <!--
+ <xsl:for-each select="marc:datafield[@tag=740][@ind2!=2]">
+ <titleInfo type="alternative">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ah</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+-->
+
+ <!-- MARC21 - creator / 100 -->
+ <xsl:for-each select="marc:datafield[@tag=700]">
+ <name type="personal">
+ <xsl:call-template name="nameABCDFG"/>
+ <xsl:call-template name="affiliation"/>
+ <role>
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
+ </role>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+
+ <!-- MARC21 - creator / 110 and 111 -->
+ <xsl:for-each select="marc:datafield[@tag=710]">
+ <name>
+ <xsl:if test="@ind1=0">
+ <xsl:attribute name="type">
+ <xsl:text>corporate</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@ind1=1">
+ <xsl:attribute name="type">
+ <xsl:text>conference</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="nameABCDEF"/>
+ <role>
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
+ </role>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+
+ <!-- MARC21 - creator / 700 -->
+ <xsl:for-each select="marc:datafield[@tag=701 or @tag=702]">
+ <name type="personal">
+ <xsl:call-template name="nameABCDFG"/>
+ <xsl:call-template name="affiliation"/>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+
+ <!-- MARC21 - creator / 710 and 711 -->
+ <xsl:for-each select="marc:datafield[@tag=711 or @tag=712]">
+ <name>
+ <xsl:if test="@ind1=0">
+ <xsl:attribute name="type">
+ <xsl:text>corporate</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@ind1=1">
+ <xsl:attribute name="type">
+ <xsl:text>conference</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="nameABCDEF"/>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+
+<!--
+ <xsl:for-each select="marc:datafield[@tag=720][not(marc:subfield[@code='t'])]">
+ <name>
+ <xsl:if test="@ind1=1">
+ <xsl:attribute name="type">
+ <xsl:text>personal</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <namePart>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </namePart>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+-->
+
+ <typeOfResource>
+ <xsl:if test="$leader7='c'">
+ <xsl:attribute name="collection">yes</xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">
+ <xsl:attribute name="manuscript">yes</xsl:attribute>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$leader6='a' or $leader6='b' or $leader6='h' or $leader6='t'">text</xsl:when>
+ <xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>
+ <xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>
+ <xsl:when test="$leader6='i'">sound recording-nonmusical</xsl:when>
+ <xsl:when test="$leader6='j'">sound recording-musical</xsl:when>
+ <xsl:when test="$leader6='k'">still image</xsl:when>
+ <xsl:when test="$leader6='g'">moving image</xsl:when>
+ <xsl:when test="$leader6='n'">three dimensional object</xsl:when>
+ <xsl:when test="$leader6='l'">software, multimedia</xsl:when>
+ <xsl:when test="$leader6='p'">mixed material</xsl:when>
+ </xsl:choose>
+ </typeOfResource>
+
+ <!-- MARC21 controlField008 -->
+ <xsl:if test="substring(marc:field[@tag=124],26,1)='d'">
+ <genre authority="marc">globe</genre>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
+ <genre authority="marc">remote sensing image</genre>
+ </xsl:if>
+
+ <xsl:if test="$typeOf008='MP'">
+ <xsl:variable name="controlField008-25" select="substring($controlField008,26,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-25='a' or $controlField008-25='b' or $controlField008-25='c' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
+ <genre authority="marc">map</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-25='e' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
+ <genre authority="marc">atlas</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="$typeOf008='SE'">
+ <xsl:variable name="controlField008-21" select="substring($controlField008,22,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-21='d'">
+ <genre authority="marc">database</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='l'">
+ <genre authority="marc">loose-leaf</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='m'">
+ <genre authority="marc">series</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='n'">
+ <genre authority="marc">newspaper</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='p'">
+ <genre authority="marc">periodical</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='w'">
+ <genre authority="marc">web site</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="$typeOf008='BK' or $typeOf008='SE'">
+ <xsl:variable name="controlField008-24" select="substring($controlField008,25,4)"/>
+ <xsl:choose>
+ <xsl:when test="contains($controlField008-24,'a')">
+ <genre authority="marc">abstract or summary</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'b')">
+ <genre authority="marc">bibliography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'c')">
+ <genre authority="marc">catalog</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'d')">
+ <genre authority="marc">dictionary</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'e')">
+ <genre authority="marc">encyclopedia</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'f')">
+ <genre authority="marc">handbook</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'g')">
+ <genre authority="marc">legal article</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'i')">
+ <genre authority="marc">index</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'k')">
+ <genre authority="marc">discography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'l')">
+ <genre authority="marc">legislation</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'m')">
+ <genre authority="marc">theses</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'n')">
+ <genre authority="marc">survey of literature</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'o')">
+ <genre authority="marc">review</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'p')">
+ <genre authority="marc">programmed text</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'q')">
+ <genre authority="marc">filmography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'r')">
+ <genre authority="marc">directory</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'s')">
+ <genre authority="marc">statistics</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'t')">
+ <genre authority="marc">technical report</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'v')">
+ <genre authority="marc">legal case and case notes</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'w')">
+ <genre authority="marc">law report or digest</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'z')">
+ <genre authority="marc">treaty</genre>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-29='1'">
+ <genre authority="marc">conference publication</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="$typeOf008='CF'">
+ <xsl:variable name="controlField008-26" select="substring($controlField008,27,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-26='a'">
+ <genre authority="marc">numeric data</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='e'">
+ <genre authority="marc">database</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='f'">
+ <genre authority="marc">font</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='g'">
+ <genre authority="marc">game</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="$typeOf008='BK'">
+ <xsl:if test="substring($controlField008,25,1)='j'">
+ <genre authority="marc">patent</genre>
+ </xsl:if>
+ <xsl:if test="substring($controlField008,31,1)='1'">
+ <genre authority="marc">festschrift</genre>
+ </xsl:if>
+
+ <xsl:variable name="controlField008-34" select="substring($controlField008,35,1)"/>
+ <xsl:if test="$controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d'">
+ <genre authority="marc">biography</genre>
+ </xsl:if>
+
+ <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-33='e'">
+ <genre authority="marc">essay</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='d'">
+ <genre authority="marc">drama</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='c'">
+ <genre authority="marc">comic strip</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='l'">
+ <genre authority="marc">fiction</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='h'">
+ <genre authority="marc">humor, satire</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='i'">
+ <genre authority="marc">letter</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='f'">
+ <genre authority="marc">novel</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='j'">
+ <genre authority="marc">short story</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='s'">
+ <genre authority="marc">speech</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="$typeOf008='MU'">
+ <xsl:variable name="controlField008-30-31" select="substring($controlField008,31,2)"/>
+ <xsl:if test="contains($controlField008-30-31,'b')">
+ <genre authority="marc">biography</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'c')">
+ <genre authority="marc">conference publication</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'d')">
+ <genre authority="marc">drama</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'e')">
+ <genre authority="marc">essay</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'f')">
+ <genre authority="marc">fiction</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'o')">
+ <genre authority="marc">folktale</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'h')">
+ <genre authority="marc">history</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'k')">
+ <genre authority="marc">humor, satire</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'m')">
+ <genre authority="marc">memoir</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'p')">
+ <genre authority="marc">poetry</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'r')">
+ <genre authority="marc">rehearsal</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'g')">
+ <genre authority="marc">reporting</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'s')">
+ <genre authority="marc">sound</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'l')">
+ <genre authority="marc">speech</genre>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="$typeOf008='VM'">
+ <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-33='a'">
+ <genre authority="marc">art original</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='b'">
+ <genre authority="marc">kit</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='c'">
+ <genre authority="marc">art reproduction</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='d'">
+ <genre authority="marc">diorama</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='f'">
+ <genre authority="marc">filmstrip</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='g'">
+ <genre authority="marc">legal article</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='i'">
+ <genre authority="marc">picture</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='k'">
+ <genre authority="marc">graphic</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='l'">
+ <genre authority="marc">technical drawing</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='m'">
+ <genre authority="marc">motion picture</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='n'">
+ <genre authority="marc">chart</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='o'">
+ <genre authority="marc">flash card</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='p'">
+ <genre authority="marc">microscope slide</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='q' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
+ <genre authority="marc">model</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='r'">
+ <genre authority="marc">realia</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='s'">
+ <genre authority="marc">slide</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='t'">
+ <genre authority="marc">transparency</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='v'">
+ <genre authority="marc">videorecording</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='w'">
+ <genre authority="marc">toy</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:for-each select="marc:datafield[@tag=655]">
+ <genre authority="marc">
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:attribute>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abvxyz</xsl:with-param>
+ <xsl:with-param name="delimeter">-</xsl:with-param>
+ </xsl:call-template>
+ </genre>
+ </xsl:for-each>
+
+ <originInfo>
+ <xsl:variable name="MARCpublicationCode" select="normalize-space(substring($controlField008,16,3))"/>
+
+ <xsl:if test="translate($MARCpublicationCode,'|','')">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">marccountry</xsl:attribute>
+ <xsl:value-of select="$MARCpublicationCode"/>
+ </placeTerm>
+ </place>
+ </xsl:if>
+
+ <!-- MARC21 44a -->
+ <xsl:for-each select="marc:datafield[@tag=102]/marc:subfield[@code='a']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">iso3166</xsl:attribute>
+ <xsl:value-of select="."/>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+
+ <!-- MARC21 260a -->
+ <xsl:for-each select="marc:datafield[@tag=210]/marc:subfield[@code='a']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">text</xsl:attribute>
+ <xsl:call-template name="chopPunctuationFront">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ <xsl:with-param name="chopString" select="../marc:subfield[@code='a']"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+
+ <!-- Unknown -->
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='m']">
+ <dateValid point="start">
+ <xsl:value-of select="."/>
+ </dateValid>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='n']">
+ <dateValid point="end">
+ <xsl:value-of select="."/>
+ </dateValid>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='j']">
+ <dateModified>
+ <xsl:value-of select="."/>
+ </dateModified>
+ </xsl:for-each>
+
+ <!-- MARC21 260bcg -->
+ <xsl:for-each select="marc:datafield[@tag=210]/marc:subfield[@code='c' or @code='d' or @code='h']">
+ <xsl:choose>
+ <xsl:when test="@code='c'">
+ <publisher>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ <xsl:with-param name="punctuation">
+ <xsl:text>:,;/ </xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </publisher>
+ </xsl:when>
+ <xsl:when test="@code='d'">
+ <dateIssued>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="chopPunctuationFront">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="punctuation"> <!-- add closing bracket -->
+ <xsl:text>:,;/] </xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </dateIssued>
+ </xsl:when>
+ <xsl:when test="@code='h'">
+ <dateCreated>
+ <xsl:value-of select="."/>
+ </dateCreated>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+
+ <!-- Unknown
+ <xsl:variable name="dataField260d">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="marc:datafield[@tag=260]/marc:subfield[@code='d']"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="controlField008-7-10" select="normalize-space(substring($controlField008, 8, 4))"/>
+ <xsl:variable name="controlField008-11-14" select="normalize-space(substring($controlField008, 12, 4))"/>
+ <xsl:variable name="controlField008-6" select="normalize-space(substring($controlField008, 7, 1))"/>
+
+ <xsl:if test="$controlField008-6='e' or $controlField008-6='p' or $controlField008-6='r' or $controlField008-6='t' or $controlField008-6='s'">
+ <xsl:if test="$controlField008-7-10 and ($controlField008-7-10 != $dataField260d)">
+ <dateIssued encoding="marc">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">
+ <xsl:if test="$controlField008-7-10">
+ <dateIssued encoding="marc" point="start">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">
+ <xsl:if test="$controlField008-11-14">
+ <dateIssued encoding="marc" point="end">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="$controlField008-6='q'">
+ <xsl:if test="$controlField008-7-10">
+ <dateIssued encoding="marc" point="start" qualifier="questionable">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="$controlField008-6='q'">
+ <xsl:if test="$controlField008-11-14">
+ <dateIssued encoding="marc" point="end" qualifier="questionable">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="$controlField008-6='t'">
+ <xsl:if test="$controlField008-11-14">
+ <copyrightDate encoding="marc">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </copyrightDate>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:for-each select="marc:datafield[@tag=033][@ind1=0 or @ind1=1]/marc:subfield[@code='a']">
+ <dateCaptured encoding="iso8601">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][1]">
+ <dateCaptured encoding="iso8601" point="start">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][2]">
+ <dateCaptured encoding="iso8601" point="end">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+-->
+
+ <!-- MARC21 250a -->
+ <xsl:for-each select="marc:datafield[@tag=205]/marc:subfield[@code='a']">
+ <edition>
+ <xsl:value-of select="."/>
+ </edition>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:leader">
+ <issuance>
+ <xsl:choose>
+ <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">monographic</xsl:when>
+ <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">continuing</xsl:when>
+ </xsl:choose>
+ </issuance>
+ </xsl:for-each>
+
+ <!-- MARC21 310 and 321 -->
+ <xsl:for-each select="marc:datafield[@tag=326]">
+ <frequency>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </frequency>
+ </xsl:for-each>
+ </originInfo>
+
+ <xsl:for-each select="marc:datafield[@tag=101]">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <language>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="text()"/>
+ </languageTerm>
+ </language>
+ </xsl:for-each>
+ </xsl:for-each>
+ <xsl:variable name="controlField008-35-37" select="normalize-space(translate(substring($controlField008,36,3),'|#',''))"/>
+ <xsl:if test="$controlField008-35-37">
+ <language>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="substring($controlField008,36,3)"/>
+ </languageTerm>
+ </language>
+ </xsl:if>
+
+ <xsl:for-each select="marc:datafield[@tag=041]">
+
+ <!-- <xsl:variable name="langCodes">
+ <xsl:copy-of select="marc:subfield[@code='a'or @code='d' or @code='e' or @code='2']"/>
+ </xsl:variable>
+ -->
+ <xsl:variable name="langCodes" select="marc:subfield[@code='a'or @code='d' or @code='e' or @code='2']"/>
+
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code='2']='rfc3066'">
+ <!-- not stacked but could be repeated -->
+ <xsl:call-template name="rfcLanguages">
+ <xsl:with-param name="nodeNum">
+ <xsl:value-of select="1"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:text></xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="controlField008-35-37">
+ <xsl:value-of select="$controlField008-35-37"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- iso -->
+ <xsl:variable name="allLanguages">
+ <xsl:copy-of select="$langCodes"/>
+ </xsl:variable>
+ <xsl:variable name="currentLanguage">
+ <xsl:value-of select="substring($allLanguages,1,3)"/>
+ </xsl:variable>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($allLanguages,1,3)"/>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of select="substring($allLanguages,4,string-length($allLanguages)-3)"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:if test="$controlField008-35-37">
+ <xsl:value-of select="$controlField008-35-37"/>
+ </xsl:if>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+
+ <xsl:variable name="physicalDescription">
+ <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='a' or substring(.,12,1)='b']">
+ <digitalOrigin>reformatted digital</digitalOrigin>
+ </xsl:if>
+
+ <xsl:variable name="controlField008-23" select="substring($controlField008,24,1)"/>
+ <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>
+
+ <xsl:variable name="check008-23">
+ <xsl:if test="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='SE' or $typeOf008='MM'">
+ <xsl:value-of select="true()"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="check008-29">
+ <xsl:if test="$typeOf008='MP' or $typeOf008='VM'">
+ <xsl:value-of select="true()"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">
+ <form authority="marcform">braille</form>
+ </xsl:when>
+ <xsl:when test="($controlField008-23=' ' and ($leader6='c' or $leader6='d')) or (($typeOf008='BK' or $typeOf008='SE') and ($controlField008-23=' ' or $controlField008='r'))">
+ <form authority="marcform">print</form>
+ </xsl:when>
+ <xsl:when test="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">
+ <form authority="marcform">electronic</form>
+ </xsl:when>
+ <xsl:when test="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">
+ <form authority="marcform">microfiche</form>
+ </xsl:when>
+ <xsl:when test="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">
+ <form authority="marcform">microfilm</form>
+ </xsl:when>
+ </xsl:choose>
+<!--
+ <xsl:if test="marc:datafield[@tag=130]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=130]/marc:subfield[@code='h']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+
+ <xsl:if test="marc:datafield[@tag=240]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=240]/marc:subfield[@code='h']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=242]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=242]/marc:subfield[@code='h']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=245]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='h']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=246]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=246]/marc:subfield[@code='h']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=730]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=730]/marc:subfield[@code='h']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=256]/marc:subfield[@code='a']">
+ <form>
+ <xsl:value-of select="."/>
+ </form>
+ </xsl:for-each>
+-->
+ <xsl:for-each select="marc:controlfield[@tag=007][substring(text(),1,1)='c']">
+ <xsl:choose>
+ <xsl:when test="substring(text(),14,1)='a'">
+ <reformattingQuality>access</reformattingQuality>
+ </xsl:when>
+ <xsl:when test="substring(text(),14,1)='p'">
+ <reformattingQuality>preservation</reformattingQuality>
+ </xsl:when>
+ <xsl:when test="substring(text(),14,1)='r'">
+ <reformattingQuality>replacement</reformattingQuality>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q'][string-length(.)&gt;1]">
+ <internetMediaType>
+ <xsl:value-of select="."/>
+ </internetMediaType>
+ </xsl:for-each>
+
+ <!-- MARC21 tag 300 - PHYSICAL DESCRIPTION (R) subfields abce-->
+ <xsl:for-each select="marc:datafield[@tag=215]">
+ <extent>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">acde</xsl:with-param>
+ </xsl:call-template>
+ </extent>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="string-length(normalize-space($physicalDescription))">
+ <physicalDescription>
+ <xsl:copy-of select="$physicalDescription"/>
+ </physicalDescription>
+ </xsl:if>
+
+ <!-- MARC21 tag 520 -->
+ <xsl:for-each select="marc:datafield[@tag=330]">
+ <abstract>
+ <xsl:call-template name="uri"/>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </abstract>
+ </xsl:for-each>
+
+ <!-- MARC21 tag 505 -->
+ <xsl:for-each select="marc:datafield[@tag=327]">
+ <tableOfContents>
+ <xsl:call-template name="uri"/>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">agrt</xsl:with-param>
+ </xsl:call-template>
+ </tableOfContents>
+ </xsl:for-each>
+
+ <!-- MARC21 tag 521 -->
+ <xsl:for-each select="marc:datafield[@tag=333]">
+ <targetAudience>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </targetAudience>
+ </xsl:for-each>
+
+ <xsl:if test="$typeOf008='BK' or $typeOf008='CF' or $typeOf008='MU' or $typeOf008='VM'">
+ <xsl:variable name="controlField008-22" select="substring($controlField008,23,1)"/>
+ <xsl:choose>
+ <!-- 01/04 fix -->
+ <xsl:when test="$controlField008-22='d'">
+ <targetAudience authority="marctarget">adolescent</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='e'">
+ <targetAudience authority="marctarget">adult</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='g'">
+ <targetAudience authority="marctarget">general</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='b' or $controlField008-22='c' or $controlField008-22='j'">
+ <targetAudience authority="marctarget">juvenile</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='a'">
+ <targetAudience authority="marctarget">preschool</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='f'">
+ <targetAudience authority="marctarget">specialized</targetAudience>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <!-- MARC21 tag 245c -->
+ <xsl:for-each select="marc:datafield[@tag=200]/marc:subfield[@code='f' or @code='g']">
+ <note type="statement of responsibility">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="punctuation">
+ <xsl:text>.:,;/] </xsl:text> <!-- have to add the closing bracket -->
+ </xsl:with-param>
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="chopPunctuationFront">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </note>
+ </xsl:for-each>
+
+ <!-- MARC21 tag 500 -->
+ <xsl:for-each select="marc:datafield[@tag &gt; 299 and @tag &lt; 316]">
+ <note>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ <xsl:call-template name="uri"/>
+ </note>
+ </xsl:for-each>
+
+ <!-- MARC21 tag 511 -->
+ <xsl:for-each select="marc:datafield[@tag=323]">
+ <note type="performers">
+ <xsl:call-template name="uri"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </note>
+ </xsl:for-each>
+
+<!--
+ <xsl:for-each select="marc:datafield[@tag=518]">
+ <note type="venue">
+ <xsl:call-template name="uri"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </note>
+ </xsl:for-each>
+
+
+ <xsl:for-each select="marc:datafield[@tag=501 or @tag=502 or @tag=504 or @tag=506 or @tag=507 or @tag=508 or @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=530 or @tag=533 or @tag=534 or @tag=535 or @tag=536 or @tag=538 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=583 or @tag=584 or @tag=585 or @tag=586]">
+ <note>
+ <xsl:call-template name="uri"/>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."/>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </note>
+ </xsl:for-each>
+-->
+
+ <!-- MARC21 tag 034 -->
+ <xsl:for-each select="marc:datafield[@tag=123][marc:subfield[@code='d' or @code='e' or @code='f' or @code='g']]">
+ <subject>
+ <cartographics>
+ <coordinates>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">defg</xsl:with-param>
+ </xsl:call-template>
+ </coordinates>
+ </cartographics>
+ </subject>
+ </xsl:for-each>
+
+ <!-- Unknown -->
+ <xsl:for-each select="marc:datafield[@tag=043]">
+ <subject>
+ <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='c']">
+ <geographicCode>
+ <xsl:attribute name="authority">
+ <xsl:if test="@code='a'">
+ <xsl:text>marcgac</xsl:text>
+ </xsl:if>
+ <xsl:if test="@code='b'">
+ <xsl:value-of select="following-sibling::marc:subfield[@code=2]"/>
+ </xsl:if>
+ <xsl:if test="@code='c'">
+ <xsl:text>iso3166</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ <xsl:value-of select="self::marc:subfield"/>
+ </geographicCode>
+ </xsl:for-each>
+ </subject>
+ </xsl:for-each>
+
+ <!-- MARC21 tag 255 -->
+ <!-- needs parsing -->
+<!--
+ <xsl:for-each select="marc:datafield[@tag=206]">
+ <subject>
+ <cartographics>
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <coordinates>
+ <xsl:value-of select="."/>
+ </coordinates>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <scale>
+ <xsl:value-of select="."/>
+ </scale>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <projection>
+ <xsl:value-of select="."/>
+ </projection>
+ </xsl:for-each>
+ </cartographics>
+ </subject>
+ </xsl:for-each>
+-->
+
+ <xsl:apply-templates select="marc:datafield[653 &gt;= @tag and @tag &gt;= 600]"/>
+
+ <xsl:apply-templates select="marc:datafield[@tag=656]"/>
+
+ <!-- MARC21 tag 752 -->
+ <xsl:for-each select="marc:datafield[@tag=620]">
+ <subject>
+ <hierarchicalGeographic>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <country>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </country>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <state>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </state>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <county>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </county>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='d']">
+ <city>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </city>
+ </xsl:for-each>
+ </hierarchicalGeographic>
+ </subject>
+ </xsl:for-each>
+
+ <!-- MARC21 tag 045 -->
+ <xsl:for-each select="marc:datafield[@tag=122][marc:subfield[@code='a']]">
+ <subject>
+
+ <xsl:choose>
+
+ <xsl:when test="@ind1=2">
+
+ <temporal encoding="iso8601" point="start">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='a'][1]"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ <temporal encoding="iso8601" point="end">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+
+
+ <xsl:value-of select="marc:subfield[@code='a'][2]"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <temporal encoding="iso8601">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </temporal>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </subject>
+ </xsl:for-each>
+
+<!--
+ <xsl:for-each select="marc:datafield[@tag=050]">
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <classification authority="lcc">
+ <xsl:value-of select="preceding-sibling::marc:subfield[@code='a'][1]"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="text()"/>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='a'][not(following-sibling::marc:subfield[@code='b'])]">
+ <classification authority="lcc">
+ <xsl:value-of select="text()"/>
+ </classification>
+ </xsl:for-each>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=082]">
+ <classification authority="ddc">
+ <xsl:if test="marc:subfield[@code='2']">
+ <xsl:attribute name="edition">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=080]">
+ <classification authority="udc">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abx</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=060]">
+ <classification authority="nlm">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=086][@ind1=0]">
+ <classification authority="sudocs">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </classification>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=086][@ind1=1]">
+ <classification authority="candoc">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </classification>
+ </xsl:for-each>
+-->
+ <!-- MARC21 086a -->
+ <xsl:for-each select="marc:datafield[@tag=022]">
+ <classification>
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </xsl:attribute>
+ <xsl:value-of select="marc:subfield[@code='b']"/>
+ </classification>
+ </xsl:for-each>
+
+ <!--
+ <xsl:for-each select="marc:datafield[@tag=084]">
+ <classification>
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:attribute>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=440]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">av</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </relatedItem>
+ </xsl:for-each>
+-->
+
+ <!-- MARC21 490/0 -->
+ <xsl:for-each select="marc:datafield[@tag=490]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adefhv</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </relatedItem>
+ </xsl:for-each>
+
+<!--
+ <xsl:for-each select="marc:datafield[@tag=510]">
+ <relatedItem type="isReferencedBy">
+ <note>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcx3</xsl:with-param>
+ </xsl:call-template>
+ </note>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=534]">
+ <relatedItem type="original">
+ <xsl:call-template name="relatedTitle"/>
+ <xsl:call-template name="relatedName"/>
+ <xsl:if test="marc:subfield[@code='b' or @code='c']">
+ <originInfo>
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <publisher>
+ <xsl:value-of select="."/>
+ </publisher>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <edition>
+ <xsl:value-of select="."/>
+ </edition>
+ </xsl:for-each>
+ </originInfo>
+ </xsl:if>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ <xsl:for-each select="marc:subfield[@code='z']">
+ <identifier type="isbn">
+ <xsl:value-of select="."/>
+ </identifier>
+ </xsl:for-each>
+ <xsl:call-template name="relatedNote"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=700][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <name type="personal">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aq</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"/>
+ <xsl:call-template name="nameDate"/>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=710][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">dg</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"/>
+ </titleInfo>
+ <name type="corporate">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:variable name="tempNamePart">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">c</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">dgn</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="normalize-space($tempNamePart)">
+ <namePart>
+ <xsl:value-of select="$tempNamePart"/>
+ </namePart>
+ </xsl:if>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=711][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"/>
+ </titleInfo>
+ <name type="conference">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aqdc</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">gn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=730][@ind2=2]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=740][@ind2=2]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+-->
+
+ <!-- MARC21 760 and 762 -->
+ <xsl:for-each select="marc:datafield[@tag=410]|marc:datafield[@tag=411]">
+ <relatedItem type="series">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <!-- MARC21 777 and 787 -->
+ <xsl:for-each select="marc:datafield[@tag=423]|marc:datafield[@tag=455]">
+ <relatedItem>
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <!-- MARC21 775 -->
+ <xsl:for-each select="marc:datafield[@tag=451]">
+ <relatedItem type="otherVersion">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <!-- MARC21 770 and 774 -->
+ <xsl:for-each select="marc:datafield[@tag=421]|marc:datafield[@tag=461]|marc:datafield[@tag=462]">
+ <relatedItem type="constituent">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <!-- MARC21 772 and 773 -->
+ <xsl:for-each select="marc:datafield[@tag=442]|marc:datafield[@tag=463]">
+ <relatedItem type="host">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <!-- MARC21 776 -->
+ <xsl:for-each select="marc:datafield[@tag=452]">
+ <relatedItem type="otherFormat">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <!-- MARC21 780 -->
+ <xsl:for-each select="marc:datafield[@tag &gt; 429 and @tag &lt; 438]">
+ <relatedItem type="preceding">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <!-- MARC21 785 -->
+ <xsl:for-each select="marc:datafield[@tag &gt; 439 and @tag &lt; 449]">
+ <relatedItem type="succeeding">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+<!--
+ <xsl:for-each select="marc:datafield[@tag=786]">
+ <relatedItem type="original">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=800]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <name type="personal">
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aq</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"/>
+ <xsl:call-template name="nameDate"/>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=810]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">dg</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"/>
+ </titleInfo>
+ <name type="corporate">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">c</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">dgn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=811]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"/>
+ </titleInfo>
+ <name type="conference">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aqdc</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">gn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=830]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=856][@ind2=2]/marc:subfield[@code='q']">
+ <relatedItem>
+ <internetMediaType>
+ <xsl:value-of select="."/>
+ </internetMediaType>
+ </relatedItem>
+ </xsl:for-each>
+-->
+
+ <!-- MARC21 020 -->
+ <xsl:for-each select="marc:datafield[@tag=010]">
+ <identifier type="isbn">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="translate(marc:subfield[@code='a'],'-','')"/>
+ </identifier>
+ </xsl:for-each>
+
+<!--
+ <xsl:for-each select="marc:datafield[@tag=024][@ind1=0]">
+ <identifier type="isrc">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=024][@ind1=2]">
+ <identifier type="ismn">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:for-each>
+-->
+
+ <!-- MARC21 022 -->
+ <xsl:for-each select="marc:datafield[@tag=011]">
+ <identifier type="issn">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:for-each>
+<!--
+ <xsl:for-each select="marc:datafield[@tag=010]">
+ <identifier type="lccn">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="normalize-space(marc:subfield[@code='a'])"/>
+ </identifier>
+ </xsl:for-each>
+-->
+ <!-- MARC21 028 -->
+ <xsl:for-each select="marc:datafield[@tag=071]">
+ <identifier>
+ <xsl:call-template name="isInvalid"/>
+ <xsl:attribute name="type">
+ <xsl:choose>
+ <xsl:when test="@ind1=0">issue number</xsl:when>
+ <xsl:when test="@ind1=1">matrix number</xsl:when>
+ <xsl:when test="@ind1=2">music plate</xsl:when>
+ <xsl:when test="@ind1=3">music publisher</xsl:when>
+ <xsl:when test="@ind1=4">videorecording identifier</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">
+ <xsl:choose>
+ <xsl:when test="@ind1=0">ba</xsl:when>
+ <xsl:otherwise>ab</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+
+<!--
+ <xsl:for-each select="marc:datafield[@tag=024][@ind1='4']">
+ <identifier type="sici">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=037]">
+ <identifier type="stock number">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=856][marc:subfield[@code='u']]">
+ <identifier>
+ <xsl:attribute name="type">
+ <xsl:choose>
+ <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:doi') or starts-with(marc:subfield[@code='u'],'doi')">doi</xsl:when>
+ <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl') or starts-with(marc:subfield[@code='u'],'http://hdl.loc.gov')">hdl</xsl:when>
+ <xsl:otherwise>uri</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl') or starts-with(marc:subfield[@code='u'],'http://hdl.loc.gov') ">
+ <xsl:value-of select="concat('hdl:',substring-after(marc:subfield[@code='u'],'http://hdl.loc.gov/'))"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="marc:subfield[@code='u']"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </identifier>
+ <xsl:if test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl')">
+ <identifier type="hdl">
+ <xsl:if test="marc:subfield[@code='y' or @code='3' or @code='z']">
+ <xsl:attribute name="displayLabel">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">y3z</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="concat('hdl:',substring-after(marc:subfield[@code='u'],'http://hdl.loc.gov/'))"/>
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=024][@ind1=1]">
+ <identifier type="upc">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=856][marc:subfield[@code='u']]">
+ <location>
+ <url>
+ <xsl:if test="marc:subfield[@code='y' or @code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">y3</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="marc:subfield[@code='u']"/>
+ </url>
+ </location>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=852]">
+ <location>
+ <physicalLocation>
+ <xsl:call-template name="displayLabel"/>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abje</xsl:with-param>
+ </xsl:call-template>
+ </physicalLocation>
+ </location>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=506]">
+ <accessCondition type="restrictionOnAccess">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcd35</xsl:with-param>
+ </xsl:call-template>
+ </accessCondition>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=540]">
+ <accessCondition type="useAndReproduction">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcde35</xsl:with-param>
+ </xsl:call-template>
+ </accessCondition>
+ </xsl:for-each>
+-->
+ <recordInfo>
+<!--
+ <xsl:for-each select="marc:datafield[@tag=040]">
+ <recordContentSource authority="marcorg">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </recordContentSource>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:controlfield[@tag=008]">
+ <recordCreationDate encoding="marc">
+ <xsl:value-of select="substring(.,1,6)"/>
+ </recordCreationDate>
+ </xsl:for-each>
+-->
+
+ <xsl:for-each select="marc:controlfield[@tag=005]">
+ <recordChangeDate encoding="iso8601">
+ <xsl:value-of select="."/>
+ </recordChangeDate>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:controlfield[@tag=001]">
+ <recordIdentifier>
+ <xsl:if test="../marc:controlfield[@tag=003]">
+ <xsl:attribute name="source">
+ <xsl:value-of select="../marc:controlfield[@tag=003]"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </recordIdentifier>
+ </xsl:for-each>
+
+ <!-- needs to process tag 100 -->
+ <xsl:for-each select="marc:datafield[@tag=040]/marc:subfield[@code='b']">
+ <languageOfCataloging>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="."/>
+ </languageTerm>
+ </languageOfCataloging>
+ </xsl:for-each>
+ </recordInfo>
+ </xsl:template>
+
+ <xsl:template name="displayForm">
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <displayForm>
+ <xsl:value-of select="."/>
+ </displayForm>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="affiliation">
+ <xsl:for-each select="marc:subfield[@code='p']">
+ <affiliation>
+ <xsl:value-of select="."/>
+ </affiliation>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="uri">
+ <xsl:for-each select="marc:subfield[@code='u']">
+ <xsl:attribute name="xlink:href">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="role">
+ <xsl:for-each select="marc:subfield[@code='e']">
+ <role>
+ <roleTerm type="text">
+ <xsl:value-of select="."/>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='4']">
+ <role>
+ <roleTerm authority="marcrelator" type="code">
+ <xsl:value-of select="."/>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="part">
+ <xsl:variable name="partNumber">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">h</xsl:with-param>
+ <xsl:with-param name="anyCodes">h</xsl:with-param>
+ <xsl:with-param name="afterCodes">bfgvz</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="partName">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">i</xsl:with-param>
+ <xsl:with-param name="anyCodes">i</xsl:with-param>
+ <xsl:with-param name="afterCodes">bfgvz</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="string-length(normalize-space($partNumber))">
+ <partNumber>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$partNumber"/>
+ </xsl:call-template>
+ </partNumber>
+ </xsl:if>
+ <xsl:if test="string-length(normalize-space($partName))">
+ <partName>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$partName"/>
+ </xsl:call-template>
+ </partName>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="relatedPart">
+ <xsl:if test="@tag=773">
+ <xsl:for-each select="marc:subfield[@code='g']">
+ <part>
+ <text>
+ <xsl:value-of select="."/>
+ </text>
+ </part>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='q']">
+ <part>
+ <xsl:call-template name="parsePart"/>
+ </part>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="relatedPartNumName">
+ <xsl:variable name="partNumber">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">g</xsl:with-param>
+ <xsl:with-param name="anyCodes">g</xsl:with-param>
+ <xsl:with-param name="afterCodes">pst</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="partName">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">p</xsl:with-param>
+ <xsl:with-param name="anyCodes">p</xsl:with-param>
+ <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="string-length(normalize-space($partNumber))">
+ <partNumber>
+ <xsl:value-of select="$partNumber"/>
+ </partNumber>
+ </xsl:if>
+ <xsl:if test="string-length(normalize-space($partName))">
+ <partName>
+ <xsl:value-of select="$partName"/>
+ </partName>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="relatedName">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <name>
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </name>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedForm">
+ <xsl:for-each select="marc:subfield[@code='h']">
+ <physicalDescription>
+ <form>
+ <xsl:value-of select="."/>
+ </form>
+ </physicalDescription>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedExtent">
+ <xsl:for-each select="marc:subfield[@code='h']">
+ <physicalDescription>
+ <extent>
+ <xsl:value-of select="."/>
+ </extent>
+ </physicalDescription>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedNote">
+ <xsl:for-each select="marc:subfield[@code='n']">
+ <note>
+ <xsl:value-of select="."/>
+ </note>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedSubject">
+ <xsl:for-each select="marc:subfield[@code='j']">
+ <subject>
+ <temporal encoding="iso8601">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </temporal>
+ </subject>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedIdentifierISSN">
+ <xsl:for-each select="marc:subfield[@code='x']">
+ <identifier type="issn">
+ <xsl:value-of select="."/>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedIdentifierISBN">
+ <xsl:for-each select="marc:subfield[@code='y']">
+ <identifier type="isbn">
+ <xsl:value-of select="."/>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedIdentifierLocal">
+ <xsl:for-each select="marc:subfield[@code='w']">
+ <identifier type="local">
+ <xsl:value-of select="."/>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedIdentifier">
+ <xsl:for-each select="marc:subfield[@code='o']">
+ <identifier>
+ <xsl:value-of select="."/>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedItem76X-78X">
+ <xsl:call-template name="displayLabel"/>
+ <xsl:call-template name="relatedTitle76X-78X"/>
+ <xsl:call-template name="relatedName"/>
+ <xsl:call-template name="relatedOriginInfo"/>
+ <xsl:call-template name="relatedLanguage"/>
+ <xsl:call-template name="relatedExtent"/>
+ <xsl:call-template name="relatedNote"/>
+ <xsl:call-template name="relatedSubject"/>
+ <xsl:call-template name="relatedIdentifier"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ <xsl:call-template name="relatedIdentifierISBN"/>
+ <xsl:call-template name="relatedIdentifierLocal"/>
+ <xsl:call-template name="relatedPart"/>
+ </xsl:template>
+
+ <xsl:template name="subjectGeographicZ">
+ <geographic>
+
+
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </geographic>
+ </xsl:template>
+
+ <xsl:template name="subjectTemporalY">
+ <temporal>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </temporal>
+ </xsl:template>
+
+ <xsl:template name="subjectTopic">
+ <topic>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </topic>
+ </xsl:template>
+
+ <xsl:template name="nameABCDN">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">cdn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="nameABCDQ">
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">aq</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="punctuation">
+ <xsl:text>:,;/ </xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"/>
+ <xsl:call-template name="nameDate"/>
+ </xsl:template>
+
+ <!-- added for unimarc -->
+ <xsl:template name="nameABCDFG">
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abdg</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="punctuation">
+ <xsl:text>:,;/ </xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"/>
+ <xsl:call-template name="nameDate"/>
+ </xsl:template>
+
+ <xsl:template name="nameACDEQ">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">acdeq</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:template>
+
+ <!-- added for unimarc -->
+ <xsl:template name="nameABCDEF">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcdef</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:template>
+
+ <xsl:template name="constituentOrRelatedType">
+ <xsl:if test="@ind2=2">
+ <xsl:attribute name="type">constituent</xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="relatedTitle">
+ <xsl:for-each select="marc:subfield[@code='t']">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ </titleInfo>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedTitle76X-78X">
+ <xsl:for-each select="marc:subfield[@code='t']">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"/>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='p']">
+ <titleInfo type="abbreviated">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"/>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='s']">
+ <titleInfo type="uniform">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"/>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="relatedOriginInfo">
+ <xsl:if test="marc:subfield[@code='b' or @code='d'] or marc:subfield[@code='f']">
+ <originInfo>
+ <xsl:if test="@tag=775">
+ <xsl:for-each select="marc:subfield[@code='f']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">marcgac</xsl:attribute>
+ <xsl:value-of select="."/>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:for-each select="marc:subfield[@code='d']">
+ <publisher>
+ <xsl:value-of select="."/>
+ </publisher>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <edition>
+ <xsl:value-of select="."/>
+ </edition>
+ </xsl:for-each>
+ </originInfo>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="relatedLanguage">
+ <xsl:for-each select="marc:subfield[@code='e']">
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="nameDate">
+ <xsl:for-each select="marc:subfield[@code='f']">
+ <namePart type="date">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </namePart>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="subjectAuthority">
+
+ <xsl:if test="@ind2!=4">
+ <xsl:if test="@ind2!=' '">
+ <xsl:if test="@ind2!=8">
+ <xsl:if test="@ind2!=9">
+ <xsl:attribute name="authority">
+ <xsl:choose>
+
+ <xsl:when test="@ind2=0">lcsh</xsl:when>
+ <xsl:when test="@ind2=1">lcshac</xsl:when>
+ <xsl:when test="@ind2=2">mesh</xsl:when>
+ <!-- 1/04 fix -->
+ <xsl:when test="@ind2=3">nal</xsl:when>
+ <xsl:when test="@ind2=5">csh</xsl:when>
+ <xsl:when test="@ind2=6">rvm</xsl:when>
+ <xsl:when test="@ind2=7">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="subjectAnyOrder">
+ <xsl:for-each select="marc:subfield[@code='v' or @code='x' or @code='y' or @code='z']">
+ <xsl:choose>
+ <xsl:when test="@code='v'">
+ <xsl:call-template name="subjectTopic"/>
+ </xsl:when>
+ <xsl:when test="@code='x'">
+ <xsl:call-template name="subjectTopic"/>
+ </xsl:when>
+ <xsl:when test="@code='y'">
+ <xsl:call-template name="subjectTemporalY"/>
+ </xsl:when>
+ <xsl:when test="@code='z'">
+ <xsl:call-template name="subjectGeographicZ"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="specialSubfieldSelect">
+ <xsl:param name="anyCodes"/>
+ <xsl:param name="axis"/>
+ <xsl:param name="beforeCodes"/>
+ <xsl:param name="afterCodes"/>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="contains($anyCodes, @code) or (contains($beforeCodes,@code) and following-sibling::marc:subfield[@code=$axis]) or (contains($afterCodes,@code) and preceding-sibling::marc:subfield[@code=$axis])">
+ <xsl:value-of select="text()"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </xsl:template>
+
+ <xsl:template match="marc:datafield[@tag=600 or @tag=602 or @Tag=604]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <name type="personal">
+ <xsl:call-template name="termsOfAddress"/>
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">a</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="nameDate"/>
+ <xsl:call-template name="affiliation"/>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+
+ <!-- MARC21 field 610 -->
+ <xsl:template match="marc:datafield[@tag=601 and @ind1=0]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <name type="corporate">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:if test="marc:subfield[@code='d' or @code='e' or @code='f']">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">def</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:if>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+
+ <!-- MARC21 field 611 -->
+ <xsl:template match="marc:datafield[@tag=601 and @ind1=01]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <name type="conference">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcdefghqnp</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:for-each select="marc:subfield[@code='4']">
+ <role>
+ <roleTerm authority="marcrelator" type="code">
+ <xsl:value-of select="."/>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+
+ <!-- MARC21 field 630 -->
+ <xsl:template match="marc:datafield[@tag=605]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfkloqr</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:call-template name="part"/>
+ </title>
+ </titleInfo>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+
+ <!-- MARC21 field 650 -->
+ <xsl:template match="marc:datafield[@tag=606]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <topic>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcd</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </topic>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+
+ <!-- MARC21 field 651 -->
+ <xsl:template match="marc:datafield[@tag=607]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <xsl:for-each select="marc:subfield[@code='a']">
+
+ <geographic>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </geographic>
+ </xsl:for-each>
+
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+
+ <!-- MARC21 field 610, empty ind2 -->
+ <xsl:template match="marc:datafield[@tag=610 and not(@ind2=0) and not(@ind2=1)]">
+ <subject>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <topic>
+ <xsl:value-of select="."/>
+ </topic>
+ </xsl:for-each>
+ </subject>
+ </xsl:template>
+
+ <xsl:template match="marc:datafield[@tag=656]">
+ <subject>
+ <xsl:if test="marc:subfield[@code=2]">
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code=2]"/>
+ </xsl:attribute>
+ </xsl:if>
+ <occupation>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </occupation>
+ </subject>
+ </xsl:template>
+
+ <xsl:template name="termsOfAddress">
+ <xsl:if test="marc:subfield[@code='c']">
+ <namePart type="termsOfAddress">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">c</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="displayLabel">
+ <xsl:if test="marc:subfield[@code='i']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="marc:subfield[@code='i']"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="marc:subfield[@code='3']"/>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="isInvalid">
+ <xsl:if test="marc:subfield[@code='z']">
+ <xsl:attribute name="invalid">yes</xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="subtitle">
+ <xsl:if test="marc:subfield[@code='b']">
+ <subTitle>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='b']"/>
+
+ <!--<xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">b</xsl:with-param>
+ </xsl:call-template>-->
+ </xsl:with-param>
+ </xsl:call-template>
+ </subTitle>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="script">
+ <xsl:param name="scriptCode"/>
+ <xsl:attribute name="script">
+ <xsl:choose>
+ <xsl:when test="$scriptCode='(3'">Arabic</xsl:when>
+ <xsl:when test="$scriptCode='(B'">Latin</xsl:when>
+ <xsl:when test="$scriptCode='$1'">Chinese, Japanese, Korean</xsl:when>
+ <xsl:when test="$scriptCode='(N'">Cyrillic</xsl:when>
+ <xsl:when test="$scriptCode='(2'">Hebrew</xsl:when>
+ <xsl:when test="$scriptCode='(S'">Greek</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template name="parsePart">
+ <!-- assumes 773$q= 1:2:3<4
+ with up to 3 levels and one optional start page
+ -->
+ <xsl:variable name="level1">
+ <xsl:choose>
+ <xsl:when test="contains(text(),':')">
+ <!-- 1:2 -->
+ <xsl:value-of select="substring-before(text(),':')"/>
+ </xsl:when>
+ <xsl:when test="not(contains(text(),':'))">
+ <!-- 1 or 1<3 -->
+ <xsl:if test="contains(text(),'&lt;')">
+ <!-- 1<3 -->
+ <xsl:value-of select="substring-before(text(),'&lt;')"/>
+ </xsl:if>
+ <xsl:if test="not(contains(text(),'&lt;'))">
+ <!-- 1 -->
+ <xsl:value-of select="text()"/>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="sici2">
+ <xsl:choose>
+ <xsl:when test="starts-with(substring-after(text(),$level1),':')">
+ <xsl:value-of select="substring(substring-after(text(),$level1),2)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-after(text(),$level1)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="level2">
+ <xsl:choose>
+ <xsl:when test="contains($sici2,':')">
+ <!-- 2:3<4 -->
+ <xsl:value-of select="substring-before($sici2,':')"/>
+ </xsl:when>
+ <xsl:when test="contains($sici2,'&lt;')">
+ <!-- 1: 2<4 -->
+ <xsl:value-of select="substring-before($sici2,'&lt;')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$sici2"/>
+ <!-- 1:2 -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="sici3">
+ <xsl:choose>
+ <xsl:when test="starts-with(substring-after($sici2,$level2),':')">
+ <xsl:value-of select="substring(substring-after($sici2,$level2),2)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-after($sici2,$level2)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="level3">
+ <xsl:choose>
+ <xsl:when test="contains($sici3,'&lt;')">
+ <!-- 2<4 -->
+ <xsl:value-of select="substring-before($sici3,'&lt;')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$sici3"/>
+ <!-- 3 -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="page">
+ <xsl:if test="contains(text(),'&lt;')">
+ <xsl:value-of select="substring-after(text(),'&lt;')"/>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:if test="$level1">
+ <detail level="1">
+ <number>
+ <xsl:value-of select="$level1"/>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$level2">
+ <detail level="2">
+ <number>
+ <xsl:value-of select="$level2"/>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$level3">
+ <detail level="3">
+ <number>
+ <xsl:value-of select="$level3"/>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$page">
+ <extent unit="page">
+ <start>
+ <xsl:value-of select="$page"/>
+ </start>
+ </extent>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="getLanguage">
+ <xsl:param name="langString"/>
+ <xsl:param name="controlField008-35-37"/>
+ <xsl:variable name="length" select="string-length($langString)"/>
+ <xsl:choose>
+ <xsl:when test="$length=0"/>
+ <xsl:when test="$controlField008-35-37=substring($langString,1,3)">
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString" select="substring($langString,4,$length)"/>
+ <xsl:with-param name="controlField008-35-37" select="$controlField008-35-37"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <language>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="substring($langString,1,3)"/>
+ </languageTerm>
+ </language>
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString" select="substring($langString,4,$length)"/>
+ <xsl:with-param name="controlField008-35-37" select="$controlField008-35-37"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="isoLanguage">
+ <xsl:param name="currentLanguage"/>
+ <xsl:param name="usedLanguages"/>
+ <xsl:param name="remainingLanguages"/>
+ <xsl:choose>
+ <xsl:when test="string-length($currentLanguage)=0"/>
+ <xsl:when test="not(contains($usedLanguages, $currentLanguage))">
+ <language>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="$currentLanguage"/>
+ </languageTerm>
+ </language>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($remainingLanguages,1,3)"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:value-of select="concat($usedLanguages,$currentLanguage)"/>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of select="substring($remainingLanguages,4,string-length($remainingLanguages))"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($remainingLanguages,1,3)"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:value-of select="concat($usedLanguages,$currentLanguage)"/>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of select="substring($remainingLanguages,4,string-length($remainingLanguages))"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="chopBrackets">
+ <xsl:param name="chopString"/>
+ <xsl:variable name="string">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$chopString"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="substring($string, 1,1)='['">
+ <xsl:value-of select="substring($string,2, string-length($string)-2)"/>
+ </xsl:if>
+ <xsl:if test="substring($string, 1,1)!='['">
+ <xsl:value-of select="$string"/>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="rfcLanguages">
+ <xsl:param name="nodeNum"/>
+ <xsl:param name="usedLanguages"/>
+ <xsl:param name="controlField008-35-37"/>
+ <!-- ??? xalan -->
+
+ <xsl:variable name="currentLanguage" select="marc:subfield[position()=$nodeNum]/text()"/>
+ <xsl:choose>
+ <xsl:when test="not($currentLanguage)"/>
+ <xsl:when test="$currentLanguage!=$controlField008-35-37 and $currentLanguage!='rfc3066'">
+ <xsl:if test="not(contains($usedLanguages,$currentLanguage))">
+ <language>
+ <languageTerm authority="rfc3066" type="code">
+ <xsl:value-of select="$currentLanguage"/>
+ </languageTerm>
+ </language>
+ </xsl:if>
+ <xsl:call-template name="rfcLanguages">
+ <!-- ??? xalan -->
+ <xsl:with-param name="nodeNum">
+ <xsl:value-of select="$nodeNum+1"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:value-of select="concat($usedLanguages,'|',$currentLanguage)"/>
+ </xsl:with-param>
+ <xsl:with-param name="controlField008-35-37">
+ <xsl:value-of select="$controlField008-35-37"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="rfcLanguages">
+ <xsl:with-param name="nodeNum">
+ <xsl:value-of select="$nodeNum+1"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:value-of select="concat($usedLanguages,$currentLanguage)"/>
+ </xsl:with-param>
+ <xsl:with-param name="controlField008-35-37">
+ <xsl:value-of select="$controlField008-35-37"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- added for Tellico, don't print unrecognized datafields -->
+ <xsl:template match="marc:datafield">
+ </xsl:template>
+
+</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2003 Copyright Sonic Software Corporation. All rights reserved.
+<metaInformation>
+<scenarios ><scenario default="no" name="Apr 02 Test" userelativepaths="yes" externalpreview="no" url="file://n:\jackie\test_files\v3.xml" htmlbaseurl="" outputurl="file://n:\temp\x.xml" processortype="xalan" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="v3Test1" userelativepaths="yes" externalpreview="no" url="file://n:\jackie\test_files\v3.xml" htmlbaseurl="" outputurl="file://n:\jackie\test_files\modsv3Converted.xml" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="Scenario1" userelativepaths="yes" externalpreview="no" url="file://n:\ckeith\DESKTOP\test.xml" htmlbaseurl="" outputurl="" processortype="xalan" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="yes" name="Test" userelativepaths="yes" externalpreview="no" url="file://n:\jackie\MARCXML\marcxmlfile.xml" htmlbaseurl="" outputurl="" processortype="xalan" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
+</metaInformation>
+-->
diff --git a/xslt/html.xsl b/xslt/html.xsl
new file mode 100644
index 0000000..7d29084
--- /dev/null
+++ b/xslt/html.xsl
@@ -0,0 +1,144 @@
+<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+<xsl:output encoding="UTF-8"/>
+
+<xsl:template match="person">
+<xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="authors">
+<xsl:for-each select="person">
+<xsl:value-of select="."/>
+<xsl:if test="position()!=last()">
+<xsl:text>, </xsl:text>
+</xsl:if>
+<xsl:if test="position()=last()-1">
+<xsl:text> and </xsl:text>
+</xsl:if>
+</xsl:for-each>
+<xsl:text>: </xsl:text>
+</xsl:template>
+
+<xsl:template match="editors">
+<xsl:text>Eds: </xsl:text>
+<xsl:for-each select="person">
+<xsl:value-of select="."/>
+<xsl:if test="position()!=last()">
+<xsl:text>, </xsl:text>
+</xsl:if>
+<xsl:if test="position()=last()-1">
+<xsl:text> and </xsl:text>
+</xsl:if>
+</xsl:for-each>
+<xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="title">
+<b><xsl:value-of select="."/></b>
+<xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="booktitle">
+<i><xsl:value-of select="."/></i>
+<xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="school">
+<xsl:value-of select="."/>
+<xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="journal">
+<i><xsl:value-of select="."/>
+<xsl:if test="string-length(../volume)>0">
+<xsl:text> </xsl:text>
+<xsl:value-of select="../volume"/>
+<xsl:if test="string-length(../number)>0">
+<xsl:text>(</xsl:text>
+<xsl:value-of select="../number"/>
+<xsl:text>)</xsl:text>
+</xsl:if>
+</xsl:if>
+</i>
+<xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="institution">
+<i><xsl:value-of select="."/></i>
+<xsl:if test="string-length(../number)>0">
+<xsl:text> No. </xsl:text>
+<xsl:value-of select="../number"/>
+</xsl:if>
+<xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="publisher">
+<xsl:value-of select="."/>
+<xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="volume">
+<xsl:if test="string-length(../journal)=0">
+<xsl:text>volume </xsl:text>
+<xsl:value-of select="."/>
+<xsl:text>, </xsl:text>
+</xsl:if>
+</xsl:template>
+
+<xsl:template match="edition">
+<xsl:value-of select="."/>
+<xsl:text> edition, </xsl:text>
+</xsl:template>
+
+<xsl:template match="pages">
+<xsl:value-of select="."/><xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="year">
+<xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="note">
+<xsl:text>, </xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="month">
+<xsl:value-of select="."/><xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="abstract">
+<br/><i>Abstract</i><xsl:text>: </xsl:text><xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="entry">
+<p>
+<xsl:apply-templates select="authors" />
+<xsl:apply-templates select="title" />
+<xsl:apply-templates select="booktitle" />
+<xsl:apply-templates select="journal" />
+<xsl:apply-templates select="school" />
+<xsl:apply-templates select="volume" />
+<xsl:apply-templates select="edition" />
+<xsl:apply-templates select="publisher" />
+<xsl:apply-templates select="institution" />
+<xsl:apply-templates select="pages" />
+<xsl:apply-templates select="editors" />
+<xsl:apply-templates select="month" />
+<xsl:apply-templates select="year" />
+<xsl:apply-templates select="note" />
+<xsl:apply-templates select="abstract" />
+</p>
+</xsl:template>
+
+<xsl:template match="bibliography">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<title>Bibliography</title>
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+</head>
+<body>
+<xsl:apply-templates select="entry" />
+</body>
+</html>
+</xsl:template>
+
+</xsl:stylesheet>