summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-17 01:24:36 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-17 01:24:36 +0000
commita8c9924456e5335c964e4e55b2dde1963c88726f (patch)
treef5bf107ba079ae460536da778ce2da5e6c68aa69
downloadknights-a8c9924456e5335c964e4e55b2dde1963c88726f.tar.gz
knights-a8c9924456e5335c964e4e55b2dde1963c88726f.zip
Added KDE3 version of Knights
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knights@1091568 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--AUTHORS10
-rw-r--r--COPYING280
-rw-r--r--ChangeLog30
-rw-r--r--CreatingThemes176
-rw-r--r--History369
-rw-r--r--INSTALL26
-rw-r--r--Makefile.am54
-rw-r--r--Makefile.dist14
-rw-r--r--README44
-rw-r--r--TODO48
-rw-r--r--acinclude.m410775
-rw-r--r--aclocal.m411308
-rw-r--r--config.guess1516
-rw-r--r--config.h.in169
-rw-r--r--config.log300
-rw-r--r--config.sub1622
-rw-r--r--configure.files2
-rw-r--r--configure.in85
-rw-r--r--configure.in.in8
-rw-r--r--doc/Makefile.am118
-rw-r--r--doc/Makefile.in.backup533
-rw-r--r--doc/help_en.docbook795
-rw-r--r--doc/help_fr.docbook658
-rw-r--r--knights.lsm15
-rw-r--r--knights.spec95
-rw-r--r--knights/Makefile.am61
-rw-r--r--knights/accel.cpp60
-rw-r--r--knights/accel.h59
-rw-r--r--knights/audio.cpp177
-rw-r--r--knights/audio.h64
-rw-r--r--knights/board_2d.cpp807
-rw-r--r--knights/board_2d.h99
-rw-r--r--knights/board_base.cpp125
-rw-r--r--knights/board_base.h68
-rw-r--r--knights/challenge_game.cpp37
-rw-r--r--knights/challenge_game.h47
-rw-r--r--knights/challenge_graph.cpp460
-rw-r--r--knights/challenge_graph.h93
-rw-r--r--knights/challenge_graph_view.cpp112
-rw-r--r--knights/challenge_graph_view.h50
-rw-r--r--knights/challenge_rectangle.cpp34
-rw-r--r--knights/challenge_rectangle.h36
-rw-r--r--knights/chessclock.cpp195
-rw-r--r--knights/chessclock.h75
-rw-r--r--knights/command.cpp98
-rw-r--r--knights/command.h194
-rw-r--r--knights/console.cpp264
-rw-r--r--knights/console.h87
-rw-r--r--knights/core.cpp892
-rw-r--r--knights/core.h107
-rw-r--r--knights/definitions.h292
-rw-r--r--knights/dlg_challenge.cpp159
-rw-r--r--knights/dlg_challenge.h69
-rw-r--r--knights/dlg_engine.cpp226
-rw-r--r--knights/dlg_engine.h77
-rw-r--r--knights/dlg_login.cpp161
-rw-r--r--knights/dlg_login.h73
-rw-r--r--knights/dlg_newmatch.cpp385
-rw-r--r--knights/dlg_newmatch.h110
-rw-r--r--knights/dlg_promote.cpp123
-rw-r--r--knights/dlg_promote.h58
-rw-r--r--knights/dlg_selectemail.cpp46
-rw-r--r--knights/dlg_selectemail.h52
-rw-r--r--knights/dlg_selectengine.cpp201
-rw-r--r--knights/dlg_selectengine.h72
-rw-r--r--knights/dlg_server.cpp240
-rw-r--r--knights/dlg_server.h92
-rw-r--r--knights/dlg_settings.cpp201
-rw-r--r--knights/dlg_settings.h80
-rw-r--r--knights/idmanager.cpp37
-rw-r--r--knights/idmanager.h42
-rw-r--r--knights/io_base.cpp57
-rw-r--r--knights/io_base.h68
-rw-r--r--knights/io_engine.cpp312
-rw-r--r--knights/io_engine.h81
-rw-r--r--knights/io_internet.cpp1138
-rw-r--r--knights/io_internet.h138
-rw-r--r--knights/knights.cpp1024
-rw-r--r--knights/knights.desktop16
-rw-r--r--knights/knights.h145
-rw-r--r--knights/knightsmap.h178
-rw-r--r--knights/knightspixcache.cpp156
-rw-r--r--knights/knightspixcache.h104
-rw-r--r--knights/knightstextview.cpp238
-rw-r--r--knights/knightstextview.h54
-rw-r--r--knights/list_pgn.cpp145
-rw-r--r--knights/list_pgn.h66
-rw-r--r--knights/logic.cpp1495
-rw-r--r--knights/logic.h88
-rw-r--r--knights/main.cpp85
-rw-r--r--knights/match.cpp1120
-rw-r--r--knights/match.h133
-rw-r--r--knights/match_param.cpp243
-rw-r--r--knights/match_param.h100
-rw-r--r--knights/pgn.cpp1464
-rw-r--r--knights/pgn.desktop11
-rw-r--r--knights/pgn.h153
-rw-r--r--knights/proto_base.cpp34
-rw-r--r--knights/proto_base.h54
-rw-r--r--knights/proto_uci.cpp218
-rw-r--r--knights/proto_uci.h55
-rw-r--r--knights/proto_xboard.cpp687
-rw-r--r--knights/proto_xboard.h78
-rw-r--r--knights/resource.cpp1048
-rw-r--r--knights/resource.h240
-rw-r--r--knights/setpageaudio.cpp133
-rw-r--r--knights/setpageaudio.h69
-rw-r--r--knights/setpagedisplay.cpp563
-rw-r--r--knights/setpagedisplay.h139
-rw-r--r--knights/setpageengines.cpp362
-rw-r--r--knights/setpageengines.h90
-rw-r--r--knights/setpagegeneral.cpp224
-rw-r--r--knights/setpagegeneral.h80
-rw-r--r--knights/setpageservers.cpp379
-rw-r--r--knights/setpageservers.h112
-rw-r--r--knights/splash.cpp40
-rw-r--r--knights/splash.h35
-rw-r--r--knights/tab_pgnview.cpp160
-rw-r--r--knights/tab_pgnview.h47
-rw-r--r--knights/tab_seeklist.cpp209
-rw-r--r--knights/tab_seeklist.h75
-rw-r--r--knights/tabbox.cpp208
-rw-r--r--knights/tabbox.h65
-rw-r--r--knights/tabgrip.cpp109
-rw-r--r--knights/tabgrip.h47
-rw-r--r--knights/tabmanager.cpp202
-rw-r--r--knights/tabmanager.h62
-rw-r--r--knights/tabpage.cpp164
-rw-r--r--knights/tabpage.h64
-rw-r--r--knights/thinbuttons.cpp262
-rw-r--r--knights/thinbuttons.h71
-rw-r--r--knights/wiz_setup.cpp360
-rw-r--r--knights/wiz_setup.h96
-rw-r--r--media/KBDefault.tar.gzbin0 -> 105539 bytes
-rw-r--r--media/KCDefault.tar.gzbin0 -> 102446 bytes
-rw-r--r--media/KSDefault.tar.gzbin0 -> 130182 bytes
-rw-r--r--media/Makefile.am65
-rw-r--r--media/default-engine-portrait.jpgbin0 -> 2534 bytes
-rw-r--r--media/default-portrait.jpgbin0 -> 2049 bytes
-rw-r--r--media/hi16-app-knights.pngbin0 -> 751 bytes
-rw-r--r--media/hi16-mime-pgn.pngbin0 -> 773 bytes
-rw-r--r--media/hi32-app-knights.pngbin0 -> 2037 bytes
-rw-r--r--media/hi32-mime-pgn.pngbin0 -> 1747 bytes
-rw-r--r--media/hi48-app-knights.pngbin0 -> 3947 bytes
-rw-r--r--media/hi48-mime-pgn.pngbin0 -> 3083 bytes
-rw-r--r--media/hi64-app-knights.pngbin0 -> 6677 bytes
-rw-r--r--media/hi64-mime-pgn.pngbin0 -> 4007 bytes
-rw-r--r--media/icon-display.pngbin0 -> 358 bytes
-rw-r--r--media/icon-general.pngbin0 -> 2037 bytes
-rw-r--r--media/pgn_template.kml17
-rw-r--r--media/splash.pngbin0 -> 56726 bytes
-rw-r--r--media/wizard.pngbin0 -> 47032 bytes
-rw-r--r--patch-stamp17
-rw-r--r--po/Makefile.am7
-rw-r--r--po/de.po2290
-rw-r--r--po/es.po2043
-rw-r--r--po/et.po2243
-rw-r--r--po/fi.po2116
-rw-r--r--po/fr.po2258
-rw-r--r--po/it.po2242
-rw-r--r--po/knights.pot2048
-rw-r--r--stamp-h.in1
-rw-r--r--subdirs5
163 files changed, 67152 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..dcf989c
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,10 @@
+Authors of the Knights Project
+
+Project Leader & Lead Programmer
+ Troy Corbin Jr. <tcorbin@users.sourceforge.net>
+
+Communications Programmer
+ Alexander Wels <agpwels@adelphia.net>
+
+See the "About Knights" dialog for a complete and current list of
+those who have helped make Knights possible. \ No newline at end of file
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..c7aea18
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,280 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, 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
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..b8f65f1
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,30 @@
+Knights 0.6 -- Tuesday May 20th, 2003
+Troy Corbin Jr. <troy@knights-chess.com>
+
+* Changed version to 0.6
+* Added a new tab that displays details from a loaded PGN match.
+* Added a server selector to the Login dialog.
+* Added hyperlinks to the ICS Console.
+* Improved printed output.
+* Added printing capabilities to the ICS Console.
+- Reduced the time needed to resize the board by about 33%
+- Fixed bug where the New Match dialog sometimes defaulted to an unplayable
+ match.
+- Fixed a bug in our XBoard protocol implementation which caused some engines
+ ( like GNUChess ) to fail.
+- Fixed bug where some loaded matches wouldn't display the player's names.
+- Fixed a crash that occured when you closed an ICS related tab, then
+ disconnected from the ICS.
+- Fixed a crash that occured when you couldn't connect to your ICS.
+- Expanded the range of the "Opponent's Strength" slider so that it didn't
+ cripple some engines.
+- Fixed a bug where selecting the current board position from the Notation Bar
+ could erase the board.
+- Fixed a bug where an engine that does not implement the 'pause' feature could
+ have caused Knights' clocks to continue running during a pause.
+- Fixed a bug where the console could be displayed in doublespace.
+- Fixed the Match->Resign option.
+- Knights generated PGN files now save NAG, RAV, and Annotations.
+- Removed the ability to swap sides midgame. This will be reinstated later when
+ we can implement a more feature-rich and trouble free dialog box.
+- Potential memory leak fixed ( thanks to Jon Keating! )
diff --git a/CreatingThemes b/CreatingThemes
new file mode 100644
index 0000000..f19cc9a
--- /dev/null
+++ b/CreatingThemes
@@ -0,0 +1,176 @@
+====================
+ Creating Themes
+====================
+
+This document is your guide to creating themes for the Knights chess
+interface.
+
+-----------------------
+1. Anatomy of a Theme:
+-----------------------
+
+A theme is a collection of images, sounds, and settings which create a
+unique representation of a chess environment. Typically, this theme is in the
+form of a gzipped tarball.
+
+There are three types of themes for Knights: Chessboard themes, Chessmen
+themes, and Audio themes.
+
+------------------------
+2. Tarball Information:
+------------------------
+
+Themes must be stored in tarballs. Knights will use any type of tarball that
+KDE supports. A good test is to try loading it in Konqueror using a
+tar://mytarball URL. Generaly speaking, using the standard gzipped tarball
+( with a '.tar.gz' extension ) will be fine.
+
+The first two letters of your filename must be 'KB', 'KC', or 'KS' depending on
+the type of theme it is. KB tells Knights that it is a Chessboard theme,
+and KC represents Chessmen themes. KS is a sound theme. This is
+case-sensitive.
+
+Between the prefix and the extension comes your theme's name. Write it exactly
+how you want it displayed in Knights, except use underscores instead of spaces.
+So if you want your theme to be called "My Uber Chessmen" within Knights, you'd
+have the following filename: KCMy_Uber_Chessmen.tar.gz
+
+As a general rule, you should remove write and execute permissions on the
+files, and either remove Owner/Group attributes, or make them something
+harmless ( like nobody:users )
+
+---------------------------
+3. theme.conf Information:
+---------------------------
+
+Every theme must contain a text file called 'theme.conf'. Here's a
+sample theme.conf file:
+
+################################
+# A Sample theme.conf file
+################################
+[General]
+Type=Board
+Name=Default
+Version=1.0
+Author=Troy Corbin Jr.
+AuthorEmail=tcorbin@users.sourceforge.net
+AuthorWWW=http://knights.sourceforge.net
+Notes=This is the default chessboard for Knights. It was made with the Gimp.
+
+[2DWhite]
+King=white.king.png
+Queen=white.queen.png
+Bishop=white.bishop.png
+Knight=white.knight.png
+Rook=white.rook.png
+Pawn=white.pawn.png
+
+[2DBlack]
+King=black.king.png
+Queen=black.queen.png
+Bishop=black.bishop.png
+Knight=black.knight.png
+Rook=black.rook.png
+Pawn=black.pawn.png
+
+[2DBoard]
+Light=square.light.png
+Dark=square.dark.png
+Motion=square.motion.png
+Select=square.select.png
+Danger=square.danger.png
+
+[Coordinates]
+TextColor=255,255,255
+ShadowColor=0,0,0
+
+[Audio]
+Select=select.wav
+Move=move.wav
+Check=check.wav
+MatchOver=matchover.wav
+Challenge=notify.wav
+Tell=tell.wav
+Notification=notify.wav
+DrawOffer=draw.wav
+Say=tell.wav
+Promote=promote.wav
+################################
+
+Nothing too tough to figure out. 'Type' must be one of the following:
+
+- Board
+- Chessmen
+- Audio
+- 3DBoard ( For future use )
+- 3DChessmen ( For future use )
+
+'Name' is your theme's name and 'Version' is the version of your theme. Author,
+AuthorEmail, and AuthorWWW should be self explanitory. Notes are any comments
+you want to add.
+
+The '2DWhite' and '2DBlack' sections are required in Chessman themes. Each line
+specifies the file to be used for each different piece type.
+
+'2DBoard' and 'Coordinates' are required in Chessboard themes. 'Light' and
+'Dark' specify the file to be used for each color square on the board. 'Motion'
+is the highlight used to indicate that a piece moved, 'Select' is the selection
+highlight, and 'Danger' indicates an attacked piece. The 'Coordinates' are
+standard 8bit RGB colors. These are the colors that Knights will use for board
+coordinates. Try to use colors that contrast with the board itself.
+
+New in Knights 0.5.6 are Chessboard borders. They are not required, but they
+can greatly enhance the appearance of your chessboard. If you'd like to use one
+then under '2DBoard' add the following lines:
+
+HaveBorder=true
+Border=border.png
+BorderLightOn=light_on.png
+BorderLightOff=light_off.png
+
+-----------------------
+4. Pixmap Information:
+-----------------------
+
+Your pixmaps can be in any format that Qt supports, as long as it supports an
+alpha channel. For this reason you are strongly encouraged to stick with PNG
+images. Note that there are a few exceptions to this in Chessboard themes. The
+'Light', 'Dark', and 'Border' pixmaps constitute the lowest layer of graphics,
+and so they will never be transparent. Therefore, for these items you can use
+non-transparent file types ( like JPEG ).
+
+Knights will scale your pixmaps to the current theme size. This means you can
+supply any sized images you want and Knights will make it work. However, when
+Knights has to enlarge a pixmap, the resulting image tends to be of poor
+quality. To keep this from happening to your themes, you should make all your
+pixmaps 144 pixels by 144 pixels. This ensures that your images will never be
+enlarged, and it's not so large that it's wasteful.
+
+Borders are an exception to the size rule. The 'Border' itself needs to be 9
+times the size of your other images. So if you use the recommended 144 pixel
+image size, the 'Border' needs to be 1296 pixels. Likewise, the 'BorderLightOn'
+and 'BorderLightOff' images need to be half the size of your other images. So
+a regular size image of 144 pixels required that the lights be 72 pixels.
+
+----------------------
+5. Audio Information:
+----------------------
+
+Like pixmaps, you can supply your audio using any file format that aRts
+supports. I recommend you stick with .wav and .ogg, although the last time
+I checked aRts' Ogg Vorbis support was flaky with short sounds. Also, for
+very short sounds, .wav files are actually smaller. It's best to try both
+and see which works best with your paticular sounds.
+
+----------------------
+6. Copyrights:
+----------------------
+
+If you're planning to share your themes with the Knights Project, you must be
+the copyright owner on all the material contained in the theme. As much as I'd
+love to see the heads of Neo and Agent Smith flying around the board, I don't
+want to recieve any nasty letters from Warner Brothers.
+
+Your material must also be released under a GNU or similar license. If you're
+in doubt, contact us and we'll work it out.
diff --git a/History b/History
new file mode 100644
index 0000000..c461090
--- /dev/null
+++ b/History
@@ -0,0 +1,369 @@
+Knights 0.5.9 -- Friday January 17th, 2003
+Troy Corbin Jr. <tcorbin@users.sourceforge.net>
+
+* Changed version to 0.5.9
+* The console is now organized into 'Tabs', rather than using a splitter. These
+ tabs can be dynamicaly organized into different windows by simply dragging
+ them. Drag a tab onto the desktop to create another tab window.
+* Added the 'Seek Graph', which is a plotted chart of matches which people are
+ seeking. It behaves very much like the 'Sought Match List', but the graph
+ makes it easy to spot matches around your desired Rating / Time Controls.
+* Added movement animations.
+* Added a 'New Match' dialog that opens whenever you start a new match. It
+ allows you to set the time controls, players for each side, and more.
+* Moved theme installation to the 'Settings' menu.
+- Major speed improvments when selecting and dragging chessmen.
+* You can now install multiple themes at once.
+* Knights now handles keyboard input better. Don't worry about pressing
+ 'Enter' before you start chatting, just begin.
+* Knights can now auto-configure the following additional chess engines:
+ Cilian, Faile, OliThink, Pepito, and Yace.
+- Fixed sloppy SAN disambiguation where it wasn't needed.
+- Fixed gcc 3.1 compilation errors.
+* Added Italian translations.
+* Added Finnish translations.
+- Fixed a bug where Knights would sometimes declare a draw too early.
+- Fixed a bug in which the King could castle even if an adjacent position was
+ being attacked.
+* Knights can now correctly read PGN files that contain FEN notation.
+* You can now right click on a match's button to access a mini-file menu.
+- XBoard is now the default engine protocol when you configure a new engine.
+* Added basic support for the UCI engine protocol.
+- Removed the listing for the Knights engine protocol.
+* New users must accept our license ( the GPL ) before they can continue.
+* Movement highlights now also work when reviewing a match.
+* You can choose to login to your ICS as a 'guest' from the Login Dialog.
+- Fixed a bug which sometimes kept audio from working.
+* The 'Help' button in the 'Configure Knights...' dialog will now display
+ context sensitive help, depending on what page you're viewing.
+* Knights can read and display images stored in the SCID *.img file format.
+- Fixed problem where the Console wouldn't redraw without focus.
+* You can now change the Console's text size using it's context menu.
+- The Retract menu option can now be used several times in a row.
+- Knights' main window is now raised to the top and given focus whenever a
+ new match starts, or whenever you select a different match.
+* You can now have multiple PGN files open at the same time.
+- Major rewrite of internal communications code.
+- Fixed bug that made en passant moves illegal when your king was in check.
+- Countless minor bugfixes.
+
+Knights 0.5.6 -- Friday June 21st, 2002
+Troy Corbin Jr. <tcorbin@users.sourceforge.net>
+
+* Changed version to 0.5.6
+- Fixed a bug in the setup wizard that makes every server but FICS the
+ current server.
+- Knights will now handle invalid ICS logins in a sane manner.
+- If you accept or counter-challenge a match offer from the
+ console, the Match Pop-up will go away.
+- Fixed a bug where Less-than and Pipe symbols wouldn't render in the console.
+- ( Possibily? ) Fixed a bug that caused Knights to repeat the final moves in a
+ match in the PGN game.
+- If your opponent on ICS resigns, Knights now handles it properly.( Redux )
+* Added a History file to Knights. It will contain all past ChangeLog entries
+ while ChangeLog will only contain entries for the current version.
+* Expanded error reporting for failed theme installation.
+- Fixed missing character bug in ICC play.
+* The "Auto Close Last ICS" option is now on by default.
+* You now setup Timeseal for each individual server.
+* Added a combobox that lets you select the level of profanity filtering your
+ ICS preforms on incomming messages.
+ ( Settings->Configure Knights->Chess Servers->Options->Profanity Filter )
+- Knights should now correctly use the "Clock Ticking" and "Lag Compensation"
+ data sent to it by FICS.
+* Added support for movelist retrieval from ICS ( experimental )
+- Fixed Knights' parsing of Recursive Annotation Variations. RAVs embedded
+ within one another are now recognised and kept track of.
+- Fixed the display of Numerical Annotation Glyphs
+* Added support for proposed NAGs #140-154 and #190-195
+- After loading a completed match, Knights now stops the clock and displays an
+ appropriate message on the Status Bar.
+* Knights now fills out the "Mode" PGN tag when it knows the correct value.
+- Fixed a bug where Knights looked for the "root" entry in a chessman
+ theme.conf rather than "rook".
+* Knights now reads and uses the Notation Coordinate Colors specified within
+ theme.conf files.
+- Fixed the time read from saved, unfinished PGN games.
+* Moved the "Seconds Between Seek Updates" and "Auto Close Last ICS" options
+ from the General Settings to the Server Options tab.
+- Rewrote the engine communications code to use KDE's KProcess instead of UNIX
+ pipes and signals. This should make Knights more portable, and should fix
+ some obscure errors.
+* Applied KDE3 compatability patch from Harald Fernengel
+- Made internal changes to the shutdown procedure. (KDE3)
+- Made internal changes to the console's stylesheet. (KDE3)
+* Made some minor changes with layout spacing.
+- Fixed the Status Bar so that it's alignment is automatic, based on the
+ current language.
+* Replaced the Default Board's 'Highlight' graphics with new images that
+ show off KDE3's true alpha-channel support. ( Blatant eye-candy, yum )
+- Disabled the back button in the Setup Wizard's last page so you can't go back
+ and set everything up multiple times.
+* When examining a match, manipulating the Notation List will now move you
+ back and forth through the match.
+* Moving the mouse wheel will now navigate the Notation List.
+* Added "Player History" to the right-click menu in the Sought Games List.
+- Fixed that annoying Console 'jump' you got whenever a match began.
+- Fixed the coloring of t-shouts and says.
+* You can now continue to drag your chessman even after your opponent has moved
+* The 'Show Last Move' option now uses the 'Movement' highlight to display the
+ appropriate positions. If a chessman was attacked as a part of the previous
+ move, then that position is shown with the 'Attack' highlight.
+* When you preform a 'Premove', it will be represented on the board using
+ transparent chessmen, rather than the old way ( which was represented with
+ nothing =).
+* You can now preform premoves during a match vs. a computer opponent.
+* Left clicking anywhere on the board will cancel a premove.
+* Added the "Assess" option to the right-click menu in the Sought Games List.
+* Improved handling of Disconnections during ICS play. Also improved handling
+ of "Illegal Move" messages.
+* "Play White" and "Play Black" menu options will now be disabled during an
+ ICS match.
+* Added the ability to Print the notation for the current Match.
+* Added translations to French, German, and Estonian.
+- Fixed shutdown crash that occured when console was still open.
+* Added 'Borders' to Chessboard themes.
+- Knights no longer requires OpenGL.
+* Added 'busy' cursor when waiting for opponent to move.
+* Added the "Bowron Abernethy Chess Engine" to the list of autodetected
+ engines in the Setup Wizard.
+- Fixed a bug in the Challenge Dialog Box that scrambled match parameters.
+* Expanded 'Notification' coloring.
+
+Knights 0.5.4.1 -- Wednesday February 6th, 2002
+Troy Corbin Jr. <tcorbin@users.sourceforge.net>
+
+* Changed version to 0.5.4.1
+- Fixed critical error which disabled your ability to capture pieces.
+
+Knights 0.5.4 -- Monday February 4th, 2002
+Troy Corbin Jr. <tcorbin@users.sourceforge.net>
+
+* Changed version to 0.5.4
+* All matches now use the same image cache, rather than creating it's own.
+ This will save you 2 meg of memory per concurrent match.
+- Fixed a bug which prevented some castling.
+* Added the 'Resign' option. ( Match->Resign )
+* Knights now automatically adjusts the display depending on which army you're
+ playing. If you're black, it will be displayed on the bottom. Of course, the
+ option 'Reverse Board Orientation' reverses this effect: the local player's
+ army will be displayed at the top.
+- Fixed problem with the display of the clocks while playing over an ICS.
+- Fixed a bug where Knights will send the resign command to an ICS whenever
+ an ICS match is closed. Now, resign is never sent to ICS unless you tell
+ Knights to do so.
+- If your opponent on ICS resigns, Knights now handles it properly.
+- Knights now writes the correct result of a resigned game in .pgn files.
+* Knights now fills out the PlayerType and Termination .pgn tags when it knows
+ the correct value.
+* Implemented "drag & drop" movement of chessmen.
+* Streamlined a lot of drawing code, making some operations ( like "Reverse
+ Board Orientation" ) much faster
+* Added initial support for examining games via ICS.
+* Added SOUND! ( Settings->Configure Knights->Audio )
+* Optimized various bits of ICS code
+* You can now call your opponent's flag ( Match->Call Flag )
+- Fixed some bugs concerning ambiguous SAN notation
+* Increased the width of the clock displays, making them more readable with
+ smaller boards.
+* Added an option to automatically close the previous ICS match when you
+ begin a new one. ( Settings->Configure Knights->General->Automatically
+ Close Previous ICS Match )
+* Knights can now begin with a match vs PC open, or it can begin connecting
+ to your ICS. ( Settings->Configure Knights->General->When Knights Begins
+ It Should: )
+* Added Premove support. ( Settings->Configure Knights->Chess Servers->
+ Options->enable Premove )
+* Added checkboxes for ICS Shouts, Unregistered Tells, Kibitzes, Seeks, and
+ Private Matches. ( Settings->Configure Knights->Chess Servers->Options )
+- Fixed the "Reject Draw" option for ICS games.
+- Fixed a bug where Channel Reply didn't work when the last channel message
+ came from an unregistered user.
+* The menu option "Match->Reverse Board Orientation F2" has been renamed to
+ "Match->Flip Board F2". This option now works independently of the original
+ option ( Settings->Configure Knights->Display->Reverse Board Orientation" ).
+ Where the original option effects every board ( and is saved between
+ sessions ), this new Match Menu option effects only the current match, and
+ is not saved in any way.
+* Now when you're challenged in ICS, a dialog will pop up with the details of
+ the challenge. From here you can accept or decline, or change the parameters
+ and make a counter offer.
+* Added a patch from Harald Fernengel that makes Knights compatable with KDE3.
+- Fixed bug where new ICS games began with garbage highlights.
+- Fixed a bug which disabled en Passant moves via ICS game.
+* Added extra error messages to detect theme loading problems.
+
+Knights 0.5.1 -- Friday December 21st, 2001
+Troy Corbin Jr. <tcorbin@users.sourceforge.net>
+
+- Fixed a compile bug for Tru64 users
+- Fixed a bug introduced in 0.5 that made all play over ICS impossible
+- Fixed a bug where Knights counted the opening position in an ICS match
+ as a move.
+- Fixed another ICS related bug where moves you made, which ICS echos back,
+ were counted twice.
+- Fixed yet another bug. This one wrote SAN for a pawn's captures in a way which
+ was incompatible with other programs.
+
+Knights 0.5 -- Monday December 17th, 2001
+Troy Corbin Jr. <tcorbin@users.sourceforge.net>
+
+* Changed version to 0.5
+- Some distros had a problem compiling 2 lines of the documentation. This
+ has been fixed.
+- Fixed a bug where recieving a position for a game we don't know about caused
+ Knights to crash.
+- Fixed a bug where Knights did not notify ICS when a game was closed.
+- In ICS matches where the local player was black, the chessmen were displayed
+ on the wrong coordinates on the board, making the match unplayable. This has
+ been fixed.
+- Incomming clock times from ICS matches where divided by 10, making a 2 minute
+ clock look like 12 seconds. This has been fixed.
+* Buffered the output of the Sought Games List to help remove the
+ "flashing" effect.
+- Fixed the ability to review games on an ICS.
+* Added ability to read .pgn files that contain multiple matches. Knights will
+ display a summary of the matches in a new window, and you simply click ( or
+ double-click based on your global KDE settings ) on a match to review it.
+- The Sought Games List required a double click to accept a match, regardless
+ of your global KDE preferences. This has been fixed.
+* Knights can now append all your saved games to a single .pgn file.
+* Added the "Accept Match", "Tell...", "Finger", and "Add to Friends List"
+ options to the Sought Games List right click menu.
+* Added "Reverse Board Orientation" option to the Match menu thanks to a patch
+ from Kunnar Klauks.
+- Knights now closes the connection to the ICS when you close the console.
+- Fixed a bug where a pawn promotion in a loaded game would prompt you to
+ choose the promotion.
+- Fixed the phantom button bug which could occur if you closed matches
+ out of sequence.
+* Added support for the XBoard commands "telluser" and "tellusererror".
+- Did some minor code cleanup throughout the project.
+
+Knights 0.4.9 -- Tuesday December 4th, 2001
+Troy Corbin Jr. <tcorbin@users.sourceforge.net>
+
+- Changed version number to 0.4.9
+* Added option to disable the splash screen
+* Added configuration for internet servers
+* The Game menu is now the File menu, and the Opponent menu is now the Match
+ menu.
+- The new game menu now dynamically enables or disables game types based on
+ your configuration. So, if you don't have any chess engines configured, you
+ can't play a vs. PC or PC vs PC game. Likewise for internet play and server
+ configuration.
+* Added the Console... which handles sending and receiving messages via chess
+ server, and any other online transactions that don't occur Over the Board.
+* Added "High Quality" mode, which displays a much smoother chessboard with
+ very little pixelation... even at the smallest board sizes. However, there
+ is a noticeable speed tradeoff.
+* Added a 2Meg cache which greatly offsets much of the speed loss in High
+ Quality mode ( At least on my 600 it does ). Still not as fast as regular,
+ which should be fine for lower-end machines.
+- Knights now displays an error message when you try playing with a bad book
+ engine configuration.
+- Fixed bug where Knights couldn't read a move from a .pgn file if it was the
+ last token on the line.
+* Knights will now read themes from two locations... The system-wide themes
+ directory ( usually /usr/share/apps/knights/themes ) and the media directory
+ so you can run Knights without installing it ( ../media )
+* Added the 'Ponder' option to the Opponent menu.
+* Added the 'Show Last Move' option to the Settings menu.
+* Added 'Pause/Resume' functions to the Game menu.
+* Separated themes into two - a board theme and a chessman theme.
+- Removed the Green Marble theme from the Knights distro.
+* Created the ThemePack distro. All themes ( except default ) will go here.
+- Fixed the 'Reverse Orientation' option... it now displays correctly.
+* Extended Knights' document handling to act like you would expect it: It
+ remembers URLs ( to resave, or save a loaded game ), and prompts whenever
+ an unsaved game is about to be destroyed.
+* Expanded .pgn support to include multiple games per file and propper
+ parsing of comments.
+* Added application/pgn mimetype
+* Knights now connects to FICS and will play chess there.
+* Added ALT-R to reply to the last private tell you recieved.
+* Added ALT-C to chat on the last channel you recieved a message on.
+* Knights now supports multiple matches at once.
+* Knights will now default Pawn Promotions to Queen if the user does not
+ select one.
+* Added ability to Retract or Undo a move while playing against an engine.
+* Added a "Install Themes" function in the Settings.
+* Added ability to modify the key bindings.
+* Added a setup wizard to get new users up and running faster.
+* Too many minor changes to document.
+
+Knights 0.4.6 -- Wednesday August 15th, 2001
+Troy Corbin Jr. <tcorbin@users.sourceforge.net>
+
+- Changed version to 0.4.6
+* Added en passant moves.
+* Added rules for 50 move rule.
+* Added rules for forced draws. ( 10.3 & 10.4 of F.I.D.E. Laws of Chess )
+* Knights now sends time & otim to engines that want it.
+- Fixed bug where Knights interpreted messages during a game into feature
+ commands. This occurred while playing Crafty. It sent "time control" during a
+ match, which Knights interpreted as "feature time=0" due to the way Knights
+ parses engine data as space separated tokens. A Timer was added to engineio
+ which keeps any feature commands from comming through after an initial two
+ seconds. This will probably become a problem again, however, and I should
+ look into making Knights read engine data as full lines rather than space
+ separated tokens.
+- Fixed bug where internal records, and therefore PGN output, did not reflect
+ engine names properly when the feature myname was used. Now internal
+ records are not initiated until after the engines have initiated.
+- Fixed bug where the last move of a game could result in an Illegal Move
+ error being printed on the status bar.
+* Knights now recognizes all PGN Tags.
+* Loaded games will now be displayed as it loads.
+* Added command line option -d <path> for specifying Knights' data directory
+- Fixed bug where the king could castle even after he moved
+- v 0.4.5 broke the Promotion Selection Dialog. It is now fixed.
+* Selecting previous moves from the notation combobox will let you review
+ the game. If someone makes a move while you're reviewing, you are returned
+ to the current position.
+* The up and down arrow keys will cycle you through your game's history.
+- You should now be able to continue a game if the engine thinks you've made
+ an illegal move.
+* Added "Force Move" command to force a computer opponent to make a move.
+* Added "Offer Draw" command to offer a draw to your opponent.
+* Experimental support for Book Engines
+- Fixed FEATURE delay for XBoard compatible engines
+- Fixed a bug where new installs had to create two engines and switch them once
+ before any engines would load.
+* Added "Reverse Board Orientation" option which, well, reverses the board's
+ orientation. =)
+* Added first draft of documentation.
+- Fixed minor bug in XBoard protocol's alternative move command
+- Fixed other minor XBoard compliance issues
+- Confirmed that KnightCap works with Knights
+- Confirmed that Sjeng works with Knights
+- Consolidated entries for GNUChess v4, XBoard v1, XBoard v2, and XBoard v3
+ protocols into XBoard
+* Engine configurator now sorts the engine list
+- Other minor tweaks that I can't remember
+
+Knights 0.4.5 -- Sunday July 29th, 2001
+Troy Corbin Jr. <tcorbin@users.sourceforge.net>
+
+* Re-rendered graphics
+* graphics are scalable... 14 different board sizes per theme
+* Themes now stored in tarballs
+* Knights recognizes and accepts most XBoard version 2 Features
+* Crafty v18.9 is confirmed to work!
+
+Knights 0.4.4 -- Friday July 20th, 2001
+Troy Corbin Jr. <tcorbin@users.sourceforge.net>
+
+* enabled engine setup from Settings
+* enabled engine vs. engine games
+* Knights now recognizes true time control periods
+* enabled playing as the black army
+* added work on supporting book engines
+* minor changes to the main interface
+
+Knights 0.4.2 -- Tuesday July 17th, 2001
+Troy Corbin Jr. <tcorbin@users.sourceforge.net>
+
+* Initial public offering via CVS
+
+
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..4cc16f2
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,26 @@
+Dependencies:
+-------------
+
+- Qt 3.x
+- KDE 3.x
+- Autoconf 2.5
+- Automake 1.6
+
+You'll also need to have your $KDEDIR environment variable set correctly.
+
+
+Installing from Tarball Distribution:
+-------------------------------------
+
+ Type: ./configure
+ make
+ make install
+
+
+Installing from CVS:
+--------------------
+
+ Type: make -f Makefile.dist
+ ./configure
+ make
+ make install
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..24a78b1
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,54 @@
+####### kdevelop will overwrite this part!!! (begin)##########
+
+SUBDIRS = admin doc knights media po
+
+####### kdevelop will overwrite this part!!! (end)############
+# not a GNU package. You can remove this line, if
+# have all needed files, that a GNU package needs
+AUTOMAKE_OPTIONS = foreign
+
+$(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:
+ $(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
+
+rpm_prep: doc clean distclean-generic ${PACKAGE}.spec
+ rm -R -f /tmp/${PACKAGE}-@RPM_VERSION@
+ mkdir -p /tmp/${PACKAGE}-@RPM_VERSION@
+ (cd ${srcdir} ; cp -R -a ./* /tmp/${PACKAGE}-@RPM_VERSION@ )
+ (cd /tmp/ ; \
+ touch ${PACKAGE}-@RPM_VERSION@/doc/help_{en,de,fr,et}.docbook ; \
+ find ${SRC_PREFIX}-@RPM_VERSION@ -name CVS > \
+ /tmp/${PACKAGE}-tar-excludes.lst ; \
+ find ${SRC_PREFIX}-@RPM_VERSION@ -name Makefile \
+ -o -name Makefile.in >> \
+ /tmp/${PACKAGE}-tar-excludes.lst ; \
+ echo "${SRC_PREFIX}-@RPM_VERSION@/doc/api" >> \
+ /tmp/${PACKAGE}-tar-excludes.lst ; \
+ tar --exclude-from=/tmp/${PACKAGE}-tar-excludes.lst \
+ -chzf ${PACKAGE}-@RPM_VERSION@.tar.gz \
+ ${SRC_PREFIX}-@RPM_VERSION@ ; \
+ rm -f /tmp/${PACKAGE}-tar-excludes.lst )
+ rm -R -f /tmp/${PACKAGE}-@RPM_VERSION@
+
+# does not work with original SuSE-6.4 rpm
+# you will need an update of the rpm package !
+rpm: rpm_prep
+ rpm -ta /tmp/${PACKAGE}-@RPM_VERSION@.tar.gz
+
+src.rpm: rpm_prep
+ rpm -ts /tmp/${PACKAGE}-@RPM_VERSION@.tar.gz
diff --git a/Makefile.dist b/Makefile.dist
new file mode 100644
index 0000000..be59a86
--- /dev/null
+++ b/Makefile.dist
@@ -0,0 +1,14 @@
+all:
+ @echo "This Makefile is only for the CVS repository"
+ @echo "This will be deleted before making the distribution"
+ @echo ""
+ @if test ! -d admin; then \
+ echo "Please recheckout this module!" ;\
+ echo "for cvs: use checkout once and after that update again" ;\
+ echo "for cvsup: checkout kde-common from cvsup and" ;\
+ echo " link kde-common/admin to ./admin" ;\
+ exit 1 ;\
+ fi
+ $(MAKE) -f admin/Makefile.common cvs
+
+.SILENT:
diff --git a/README b/README
new file mode 100644
index 0000000..751514e
--- /dev/null
+++ b/README
@@ -0,0 +1,44 @@
+Knights - A chess interface for the K Desktop Environment
+
+FOR INSTALLATION INSTRUCTIONS, SEE THE "INSTALL" FILE
+
+- What Is Knights?
+
+Knights is a graphical chess interface designed to work with KDE. Knights
+is called a chess 'interface' because it does not come with it's own computer
+players. There are several very good computer players ( Chess Engines )
+already. Unfortunatly, most chess engines do not include fully featured GUIs.
+Instead, they rely on other programs ( like Knights ) to fill the gap.
+
+- How can I learn more about Knights?
+
+If you're interested in learning more, you should visit our project's website
+at http://knights.sourceforge.net
+
+- What Chess Engines work with Knights?
+
+Knights should support any engine which uses the XBoard protocol developed by
+Tim Mann. Knights will also offer it's own protocol for future use. To date,
+the following chess engines have been confirmed to work with Knights. If you
+know of another, please let me know so I can update this list.
+
+ - GNUChess v4.0 patchlevel 80
+ - GNUChess v5.02
+ - Crafty v18.09
+ - Crafty v18.10
+ - KnightCap v3.3
+ - Sjeng v10.0
+ - BabyChess
+
+- What can I do to help Knights?
+
+Knights can always use help in a number of areas. The best way to get started
+would be to express your interests on the knights-devel mailing list. You can
+sign up from here:
+
+ http://sourceforge.net/mail/?group_id=31461
+
+Currently, we're very interested in talking to a graphics artist about
+designing some new themes, and we would like to talk to some advanced
+chess players about helping to develop the tutorials.
+
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..59ea918
--- /dev/null
+++ b/TODO
@@ -0,0 +1,48 @@
+Knights TODO version 0.6
+
+- Server Selector in dlg_logic
+
+- Bughouse/Crazyhouse Support
+
+ o Add support for multiple boards viewed at once
+
+ - Convert the Main Window to use the TabManager
+
+ o Must find a way to replicate the top-menu
+
+ o Must move most of the knights class into the match class
+
+ - Time to remove the knights class completely?!?!?!?
+
+ o Umm.. is the main window going to look OK with the menu BELOW the tabGrip and close button?
+
+ o We can remove the thinbutton class
+
+ o Must make game boards dynamically resizeable
+
+ - Resizing is slow. How can we speed this up?
+
+ o Add support for a 'sideboard' which displays waiting chessmen
+
+ - Must use TabManager tabs
+
+ o Resizing will be slow. We must find a way to speed up resizing.
+
+- Add scratchboard support
+
+ o Must replace match's right-click code with a pop-up menu
+ or context sensitive actions
+
+- Implement io_email
+
+- Implement 'Online Player' option in New Match Dialog
+
+ o If player is not online at the time, begin connecting
+
+ o Once online, begin seeking a match w/ time controls set in New Match dialog
+
+- Implement audio speech which follows teh action on the board
+
+ o Must find someone with a great voice. :-)
+
+- Support hyperlinks in the console
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..33f5ef8
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,10775 @@
+## -*- 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.
+
+dnl ------------------------------------------------------------------------
+dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
+dnl thanks to Raja R Harinath.
+dnl ------------------------------------------------------------------------
+dnl
+ifdef([_AC_PATH_X_XMKMF],[],
+ [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
+ifdef([AC_OUTPUT_SUBDIRS],[],
+ [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
+
+# 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(, [${x_direct_test_function}()],
+[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(programm-name, variable-name, list of directories,
+dnl if-not-found, test-parameter)
+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"
+ dirs="$3"
+ kde_save_IFS=$IFS
+ IFS=':'
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ 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,
+[
+ 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
+ elif test $kde_qtver = 3; then
+ KDE_CHECK_UIC_FLAG(L,[/nonexistant],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)
+
+ UIC=$UIC_PATH
+ 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
+ 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_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\" \
+ kde_result=$1"
+])
+
+AC_DEFUN(KDE_SET_DEFAULT_PATHS,
+[
+if test "$1" = "default"; then
+
+ if test -z "$kde_htmldir"; then
+ kde_htmldir='\${prefix}/share/doc/HTML'
+ fi
+ if test -z "$kde_appsdir"; then
+ kde_appsdir='\${prefix}/share/applnk'
+ fi
+ if test -z "$kde_icondir"; then
+ kde_icondir='\${prefix}/share/icons'
+ fi
+ if test -z "$kde_sounddir"; then
+ kde_sounddir='\${prefix}/share/sounds'
+ fi
+ if test -z "$kde_datadir"; then
+ kde_datadir='\${prefix}/share/apps'
+ fi
+ if test -z "$kde_locale"; then
+ kde_locale='\${prefix}/share/locale'
+ fi
+ if test -z "$kde_cgidir"; then
+ kde_cgidir='\${exec_prefix}/cgi-bin'
+ fi
+ if test -z "$kde_confdir"; then
+ kde_confdir='\${prefix}/share/config'
+ fi
+ if test -z "$kde_mimedir"; then
+ kde_mimedir='\${prefix}/share/mimelnk'
+ fi
+ if test -z "$kde_toolbardir"; then
+ kde_toolbardir='\${prefix}/share/toolbar'
+ fi
+ if test -z "$kde_wallpaperdir"; then
+ kde_wallpaperdir='\${prefix}/share/wallpapers'
+ fi
+ if test -z "$kde_templatesdir"; then
+ kde_templatesdir='\${prefix}/share/templates'
+ fi
+ if test -z "$kde_bindir"; then
+ kde_bindir='\${exec_prefix}/bin'
+ fi
+ if test -z "$kde_servicesdir"; then
+ kde_servicesdir='\${prefix}/share/services'
+ fi
+ if test -z "$kde_servicetypesdir"; then
+ kde_servicetypesdir='\${prefix}/share/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
+
+ 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_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 "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.
+])
+])
+
+AC_DEFUN(KDE_SUBST_PROGRAMS,
+[
+
+ 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_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)])
+ 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)])
+ KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
+ KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
+
+ if test -n "$MEINPROC" && test ! "$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)'
+ AC_SUBST(DCOPIDL)
+ AC_SUBST(DCOPIDL2CPP)
+ AC_SUBST(DCOP_DEPENDENCIES)
+ AC_SUBST(MCOPIDL)
+ AC_SUBST(ARTSCCONFIG)
+ AC_SUBST(KDECONFIG)
+ AC_SUBST(MEINPROC)
+ AC_SUBST(KDE_XSL_STYLESHEET)
+
+ if test -x "$KDECONFIG"; then # it can be "compiled"
+ 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`
+ else
+ kde_libs_prefix='$(prefix)'
+ kde_libs_htmldir='$(kde_htmldir)'
+ fi
+ AC_SUBST(kde_libs_prefix)
+ AC_SUBST(kde_libs_htmldir)
+])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_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
+ kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
+ kde_have_all_paths=
+ kde_styledir=
+ kde_widgetdir=
+ 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_mimedir)
+AC_SUBST(kde_wallpaperdir)
+AC_SUBST(kde_bindir)
+dnl for KDE 2
+AC_SUBST(kde_templatesdir)
+AC_SUBST(kde_servicesdir)
+AC_SUBST(kde_servicetypesdir)
+AC_SUBST(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,
+[
+ AC_LANG_C
+ 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_LANG_C
+ 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"))
+
+ # 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])])
+
+ # more headers that need to be explicitly included on darwin
+ AC_CHECK_HEADERS(sys/types.h stdint.h)
+
+ # darwin requires a poll emulation library
+ AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
+
+ # CoreAudio framework
+ AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
+ AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
+ FRAMEWORK_COREAUDIO="-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
+
+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,
+ [ --enable-embedded link to Qt-embedded, don't use X],
+ kde_use_qt_emb=$enableval,
+ kde_use_qt_emb=no
+)
+
+AC_ARG_ENABLE(
+ qtopia,
+ [ --enable-qtopia link to Qt-embedded, link to the Qtopia Environment],
+ kde_use_qt_emb_palm=$enableval,
+ kde_use_qt_emb_palm=no
+)
+
+if test "$kde_use_qt_emb" = "no"; then
+
+AC_MSG_CHECKING(for X)
+AC_LANG_SAVE
+AC_LANG_C
+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; 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"
+
+AC_SUBST(X_INCLUDES)
+AC_SUBST(X_LDFLAGS)
+AC_SUBST(x_libraries)
+AC_SUBST(x_includes)
+
+# 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)
+AC_SUBST(LIBSM)
+LDFLAGS="$ac_save_LDFLAGS"
+
+AC_SUBST(X_PRE_LIBS)
+
+LIB_X11='-lX11 $(LIBSOCKET)'
+AC_SUBST(LIB_X11)
+
+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
+
+AC_MSG_CHECKING(for Xinerama)
+
+ AC_ARG_WITH(xinerama,
+ [ --with-xinerama enable support for Xinerama ],
+ [
+ no_xinerama=no
+ ], [
+ no_xinerama=yes
+ ]
+)
+
+kde_save_LDFLAGS="$LDFLAGS"
+kde_save_CFLAGS="$CFLAGS"
+kde_save_LIBS="$LIBS"
+LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
+CFLAGS="$CFLAGS -I$x_includes"
+LIBS="-lXinerama -lXext"
+
+if test "x$no_xinerama" = "xno"; then
+
+ AC_CACHE_VAL(ac_cv_have_xinerama,
+ [
+ AC_TRY_LINK([#include <X11/Xlib.h>
+ #include <X11/extensions/Xinerama.h>],
+ [XineramaIsActive(NULL);],
+ [ac_cv_have_xinerama="yes"],
+ [ac_cv_have_xinerama="no"])
+ ])
+else
+ ac_cv_have_xinerama=no;
+fi
+
+AC_MSG_RESULT($ac_cv_have_xinerama)
+
+LIBXINERAMA=""
+
+if test "$ac_cv_have_xinerama" = "yes"; then
+ AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
+ LIBXINERAMA="-lXinerama"
+fi
+
+AC_SUBST(LIBXINERAMA)
+
+LDFLAGS="$kde_save_LDFLAGS"
+CFLAGS="$kde_save_CFLAGS"
+LIBS="$kde_save_LIBS"
+
+LIB_XEXT="-lXext"
+QTE_NORTTI=""
+
+else
+ dnl We're using QT Embedded
+ CPPFLAGS=-DQWS
+ CXXFLAGS="$CXXFLAGS -fno-rtti"
+ QTE_NORTTI="-fno-rtti -DQWS"
+ X_PRE_LIBS=""
+ LIB_X11=""
+ LIB_XEXT=""
+ LIBSM=""
+ X_INCLUDES=""
+ X_LDFLAGS=""
+ x_includes=""
+ x_libraries=""
+ AC_SUBST(X_PRE_LIBS)
+ AC_SUBST(LIB_X11)
+ AC_SUBST(LIBSM)
+ AC_SUBST(X_INCLUDES)
+ AC_SUBST(X_LDFLAGS)
+ AC_SUBST(x_includes)
+ AC_SUBST(x_libraries)
+fi
+AC_SUBST(QTE_NORTTI)
+AC_SUBST(LIB_XEXT)
+
+
+AC_LANG_RESTORE
+
+])
+
+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.1
+ kde_qtver=3
+ kde_qtsubver=1
+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
+ kde_qt_minversion=">= Qt 3.1 (20021021)"
+ else
+ kde_qt_minversion=">= Qt 3.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 >= 0x030100"
+ else
+ kde_qt_verstring="QT_VERSION >= 300"
+ 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 = 3; then
+ kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt"
+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"; 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,
+ [ --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
+
+if test -z "$LIBQT"; then
+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"
+else
+ kde_int_qt="$LIBQT"
+ kde_lib_qt_set=yes
+fi
+
+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
+ if test -z "$LIBQT"; then
+ LIBQT="-l$qtlib-mt"
+ kde_int_qt="-l$qtlib-mt"
+ else
+ LIBQT="$qtlib-mt"
+ kde_int_qt="$qtlib-mt"
+ fi
+ 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"; 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,
+ [ --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,
+ [ --with-qt-includes=DIR where the Qt includes are. ],
+ [
+ ac_qt_includes="$withval"
+ ])
+
+kde_qt_libs_given=no
+
+AC_ARG_WITH(qt-libraries,
+ [ --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 $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
+
+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"; 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="$all_libraries $QT_LDFLAGS"
+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"; then
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
+else
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
+fi
+test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
+
+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 test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
+ kde_cv_uic_plugins=yes
+ fi
+fi
+rm -f actest.ui actest.cpp
+])
+
+if test "$kde_cv_uic_plugins" = yes; then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_ERROR([not found - you need to install kdelibs first.])
+fi
+fi
+])
+
+AC_DEFUN(KDE_CHECK_FINAL,
+[
+ AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (experimental - needs lots of memory)],
+ kde_use_final=$enableval, kde_use_final=no)
+
+ KDE_COMPILER_REPO
+ 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_ARG_ENABLE(closure, [ --disable-closure don't delay template instantiation],
+ kde_use_closure=$enableval, kde_use_closure=yes)
+
+ 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=""
+ fi
+ AC_SUBST(KDE_USE_CLOSURE_TRUE)
+ AC_SUBST(KDE_USE_CLOSURE_FALSE)
+])
+
+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_PREREQ([2.13])
+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=${prefix}/include
+ ac_kde_includes=$prefix/include
+
+ if test "${exec_prefix}" != NONE; then
+ kde_libraries=${libdir}
+ ac_kde_libraries=$libdir
+ if test "$ac_kde_libraries" = '${exec_prefix}/lib'${kdelibsuff}; then
+ ac_kde_libraries=$exec_prefix/lib${kdelibsuff}
+ fi
+ else
+ kde_libraries=${prefix}/lib${kdelibsuff}
+ ac_kde_libraries=$prefix/lib${kdelibsuff}
+ fi
+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="/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="/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
+
+ 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=${ac_kde_prefix}/include
+
+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_LDFLAGS="-L$kde_libraries"
+if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
+ all_libraries="$all_libraries $KDE_LDFLAGS"
+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, [ --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, [ --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");
+ return 0;
+ }
+EOF
+
+ ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
+ 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
+
+ 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_CHECK_KIMGIO,
+[
+ AC_REQUIRE([AC_BASE_PATH_KDE])
+ AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+ AC_REQUIRE([AC_FIND_TIFF])
+ AC_REQUIRE([AC_FIND_JPEG])
+ AC_REQUIRE([AC_FIND_PNG])
+ AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
+
+ if test "$1" = "existance"; then
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ kde_save_LIBS="$LIBS"
+ LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
+ AC_CHECK_LIB(kimgio, kimgioRegister, [
+ LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
+ LIBS="$kde_save_LIBS"
+ AC_LANG_RESTORE
+ else
+ LIBKIMGIO_EXISTS=yes
+ fi
+
+ if test "$LIBKIMGIO_EXISTS" = "yes"; then
+ LIB_KIMGIO='-lkimgio'
+ else
+ LIB_KIMGIO=''
+ fi
+ AC_SUBST(LIB_KIMGIO)
+])
+
+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
+ AC_SUBST(LIB_KDECORE, "-lkdecore")
+ AC_SUBST(LIB_KDEUI, "-lkdeui")
+ AC_SUBST(LIB_KIO, "-lkio")
+ 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")
+# 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, [ --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|getdomainname|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;
+#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>
+],
+ [
+char buffer[200];
+getdomainname(buffer, 200);
+],
+ [int getdomainname (char *, unsigned int)],
+ [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_MKSTEMP,
+[
+ KDE_CHECK_FUNC_EXT(mkstemp, [
+#include <stdlib.h>
+],
+ [
+mkstemp("/tmp/aaaXXXXXX");
+],
+ [int mkstemp(char *)],
+ [MKSTEMP])
+])
+
+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_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)
+ X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
+ 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)
+
+ AC_MSG_CHECKING([if res_init is available])
+ AC_TRY_COMPILE(
+ [
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+ ],
+ [
+ res_init();
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
+ ],
+ [ AC_MSG_RESULT(no) ]
+ )
+])
+
+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_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"; 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_LANG_C
+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(
+[/* Override any gcc2 internal prototype to avoid an error. */
+struct jpeg_decompress_struct;
+typedef struct jpeg_decompress_struct * j_decompress_ptr;
+typedef int size_t;
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void jpeg_CreateDecompress(j_decompress_ptr cinfo,
+ int version, size_t structsize);
+#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. */
+],
+ [jpeg_CreateDecompress(0L, 0, 0);],
+ 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,
+[
+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
+])
+
+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,
+[
+AC_LANG_C
+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>
+],
+ [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_SUBST(LIBZ)
+ AC_MSG_RESULT($ac_cv_lib_z)
+else
+ AC_MSG_ERROR(not found. Check your installation and look into config.log)
+ LIBZ=""
+ AC_SUBST(LIBZ)
+fi
+])
+
+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"; 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(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"; 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_LANG_C
+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_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 "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
+])
+
+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
+])
+
+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,[ --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,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
+
+ AC_ARG_ENABLE(strict,[ --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,[ --disable-warnings disables compilation with -Wall and similiar],
+ [
+ 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,[ --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 $CFLAGS"
+ else
+ CFLAGS="-g -O2 $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
+
+ 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 -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
+ else
+ if test "$kde_use_debug_code" = "full"; then
+ CXXFLAGS="-g3 $CXXFLAGS"
+ else
+ CXXFLAGS="-g -O2 $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
+ case $host in
+ *-*-linux-gnu)
+ CFLAGS="-ansi -W -Wall -pedantic -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 -Wconversion $CXXFLAGS"
+ ;;
+ esac
+ CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
+ KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
+ KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
+ KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
+ fi
+ fi
+
+ if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
+ CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
+ fi
+
+ if test "$GXX" = "yes"; then
+ 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(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
+ fi
+ 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= )
+
+ AC_ARG_ENABLE(pch,[ --enable-pch enables precompiled header support (currently only KCC) [default=no]],
+ [
+ kde_use_pch=$enableval
+ ],[kde_use_pch=no])
+
+ 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_CXXFLAGS=-O0
+ NOOPT_CFLAGS=-O0
+ fi
+
+ AC_SUBST(NOOPT_CXXFLAGS)
+ AC_SUBST(NOOPT_CFLAGS)
+
+ KDE_CHECK_FINAL
+
+ ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
+])
+
+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_LANG_SAVE
+AC_LANG_C
+AC_OBJEXT
+AC_EXEEXT
+AC_LANG_RESTORE
+
+AM_PROG_LIBTOOL
+AC_LIBTOOL_CXX
+
+LIBTOOL_SHELL="/bin/sh ./libtool"
+# LIBTOOL="$LIBTOOL --silent"
+KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
+AC_SUBST(KDE_PLUGIN)
+
+AC_ARG_ENABLE(objprelink, [ --enable-objprelink prelink apps using objprelink (obsolete)],
+ kde_use_objprelink=$enableval, kde_use_objprelink=no)
+ if test "x$kde_use_objprelink" = "xyes"; then
+ AC_MSG_WARN([
+------------------------------------------------------------
+Configuration option --enable-objprelink is no longer useful.
+See http:://objprelink.sourceforge.net for details:
+1- Recent binutils are fast enough to do without objprelink.
+2- Newer versions of objprelink do not need this option.
+------------------------------------------------------------
+])
+ fi
+])
+
+AC_DEFUN(KDE_CHECK_LIB64,
+[
+ kdelibsuff=none
+ AC_ARG_ENABLE(libsuffix,
+ AC_HELP_STRING([--enable-libsuffix],
+ [/lib directory suffix (64,32,none)]),
+ kdelibsuff=$enableval)
+ if test "$kdelibsuff" = "none"; then
+ if test -d /lib64 ; then
+ kdelibsuff=64
+ else
+ kdelibsuff=
+ fi
+ 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(long, 4)dnl
+ AC_CHECK_SIZEOF(char *, 4)dnl
+ AC_CHECK_SIZEOF(char, 1)dnl
+])dnl
+
+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,
+ [ --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 \$(kde_libraries)"
+
+ 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
+ KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
+ 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_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(ac_cv_socklen_t, [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+ ],[
+socklen_t a=0;
+getsockname(0,(struct sockaddr*)0, &a);
+ ],
+ ac_cv_socklen_t=socklen_t,
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+ ],[
+int a=0;
+getsockname(0,(struct sockaddr*)0, &a);
+ ],
+ ac_cv_socklen_t=int,
+ ac_cv_socklen_t=size_t
+ )
+ )
+ AC_LANG_RESTORE
+ ])
+
+ AC_MSG_RESULT($ac_cv_socklen_t)
+ if test "$ac_cv_socklen_t" != "socklen_t"; then
+ AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
+ [Define the real type of socklen_t])
+ fi
+ AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
+
+])
+
+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 'GNU gettext'`"], msgfmt)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+ if test -z "`$GMSGFMT --version 2>&1 | grep '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 '(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="-Wmissing-prototypes -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, [ --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_LANG_C
+ ac_save_ldflags="$LDFLAGS"
+ ac_save_cflags="$CFLAGS"
+ if test "x$kde_use_qt_emb" != "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, [ --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"; then
+ AC_MSG_RESULT(no)
+ ac_cv_have_dpms="no"
+ else
+ AC_LANG_C
+ ac_save_ldflags="$LDFLAGS"
+ ac_save_cflags="$CFLAGS"
+ ac_save_libs="$LIBS"
+ LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -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", [
+ LDFLAGS="$ac_save_ldflags"
+ CFLAGS="$ac_save_cflags"
+ LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
+ LIBS="$LIBS -lXdpms"
+ 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="-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_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, [ --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"
+ LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
+ test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
+ LDFLAGS="$LDFLAGS $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="mesa", ac_cv_have_gl="no")
+ if test "x$ac_cv_have_gl" = "xno"; then
+ LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
+ test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
+ LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
+ CXXFLAGS="$ac_save_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")
+ fi
+ AC_LANG_RESTORE
+ LDFLAGS="$ac_save_ldflags"
+ CXXFLAGS="$ac_save_cxxflags"
+ ])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
+ if test "$ac_cv_have_gl" = "mesa"; then
+ GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
+ else
+ GLLIB='-lGLU -lGL $(LIB_X11)'
+ fi
+ else
+ if test "$ac_cv_have_gl" = "mesa"; then
+ GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
+ else
+ GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
+ fi
+ 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])
+
+ AC_ARG_WITH(pam,
+ [ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]],
+ [ if test "x$withval" = "xyes"; then
+ use_pam=yes
+ pam_service=kde
+ elif test "x$withval" = "xno"; then
+ use_pam=no
+ else
+ use_pam=yes
+ pam_service=$withval
+ fi
+ ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
+ ], [
+ AC_CACHE_VAL(ac_cv_path_pam,
+ [ use_pam=no
+ AC_CHECK_LIB(pam, pam_start,
+ [ AC_CHECK_HEADER(security/pam_appl.h,
+ [ use_pam=yes
+ pam_service=kde ])
+ ], , $LIBDL)
+ ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
+ ])
+ ])
+ eval "$ac_cv_path_pam"
+
+ AC_MSG_CHECKING(for PAM)
+ if test "x$use_pam" = xno; then
+ AC_MSG_RESULT(no)
+ PAMLIBS=""
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
+ PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
+
+ 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], security/pam_appl.h,
+ [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
+ [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
+
+ AC_SUBST(PAMLIBS)
+])
+
+dnl DEF_PAM_SERVICE(arg name, full name, define name)
+AC_DEFUN(DEF_PAM_SERVICE, [
+ AC_ARG_WITH($1-pam,
+ [ --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,
+ [ --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,
+[ --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 '^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_MICO,
+[
+AC_REQUIRE([KDE_CHECK_LIBDL])
+AC_REQUIRE([KDE_MISC_TESTS])
+AC_MSG_CHECKING(for MICO)
+
+if test -z "$MICODIR"; then
+ kde_micodir=/usr/local
+ else
+ kde_micodir="$MICODIR"
+fi
+
+AC_ARG_WITH(micodir,
+ [ --with-micodir=micodir where mico is installed ],
+ kde_micodir=$withval,
+ kde_micodir=$kde_micodir
+)
+
+AC_CACHE_VAL(kde_cv_mico_incdir,
+[
+ mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
+AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
+
+])
+kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
+
+if test ! -r $kde_micodir/include/CORBA.h; then
+ AC_MSG_ERROR([No CORBA.h found, specify another micodir])
+fi
+
+AC_MSG_RESULT($kde_micodir)
+
+MICO_INCLUDES=-I$kde_micodir/include
+AC_SUBST(MICO_INCLUDES)
+MICO_LDFLAGS=-L$kde_micodir/lib
+AC_SUBST(MICO_LDFLAGS)
+micodir=$kde_micodir
+AC_SUBST(micodir)
+
+AC_MSG_CHECKING([for MICO version])
+AC_CACHE_VAL(kde_cv_mico_version,
+[
+AC_LANG_C
+cat >conftest.$ac_ext <<EOF
+#include <stdio.h>
+#include <mico/version.h>
+int main() {
+
+ printf("MICO_VERSION=%s\n",MICO_VERSION);
+ return (0);
+}
+EOF
+ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
+if AC_TRY_EVAL(ac_compile); then
+ if eval `./conftest 2>&5`; then
+ kde_cv_mico_version=$MICO_VERSION
+ else
+ AC_MSG_ERROR([your system is not able to execute a small application to
+ find MICO version! Check $kde_micodir/include/mico/version.h])
+ fi
+else
+ AC_MSG_ERROR([your system is not able to compile a small application to
+ find MICO version! Check $kde_micodir/include/mico/version.h])
+fi
+])
+
+dnl installed MICO version
+mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
+mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
+mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
+
+if test "x$1" = "x"; then
+ req_version="2.3.0"
+else
+ req_version=$1
+fi
+
+dnl required MICO version
+req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
+req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
+req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
+
+if test "$mico_v_maj" -lt "$req_v_maj" || \
+ ( test "$mico_v_maj" -eq "$req_v_maj" && \
+ test "$mico_v_mid" -lt "$req_v_mid" ) || \
+ ( test "$mico_v_mid" -eq "$req_v_mid" && \
+ test "$mico_v_min" -lt "$req_v_min" )
+
+then
+ AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
+at least is required. You should upgrade MICO.])
+else
+ AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
+fi
+
+LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
+AC_SUBST(LIBMICO)
+if test -z "$IDL"; then
+ IDL='$(kde_bindir)/cuteidl'
+fi
+AC_SUBST(IDL)
+IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
+AC_SUBST(IDL_DEPENDENCIES)
+
+idldir="\$(includedir)/idl"
+AC_SUBST(idldir)
+
+])
+
+AC_DEFUN(KDE_CHECK_MINI_STL,
+[
+AC_REQUIRE([KDE_CHECK_MICO])
+
+AC_MSG_CHECKING(if we use mico's mini-STL)
+AC_CACHE_VAL(kde_cv_have_mini_stl,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+kde_save_cxxflags="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
+AC_TRY_COMPILE(
+[
+#include <mico/config.h>
+],
+[
+#ifdef HAVE_MINI_STL
+#error "nothing"
+#endif
+],
+kde_cv_have_mini_stl=no,
+kde_cv_have_mini_stl=yes)
+CXXFLAGS="$kde_save_cxxflags"
+AC_LANG_RESTORE
+])
+
+if test "x$kde_cv_have_mini_stl" = "xyes"; then
+ AC_MSG_RESULT(yes)
+ $1
+else
+ AC_MSG_RESULT(no)
+ $2
+fi
+])
+
+])
+
+
+AC_DEFUN(KDE_CHECK_LIBPTHREAD,
+[
+AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
+AC_SUBST(LIBPTHREAD)
+])
+
+AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
+[
+ AC_ARG_ENABLE(kernel-threads, [ --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
+ kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
+
+ if test "$kde_use_kernthreads" = "yes"; then
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ ac_save_CFLAGS="$CFLAGS"
+ CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
+ CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
+ AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ CFLAGS="$ac_save_CFLAGS"
+ if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
+ kde_use_kernthreads=no
+ else
+ dnl Add proper -I and -l statements
+ AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
+ if test "x$LIBPTHREAD" = "x"; then
+ kde_use_kernthreads=no
+ else
+ USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
+ fi
+ fi
+ else
+ USE_THREADS=""
+ if test -z "$LIBPTHREAD"; then
+ KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
+ fi
+ 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"
+ ;;
+ 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, [ --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,
+[
+AC_LANG_SAVE
+AC_LANG_C
+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
+AC_LANG_RESTORE
+
+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,
+[ --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 /usr/lib /usr/local /usr/lib $kde_extra_libs"
+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
+
+PYTHONLIB=-L$python_libdir
+kde_orig_LIBPYTHON=$LIBPYTHON
+if test -z "$LIBPYTHON"; then
+ LIBPYTHON=-lpython$version
+fi
+
+python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
+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(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
+ [AC_MSG_WARN([it seems, Python depends on another library.
+ Pleae 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.2",
+ [KDE_CHECK_PYTHON_INTERN("2.1",
+ [KDE_CHECK_PYTHON_INTERN("2.0", [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
+ ])])
+])
+
+AC_DEFUN(KDE_CHECK_STL_SGI,
+[
+ AC_MSG_CHECKING([if STL implementation is SGI like])
+ AC_CACHE_VAL(kde_cv_stl_type_sgi,
+ [
+ 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_type_sgi=yes,
+ kde_cv_stl_type_sgi=no)
+])
+
+ AC_MSG_RESULT($kde_cv_stl_type_sgi)
+
+ if test "$kde_cv_stl_type_sgi" = "yes"; then
+ AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
+ fi
+])
+
+AC_DEFUN(KDE_CHECK_STL_HP,
+[
+ AC_MSG_CHECKING([if STL implementation is HP like])
+ AC_CACHE_VAL(kde_cv_stl_type_hp,
+ [
+ AC_TRY_COMPILE([
+#include <string>
+using namespace std;
+],[
+ string astring="Hello World";
+ astring.remove(0, 6); // now astring is "World"
+ return 0;
+], kde_cv_stl_type_hp=yes,
+ kde_cv_stl_type_hp=no)
+])
+ AC_MSG_RESULT($kde_cv_stl_type_hp)
+
+ if test "$kde_cv_stl_type_hp" = "yes"; then
+ AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
+ fi
+])
+
+AC_DEFUN(KDE_CHECK_STL,
+[
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
+ KDE_CHECK_STL_SGI
+
+ if test "$kde_cv_stl_type_sgi" = "no"; then
+ KDE_CHECK_STL_HP
+
+ if test "$kde_cv_stl_type_hp" = "no"; then
+ AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
+ fi
+ 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(KDE_CHECK_ANSI,
+[
+])
+
+AC_DEFUN(KDE_CHECK_INSURE,
+[
+ AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
+ [
+ if test $enableval = "no"; dnl
+ then ac_use_insure="no"
+ else ac_use_insure="yes"
+ fi
+ ], [ac_use_insure="no"])
+
+ AC_MSG_CHECKING(if we will use Insure++ to debug)
+ AC_MSG_RESULT($ac_use_insure)
+ if test "$ac_use_insure" = "yes"; dnl
+ then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
+ 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"
+
+if test ! -s $srcdir/subdirs; then
+ dnl Note: Makefile.common creates subdirs, so this is just a fallback
+ TOPSUBDIRS=""
+ 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
+
+if test -s $srcdir/inst-apps; then
+ ac_topsubdirs="`cat $srcdir/inst-apps`"
+else
+ 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
+])
+
+AC_DEFUN(KDE_CHECK_NEWLIBS,
+[
+
+])
+
+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_LANG_SAVE
+AC_LANG_C
+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_LANG_RESTORE
+])
+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,
+[
+AC_LANG_C
+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 '^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] )
+])
+
+dnl -------------------------------------------------------------------------
+dnl See if the compiler supports a template repository bero@redhat.de
+dnl -------------------------------------------------------------------------
+AC_DEFUN(KDE_COMPILER_REPO,
+[
+ REPO=""
+ NOREPO=""
+
+ KDE_CHECK_COMPILER_FLAG(frepo,
+ [
+ REPO="-frepo"
+ NOREPO="-fno-repo"
+ ])
+
+ if test -z "$REPO"; then
+ KDE_CHECK_COMPILER_FLAG(instances=explicit,
+ [
+ REPO="-instances=explicit"
+ NOREPO="-instances=extern"
+ ])
+ fi
+
+ if test -n "$REPO"; then
+ AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
+ [C++ compiler supports template repository])
+ $1
+ fi
+
+ AC_SUBST(REPO)
+ AC_SUBST(NOREPO)
+])
+
+AC_DEFUN(KDE_CHECK_HEADER,
+[
+ AC_LANG_SAVE
+ kde_safe_cppflags=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $all_includes"
+ AC_LANG_CPLUSPLUS
+ AC_CHECK_HEADER($1, $2, $3)
+ CPPFLAGS=$kde_safe_cppflags
+ AC_LANG_RESTORE
+])
+
+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, [ --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
+
+AC_DEFUN(KDE_SET_PREFIX,
+[
+ 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 superflous '/' 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_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,
+[ --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_libhpidir=no
+else
+ if test "x$ac_java_dir" = "x"; then
+
+
+ dnl No option set -> look in $PATH
+ KDE_JAVA_PREFIX(/usr/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/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
+ javadirs="$javadirs $dir"
+ done
+ IFS=$kde_save_IFS
+ jredirs=
+
+ for dir in $javadirs; do
+ if test ! -d $dir; then break; fi
+ if test -x "$dir/java"; 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
+ done
+
+ 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 libhpi.so and avoid green threads
+ kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -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..
+ 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"
+
+ else
+ JAVAC=
+ jni_includes=
+ fi
+
+ if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
+ AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
+ 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
+
+ if test ! -r "$kde_java_libhpidir/libhpi.so"; then
+ AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
+ 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])
+ JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
+ 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
+else # no
+ 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,
+ [ --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], 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_C
+kde_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $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"
+CFLAGS="$kde_save_CFLAGS"
+])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_flags=
+ KDE_CHECK_COMPILER_FLAG(shared, [
+ cxx_shared_flag="-shared"
+ ])
+
+ AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
+ AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
+ [
+ AC_LANG_C
+ kde_save_LIBS="$LIBS"
+ LIBS="$all_libraries $USER_LDFLAGS $cxx_shared_flag -lbz2 $LIBSOCKET"
+ kde_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $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"
+ CFLAGS="$kde_save_CFLAGS"
+ ])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,
+ [ --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,
+ [ --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_LANG_SAVE
+ AC_LANG_C
+
+ ac_cflags_safe="$CFLAGS"
+ ac_ldflags_safe="$LDFLAGS"
+ ac_libs_safe="$LIBS"
+
+ CFLAGS="$CFLAGS -I$ssl_incdir $all_includes"
+ 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"
+ )
+
+ CFLAGS="$ac_cflags_safe"
+ LDFLAGS="$ac_ldflags_safe"
+ LIBS="$ac_libs_safe"
+
+ AC_LANG_RESTORE
+
+ 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,
+ [
+ AC_LANG_SAVE
+ AC_LANG_C
+
+ 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_compile='${CC-gcc} $CFLAGS -I$ac_ssl_includes conftest.$ac_ext -o conftest'
+ if AC_TRY_EVAL(ac_compile); 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
+
+ AC_LANG_RESTORE
+
+ ])
+
+ 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
+
+if test "$ssl_includes" = "/usr/include" || test "$ssl_includes" = "/usr/local/include" || test -z "$ssl_includes"; then
+ SSL_INCLUDES="";
+else
+ SSL_INCLUDES="-I$ssl_includes"
+fi
+
+if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries"; 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_CHECK_STRLCPY
+ AC_CHECK_STRLCAT
+ 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!
+ ])
+ ])
+])
+
+# 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_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 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_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([LT_AC_PROG_SED])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(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
+
+ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+ifdef([AC_PROVIDE_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.
+set dummy $CC
+compiler="[$]2"
+])# _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_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],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+
+# 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)
+AC_DIVERT_POP
+])# _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
+ 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
+ rm -rf conftest*
+ ;;
+
+*-*-linux*)
+ # Test if the compiler is 64bit
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *"ELF 32"*)
+ LINUX_64_MODE="32"
+ ;;
+ *"ELF 64"*)
+ LINUX_64_MODE="64"
+ ;;
+ 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
+ ;;
+ifdef([AC_PROVIDE_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)
+
+ # recent cygwin and mingw systems supply a stub DllMain which the user
+ # can override, but on older systems we have to supply one
+ AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
+ [AC_TRY_LINK([],
+ [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
+ DllMain (0, 0, 0);],
+ [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
+
+ case $host/$CC in
+ *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
+ # old mingw systems require "-dll" to link a DLL, while more recent ones
+ # require "-mdll"
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -mdll"
+ AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
+ [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
+ CFLAGS="$SAVE_CFLAGS" ;;
+ *-*-cygwin* | *-*-pw32*)
+ # cygwin systems need to pass --dll to the linker, and not link
+ # crt.o which will require a WinMain@16 definition.
+ lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
+ esac
+ ;;
+ ])
+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_CACHE_CHECK([$1], [$2],
+ [$2=no
+ ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $3"
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ if (eval $ac_compile 2>conftest.err) && 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
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ else
+ $2=yes
+ fi
+ fi
+ $rm conftest*
+ CFLAGS="$save_CFLAGS"
+])
+
+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"
+ echo "$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 $host_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;
+ ;;
+
+ *)
+ # 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
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ *)
+ 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
+ ifelse([$1],[],[save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
+ [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
+ [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
+ GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
+ echo "$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 .
+
+ if (eval $ac_compile 2>out/conftest.err) && 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
+ # Append any errors to the config.log.
+ cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
+ else
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
+ [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
+ [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
+ 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)"; then
+
+ # We can hardcode non-existant directories.
+ if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_AC_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+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=
+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}.so$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}.so$major'
+ ;;
+
+aix4* | aix5*)
+ version_type=linux
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ 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}.so$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}.so'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi4*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$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
+ need_version=no
+ need_lib_prefix=no
+ case $GCC,$host_os in
+ yes,cygwin*)
+ library_names_spec='$libname.dll.a'
+ sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
+ postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog .libs/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $rm \$dlpath'
+ ;;
+ yes,mingw*)
+ library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
+ if echo "$sys_lib_search_path_spec" | [egrep ';[C-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
+ ;;
+ yes,pw32*)
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
+ ;;
+ *)
+ library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $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
+ # FIXME: Relying on posixy $() will cause problems for
+ # cross-compilation, but unfortunately the echo tests do not
+ # yet detect zsh echo's removal of \ escapes.
+ library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
+ soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+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}.so$versuffix ${libname}${release}.so $libname.so'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}.so$versuffix $libname.so$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}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
+ soname_spec='${libname}${release}.so$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
+ if test "$host_cpu" = ia64; then
+ 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}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$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
+ else
+ 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}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
+ soname_spec='${libname}${release}.sl$major'
+ fi
+ # 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 ;;
+ *) version_type=irix ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}.so$major'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 ") 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}"
+ ;;
+
+# 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}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$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; 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 __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
+ soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so'
+ 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}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ need_lib_prefix=no
+ library_names_spec='$libname.dll $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}.so'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ 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}.so$major'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=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.so.$versuffix $libname.so.$major $libname.so'
+ soname_spec='$libname.so.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$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 @<:@CXX,GCJ@:>@])],
+ [tagnames="$withval"],
+ [tagnames="CXX,GCJ"
+ case $host_os in
+ mingw*|cygwin*) tagnames="$tagnames,RC" ;;
+ esac])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+ if test ! -f "${ofile}"; then
+ AC_MSG_WARN([output file `$ofile' does not exist])
+ fi
+
+ if test -z "$LTCC"; then
+ eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+ if test -z "$LTCC"; then
+ AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+ else
+ AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+ fi
+ fi
+
+ # Extract list of available tagged configurations in $ofile.
+ # Note that this assumes the entire list is on one line.
+ available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for tagname in $tagnames; do
+ IFS="$lt_save_ifs"
+ # Check whether tagname contains only valid characters
+ case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+ "") ;;
+ *) AC_MSG_ERROR([invalid tag name: $tagname])
+ ;;
+ esac
+
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+ then
+ AC_MSG_ERROR([tag name \"$tagname\" already exists])
+ fi
+
+ # Update the list of available tags.
+ if test -n "$tagname"; then
+ echo appending configuration tag \"$tagname\" to $ofile
+
+ case $tagname in
+ CXX)
+ AC_LIBTOOL_LANG_CXX_CONFIG
+ ;;
+
+ GCJ)
+ AC_LIBTOOL_LANG_GCJ_CONFIG
+ ;;
+
+ 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.
+ available_tags="$available_tags $tagname"
+ 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_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[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 path 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([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 GCC])
+ 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 path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ 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_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.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ lt_cv_prog_gnu_ld=yes
+else
+ lt_cv_prog_gnu_ld=no
+fi])
+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 dependant 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 egrep 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* | mingw* | pw32*)
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method='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
+ ;;
+
+freebsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ if test "$host_cpu" = ia64; then
+ 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
+ else
+ 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
+ fi
+ ;;
+
+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 | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
+ 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 __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+nto-qnx)
+ lt_cv_deplibs_check_method=unknown
+ ;;
+
+openbsd*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
+ else
+ lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ # 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
+ ;;
+ 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 path 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
+ if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ else
+ 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
+ fi
+ 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*)
+ # These system don't have libm
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, main, 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, main,
+ [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
+
+
+# If this macro is not defined by Autoconf, define it here.
+ifdef([AC_PROVIDE_IFELSE],
+ [],
+ [define([AC_PROVIDE_IFELSE],
+ [ifdef([AC_PROVIDE_$1],
+ [$2], [$3])])])
+
+
+# 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_LANG_CXX
+
+
+# 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_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# --------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([AC_PROG_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;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='main(){return(0);}'
+
+_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 " | egrep -e "[[ ]]$]_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_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+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
+ ;;
+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_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_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)=
+
+# 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;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int char *[]) { return(0); }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${CXX-"c++"}
+set dummy $CC
+compiler="[$]2"
+_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
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
+ egrep 'GNU ld' > /dev/null; then
+ with_gnu_ld=yes
+
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+ egrep '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 $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-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 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 $libobjs $deplibs $compiler_flags `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 $libobjs $deplibs $compiler_flags `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 $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ 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*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+ gnu*)
+ ;;
+ hpux*)
+ if test $with_gnu_ld = no; then
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ else
+ _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'
+ fi
+ fi
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ else
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ fi
+ _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)
+ case $host_os in
+ hpux9*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ ;;
+ *)
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ fi
+ ;;
+ 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) | egrep "\-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_os in
+ hpux9*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ ;;
+ *)
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ fi
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC)
+ # SGI C++
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $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)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; 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'
+ ;;
+ cxx)
+ # Compaq C++
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ esac
+ ;;
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ netbsd*)
+ # NetBSD uses g++ - do we need to do anything?
+ ;;
+ 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)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-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)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
+ $rm $lib.exp'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ sco*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ case $cc_basename in
+ CC)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The C++ compiler is used as linker so we must use $wl
+ # flag to pass the commands to the underlying system
+ # linker.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx)
+ # Green Hills C++ Compiler
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | egrep -v '^2\.7' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-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
+
+# Figure out "hidden" C++ library dependencies from verbose
+# compiler output whening linking a shared library.
+cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+EOF
+
+
+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
+else
+ echo "libtool.m4: error: problem compiling C++ test program"
+fi
+
+$rm -f confest.$objext
+
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
+esac
+
+_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_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_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_CXX_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 C test sources.
+ac_ext=java
+
+# 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="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+set dummy $CC
+compiler="[$]2"
+_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_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+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 }'
+
+# 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"}
+set dummy $CC
+compiler="[$]2"
+_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
+ # 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 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(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_separator, $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(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.
+
+# 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 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)
+
+# 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 sed program that does not truncate output.
+SED=$lt_SED
+
+# 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"
+
+# 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 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)
+
+# 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.so 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)
+
+# 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
+ ;;
+
+ cygwin* | mingw* | pw32* | os2*)
+ cat <<'EOF' >> "$cfgfile"
+ # This is a source program that is used to create dlls on Windows
+ # Don't remove nor modify the starting and closing comments
+ _LT_AC_FILE_LTDLL_C
+ # This is a source program that is used to create import libraries
+ # on Windows for dlls which lack them. Don't remove nor modify the
+ # starting and closing comments
+ _LT_AC_FILE_IMPGEN_C
+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 -c conftest.$ac_ext], [],
+ [_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]]'
+ ;;
+solaris* | sysv5*)
+ symcode='[[BDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $host_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.
+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
+ symcode='[[ABCDGISTW]]'
+fi
+
+# 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 egrep ' nm_test_var$' "$nlist" >/dev/null; then
+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+ cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+ sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+ cat <<\EOF >> conftest.$ac_ext
+ {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ cygwin* | mingw* | 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'
+ ;;
+ *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, but not for PA HP-UX.
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ fi
+ ;;
+ *)
+ _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*)
+ # 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"
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ *)
+ ;;
+ 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'
+ ;;
+ 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* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ cygwin* | 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, but not for PA HP-UX.
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ fi
+ ;;
+
+ *)
+ _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
+ ;;
+
+ cygwin* | 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,'
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ # 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'
+ ;;
+
+ 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*)
+ if test "x$host_vendor" = xsni; then
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
+ else
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ fi
+ _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) -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) -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 | egrep '(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
+ ;;
+ cygwin* | mingw* | pw32*)
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ *)
+ _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(archive_cmds, $1)=
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $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_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(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 egrep regular expression 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 | egrep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+
+ extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
+ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
+ test -f $output_objdir/impgen.exe || (cd $output_objdir && \
+ if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
+ else $CC -o impgen impgen.c ; fi)~
+ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
+
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
+
+ # cygwin and mingw dlls have different entry points and sets of symbols
+ # to exclude.
+ # FIXME: what about values for MSVC?
+ dll_entry=__cygwin_dll_entry@12
+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
+ case $host_os in
+ mingw*)
+ # mingw values
+ dll_entry=_DllMainCRTStartup@12
+ dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
+ ;;
+ esac
+
+ # mingw and cygwin differ, and it's simplest to just exclude the union
+ # of the two symbol sets.
+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
+
+ # recent cygwin and mingw systems supply a stub DllMain which the user
+ # can override, but on older systems we have to supply one (in ltdll.c)
+ if test "x$lt_cv_need_dllmain" = "xyes"; then
+ ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
+ ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
+ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
+ else
+ ltdll_obj=
+ ltdll_cmds=
+ fi
+
+ # Extract the symbol export list from an `--export-all' def file,
+ # then regenerate the def file from the symbol export list, so that
+ # the compiled dll only exports the symbol export list.
+ # Be careful not to strip the DATA tag left by newer dlltools.
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
+ $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
+ sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
+
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is.
+ # If DATA tags from a recent dlltool are present, honour them!
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname-def;
+ else
+ echo EXPORTS > $output_objdir/$soname-def;
+ _lt_hint=1;
+ cat $export_symbols | while read symbol; do
+ set dummy \$symbol;
+ case \[$]# in
+ 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
+ *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
+ esac;
+ _lt_hint=`expr 1 + \$_lt_hint`;
+ done;
+ fi~
+ '"$ltdll_cmds"'
+ $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
+ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
+ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | egrep '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 | egrep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sunos4*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
+ runpath_var=LD_RUN_PATH
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # dlltool doesn't understand --whole-archive et. al.
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ ;;
+ *)
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | egrep '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
+ ;;
+ esac
+ 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 | egrep '(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 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 $libobjs $deplibs $compiler_flags `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 $libobjs $deplibs $compiler_flags `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 $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ # see comment about different semantics on the GNU ld section
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ bsdi4*)
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ ;;
+
+ darwin* | rhapsody*)
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
+ ;;
+ *) # Darwin 1.3 on
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ ;;
+ esac
+
+ # FIXME: Relying on posixy $() will cause problems for
+ # cross-compilation, but unfortunately the echo tests do not
+ # yet detect zsh echo's removal of \ escapes. Also zsh mangles
+ # `"' quotes if we put them in here... so don't!
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
+ # We need to add '_' to the symbols in $export_symbols first
+ #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+ ;;
+
+ 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*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ if test "$GCC" = yes; then
+ case $host_os in
+ hpux9*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ ;;
+ *)
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+ esac
+ else
+ case $host_os in
+ hpux9*)
+ _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'
+ ;;
+ *)
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ ;;
+ esac
+ fi
+ if test "$host_cpu" = ia64; then
+ _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
+ else
+ _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
+ fi
+ # 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'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ openbsd*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+
+ os2*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ sco3.2v5*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ;;
+
+ solaris*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+ esac
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ if test "x$host_vendor" = xsni; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ else
+ _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
+ fi
+ runpath_var='LD_RUN_PATH'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4.2uw2*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ hardcode_runpath_var=yes
+ runpath_var=LD_RUN_PATH
+ ;;
+
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ runpath_var='LD_RUN_PATH'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv5*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+ ;;
+
+ uts4*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+_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*
+ echo 'static int dummy;' > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+ then
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $rm conftest*
+ AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+ ;;
+ esac
+fi
+])# 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_FILE_IMPGEN_C
+# --------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
+# /* impgen.c starts here */
+# /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+#
+# This file is part of GNU libtool.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You 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.
+# */
+#
+# #include <stdio.h> /* for printf() */
+# #include <unistd.h> /* for open(), lseek(), read() */
+# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
+# #include <string.h> /* for strdup() */
+#
+# /* O_BINARY isn't required (or even defined sometimes) under Unix */
+# #ifndef O_BINARY
+# #define O_BINARY 0
+# #endif
+#
+# static unsigned int
+# pe_get16 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[2];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 2);
+# return b[0] + (b[1]<<8);
+# }
+#
+# static unsigned int
+# pe_get32 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[4];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 4);
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# static unsigned int
+# pe_as32 (ptr)
+# void *ptr;
+# {
+# unsigned char *b = ptr;
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# int
+# main (argc, argv)
+# int argc;
+# char *argv[];
+# {
+# int dll;
+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
+# unsigned long export_rva, export_size, nsections, secptr, expptr;
+# unsigned long name_rvas, nexp;
+# unsigned char *expdata, *erva;
+# char *filename, *dll_name;
+#
+# filename = argv[1];
+#
+# dll = open(filename, O_RDONLY|O_BINARY);
+# if (dll < 1)
+# return 1;
+#
+# dll_name = filename;
+#
+# for (i=0; filename[i]; i++)
+# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
+# dll_name = filename + i +1;
+#
+# pe_header_offset = pe_get32 (dll, 0x3c);
+# opthdr_ofs = pe_header_offset + 4 + 20;
+# num_entries = pe_get32 (dll, opthdr_ofs + 92);
+#
+# if (num_entries < 1) /* no exports */
+# return 1;
+#
+# export_rva = pe_get32 (dll, opthdr_ofs + 96);
+# export_size = pe_get32 (dll, opthdr_ofs + 100);
+# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
+# secptr = (pe_header_offset + 4 + 20 +
+# pe_get16 (dll, pe_header_offset + 4 + 16));
+#
+# expptr = 0;
+# for (i = 0; i < nsections; i++)
+# {
+# char sname[8];
+# unsigned long secptr1 = secptr + 40 * i;
+# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
+# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
+# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
+# lseek(dll, secptr1, SEEK_SET);
+# read(dll, sname, 8);
+# if (vaddr <= export_rva && vaddr+vsize > export_rva)
+# {
+# expptr = fptr + (export_rva - vaddr);
+# if (export_rva + export_size > vaddr + vsize)
+# export_size = vsize - (export_rva - vaddr);
+# break;
+# }
+# }
+#
+# expdata = (unsigned char*)malloc(export_size);
+# lseek (dll, expptr, SEEK_SET);
+# read (dll, expdata, export_size);
+# erva = expdata - export_rva;
+#
+# nexp = pe_as32 (expdata+24);
+# name_rvas = pe_as32 (expdata+32);
+#
+# printf ("EXPORTS\n");
+# for (i = 0; i<nexp; i++)
+# {
+# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
+# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
+# }
+#
+# return 0;
+# }
+# /* impgen.c ends here */
+])# _LT_AC_FILE_IMPGEN_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 ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+
+ # Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=$TMPDIR/sed$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ { (exit 1); exit 1; }
+}
+ _max=0
+ _count=0
+ # Add /usr/xpg4/bin/sed as it is typically found on Solaris
+ # along with /bin/sed that truncates output.
+ for _sed in $_sed_list /usr/xpg4/bin/sed; do
+ test ! -f ${_sed} && break
+ cat /dev/null > "$tmp/sed.in"
+ _count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
+ # Check for GNU sed and select it if it is found.
+ if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
+ lt_cv_path_SED=${_sed}
+ break;
+ fi
+ while true; do
+ cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
+ mv "$tmp/sed.tmp" "$tmp/sed.in"
+ cp "$tmp/sed.in" "$tmp/sed.nl"
+ echo >>"$tmp/sed.nl"
+ ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
+ cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
+ # 10000 chars as input seems more than enough
+ test $_count -gt 10 && break
+ _count=`expr $_count + 1`
+ if test $_count -gt $_max; then
+ _max=$_count
+ lt_cv_path_SED=$_sed
+ fi
+ done
+ done
+ rm -rf "$tmp"
+])
+AC_MSG_RESULT([$SED])
+])
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..668f764
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,11308 @@
+# aclocal.m4 generated automatically by aclocal 1.5
+
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001
+# 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.
+
+
+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.
+
+dnl ------------------------------------------------------------------------
+dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
+dnl thanks to Raja R Harinath.
+dnl ------------------------------------------------------------------------
+dnl
+ifdef([_AC_PATH_X_XMKMF],[],
+ [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
+ifdef([AC_OUTPUT_SUBDIRS],[],
+ [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
+
+# 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(, [${x_direct_test_function}()],
+[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(programm-name, variable-name, list of directories,
+dnl if-not-found, test-parameter)
+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"
+ dirs="$3"
+ kde_save_IFS=$IFS
+ IFS=':'
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ 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,
+[
+ 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
+ elif test $kde_qtver = 3; then
+ KDE_CHECK_UIC_FLAG(L,[/nonexistant],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)
+
+ UIC=$UIC_PATH
+ 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
+ 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_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\" \
+ kde_result=$1"
+])
+
+AC_DEFUN(KDE_SET_DEFAULT_PATHS,
+[
+if test "$1" = "default"; then
+
+ if test -z "$kde_htmldir"; then
+ kde_htmldir='\${prefix}/share/doc/HTML'
+ fi
+ if test -z "$kde_appsdir"; then
+ kde_appsdir='\${prefix}/share/applnk'
+ fi
+ if test -z "$kde_icondir"; then
+ kde_icondir='\${prefix}/share/icons'
+ fi
+ if test -z "$kde_sounddir"; then
+ kde_sounddir='\${prefix}/share/sounds'
+ fi
+ if test -z "$kde_datadir"; then
+ kde_datadir='\${prefix}/share/apps'
+ fi
+ if test -z "$kde_locale"; then
+ kde_locale='\${prefix}/share/locale'
+ fi
+ if test -z "$kde_cgidir"; then
+ kde_cgidir='\${exec_prefix}/cgi-bin'
+ fi
+ if test -z "$kde_confdir"; then
+ kde_confdir='\${prefix}/share/config'
+ fi
+ if test -z "$kde_mimedir"; then
+ kde_mimedir='\${prefix}/share/mimelnk'
+ fi
+ if test -z "$kde_toolbardir"; then
+ kde_toolbardir='\${prefix}/share/toolbar'
+ fi
+ if test -z "$kde_wallpaperdir"; then
+ kde_wallpaperdir='\${prefix}/share/wallpapers'
+ fi
+ if test -z "$kde_templatesdir"; then
+ kde_templatesdir='\${prefix}/share/templates'
+ fi
+ if test -z "$kde_bindir"; then
+ kde_bindir='\${exec_prefix}/bin'
+ fi
+ if test -z "$kde_servicesdir"; then
+ kde_servicesdir='\${prefix}/share/services'
+ fi
+ if test -z "$kde_servicetypesdir"; then
+ kde_servicetypesdir='\${prefix}/share/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
+
+ 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_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 "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.
+])
+])
+
+AC_DEFUN(KDE_SUBST_PROGRAMS,
+[
+
+ 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_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)])
+ 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)])
+ KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
+ KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
+
+ if test -n "$MEINPROC" && test ! "$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)'
+ AC_SUBST(DCOPIDL)
+ AC_SUBST(DCOPIDL2CPP)
+ AC_SUBST(DCOP_DEPENDENCIES)
+ AC_SUBST(MCOPIDL)
+ AC_SUBST(ARTSCCONFIG)
+ AC_SUBST(KDECONFIG)
+ AC_SUBST(MEINPROC)
+ AC_SUBST(KDE_XSL_STYLESHEET)
+
+ if test -x "$KDECONFIG"; then # it can be "compiled"
+ 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`
+ else
+ kde_libs_prefix='$(prefix)'
+ kde_libs_htmldir='$(kde_htmldir)'
+ fi
+ AC_SUBST(kde_libs_prefix)
+ AC_SUBST(kde_libs_htmldir)
+])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_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
+ kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
+ kde_have_all_paths=
+ kde_styledir=
+ kde_widgetdir=
+ 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_mimedir)
+AC_SUBST(kde_wallpaperdir)
+AC_SUBST(kde_bindir)
+dnl for KDE 2
+AC_SUBST(kde_templatesdir)
+AC_SUBST(kde_servicesdir)
+AC_SUBST(kde_servicetypesdir)
+AC_SUBST(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,
+[
+ AC_LANG_C
+ 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_LANG_C
+ 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"))
+
+ # 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])])
+
+ # more headers that need to be explicitly included on darwin
+ AC_CHECK_HEADERS(sys/types.h stdint.h)
+
+ # darwin requires a poll emulation library
+ AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
+
+ # CoreAudio framework
+ AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
+ AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
+ FRAMEWORK_COREAUDIO="-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
+
+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,
+ [ --enable-embedded link to Qt-embedded, don't use X],
+ kde_use_qt_emb=$enableval,
+ kde_use_qt_emb=no
+)
+
+AC_ARG_ENABLE(
+ qtopia,
+ [ --enable-qtopia link to Qt-embedded, link to the Qtopia Environment],
+ kde_use_qt_emb_palm=$enableval,
+ kde_use_qt_emb_palm=no
+)
+
+if test "$kde_use_qt_emb" = "no"; then
+
+AC_MSG_CHECKING(for X)
+AC_LANG_SAVE
+AC_LANG_C
+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; 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"
+
+AC_SUBST(X_INCLUDES)
+AC_SUBST(X_LDFLAGS)
+AC_SUBST(x_libraries)
+AC_SUBST(x_includes)
+
+# 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)
+AC_SUBST(LIBSM)
+LDFLAGS="$ac_save_LDFLAGS"
+
+AC_SUBST(X_PRE_LIBS)
+
+LIB_X11='-lX11 $(LIBSOCKET)'
+AC_SUBST(LIB_X11)
+
+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
+
+AC_MSG_CHECKING(for Xinerama)
+
+ AC_ARG_WITH(xinerama,
+ [ --with-xinerama enable support for Xinerama ],
+ [
+ no_xinerama=no
+ ], [
+ no_xinerama=yes
+ ]
+)
+
+kde_save_LDFLAGS="$LDFLAGS"
+kde_save_CFLAGS="$CFLAGS"
+kde_save_LIBS="$LIBS"
+LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
+CFLAGS="$CFLAGS -I$x_includes"
+LIBS="-lXinerama -lXext"
+
+if test "x$no_xinerama" = "xno"; then
+
+ AC_CACHE_VAL(ac_cv_have_xinerama,
+ [
+ AC_TRY_LINK([#include <X11/Xlib.h>
+ #include <X11/extensions/Xinerama.h>],
+ [XineramaIsActive(NULL);],
+ [ac_cv_have_xinerama="yes"],
+ [ac_cv_have_xinerama="no"])
+ ])
+else
+ ac_cv_have_xinerama=no;
+fi
+
+AC_MSG_RESULT($ac_cv_have_xinerama)
+
+LIBXINERAMA=""
+
+if test "$ac_cv_have_xinerama" = "yes"; then
+ AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
+ LIBXINERAMA="-lXinerama"
+fi
+
+AC_SUBST(LIBXINERAMA)
+
+LDFLAGS="$kde_save_LDFLAGS"
+CFLAGS="$kde_save_CFLAGS"
+LIBS="$kde_save_LIBS"
+
+LIB_XEXT="-lXext"
+QTE_NORTTI=""
+
+else
+ dnl We're using QT Embedded
+ CPPFLAGS=-DQWS
+ CXXFLAGS="$CXXFLAGS -fno-rtti"
+ QTE_NORTTI="-fno-rtti -DQWS"
+ X_PRE_LIBS=""
+ LIB_X11=""
+ LIB_XEXT=""
+ LIBSM=""
+ X_INCLUDES=""
+ X_LDFLAGS=""
+ x_includes=""
+ x_libraries=""
+ AC_SUBST(X_PRE_LIBS)
+ AC_SUBST(LIB_X11)
+ AC_SUBST(LIBSM)
+ AC_SUBST(X_INCLUDES)
+ AC_SUBST(X_LDFLAGS)
+ AC_SUBST(x_includes)
+ AC_SUBST(x_libraries)
+fi
+AC_SUBST(QTE_NORTTI)
+AC_SUBST(LIB_XEXT)
+
+
+AC_LANG_RESTORE
+
+])
+
+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.1
+ kde_qtver=3
+ kde_qtsubver=1
+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
+ kde_qt_minversion=">= Qt 3.1 (20021021)"
+ else
+ kde_qt_minversion=">= Qt 3.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 >= 0x030100"
+ else
+ kde_qt_verstring="QT_VERSION >= 300"
+ 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 = 3; then
+ kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt"
+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"; 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,
+ [ --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
+
+if test -z "$LIBQT"; then
+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"
+else
+ kde_int_qt="$LIBQT"
+ kde_lib_qt_set=yes
+fi
+
+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
+ if test -z "$LIBQT"; then
+ LIBQT="-l$qtlib-mt"
+ kde_int_qt="-l$qtlib-mt"
+ else
+ LIBQT="$qtlib-mt"
+ kde_int_qt="$qtlib-mt"
+ fi
+ 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"; 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,
+ [ --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,
+ [ --with-qt-includes=DIR where the Qt includes are. ],
+ [
+ ac_qt_includes="$withval"
+ ])
+
+kde_qt_libs_given=no
+
+AC_ARG_WITH(qt-libraries,
+ [ --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 $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
+
+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"; 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="$all_libraries $QT_LDFLAGS"
+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"; then
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
+else
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
+fi
+test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
+
+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 test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
+ kde_cv_uic_plugins=yes
+ fi
+fi
+rm -f actest.ui actest.cpp
+])
+
+if test "$kde_cv_uic_plugins" = yes; then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_ERROR([not found - you need to install kdelibs first.])
+fi
+fi
+])
+
+AC_DEFUN(KDE_CHECK_FINAL,
+[
+ AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (experimental - needs lots of memory)],
+ kde_use_final=$enableval, kde_use_final=no)
+
+ KDE_COMPILER_REPO
+ 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_ARG_ENABLE(closure, [ --disable-closure don't delay template instantiation],
+ kde_use_closure=$enableval, kde_use_closure=yes)
+
+ 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=""
+ fi
+ AC_SUBST(KDE_USE_CLOSURE_TRUE)
+ AC_SUBST(KDE_USE_CLOSURE_FALSE)
+])
+
+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_PREREQ([2.13])
+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=${prefix}/include
+ ac_kde_includes=$prefix/include
+
+ if test "${exec_prefix}" != NONE; then
+ kde_libraries=${libdir}
+ ac_kde_libraries=$libdir
+ if test "$ac_kde_libraries" = '${exec_prefix}/lib'${kdelibsuff}; then
+ ac_kde_libraries=$exec_prefix/lib${kdelibsuff}
+ fi
+ else
+ kde_libraries=${prefix}/lib${kdelibsuff}
+ ac_kde_libraries=$prefix/lib${kdelibsuff}
+ fi
+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="/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="/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
+
+ 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=${ac_kde_prefix}/include
+
+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_LDFLAGS="-L$kde_libraries"
+if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
+ all_libraries="$all_libraries $KDE_LDFLAGS"
+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, [ --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, [ --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");
+ return 0;
+ }
+EOF
+
+ ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
+ 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
+
+ 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_CHECK_KIMGIO,
+[
+ AC_REQUIRE([AC_BASE_PATH_KDE])
+ AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+ AC_REQUIRE([AC_FIND_TIFF])
+ AC_REQUIRE([AC_FIND_JPEG])
+ AC_REQUIRE([AC_FIND_PNG])
+ AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
+
+ if test "$1" = "existance"; then
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ kde_save_LIBS="$LIBS"
+ LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
+ AC_CHECK_LIB(kimgio, kimgioRegister, [
+ LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
+ LIBS="$kde_save_LIBS"
+ AC_LANG_RESTORE
+ else
+ LIBKIMGIO_EXISTS=yes
+ fi
+
+ if test "$LIBKIMGIO_EXISTS" = "yes"; then
+ LIB_KIMGIO='-lkimgio'
+ else
+ LIB_KIMGIO=''
+ fi
+ AC_SUBST(LIB_KIMGIO)
+])
+
+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
+ AC_SUBST(LIB_KDECORE, "-lkdecore")
+ AC_SUBST(LIB_KDEUI, "-lkdeui")
+ AC_SUBST(LIB_KIO, "-lkio")
+ 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")
+# 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, [ --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|getdomainname|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;
+#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>
+],
+ [
+char buffer[200];
+getdomainname(buffer, 200);
+],
+ [int getdomainname (char *, unsigned int)],
+ [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_MKSTEMP,
+[
+ KDE_CHECK_FUNC_EXT(mkstemp, [
+#include <stdlib.h>
+],
+ [
+mkstemp("/tmp/aaaXXXXXX");
+],
+ [int mkstemp(char *)],
+ [MKSTEMP])
+])
+
+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_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)
+ X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
+ 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)
+
+ AC_MSG_CHECKING([if res_init is available])
+ AC_TRY_COMPILE(
+ [
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+ ],
+ [
+ res_init();
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
+ ],
+ [ AC_MSG_RESULT(no) ]
+ )
+])
+
+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_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"; 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_LANG_C
+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(
+[/* Override any gcc2 internal prototype to avoid an error. */
+struct jpeg_decompress_struct;
+typedef struct jpeg_decompress_struct * j_decompress_ptr;
+typedef int size_t;
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void jpeg_CreateDecompress(j_decompress_ptr cinfo,
+ int version, size_t structsize);
+#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. */
+],
+ [jpeg_CreateDecompress(0L, 0, 0);],
+ 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,
+[
+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
+])
+
+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,
+[
+AC_LANG_C
+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>
+],
+ [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_SUBST(LIBZ)
+ AC_MSG_RESULT($ac_cv_lib_z)
+else
+ AC_MSG_ERROR(not found. Check your installation and look into config.log)
+ LIBZ=""
+ AC_SUBST(LIBZ)
+fi
+])
+
+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"; 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(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"; 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_LANG_C
+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_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 "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
+])
+
+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
+])
+
+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,[ --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,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
+
+ AC_ARG_ENABLE(strict,[ --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,[ --disable-warnings disables compilation with -Wall and similiar],
+ [
+ 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,[ --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 $CFLAGS"
+ else
+ CFLAGS="-g -O2 $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
+
+ 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 -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
+ else
+ if test "$kde_use_debug_code" = "full"; then
+ CXXFLAGS="-g3 $CXXFLAGS"
+ else
+ CXXFLAGS="-g -O2 $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
+ case $host in
+ *-*-linux-gnu)
+ CFLAGS="-ansi -W -Wall -pedantic -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 -Wconversion $CXXFLAGS"
+ ;;
+ esac
+ CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
+ KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
+ KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
+ KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
+ fi
+ fi
+
+ if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
+ CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
+ fi
+
+ if test "$GXX" = "yes"; then
+ 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(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
+ fi
+ 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= )
+
+ AC_ARG_ENABLE(pch,[ --enable-pch enables precompiled header support (currently only KCC) [default=no]],
+ [
+ kde_use_pch=$enableval
+ ],[kde_use_pch=no])
+
+ 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_CXXFLAGS=-O0
+ NOOPT_CFLAGS=-O0
+ fi
+
+ AC_SUBST(NOOPT_CXXFLAGS)
+ AC_SUBST(NOOPT_CFLAGS)
+
+ KDE_CHECK_FINAL
+
+ ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
+])
+
+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_LANG_SAVE
+AC_LANG_C
+AC_OBJEXT
+AC_EXEEXT
+AC_LANG_RESTORE
+
+AM_PROG_LIBTOOL
+AC_LIBTOOL_CXX
+
+LIBTOOL_SHELL="/bin/sh ./libtool"
+# LIBTOOL="$LIBTOOL --silent"
+KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
+AC_SUBST(KDE_PLUGIN)
+
+AC_ARG_ENABLE(objprelink, [ --enable-objprelink prelink apps using objprelink (obsolete)],
+ kde_use_objprelink=$enableval, kde_use_objprelink=no)
+ if test "x$kde_use_objprelink" = "xyes"; then
+ AC_MSG_WARN([
+------------------------------------------------------------
+Configuration option --enable-objprelink is no longer useful.
+See http:://objprelink.sourceforge.net for details:
+1- Recent binutils are fast enough to do without objprelink.
+2- Newer versions of objprelink do not need this option.
+------------------------------------------------------------
+])
+ fi
+])
+
+AC_DEFUN(KDE_CHECK_LIB64,
+[
+ kdelibsuff=none
+ AC_ARG_ENABLE(libsuffix,
+ AC_HELP_STRING([--enable-libsuffix],
+ [/lib directory suffix (64,32,none)]),
+ kdelibsuff=$enableval)
+ if test "$kdelibsuff" = "none"; then
+ if test -d /lib64 ; then
+ kdelibsuff=64
+ else
+ kdelibsuff=
+ fi
+ 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(long, 4)dnl
+ AC_CHECK_SIZEOF(char *, 4)dnl
+ AC_CHECK_SIZEOF(char, 1)dnl
+])dnl
+
+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,
+ [ --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 \$(kde_libraries)"
+
+ 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
+ KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
+ 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_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(ac_cv_socklen_t, [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+ ],[
+socklen_t a=0;
+getsockname(0,(struct sockaddr*)0, &a);
+ ],
+ ac_cv_socklen_t=socklen_t,
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+ ],[
+int a=0;
+getsockname(0,(struct sockaddr*)0, &a);
+ ],
+ ac_cv_socklen_t=int,
+ ac_cv_socklen_t=size_t
+ )
+ )
+ AC_LANG_RESTORE
+ ])
+
+ AC_MSG_RESULT($ac_cv_socklen_t)
+ if test "$ac_cv_socklen_t" != "socklen_t"; then
+ AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
+ [Define the real type of socklen_t])
+ fi
+ AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
+
+])
+
+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 'GNU gettext'`"], msgfmt)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+ if test -z "`$GMSGFMT --version 2>&1 | grep '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 '(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="-Wmissing-prototypes -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, [ --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_LANG_C
+ ac_save_ldflags="$LDFLAGS"
+ ac_save_cflags="$CFLAGS"
+ if test "x$kde_use_qt_emb" != "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, [ --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"; then
+ AC_MSG_RESULT(no)
+ ac_cv_have_dpms="no"
+ else
+ AC_LANG_C
+ ac_save_ldflags="$LDFLAGS"
+ ac_save_cflags="$CFLAGS"
+ ac_save_libs="$LIBS"
+ LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -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", [
+ LDFLAGS="$ac_save_ldflags"
+ CFLAGS="$ac_save_cflags"
+ LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
+ LIBS="$LIBS -lXdpms"
+ 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="-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_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, [ --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"
+ LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
+ test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
+ LDFLAGS="$LDFLAGS $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="mesa", ac_cv_have_gl="no")
+ if test "x$ac_cv_have_gl" = "xno"; then
+ LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
+ test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
+ LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
+ CXXFLAGS="$ac_save_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")
+ fi
+ AC_LANG_RESTORE
+ LDFLAGS="$ac_save_ldflags"
+ CXXFLAGS="$ac_save_cxxflags"
+ ])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
+ if test "$ac_cv_have_gl" = "mesa"; then
+ GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
+ else
+ GLLIB='-lGLU -lGL $(LIB_X11)'
+ fi
+ else
+ if test "$ac_cv_have_gl" = "mesa"; then
+ GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
+ else
+ GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
+ fi
+ 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])
+
+ AC_ARG_WITH(pam,
+ [ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]],
+ [ if test "x$withval" = "xyes"; then
+ use_pam=yes
+ pam_service=kde
+ elif test "x$withval" = "xno"; then
+ use_pam=no
+ else
+ use_pam=yes
+ pam_service=$withval
+ fi
+ ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
+ ], [
+ AC_CACHE_VAL(ac_cv_path_pam,
+ [ use_pam=no
+ AC_CHECK_LIB(pam, pam_start,
+ [ AC_CHECK_HEADER(security/pam_appl.h,
+ [ use_pam=yes
+ pam_service=kde ])
+ ], , $LIBDL)
+ ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
+ ])
+ ])
+ eval "$ac_cv_path_pam"
+
+ AC_MSG_CHECKING(for PAM)
+ if test "x$use_pam" = xno; then
+ AC_MSG_RESULT(no)
+ PAMLIBS=""
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
+ PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
+
+ 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], security/pam_appl.h,
+ [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
+ [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
+
+ AC_SUBST(PAMLIBS)
+])
+
+dnl DEF_PAM_SERVICE(arg name, full name, define name)
+AC_DEFUN(DEF_PAM_SERVICE, [
+ AC_ARG_WITH($1-pam,
+ [ --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,
+ [ --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,
+[ --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 '^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_MICO,
+[
+AC_REQUIRE([KDE_CHECK_LIBDL])
+AC_REQUIRE([KDE_MISC_TESTS])
+AC_MSG_CHECKING(for MICO)
+
+if test -z "$MICODIR"; then
+ kde_micodir=/usr/local
+ else
+ kde_micodir="$MICODIR"
+fi
+
+AC_ARG_WITH(micodir,
+ [ --with-micodir=micodir where mico is installed ],
+ kde_micodir=$withval,
+ kde_micodir=$kde_micodir
+)
+
+AC_CACHE_VAL(kde_cv_mico_incdir,
+[
+ mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
+AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
+
+])
+kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
+
+if test ! -r $kde_micodir/include/CORBA.h; then
+ AC_MSG_ERROR([No CORBA.h found, specify another micodir])
+fi
+
+AC_MSG_RESULT($kde_micodir)
+
+MICO_INCLUDES=-I$kde_micodir/include
+AC_SUBST(MICO_INCLUDES)
+MICO_LDFLAGS=-L$kde_micodir/lib
+AC_SUBST(MICO_LDFLAGS)
+micodir=$kde_micodir
+AC_SUBST(micodir)
+
+AC_MSG_CHECKING([for MICO version])
+AC_CACHE_VAL(kde_cv_mico_version,
+[
+AC_LANG_C
+cat >conftest.$ac_ext <<EOF
+#include <stdio.h>
+#include <mico/version.h>
+int main() {
+
+ printf("MICO_VERSION=%s\n",MICO_VERSION);
+ return (0);
+}
+EOF
+ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
+if AC_TRY_EVAL(ac_compile); then
+ if eval `./conftest 2>&5`; then
+ kde_cv_mico_version=$MICO_VERSION
+ else
+ AC_MSG_ERROR([your system is not able to execute a small application to
+ find MICO version! Check $kde_micodir/include/mico/version.h])
+ fi
+else
+ AC_MSG_ERROR([your system is not able to compile a small application to
+ find MICO version! Check $kde_micodir/include/mico/version.h])
+fi
+])
+
+dnl installed MICO version
+mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
+mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
+mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
+
+if test "x$1" = "x"; then
+ req_version="2.3.0"
+else
+ req_version=$1
+fi
+
+dnl required MICO version
+req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
+req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
+req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
+
+if test "$mico_v_maj" -lt "$req_v_maj" || \
+ ( test "$mico_v_maj" -eq "$req_v_maj" && \
+ test "$mico_v_mid" -lt "$req_v_mid" ) || \
+ ( test "$mico_v_mid" -eq "$req_v_mid" && \
+ test "$mico_v_min" -lt "$req_v_min" )
+
+then
+ AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
+at least is required. You should upgrade MICO.])
+else
+ AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
+fi
+
+LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
+AC_SUBST(LIBMICO)
+if test -z "$IDL"; then
+ IDL='$(kde_bindir)/cuteidl'
+fi
+AC_SUBST(IDL)
+IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
+AC_SUBST(IDL_DEPENDENCIES)
+
+idldir="\$(includedir)/idl"
+AC_SUBST(idldir)
+
+])
+
+AC_DEFUN(KDE_CHECK_MINI_STL,
+[
+AC_REQUIRE([KDE_CHECK_MICO])
+
+AC_MSG_CHECKING(if we use mico's mini-STL)
+AC_CACHE_VAL(kde_cv_have_mini_stl,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+kde_save_cxxflags="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
+AC_TRY_COMPILE(
+[
+#include <mico/config.h>
+],
+[
+#ifdef HAVE_MINI_STL
+#error "nothing"
+#endif
+],
+kde_cv_have_mini_stl=no,
+kde_cv_have_mini_stl=yes)
+CXXFLAGS="$kde_save_cxxflags"
+AC_LANG_RESTORE
+])
+
+if test "x$kde_cv_have_mini_stl" = "xyes"; then
+ AC_MSG_RESULT(yes)
+ $1
+else
+ AC_MSG_RESULT(no)
+ $2
+fi
+])
+
+])
+
+
+AC_DEFUN(KDE_CHECK_LIBPTHREAD,
+[
+AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
+AC_SUBST(LIBPTHREAD)
+])
+
+AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
+[
+ AC_ARG_ENABLE(kernel-threads, [ --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
+ kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
+
+ if test "$kde_use_kernthreads" = "yes"; then
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ ac_save_CFLAGS="$CFLAGS"
+ CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
+ CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
+ AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ CFLAGS="$ac_save_CFLAGS"
+ if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
+ kde_use_kernthreads=no
+ else
+ dnl Add proper -I and -l statements
+ AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
+ if test "x$LIBPTHREAD" = "x"; then
+ kde_use_kernthreads=no
+ else
+ USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
+ fi
+ fi
+ else
+ USE_THREADS=""
+ if test -z "$LIBPTHREAD"; then
+ KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
+ fi
+ 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"
+ ;;
+ 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, [ --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,
+[
+AC_LANG_SAVE
+AC_LANG_C
+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
+AC_LANG_RESTORE
+
+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,
+[ --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 /usr/lib /usr/local /usr/lib $kde_extra_libs"
+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
+
+PYTHONLIB=-L$python_libdir
+kde_orig_LIBPYTHON=$LIBPYTHON
+if test -z "$LIBPYTHON"; then
+ LIBPYTHON=-lpython$version
+fi
+
+python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
+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(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
+ [AC_MSG_WARN([it seems, Python depends on another library.
+ Pleae 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.2",
+ [KDE_CHECK_PYTHON_INTERN("2.1",
+ [KDE_CHECK_PYTHON_INTERN("2.0", [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
+ ])])
+])
+
+AC_DEFUN(KDE_CHECK_STL_SGI,
+[
+ AC_MSG_CHECKING([if STL implementation is SGI like])
+ AC_CACHE_VAL(kde_cv_stl_type_sgi,
+ [
+ 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_type_sgi=yes,
+ kde_cv_stl_type_sgi=no)
+])
+
+ AC_MSG_RESULT($kde_cv_stl_type_sgi)
+
+ if test "$kde_cv_stl_type_sgi" = "yes"; then
+ AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
+ fi
+])
+
+AC_DEFUN(KDE_CHECK_STL_HP,
+[
+ AC_MSG_CHECKING([if STL implementation is HP like])
+ AC_CACHE_VAL(kde_cv_stl_type_hp,
+ [
+ AC_TRY_COMPILE([
+#include <string>
+using namespace std;
+],[
+ string astring="Hello World";
+ astring.remove(0, 6); // now astring is "World"
+ return 0;
+], kde_cv_stl_type_hp=yes,
+ kde_cv_stl_type_hp=no)
+])
+ AC_MSG_RESULT($kde_cv_stl_type_hp)
+
+ if test "$kde_cv_stl_type_hp" = "yes"; then
+ AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
+ fi
+])
+
+AC_DEFUN(KDE_CHECK_STL,
+[
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
+ KDE_CHECK_STL_SGI
+
+ if test "$kde_cv_stl_type_sgi" = "no"; then
+ KDE_CHECK_STL_HP
+
+ if test "$kde_cv_stl_type_hp" = "no"; then
+ AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
+ fi
+ 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(KDE_CHECK_ANSI,
+[
+])
+
+AC_DEFUN(KDE_CHECK_INSURE,
+[
+ AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
+ [
+ if test $enableval = "no"; dnl
+ then ac_use_insure="no"
+ else ac_use_insure="yes"
+ fi
+ ], [ac_use_insure="no"])
+
+ AC_MSG_CHECKING(if we will use Insure++ to debug)
+ AC_MSG_RESULT($ac_use_insure)
+ if test "$ac_use_insure" = "yes"; dnl
+ then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
+ 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"
+
+if test ! -s $srcdir/subdirs; then
+ dnl Note: Makefile.common creates subdirs, so this is just a fallback
+ TOPSUBDIRS=""
+ 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
+
+if test -s $srcdir/inst-apps; then
+ ac_topsubdirs="`cat $srcdir/inst-apps`"
+else
+ 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
+])
+
+AC_DEFUN(KDE_CHECK_NEWLIBS,
+[
+
+])
+
+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_LANG_SAVE
+AC_LANG_C
+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_LANG_RESTORE
+])
+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,
+[
+AC_LANG_C
+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 '^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] )
+])
+
+dnl -------------------------------------------------------------------------
+dnl See if the compiler supports a template repository bero@redhat.de
+dnl -------------------------------------------------------------------------
+AC_DEFUN(KDE_COMPILER_REPO,
+[
+ REPO=""
+ NOREPO=""
+
+ KDE_CHECK_COMPILER_FLAG(frepo,
+ [
+ REPO="-frepo"
+ NOREPO="-fno-repo"
+ ])
+
+ if test -z "$REPO"; then
+ KDE_CHECK_COMPILER_FLAG(instances=explicit,
+ [
+ REPO="-instances=explicit"
+ NOREPO="-instances=extern"
+ ])
+ fi
+
+ if test -n "$REPO"; then
+ AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
+ [C++ compiler supports template repository])
+ $1
+ fi
+
+ AC_SUBST(REPO)
+ AC_SUBST(NOREPO)
+])
+
+AC_DEFUN(KDE_CHECK_HEADER,
+[
+ AC_LANG_SAVE
+ kde_safe_cppflags=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $all_includes"
+ AC_LANG_CPLUSPLUS
+ AC_CHECK_HEADER($1, $2, $3)
+ CPPFLAGS=$kde_safe_cppflags
+ AC_LANG_RESTORE
+])
+
+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, [ --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
+
+AC_DEFUN(KDE_SET_PREFIX,
+[
+ 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 superflous '/' 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_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,
+[ --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_libhpidir=no
+else
+ if test "x$ac_java_dir" = "x"; then
+
+
+ dnl No option set -> look in $PATH
+ KDE_JAVA_PREFIX(/usr/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/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
+ javadirs="$javadirs $dir"
+ done
+ IFS=$kde_save_IFS
+ jredirs=
+
+ for dir in $javadirs; do
+ if test ! -d $dir; then break; fi
+ if test -x "$dir/java"; 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
+ done
+
+ 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 libhpi.so and avoid green threads
+ kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -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..
+ 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"
+
+ else
+ JAVAC=
+ jni_includes=
+ fi
+
+ if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
+ AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
+ 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
+
+ if test ! -r "$kde_java_libhpidir/libhpi.so"; then
+ AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
+ 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])
+ JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
+ 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
+else # no
+ 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,
+ [ --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], 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_C
+kde_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $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"
+CFLAGS="$kde_save_CFLAGS"
+])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_flags=
+ KDE_CHECK_COMPILER_FLAG(shared, [
+ cxx_shared_flag="-shared"
+ ])
+
+ AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
+ AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
+ [
+ AC_LANG_C
+ kde_save_LIBS="$LIBS"
+ LIBS="$all_libraries $USER_LDFLAGS $cxx_shared_flag -lbz2 $LIBSOCKET"
+ kde_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $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"
+ CFLAGS="$kde_save_CFLAGS"
+ ])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,
+ [ --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,
+ [ --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_LANG_SAVE
+ AC_LANG_C
+
+ ac_cflags_safe="$CFLAGS"
+ ac_ldflags_safe="$LDFLAGS"
+ ac_libs_safe="$LIBS"
+
+ CFLAGS="$CFLAGS -I$ssl_incdir $all_includes"
+ 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"
+ )
+
+ CFLAGS="$ac_cflags_safe"
+ LDFLAGS="$ac_ldflags_safe"
+ LIBS="$ac_libs_safe"
+
+ AC_LANG_RESTORE
+
+ 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,
+ [
+ AC_LANG_SAVE
+ AC_LANG_C
+
+ 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_compile='${CC-gcc} $CFLAGS -I$ac_ssl_includes conftest.$ac_ext -o conftest'
+ if AC_TRY_EVAL(ac_compile); 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
+
+ AC_LANG_RESTORE
+
+ ])
+
+ 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
+
+if test "$ssl_includes" = "/usr/include" || test "$ssl_includes" = "/usr/local/include" || test -z "$ssl_includes"; then
+ SSL_INCLUDES="";
+else
+ SSL_INCLUDES="-I$ssl_includes"
+fi
+
+if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries"; 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_CHECK_STRLCPY
+ AC_CHECK_STRLCAT
+ 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!
+ ])
+ ])
+])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+
+# serial 47 AC_PROG_LIBTOOL
+
+# 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 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_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([LT_AC_PROG_SED])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(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
+
+ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+ifdef([AC_PROVIDE_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.
+set dummy $CC
+compiler="[$]2"
+])# _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_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],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+
+# 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)
+AC_DIVERT_POP
+])# _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
+ 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
+ rm -rf conftest*
+ ;;
+
+*-*-linux*)
+ # Test if the compiler is 64bit
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *"ELF 32"*)
+ LINUX_64_MODE="32"
+ ;;
+ *"ELF 64"*)
+ LINUX_64_MODE="64"
+ ;;
+ 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
+ ;;
+ifdef([AC_PROVIDE_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)
+
+ # recent cygwin and mingw systems supply a stub DllMain which the user
+ # can override, but on older systems we have to supply one
+ AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
+ [AC_TRY_LINK([],
+ [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
+ DllMain (0, 0, 0);],
+ [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
+
+ case $host/$CC in
+ *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
+ # old mingw systems require "-dll" to link a DLL, while more recent ones
+ # require "-mdll"
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -mdll"
+ AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
+ [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
+ CFLAGS="$SAVE_CFLAGS" ;;
+ *-*-cygwin* | *-*-pw32*)
+ # cygwin systems need to pass --dll to the linker, and not link
+ # crt.o which will require a WinMain@16 definition.
+ lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
+ esac
+ ;;
+ ])
+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_CACHE_CHECK([$1], [$2],
+ [$2=no
+ ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $3"
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ if (eval $ac_compile 2>conftest.err) && 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
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ else
+ $2=yes
+ fi
+ fi
+ $rm conftest*
+ CFLAGS="$save_CFLAGS"
+])
+
+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"
+ echo "$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 $host_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;
+ ;;
+
+ *)
+ # 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
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ *)
+ 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
+ ifelse([$1],[],[save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
+ [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
+ [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
+ GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
+ echo "$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 .
+
+ if (eval $ac_compile 2>out/conftest.err) && 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
+ # Append any errors to the config.log.
+ cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
+ else
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
+ [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
+ [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
+ 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)"; then
+
+ # We can hardcode non-existant directories.
+ if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_AC_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+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=
+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}.so$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}.so$major'
+ ;;
+
+aix4* | aix5*)
+ version_type=linux
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ 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}.so$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}.so'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi4*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$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
+ need_version=no
+ need_lib_prefix=no
+ case $GCC,$host_os in
+ yes,cygwin*)
+ library_names_spec='$libname.dll.a'
+ sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
+ postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog .libs/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $rm \$dlpath'
+ ;;
+ yes,mingw*)
+ library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
+ if echo "$sys_lib_search_path_spec" | [egrep ';[C-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
+ ;;
+ yes,pw32*)
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
+ ;;
+ *)
+ library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $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
+ # FIXME: Relying on posixy $() will cause problems for
+ # cross-compilation, but unfortunately the echo tests do not
+ # yet detect zsh echo's removal of \ escapes.
+ library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
+ soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+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}.so$versuffix ${libname}${release}.so $libname.so'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}.so$versuffix $libname.so$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}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
+ soname_spec='${libname}${release}.so$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
+ if test "$host_cpu" = ia64; then
+ 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}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$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
+ else
+ 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}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
+ soname_spec='${libname}${release}.sl$major'
+ fi
+ # 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 ;;
+ *) version_type=irix ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}.so$major'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 ") 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}"
+ ;;
+
+# 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}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$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; 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 __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
+ soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so'
+ 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}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ need_lib_prefix=no
+ library_names_spec='$libname.dll $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}.so'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ 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}.so$major'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=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.so.$versuffix $libname.so.$major $libname.so'
+ soname_spec='$libname.so.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$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 @<:@CXX,GCJ@:>@])],
+ [tagnames="$withval"],
+ [tagnames="CXX,GCJ"
+ case $host_os in
+ mingw*|cygwin*) tagnames="$tagnames,RC" ;;
+ esac])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+ if test ! -f "${ofile}"; then
+ AC_MSG_WARN([output file `$ofile' does not exist])
+ fi
+
+ if test -z "$LTCC"; then
+ eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+ if test -z "$LTCC"; then
+ AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+ else
+ AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+ fi
+ fi
+
+ # Extract list of available tagged configurations in $ofile.
+ # Note that this assumes the entire list is on one line.
+ available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for tagname in $tagnames; do
+ IFS="$lt_save_ifs"
+ # Check whether tagname contains only valid characters
+ case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+ "") ;;
+ *) AC_MSG_ERROR([invalid tag name: $tagname])
+ ;;
+ esac
+
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+ then
+ AC_MSG_ERROR([tag name \"$tagname\" already exists])
+ fi
+
+ # Update the list of available tags.
+ if test -n "$tagname"; then
+ echo appending configuration tag \"$tagname\" to $ofile
+
+ case $tagname in
+ CXX)
+ AC_LIBTOOL_LANG_CXX_CONFIG
+ ;;
+
+ GCJ)
+ AC_LIBTOOL_LANG_GCJ_CONFIG
+ ;;
+
+ 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.
+ available_tags="$available_tags $tagname"
+ 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_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[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 path 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([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 GCC])
+ 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 path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ 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_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.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ lt_cv_prog_gnu_ld=yes
+else
+ lt_cv_prog_gnu_ld=no
+fi])
+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 dependant 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 egrep 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* | mingw* | pw32*)
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method='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
+ ;;
+
+freebsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ if test "$host_cpu" = ia64; then
+ 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
+ else
+ 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
+ fi
+ ;;
+
+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 | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
+ 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 __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+nto-qnx)
+ lt_cv_deplibs_check_method=unknown
+ ;;
+
+openbsd*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
+ else
+ lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ # 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
+ ;;
+ 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 path 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
+ if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ else
+ 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
+ fi
+ 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*)
+ # These system don't have libm
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, main, 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, main,
+ [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
+
+
+# If this macro is not defined by Autoconf, define it here.
+ifdef([AC_PROVIDE_IFELSE],
+ [],
+ [define([AC_PROVIDE_IFELSE],
+ [ifdef([AC_PROVIDE_$1],
+ [$2], [$3])])])
+
+
+# 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_LANG_CXX
+
+
+# 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_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# --------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([AC_PROG_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;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='main(){return(0);}'
+
+_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 " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
+ else
+ AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
+ _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
+ fi
+fi
+
+
+#
+# Check to make sure the static flag actually works.
+#
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
+ _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+ $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
+ [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+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
+ ;;
+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_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_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)=
+
+# 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;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int char *[]) { return(0); }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${CXX-"c++"}
+set dummy $CC
+compiler="[$]2"
+_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
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
+ egrep 'GNU ld' > /dev/null; then
+ with_gnu_ld=yes
+
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+ egrep '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 $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-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 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 $libobjs $deplibs $compiler_flags `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 $libobjs $deplibs $compiler_flags `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 $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ 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*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+ gnu*)
+ ;;
+ hpux*)
+ if test $with_gnu_ld = no; then
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ else
+ _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'
+ fi
+ fi
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ else
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ fi
+ _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)
+ case $host_os in
+ hpux9*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ ;;
+ *)
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ fi
+ ;;
+ 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) | egrep "\-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_os in
+ hpux9*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ ;;
+ *)
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ fi
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC)
+ # SGI C++
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $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)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; 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'
+ ;;
+ cxx)
+ # Compaq C++
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ esac
+ ;;
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ netbsd*)
+ # NetBSD uses g++ - do we need to do anything?
+ ;;
+ 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)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-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)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
+ $rm $lib.exp'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ sco*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ case $cc_basename in
+ CC)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The C++ compiler is used as linker so we must use $wl
+ # flag to pass the commands to the underlying system
+ # linker.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx)
+ # Green Hills C++ Compiler
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | egrep -v '^2\.7' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-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
+
+# Figure out "hidden" C++ library dependencies from verbose
+# compiler output whening linking a shared library.
+cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+EOF
+
+
+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
+else
+ echo "libtool.m4: error: problem compiling C++ test program"
+fi
+
+$rm -f confest.$objext
+
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
+esac
+
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_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_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_CXX_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 C test sources.
+ac_ext=java
+
+# 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="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+set dummy $CC
+compiler="[$]2"
+_LT_AC_TAGVAR(compiler, $1)=$CC
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+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 }'
+
+# 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"}
+set dummy $CC
+compiler="[$]2"
+_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
+ # 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 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(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_separator, $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(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.
+
+# 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 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)
+
+# 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 sed program that does not truncate output.
+SED=$lt_SED
+
+# 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"
+
+# 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 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)
+
+# 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.so 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)
+
+# 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
+ ;;
+
+ cygwin* | mingw* | pw32* | os2*)
+ cat <<'EOF' >> "$cfgfile"
+ # This is a source program that is used to create dlls on Windows
+ # Don't remove nor modify the starting and closing comments
+ _LT_AC_FILE_LTDLL_C
+ # This is a source program that is used to create import libraries
+ # on Windows for dlls which lack them. Don't remove nor modify the
+ # starting and closing comments
+ _LT_AC_FILE_IMPGEN_C
+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 -c conftest.$ac_ext], [],
+ [_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]]'
+ ;;
+solaris* | sysv5*)
+ symcode='[[BDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $host_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.
+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
+ symcode='[[ABCDGISTW]]'
+fi
+
+# 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 egrep ' nm_test_var$' "$nlist" >/dev/null; then
+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+ cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+ sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+ cat <<\EOF >> conftest.$ac_ext
+ {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ cygwin* | mingw* | 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'
+ ;;
+ *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, but not for PA HP-UX.
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ fi
+ ;;
+ *)
+ _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*)
+ # 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"
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ *)
+ ;;
+ 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'
+ ;;
+ 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* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ cygwin* | 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, but not for PA HP-UX.
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ fi
+ ;;
+
+ *)
+ _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
+ ;;
+
+ cygwin* | 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,'
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ # 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'
+ ;;
+
+ 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*)
+ if test "x$host_vendor" = xsni; then
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
+ else
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ fi
+ _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) -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) -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 | egrep '(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
+ ;;
+ cygwin* | mingw* | pw32*)
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ *)
+ _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(archive_cmds, $1)=
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $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_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(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 egrep regular expression 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 | egrep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+
+ extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
+ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
+ test -f $output_objdir/impgen.exe || (cd $output_objdir && \
+ if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
+ else $CC -o impgen impgen.c ; fi)~
+ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
+
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
+
+ # cygwin and mingw dlls have different entry points and sets of symbols
+ # to exclude.
+ # FIXME: what about values for MSVC?
+ dll_entry=__cygwin_dll_entry@12
+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
+ case $host_os in
+ mingw*)
+ # mingw values
+ dll_entry=_DllMainCRTStartup@12
+ dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
+ ;;
+ esac
+
+ # mingw and cygwin differ, and it's simplest to just exclude the union
+ # of the two symbol sets.
+ dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
+
+ # recent cygwin and mingw systems supply a stub DllMain which the user
+ # can override, but on older systems we have to supply one (in ltdll.c)
+ if test "x$lt_cv_need_dllmain" = "xyes"; then
+ ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
+ ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
+ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
+ else
+ ltdll_obj=
+ ltdll_cmds=
+ fi
+
+ # Extract the symbol export list from an `--export-all' def file,
+ # then regenerate the def file from the symbol export list, so that
+ # the compiled dll only exports the symbol export list.
+ # Be careful not to strip the DATA tag left by newer dlltools.
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
+ $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
+ sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
+
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is.
+ # If DATA tags from a recent dlltool are present, honour them!
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname-def;
+ else
+ echo EXPORTS > $output_objdir/$soname-def;
+ _lt_hint=1;
+ cat $export_symbols | while read symbol; do
+ set dummy \$symbol;
+ case \[$]# in
+ 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
+ *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
+ esac;
+ _lt_hint=`expr 1 + \$_lt_hint`;
+ done;
+ fi~
+ '"$ltdll_cmds"'
+ $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
+ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
+ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | egrep '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 | egrep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sunos4*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
+ runpath_var=LD_RUN_PATH
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # dlltool doesn't understand --whole-archive et. al.
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ ;;
+ *)
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | egrep '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
+ ;;
+ esac
+ 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 | egrep '(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 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 $libobjs $deplibs $compiler_flags `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 $libobjs $deplibs $compiler_flags `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 $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ # see comment about different semantics on the GNU ld section
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ bsdi4*)
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ ;;
+
+ darwin* | rhapsody*)
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
+ ;;
+ *) # Darwin 1.3 on
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ ;;
+ esac
+
+ # FIXME: Relying on posixy $() will cause problems for
+ # cross-compilation, but unfortunately the echo tests do not
+ # yet detect zsh echo's removal of \ escapes. Also zsh mangles
+ # `"' quotes if we put them in here... so don't!
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
+ # We need to add '_' to the symbols in $export_symbols first
+ #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+ ;;
+
+ 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*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ if test "$GCC" = yes; then
+ case $host_os in
+ hpux9*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ ;;
+ *)
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+ esac
+ else
+ case $host_os in
+ hpux9*)
+ _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'
+ ;;
+ *)
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ ;;
+ esac
+ fi
+ if test "$host_cpu" = ia64; then
+ _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
+ else
+ _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
+ fi
+ # 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'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ openbsd*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+
+ os2*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ sco3.2v5*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ;;
+
+ solaris*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+ esac
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ if test "x$host_vendor" = xsni; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ else
+ _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
+ fi
+ runpath_var='LD_RUN_PATH'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4.2uw2*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ hardcode_runpath_var=yes
+ runpath_var=LD_RUN_PATH
+ ;;
+
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ runpath_var='LD_RUN_PATH'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv5*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+ ;;
+
+ uts4*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+_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*
+ echo 'static int dummy;' > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+ then
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $rm conftest*
+ AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+ ;;
+ esac
+fi
+])# 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_FILE_IMPGEN_C
+# --------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
+# /* impgen.c starts here */
+# /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+#
+# This file is part of GNU libtool.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You 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.
+# */
+#
+# #include <stdio.h> /* for printf() */
+# #include <unistd.h> /* for open(), lseek(), read() */
+# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
+# #include <string.h> /* for strdup() */
+#
+# /* O_BINARY isn't required (or even defined sometimes) under Unix */
+# #ifndef O_BINARY
+# #define O_BINARY 0
+# #endif
+#
+# static unsigned int
+# pe_get16 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[2];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 2);
+# return b[0] + (b[1]<<8);
+# }
+#
+# static unsigned int
+# pe_get32 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[4];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 4);
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# static unsigned int
+# pe_as32 (ptr)
+# void *ptr;
+# {
+# unsigned char *b = ptr;
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# int
+# main (argc, argv)
+# int argc;
+# char *argv[];
+# {
+# int dll;
+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
+# unsigned long export_rva, export_size, nsections, secptr, expptr;
+# unsigned long name_rvas, nexp;
+# unsigned char *expdata, *erva;
+# char *filename, *dll_name;
+#
+# filename = argv[1];
+#
+# dll = open(filename, O_RDONLY|O_BINARY);
+# if (dll < 1)
+# return 1;
+#
+# dll_name = filename;
+#
+# for (i=0; filename[i]; i++)
+# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
+# dll_name = filename + i +1;
+#
+# pe_header_offset = pe_get32 (dll, 0x3c);
+# opthdr_ofs = pe_header_offset + 4 + 20;
+# num_entries = pe_get32 (dll, opthdr_ofs + 92);
+#
+# if (num_entries < 1) /* no exports */
+# return 1;
+#
+# export_rva = pe_get32 (dll, opthdr_ofs + 96);
+# export_size = pe_get32 (dll, opthdr_ofs + 100);
+# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
+# secptr = (pe_header_offset + 4 + 20 +
+# pe_get16 (dll, pe_header_offset + 4 + 16));
+#
+# expptr = 0;
+# for (i = 0; i < nsections; i++)
+# {
+# char sname[8];
+# unsigned long secptr1 = secptr + 40 * i;
+# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
+# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
+# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
+# lseek(dll, secptr1, SEEK_SET);
+# read(dll, sname, 8);
+# if (vaddr <= export_rva && vaddr+vsize > export_rva)
+# {
+# expptr = fptr + (export_rva - vaddr);
+# if (export_rva + export_size > vaddr + vsize)
+# export_size = vsize - (export_rva - vaddr);
+# break;
+# }
+# }
+#
+# expdata = (unsigned char*)malloc(export_size);
+# lseek (dll, expptr, SEEK_SET);
+# read (dll, expdata, export_size);
+# erva = expdata - export_rva;
+#
+# nexp = pe_as32 (expdata+24);
+# name_rvas = pe_as32 (expdata+32);
+#
+# printf ("EXPORTS\n");
+# for (i = 0; i<nexp; i++)
+# {
+# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
+# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
+# }
+#
+# return 0;
+# }
+# /* impgen.c ends here */
+])# _LT_AC_FILE_IMPGEN_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 ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+
+ # Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=$TMPDIR/sed$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ { (exit 1); exit 1; }
+}
+ _max=0
+ _count=0
+ # Add /usr/xpg4/bin/sed as it is typically found on Solaris
+ # along with /bin/sed that truncates output.
+ for _sed in $_sed_list /usr/xpg4/bin/sed; do
+ test ! -f ${_sed} && break
+ cat /dev/null > "$tmp/sed.in"
+ _count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
+ # Check for GNU sed and select it if it is found.
+ if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
+ lt_cv_path_SED=${_sed}
+ break;
+ fi
+ while true; do
+ cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
+ mv "$tmp/sed.tmp" "$tmp/sed.in"
+ cp "$tmp/sed.in" "$tmp/sed.nl"
+ echo >>"$tmp/sed.nl"
+ ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
+ cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
+ # 10000 chars as input seems more than enough
+ test $_count -gt 10 && break
+ _count=`expr $_count + 1`
+ if test $_count -gt $_max; then
+ _max=$_count
+ lt_cv_path_SED=$_sed
+ fi
+ done
+ done
+ rm -rf "$tmp"
+])
+AC_MSG_RESULT([$SED])
+])
+
+# Do all the work for Automake. 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.
+
+# serial 5
+
+# 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...
+
+
+# We require 2.13 because we rely on SHELL being computed by configure.
+AC_PREREQ([2.13])
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
+# The purpose of this macro is to provide the user with a means to
+# check macros which are provided without letting her know how the
+# information is coded.
+# If this macro is not defined by Autoconf, define it here.
+ifdef([AC_PROVIDE_IFELSE],
+ [],
+ [define([AC_PROVIDE_IFELSE],
+ [ifdef([AC_PROVIDE_$1],
+ [$2], [$3])])])
+
+
+# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
+# ----------------------------------------------
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
+fi
+
+# Define the identity of the package.
+PACKAGE=$1
+AC_SUBST(PACKAGE)dnl
+VERSION=$2
+AC_SUBST(VERSION)dnl
+ifelse([$3],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
+
+# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
+# the ones we care about.
+ifdef([m4_pattern_allow],
+ [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
+
+# Autoconf 2.50 always computes EXEEXT. However we need to be
+# compatible with 2.13, for now. So we always define EXEEXT, but we
+# don't compute it.
+AC_SUBST(EXEEXT)
+# Similar for OBJEXT -- only we only use OBJEXT if the user actually
+# requests that it be used. This is a bit dumb.
+: ${OBJEXT=o}
+AC_SUBST(OBJEXT)
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal)
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake)
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+AC_REQUIRE([AM_SET_DEPDIR])dnl
+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
+])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+
+# serial 2
+
+# 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=
+ am_backtick='`'
+ AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# 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], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
+])
+
+# 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)])
+
+# 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
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# serial 4 -*- Autoconf -*-
+
+
+
+# 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" 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
+
+ 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
+ # 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.
+ echo '#include "conftest.h"' > conftest.c
+ echo 'int i;' > conftest.h
+ echo "${am__include} ${am__quote}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=conftest.c object=conftest.o \
+ depfile=conftest.Po tmpdepfile=conftest.TPo \
+ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+ grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
+AC_SUBST([$1DEPMODE])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+ DEPDIR=.deps
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ DEPDIR=_deps
+fi
+rmdir .deps 2>/dev/null
+AC_SUBST(DEPDIR)
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+pushdef([subst], defn([AC_SUBST]))
+subst(AMDEPBACKSLASH)
+popdef([subst])
+])
+
+# Generate code to set up dependency tracking.
+# This macro should only be invoked once -- use via AC_REQUIRE.
+# Usage:
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+
+#
+# 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_OUTPUT_COMMANDS([
+test x"$AMDEP_TRUE" != x"" ||
+for mf in $CONFIG_FILES; do
+ case "$mf" in
+ Makefile|GNUmakefile) dirpart=.;;
+ */Makefile|*/GNUmakefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
+ *) continue;;
+ esac
+ grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
+ $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+], [AMDEP_TRUE="$AMDEP_TRUE"
+ac_aux_dir="$ac_aux_dir"])])
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+ @echo done
+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 | fgrep -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
+])
+
+# serial 3
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+#
+# FIXME: Once using 2.50, use this:
+# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE],
+ [errprint(__file__:__line__: [$0: invalid condition: $1
+])dnl
+m4exit(1)])dnl
+ifelse([$1], [FALSE],
+ [errprint(__file__:__line__: [$0: invalid condition: $1
+])dnl
+m4exit(1)])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
+
+
+# AM_PROG_LEX
+# Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
+AC_DEFUN([AM_PROG_LEX],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+AC_CHECK_PROGS(LEX, flex lex, [${am_missing_run}flex])
+AC_PROG_LEX
+AC_DECL_YYTEXT])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+# serial 3
+
+# 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. We must strip everything past the first ":",
+# and everything past the last "/".
+
+AC_PREREQ([2.12])
+
+AC_DEFUN([AM_CONFIG_HEADER],
+[ifdef([AC_FOREACH],dnl
+ [dnl init our file count if it isn't already
+ m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
+ dnl prepare to store our destination file list for use in config.status
+ AC_FOREACH([_AM_File], [$1],
+ [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
+ m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
+ dnl and add it to the list of files AC keeps track of, along
+ dnl with our hook
+ AC_CONFIG_HEADERS(_AM_File,
+dnl COMMANDS, [, INIT-CMDS]
+[# update the timestamp
+echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
+][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
+ m4_popdef([_AM_Dest])])],dnl
+[AC_CONFIG_HEADER([$1])
+ AC_OUTPUT_COMMANDS(
+ ifelse(patsubst([$1], [[^ ]], []),
+ [],
+ [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
+ patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
+[am_indx=1
+for am_file in $1; do
+ case " \$CONFIG_HEADERS " in
+ *" \$am_file "*)
+ am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
+ if test -n "\$am_dir"; then
+ am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
+ for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
+ am_tmpdir=\$am_tmpdir\$am_subdir/
+ if test ! -d \$am_tmpdir; then
+ mkdir \$am_tmpdir
+ fi
+ done
+ fi
+ echo timestamp > "\$am_dir"stamp-h\$am_indx
+ ;;
+ esac
+ am_indx=\`expr \$am_indx + 1\`
+done])
+])]) # AM_CONFIG_HEADER
+
+# _AM_DIRNAME(PATH)
+# -----------------
+# Like AS_DIRNAME, only do it during macro expansion
+AC_DEFUN([_AM_DIRNAME],
+ [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
+ m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
+ m4_if(m4_regexp([$1], [^/.*]), -1,
+ [.],
+ m4_patsubst([$1], [^\(/\).*], [\1])),
+ m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
+ m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
+]) # _AM_DIRNAME
+
diff --git a/config.guess b/config.guess
new file mode 100644
index 0000000..0f0fe71
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1516 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2007-03-06'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 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.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa:Linux:*:*)
+ echo xtensa-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..16dc24f
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,169 @@
+/* config.h.in. Generated from configure.in by autoheader. */
+
+/* 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 to 1 if you have the <pthread/linuxthreads/pthread.h> header file.
+ */
+#undef HAVE_PTHREAD_LINUXTHREADS_PTHREAD_H
+
+/* Define if you have the res_init function */
+#undef HAVE_RES_INIT
+
+/* 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 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
+
+/* C++ compiler supports template repository */
+#undef HAVE_TEMPLATE_REPOSITORY
+
+/* 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 if you want Xinerama support */
+#undef HAVE_XINERAMA
+
+/* Suffix for lib directories */
+#undef KDELIBSUFF
+
+/* 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 a `char', as computed by sizeof. */
+#undef SIZEOF_CHAR
+
+/* The size of a `char *', as computed by sizeof. */
+#undef SIZEOF_CHAR_P
+
+/* The size of a `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
+/* The size of a `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/*
+ * 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
+
+
+
+/*
+ * 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
+
+
+/* Compatibility define */
+#undef ksize_t
+
+/* Define the real type of socklen_t */
+#undef socklen_t
diff --git a/config.log b/config.log
new file mode 100644
index 0000000..f7d53bc
--- /dev/null
+++ b/config.log
@@ -0,0 +1,300 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by configure, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ $ ./configure --host=x86_64-linux-gnu --build=x86_64-linux-gnu --enable-libsuffix --disable-debug --disable-rpath --sysconfdir=/etc --includedir=/opt/kde3/include/kde --infodir=/opt/kde3/share/info --mandir=/opt/kde3/share/man --with-qt-dir=/usr/share/qt3 --prefix=/opt/kde3 --with-extra-libs=/opt/kde3/lib
+
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = argus4
+uname -m = x86_64
+uname -r = 2.6.31-16-generic
+uname -s = Linux
+uname -v = #53-Ubuntu SMP Tue Dec 8 04:02:15 UTC 2009
+
+/usr/bin/uname -p = unknown
+/bin/uname -X = unknown
+
+/bin/arch = unknown
+/usr/bin/arch -k = unknown
+/usr/convex/getsysinfo = unknown
+hostinfo = unknown
+/bin/machine = unknown
+/usr/bin/oslevel = unknown
+/bin/universe = unknown
+
+PATH: /opt/kde3/bin
+PATH: /opt/kde3/games
+PATH: /opt/kde3/bin
+PATH: /home/eldarion/bin
+PATH: /usr/local/sbin
+PATH: /usr/local/bin
+PATH: /usr/sbin
+PATH: /usr/bin
+PATH: /sbin
+PATH: /bin
+PATH: /usr/games
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+configure:1509: checking build system type
+configure:1527: result: x86_64-pc-linux-gnu
+configure:1535: checking host system type
+configure:1549: result: x86_64-pc-linux-gnu
+configure:1557: checking target system type
+configure:1571: result: x86_64-pc-linux-gnu
+configure:1616: checking for a BSD-compatible install
+configure:1670: result: /usr/bin/install -c
+configure:1685: checking for -p flag to install
+configure:1698: result: yes
+configure:1709: checking whether build environment is sane
+
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+
+ac_cv_build=x86_64-pc-linux-gnu
+ac_cv_build_alias=x86_64-linux-gnu
+ac_cv_env_CC_set=
+ac_cv_env_CC_value=
+ac_cv_env_CFLAGS_set=set
+ac_cv_env_CFLAGS_value='-Wall -g -O2'
+ac_cv_env_CPPFLAGS_set=set
+ac_cv_env_CPPFLAGS_value=
+ac_cv_env_CPP_set=
+ac_cv_env_CPP_value=
+ac_cv_env_CXXCPP_set=
+ac_cv_env_CXXCPP_value=
+ac_cv_env_CXXFLAGS_set=set
+ac_cv_env_CXXFLAGS_value='-g -O2'
+ac_cv_env_CXX_set=
+ac_cv_env_CXX_value=
+ac_cv_env_LDFLAGS_set=set
+ac_cv_env_LDFLAGS_value=-Wl,-Bsymbolic-functions
+ac_cv_env_build_alias_set=set
+ac_cv_env_build_alias_value=x86_64-linux-gnu
+ac_cv_env_host_alias_set=set
+ac_cv_env_host_alias_value=x86_64-linux-gnu
+ac_cv_env_target_alias_set=
+ac_cv_env_target_alias_value=
+ac_cv_host=x86_64-pc-linux-gnu
+ac_cv_host_alias=x86_64-linux-gnu
+ac_cv_path_install='/usr/bin/install -c'
+ac_cv_target=x86_64-pc-linux-gnu
+ac_cv_target_alias=x86_64-linux-gnu
+
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+
+ACLOCAL=''
+AMDEPBACKSLASH=''
+AMDEP_FALSE=''
+AMDEP_TRUE=''
+AMTAR=''
+ARTSCCONFIG=''
+AUTOCONF=''
+AUTODIRS=''
+AUTOHEADER=''
+AUTOMAKE=''
+AWK=''
+CC=''
+CCDEPMODE=''
+CFLAGS='-Wall -g -O2'
+CONF_FILES=''
+CPP=''
+CPPFLAGS=''
+CXX=''
+CXXCPP=''
+CXXDEPMODE=''
+CXXFLAGS='-g -O2'
+DCOPIDL2CPP=''
+DCOPIDL=''
+DCOP_DEPENDENCIES=''
+DEFS=''
+DEPDIR=''
+ECHO='echo'
+ECHO_C=''
+ECHO_N='-n'
+ECHO_T=''
+EGREP=''
+EXEEXT=''
+FRAMEWORK_COREAUDIO=''
+GMSGFMT=''
+INSTALL_DATA='${INSTALL} -m 644'
+INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
+INSTALL_SCRIPT='${INSTALL}'
+INSTALL_STRIP_PROGRAM=''
+KDECONFIG=''
+KDE_EXTRA_RPATH=''
+KDE_INCLUDES=''
+KDE_LDFLAGS=''
+KDE_MT_LDFLAGS=''
+KDE_MT_LIBS=''
+KDE_PLUGIN=''
+KDE_RPATH=''
+KDE_USE_CLOSURE_FALSE=''
+KDE_USE_CLOSURE_TRUE=''
+KDE_USE_FINAL_FALSE=''
+KDE_USE_FINAL_TRUE=''
+KDE_XSL_STYLESHEET=''
+LDFLAGS='-Wl,-Bsymbolic-functions'
+LIBCOMPAT=''
+LIBCRYPT=''
+LIBDL=''
+LIBJPEG=''
+LIBOBJS=''
+LIBPNG=''
+LIBPTHREAD=''
+LIBRESOLV=''
+LIBS=''
+LIBSM=''
+LIBSOCKET=''
+LIBTOOL=''
+LIBUCB=''
+LIBUTIL=''
+LIBXINERAMA=''
+LIBZ=''
+LIB_KAB=''
+LIB_KABC=''
+LIB_KDECORE=''
+LIB_KDEPRINT=''
+LIB_KDEUI=''
+LIB_KFILE=''
+LIB_KFM=''
+LIB_KHTML=''
+LIB_KIO=''
+LIB_KPARTS=''
+LIB_KSPELL=''
+LIB_KSYCOCA=''
+LIB_POLL=''
+LIB_QPE=''
+LIB_QT=''
+LIB_SMB=''
+LIB_X11=''
+LIB_XEXT=''
+LN_S=''
+LTLIBOBJS=''
+MAKEINFO=''
+MCOPIDL=''
+MEINPROC=''
+MOC=''
+MSGFMT=''
+NOOPT_CFLAGS=''
+NOOPT_CXXFLAGS=''
+NOREPO=''
+OBJEXT=''
+PACKAGE=''
+PACKAGE_BUGREPORT=''
+PACKAGE_NAME=''
+PACKAGE_STRING=''
+PACKAGE_TARNAME=''
+PACKAGE_VERSION=''
+PATH_SEPARATOR=':'
+QTE_NORTTI=''
+QT_INCLUDES=''
+QT_LDFLAGS=''
+RANLIB=''
+REPO=''
+SET_MAKE=''
+SHELL='/bin/bash'
+STRIP=''
+TOPSUBDIRS=''
+UIC=''
+UIC_TR=''
+USER_INCLUDES=''
+USER_LDFLAGS=''
+USE_EXCEPTIONS=''
+USE_RTTI=''
+USE_THREADS=''
+VERSION=''
+WOVERLOADED_VIRTUAL=''
+XGETTEXT=''
+X_EXTRA_LIBS=''
+X_INCLUDES=''
+X_LDFLAGS=''
+X_PRE_LIBS=''
+ac_ct_CC=''
+ac_ct_CXX=''
+ac_ct_RANLIB=''
+ac_ct_STRIP=''
+all_includes=''
+all_libraries=''
+am__include=''
+am__quote=''
+bindir='${exec_prefix}/bin'
+build='x86_64-pc-linux-gnu'
+build_alias='x86_64-linux-gnu'
+build_cpu='x86_64'
+build_os='linux-gnu'
+build_vendor='pc'
+datadir='${prefix}/share'
+exec_prefix='NONE'
+host='x86_64-pc-linux-gnu'
+host_alias='x86_64-linux-gnu'
+host_cpu='x86_64'
+host_os='linux-gnu'
+host_vendor='pc'
+includedir='/opt/kde3/include/kde'
+infodir='/opt/kde3/share/info'
+install_sh=''
+kde_appsdir=''
+kde_bindir=''
+kde_confdir='/etc/kde3'
+kde_datadir=''
+kde_htmldir='/usr/share/doc/kde/HTML'
+kde_icondir=''
+kde_includes=''
+kde_libraries=''
+kde_libs_htmldir=''
+kde_libs_prefix=''
+kde_locale=''
+kde_mimedir=''
+kde_moduledir=''
+kde_qtver=''
+kde_servicesdir=''
+kde_servicetypesdir=''
+kde_sounddir=''
+kde_styledir=''
+kde_templatesdir=''
+kde_wallpaperdir=''
+kde_widgetdir=''
+libdir='${exec_prefix}/lib'
+libexecdir='${exec_prefix}/libexec'
+localstatedir='${prefix}/var'
+mandir='/opt/kde3/share/man'
+oldincludedir='/usr/include'
+prefix='/opt/kde3'
+program_transform_name='s,x,x,'
+qt_includes=''
+qt_libraries=''
+sbindir='${exec_prefix}/sbin'
+sharedstatedir='${prefix}/com'
+sysconfdir='/etc'
+target='x86_64-pc-linux-gnu'
+target_alias=''
+target_cpu='x86_64'
+target_os='linux-gnu'
+target_vendor='pc'
+x_includes='NONE'
+x_libraries='NONE'
+
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+
+#define PACKAGE_BUGREPORT ""
+#define PACKAGE_NAME ""
+#define PACKAGE_STRING ""
+#define PACKAGE_TARNAME ""
+#define PACKAGE_VERSION ""
+
+configure: caught signal 2
+configure: exit 1
diff --git a/config.sub b/config.sub
new file mode 100644
index 0000000..5defff6
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1622 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2007-01-18'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 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.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | mt \
+ | msp430 \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16c)
+ basic_machine=cr16c-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/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..7efc923
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,85 @@
+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(knights, 0.6) 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
+#MIN_CONFIG(3.0.0)
+
+dnl PACKAGE set before
+AC_PREREQ(2.5)
+
+KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(meinproc)])
+AC_SUBST(MEINPROC)
+
+KDE_CREATE_SUBDIRSLIST
+AC_CONFIG_FILES([ Makefile ])
+AC_CONFIG_FILES([ admin/Makefile ])
+AC_CONFIG_FILES([ doc/Makefile ])
+AC_CONFIG_FILES([ knights/Makefile ])
+AC_CONFIG_FILES([ media/Makefile ])
+AC_CONFIG_FILES([ po/Makefile ])
+AC_OUTPUT
+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..8c278ce
--- /dev/null
+++ b/configure.in.in
@@ -0,0 +1,8 @@
+#MIN_CONFIG(3.0.0)
+
+AM_INIT_AUTOMAKE(knights,0.6)
+AC_PREREQ(2.5)
+
+KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(meinproc)])
+AC_SUBST(MEINPROC)
+
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..c2914d0
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,118 @@
+####### kdevelop will overwrite this part!!! (begin)##########
+
+
+EXTRA_DIST = help_en.docbook help_fr.docbook
+
+####### kdevelop will overwrite this part!!! (end)############
+
+MAINTAINERCLEANFILES = ./*.html
+CLEANFILES = core *~ .deps/* doc/*~ *.orig changes.docbook
+DISTCLEANFILES = Makefile.in Makefile
+
+LANGUAGES = en fr de et it fi es ru
+SUFFIXES = .docbook .po .pot
+SGMLDIR=$(kde_datadir)/ksgmltools2
+DOCDIR = $(DESTDIR)${kde_htmldir}
+XML2POT = xml2pot
+PO2XML = po2xml
+MSGMERGE = msgmerge
+
+
+help_en.pot: help_en.docbook
+ $(XML2POT) help_en.docbook > help_en.pot
+
+# --- translated docbook online help ---
+
+help_fr.po: help_en.pot
+ $(MSGMERGE) -o help_fr.po help_fr.po help_en.pot
+
+help_fr.docbook: help_en.docbook help_en.pot
+ ${MAKE} help_fr.po
+ @echo "converting french help"
+ @ $(PO2XML) help_en.docbook help_fr.po | \
+ sed s/^\ \ \<\!ENTITY\ %\ English\ /\ \ \<\!ENTITY\ %\ French\ /g \
+ > help_fr.docbook
+
+help_de.po: help_en.pot
+ $(MSGMERGE) -o help_de.po help_de.po help_en.pot
+
+help_de.docbook: help_en.docbook help_en.pot
+ ${MAKE} help_de.po
+ @echo "converting german help"
+ @ $(PO2XML) help_en.docbook help_de.po | \
+ sed s/^\ \ \<\!ENTITY\ %\ English\ /\ \ \<\!ENTITY\ %\ German\ /g \
+ > help_de.docbook
+
+help_et.po: help_en.pot
+ $(MSGMERGE) -o help_et.po help_et.po help_en.pot
+
+help_et.docbook: help_en.docbook help_en.pot
+ ${MAKE} help_et.po
+ @echo "converting estonian help"
+ @ $(PO2XML) help_en.docbook help_et.po | \
+ sed s/^\ \ \<\!ENTITY\ %\ English\ /\ \ \<\!ENTITY\ %\ Estonian\ /g \
+ > help_de.docbook
+
+help_it.po: help_en.pot
+ $(MSGMERGE) -o help_it.po help_it.po help_en.pot
+
+help_it.docbook: help_en.docbook help_en.pot
+ ${MAKE} help_it.po
+ @echo "converting italian help"
+ @ $(PO2XML) help_en.docbook help_it.po | \
+ sed s/^\ \ \<\!ENTITY\ %\ English\ /\ \ \<\!ENTITY\ %\ Italian\ /g \
+ > help_it.docbook
+
+help_fi.po: help_en.pot
+ $(MSGMERGE) -o help_fi.po help_fi.po help_en.pot
+
+help_fi.docbook: help_en.docbook help_en.pot
+ ${MAKE} help_fi.po
+ @echo "converting finnish help"
+ @ $(PO2XML) help_en.docbook help_fi.po | \
+ sed s/^\ \ \<\!ENTITY\ %\ English\ /\ \ \<\!ENTITY\ %\ Finnish\ /g \
+ > help_fi.docbook
+
+help_es.po: help_en.pot
+ $(MSGMERGE) -o help_es.po help_es.po help_en.pot
+
+help_es.docbook: help_en.docbook help_en.pot
+ ${MAKE} help_es.po
+ @echo "converting spanish help"
+ @ $(PO2XML) help_en.docbook help_es.po | \
+ sed s/^\ \ \<\!ENTITY\ %\ English\ /\ \ \<\!ENTITY\ %\ Spanish\ /g \
+ > help_es.docbook
+
+help_ru.po: help_en.pot
+ $(MSGMERGE) -o help_ru.po help_ru.po help_en.pot
+
+help_ru.docbook: help_en.docbook help_en.pot
+ ${MAKE} help_ru.po
+ @echo "converting russian help"
+ @ $(PO2XML) help_en.docbook help_ru.po | \
+ sed s/^\ \ \<\!ENTITY\ %\ English\ /\ \ \<\!ENTITY\ %\ Russian\ /g \
+ > help_ru.docbook
+
+# --- ---
+
+install-data-local:
+ echo installing docs in $(DOCDIR)
+ for lang in ${LANGUAGES}; do \
+ { \
+ $(mkinstalldirs) ${DOCDIR}/$${lang}/$(PACKAGE); \
+ $(INSTALL_DATA) help_$${lang}.docbook ${DOCDIR}/$${lang}/$(PACKAGE)/index.docbook; \
+ if test ! -e ${DOCDIR}/$${lang}/$(PACKAGE)/common ; then \
+ rm -f ${DOCDIR}/$${lang}/$(PACKAGE)/common ; fi ; \
+ ( cd ${DOCDIR}/$${lang}/${PACKAGE} ; ln -sf ../common . ) ; \
+ }; done
+ cd ${DOCDIR} ; \
+ if test ! -e default/$(PACKAGE) -a -e default ; then ln -sf ../en/$(PACKAGE) default; fi;
+
+uninstall-local:
+ for lang in ${LANGUAGES}; do { \
+ rm -R -f ${DOCDIR}/$${lang}/${PACKAGE} ; \
+ rmdir -p --ignore-fail-on-non-empty $(DOCDIR)/$$lang >/dev/null 2>&1; \
+ if test -L ${DOCDIR}/default/$(PACKAGE); then rm -f ${DOCDIR}/default/$(PACKAGE); fi; \
+ }; done
+
+all:
diff --git a/doc/Makefile.in.backup b/doc/Makefile.in.backup
new file mode 100644
index 0000000..3334f07
--- /dev/null
+++ b/doc/Makefile.in.backup
@@ -0,0 +1,533 @@
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 1.7 $
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# 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@
+
+####### kdevelop will overwrite this part!!! (begin)##########
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AMTAR = @AMTAR@
+ARTSCCONFIG = @ARTSCCONFIG@
+AS = @AS@
+AUTODIRS = @AUTODIRS@
+AWK = @AWK@
+CC = @CC@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_PROJECT_NAME = @DOXYGEN_PROJECT_NAME@
+DOXYGEN_PROJECT_NUMBER = @DOXYGEN_PROJECT_NUMBER@
+DPMSINC = @DPMSINC@
+DPMSLIB = @DPMSLIB@
+ECHO = @ECHO@
+EXEEXT = @EXEEXT@
+FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
+GLINC = @GLINC@
+GLLIB = @GLLIB@
+GMSGFMT = @GMSGFMT@
+IDL = @IDL@
+IDL_DEPENDENCIES = @IDL_DEPENDENCIES@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JAR = @JAR@
+JAVAC = @JAVAC@
+JAVAH = @JAVAH@
+JVMLIBS = @JVMLIBS@
+KDECONFIG = @KDECONFIG@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_HAS_DOXYGEN = @KDE_HAS_DOXYGEN@
+KDE_HAVE_DOT = @KDE_HAVE_DOT@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+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_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LIBBZ2 = @LIBBZ2@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBGEN = @LIBGEN@
+LIBJPEG = @LIBJPEG@
+LIBMICO = @LIBMICO@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBPYTHON = @LIBPYTHON@
+LIBQIMGIO = @LIBQIMGIO@
+LIBRESOLV = @LIBRESOLV@
+LIBSHADOW = @LIBSHADOW@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBSSL = @LIBSSL@
+LIBTIFF = @LIBTIFF@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBXINERAMA = @LIBXINERAMA@
+LIBZ = @LIBZ@
+LIB_KAB = @LIB_KAB@
+LIB_KABC = @LIB_KABC@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIMGIO = @LIB_KIMGIO@
+LIB_KIO = @LIB_KIO@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_POLL = @LIB_POLL@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_QTOPIA = @LIB_QTOPIA@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LN_S = @LN_S@
+MCOPIDL = @MCOPIDL@
+MEINPROC = @MEINPROC@
+MICO_INCLUDES = @MICO_INCLUDES@
+MICO_LDFLAGS = @MICO_LDFLAGS@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+NOREPO = @NOREPO@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PAMLIBS = @PAMLIBS@
+PASSWDLIBS = @PASSWDLIBS@
+PYTHONINC = @PYTHONINC@
+PYTHONLIB = @PYTHONLIB@
+PYTHONMODDIR = @PYTHONMODDIR@
+QTDOCDIR = @QTDOCDIR@
+QTE_NORTTI = @QTE_NORTTI@
+QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+RC = @RC@
+REPO = @REPO@
+SETUIDFLAGS = @SETUIDFLAGS@
+SSL_INCLUDES = @SSL_INCLUDES@
+SSL_LDFLAGS = @SSL_LDFLAGS@
+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@
+XPMINC = @XPMINC@
+XPMLIB = @XPMLIB@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+X_PRE_LIBS = @X_PRE_LIBS@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+am__include = @am__include@
+am__quote = @am__quote@
+idldir = @idldir@
+install_sh = @install_sh@
+jni_includes = @jni_includes@
+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_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@
+micodir = @micodir@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+
+EXTRA_DIST = help_en.docbook help_fr.docbook
+
+
+####### kdevelop will overwrite this part!!! (end)############
+MAINTAINERCLEANFILES = ./*.html
+CLEANFILES = core *~ .deps/* doc/*~ *.orig changes.docbook
+DISTCLEANFILES = Makefile.in Makefile
+
+LANGUAGES = en fr de et it fi es ru
+SUFFIXES = .docbook .po .pot
+SGMLDIR = $(kde_datadir)/ksgmltools2
+DOCDIR = $(DESTDIR)${kde_htmldir}
+XML2POT = xml2pot
+PO2XML = po2xml
+MSGMERGE = msgmerge
+subdir = doc
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+DIST_COMMON = Makefile.am Makefile.in
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+.SUFFIXES: .docbook .po .pot
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu doc/Makefile
+#>+ 3
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/Makefile
+ cd $(top_srcdir) && perl admin/am_edit knights-0.6/doc/Makefile.in
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && \
+ CONFIG_HEADERS= CONFIG_LINKS= \
+ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 4
+KDE_DIST=help_et.po help_fi.po help_de.po help_it.po help_ru.po help_es.po help_fr.po help_en.pot
+
+DISTFILES= $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ $(mkinstalldirs) "$(distdir)/$$dir"; \
+ fi; \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+
+installdirs:
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+#>- clean: clean-am
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+uninstall-am: uninstall-info-am uninstall-local
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am info info-am install install-am install-data \
+ install-data-am install-data-local install-exec install-exec-am \
+ install-info install-info-am install-man install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool uninstall uninstall-am uninstall-info-am \
+ uninstall-local
+
+
+help_en.pot: help_en.docbook
+ $(XML2POT) help_en.docbook > help_en.pot
+
+# --- translated docbook online help ---
+
+help_fr.po: help_en.pot
+ $(MSGMERGE) -o help_fr.po help_fr.po help_en.pot
+
+help_fr.docbook: help_en.docbook help_en.pot
+ ${MAKE} help_fr.po
+ @echo "converting french help"
+ @ $(PO2XML) help_en.docbook help_fr.po | \
+ sed s/^\ \ \<\!ENTITY\ %\ English\ /\ \ \<\!ENTITY\ %\ French\ /g \
+ > help_fr.docbook
+
+help_de.po: help_en.pot
+ $(MSGMERGE) -o help_de.po help_de.po help_en.pot
+
+help_de.docbook: help_en.docbook help_en.pot
+ ${MAKE} help_de.po
+ @echo "converting german help"
+ @ $(PO2XML) help_en.docbook help_de.po | \
+ sed s/^\ \ \<\!ENTITY\ %\ English\ /\ \ \<\!ENTITY\ %\ German\ /g \
+ > help_de.docbook
+
+help_et.po: help_en.pot
+ $(MSGMERGE) -o help_et.po help_et.po help_en.pot
+
+help_et.docbook: help_en.docbook help_en.pot
+ ${MAKE} help_et.po
+ @echo "converting estonian help"
+ @ $(PO2XML) help_en.docbook help_et.po | \
+ sed s/^\ \ \<\!ENTITY\ %\ English\ /\ \ \<\!ENTITY\ %\ Estonian\ /g \
+ > help_de.docbook
+
+help_it.po: help_en.pot
+ $(MSGMERGE) -o help_it.po help_it.po help_en.pot
+
+help_it.docbook: help_en.docbook help_en.pot
+ ${MAKE} help_it.po
+ @echo "converting italian help"
+ @ $(PO2XML) help_en.docbook help_it.po | \
+ sed s/^\ \ \<\!ENTITY\ %\ English\ /\ \ \<\!ENTITY\ %\ Italian\ /g \
+ > help_it.docbook
+
+help_fi.po: help_en.pot
+ $(MSGMERGE) -o help_fi.po help_fi.po help_en.pot
+
+help_fi.docbook: help_en.docbook help_en.pot
+ ${MAKE} help_fi.po
+ @echo "converting finnish help"
+ @ $(PO2XML) help_en.docbook help_fi.po | \
+ sed s/^\ \ \<\!ENTITY\ %\ English\ /\ \ \<\!ENTITY\ %\ Finnish\ /g \
+ > help_fi.docbook
+
+help_es.po: help_en.pot
+ $(MSGMERGE) -o help_es.po help_es.po help_en.pot
+
+help_es.docbook: help_en.docbook help_en.pot
+ ${MAKE} help_es.po
+ @echo "converting spanish help"
+ @ $(PO2XML) help_en.docbook help_es.po | \
+ sed s/^\ \ \<\!ENTITY\ %\ English\ /\ \ \<\!ENTITY\ %\ Spanish\ /g \
+ > help_es.docbook
+
+help_ru.po: help_en.pot
+ $(MSGMERGE) -o help_ru.po help_ru.po help_en.pot
+
+help_ru.docbook: help_en.docbook help_en.pot
+ ${MAKE} help_ru.po
+ @echo "converting russian help"
+ @ $(PO2XML) help_en.docbook help_ru.po | \
+ sed s/^\ \ \<\!ENTITY\ %\ English\ /\ \ \<\!ENTITY\ %\ Russian\ /g \
+ > help_ru.docbook
+
+# --- ---
+
+install-data-local:
+ echo installing docs in $(DOCDIR)
+ for lang in ${LANGUAGES}; do \
+ { \
+ $(mkinstalldirs) ${DOCDIR}/$${lang}/$(PACKAGE); \
+ $(INSTALL_DATA) help_$${lang}.docbook ${DOCDIR}/$${lang}/$(PACKAGE)/index.docbook; \
+ if test ! -e ${DOCDIR}/$${lang}/$(PACKAGE)/common ; then \
+ rm -f ${DOCDIR}/$${lang}/$(PACKAGE)/common ; fi ; \
+ ( cd ${DOCDIR}/$${lang}/${PACKAGE} ; ln -sf ../common . ) ; \
+ }; done
+ cd ${DOCDIR} ; \
+ if test ! -e default/$(PACKAGE) -a -e default ; then ln -sf ../en/$(PACKAGE) default; fi;
+
+uninstall-local:
+ for lang in ${LANGUAGES}; do { \
+ rm -R -f ${DOCDIR}/$${lang}/${PACKAGE} ; \
+ rmdir -p --ignore-fail-on-non-empty $(DOCDIR)/$$lang >/dev/null 2>&1; \
+ if test -L ${DOCDIR}/default/$(PACKAGE); then rm -f ${DOCDIR}/default/$(PACKAGE); fi; \
+ }; done
+
+all:
+# 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
+docs-am:
+
+#>+ 6
+force-reedit:
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/Makefile
+ cd $(top_srcdir) && perl admin/am_edit knights-0.6/doc/Makefile.in
+
+
+#>+ 2
+final:
+ $(MAKE) all-am
+#>+ 2
+final-install:
+ $(MAKE) install-am
+#>+ 2
+no-final:
+ $(MAKE) all-am
+#>+ 2
+no-final-install:
+ $(MAKE) install-am
+#>+ 3
+cvs-clean:
+ $(MAKE) admindir=$(top_srcdir)/admin -f $(top_srcdir)/admin/Makefile.common cvs-clean
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
diff --git a/doc/help_en.docbook b/doc/help_en.docbook
new file mode 100644
index 0000000..7b899f8
--- /dev/null
+++ b/doc/help_en.docbook
@@ -0,0 +1,795 @@
+<?xml version="1.0" ?>
+<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd" [
+ <!ENTITY kappname "Knights">
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE" > <!-- change language only here -->
+]>
+
+<book lang="&language;">
+ <bookinfo>
+ <title>
+ The Knights Handbook
+ </title>
+ <authorgroup>
+ <author>
+ <firstname>Troy</firstname>
+ <surname>Corbin Jr.</surname>
+ <affiliation>
+ <address>
+ <email>tcorbin@users.sf.net</email>
+ </address>
+ </affiliation>
+ </author>
+ <othercredit role="developer">
+ <firstname>Troy</firstname>
+ <surname>Corbin Jr.</surname>
+ <affiliation>
+ <address>
+ <email>tcorbin@users.sf.net</email>
+ </address>
+ </affiliation>
+ <contrib>Developer</contrib>
+ </othercredit>
+ </authorgroup>
+ <!-- TRANS:ROLES_OF_TRANSLATORS -->
+ <copyright>
+ <year>2001, 2002</year>
+ <holder>Troy Corbin Jr.</holder>
+ </copyright>
+ <legalnotice>
+ &FDLNotice;
+ </legalnotice>
+ <date>
+ 2003-05-17
+ </date>
+ <releaseinfo>
+ 0.6
+ </releaseinfo>
+ <abstract>
+ <para>
+ Knights is a graphical chess interface for &kde;. It supports chess matches against computer engines like GNUChess and Crafty, watching two computer engines play against each other, solitaire chess, matches played via Internet Chess Servers, and reviewing matches saved in Portable Game Notation.
+ </para>
+ </abstract>
+ <keywordset>
+ <keyword>knights</keyword>
+ <keyword>KDE</keyword>
+ <keyword>game</keyword>
+ <keyword>chess</keyword>
+ <keyword>gnuchess</keyword>
+ <keyword>crafty</keyword>
+ <keyword>ICS</keyword>
+ <keyword>SAN</keyword>
+ <keyword>PGN</keyword>
+ </keywordset>
+ </bookinfo>
+
+ <chapter id="introduction">
+ <title>Introduction</title>
+ <para>
+ Chess is a game of strategy with a long history and many variations, and Knights aims to be the ultimate chess resource on your computer. Knights provides a virtual chess board and pieces which you can use to play against a variety of opponents. Currently, those opponents include yourself ( Solitaire chess is a wonderful way to improve your skill at the game ), computer opponents ( sometimes called chess engines ) which you have installed on your computer, and people connected to an internet chess server. In the future, you will also be able to play against a friend using email.
+ </para>
+ <para>
+ If you like to review chess matches which other people have played, Knights can help. Using Portable Game Notation ( <acronym>PGN</acronym> ), Knights can exchange recorded chess matches with most other computer chess programs. You can also record your own matches with Knights, and share them with anyone.
+ </para>
+ <para>
+ Future versions of Knights will include comprehensive chess education in the form of interactive tutorials. These tutorials will help new players grasp the basics, and help them evolve into advanced players.
+ </para>
+ </chapter>
+
+ <chapter id="getting-started">
+ <title>Getting Started</title>
+ <para>
+ The following sections will help you become familiar with Knights quickly.
+ </para>
+ <sect1 id="interface-chessboard">
+ <title>The Chessboard</title>
+ <para>
+ If you've ever played chess before, then Knights' chessboard should be easy to understand. It always displays one player at the top of the screen and the other at the bottom. By default, your pieces always start at the bottom while your opponent's start at the top.
+ </para>
+ <para>
+ Directly below the board are two clocks. The left clock has a white background and always shows the time for the white player. The right clock is always black and shows the time for the black player.
+ </para>
+ <sect2 id="interface-chessboard-move">
+ <title>Making a Move</title>
+ <para>
+ To move a chessman, simply click the left mouse button while your pointer is over the chessman you wish to move. If it's your turn to move, the chessman will become highlighted. This lets you know that Knights is ready to move that chessman for you. Now, move your pointer to the position where you want your chessman to move to. Click the left mouse button. You've just moved your chessman!
+ </para>
+ <para>
+ You can also move your chessman using "Drag and Drop". Hold down the left mouse button over the chessman you wish to move and, while still holding down the mouse button, move your chessman to it's new position and release the button.
+ </para>
+ </sect2>
+ <sect2 id="interface-chessboard-preview">
+ <title>Using Preview</title>
+ <para>
+ The Preview feature shows you where each chessman can move on a given turn. To use this feature, move your pointer so that it is over the chessman you wish to examine. Now, click the right mouse button. Any position which that chessman can move to will be highlighted. Moves which will result in a chessman being captured are colored differently.
+ </para>
+ <para>
+ If the chessman you are examining is yours, and it is your turn, you may go head and move him by left clicking on the desired square.
+ </para>
+ <tip>
+ <para>
+ You can tell Knights to automatically preview possible moves every time you left click on a chessman. See the <link linkend="configure-display-general">Display Settings</link> chapter to find out how.
+ </para>
+ </tip>
+ </sect2>
+ <sect2 id="interface-chessboard-notation">
+ <title>SAN Notation</title>
+ <para>
+ You will notice that in the lower-right corner, there is a button which displays the last move using Standard Algebraic Notation ( <acronym>SAN</acronym> ). Clicking this button will display all the moves in this match. You can review a previous position by selecting it from this list. Another way to move through this list is to use the <keycombo action="simul"><keycap>Up</keycap></keycombo> and <keycombo action="simul"><keycap>Down</keycap></keycombo> arrow keys on your keyboard. This will step through each move one at a time.
+ </para>
+ <note>
+ <para>
+ You can not make your next move while you are reviewing the match. You must return to the most recent entry in the list before you can make your move. If someone else makes a move while you are reviewing a previous position, Knights will automatically return you to the current position.
+ </para>
+ </note>
+ </sect2>
+ </sect1>
+ <sect1 id="new-match">
+ <title>Starting a New Match</title>
+ <para>
+ To start a new match, click on the <menuchoice><guimenu>File</guimenu></menuchoice> menu, then select <menuchoice><guimenu>New Match...</guimenu></menuchoice>.
+ </para>
+ <sect2 id="new-match-dialog">
+ <title>The New Match Window</title>
+ <para>
+ The New Match Window lets you change the type of chess match you'd like to play.
+ </para>
+ <note>
+ <para>
+ Online games can not be started from here. If you'd like to play chess online, please see the section of this document titled <link linkend="online">Using Knights Online</link>.
+ </para>
+ </note>
+ <para>
+ Clicking <menuchoice><guimenu>Human</guimenu></menuchoice> will tell Knights that you want to control this color yourself.
+ </para>
+ <para>
+ The <menuchoice><guimenu>Computer</guimenu></menuchoice> option, if available, will tell Knights that a Computer Opponent ( also known as a Chess Engine ) should control this color. Another window will pop up with a list of opponents that you have installed. After selecting an opponent, you should use the <menuchoice><guimenu>Player Strength</guimenu></menuchoice> slider to customize your opponent's skill level. Due to the fact that each computer opponent is unique, some which are set to <menuchoice><guimenu>Weak</guimenu></menuchoice> may actually be better than opponents set to <menuchoice><guimenu>Strong</guimenu></menuchoice>. Also note that some may completely ignore your preference and play that same no matter what skill level you select.
+ </para>
+ <para>
+ The <menuchoice><guimenu>Email</guimenu></menuchoice> option is not yet supported by Knights.
+ </para>
+ <para>
+ Once you've selected the players, you'll want to select the time controls for this match. <menuchoice><guimenu>Base Time</guimenu></menuchoice> is the number of minutes that this player has at the beginning of the match. After you make a number of moves, you'll receive extra time on your clock. <menuchoice><guimenu>Moves Per Base Time</guimenu></menuchoice> controls the number of moves needed to receive that extra time. <menuchoice><guimenu>Increment Per Move</guimenu></menuchoice> is yet another time bonus that you receive after every move.
+ </para>
+ </sect2>
+ </sect1>
+ </chapter>
+
+ <chapter id="online">
+ <title>Using Knights Online</title>
+ <para>
+ Knights can connect you with thousands of other chess players around the globe. You can play games, observe others playing, attend live classes, or just relax and chat.
+ </para>
+ <para>
+ Although Knights tries to make it easy to use a chess server, there are many commands and functions for each server that are beyond the scope of this document. You should check with the chess server you intend to use for a full description of these.
+ </para>
+ <sect1 id="getting-started-online">
+ <title>Getting Started</title>
+ <para>
+ If you used the Setup Wizard when you first installed Knights, then Knights will connect to the <ulink url="http://www.freechess.org">Free Internet Chess Server</ulink> by default. If you did not use the Setup Wizard, or you'd prefer to connect to another chess server, you'll need to change Knights' settings. See the section of this document titled <link linkend="configure-servers">Chess Servers</link> for instructions on doing this.
+ </para>
+ <para>
+ Your computer will need to be connected to the Internet before you attempt to connect to a chess server. Knights will display an error message if it can not access the Internet.
+ </para>
+ <para>
+ Some chess servers will require you to have a membership, which sometimes includes paying a membership fee. You will need to visit the website of your chosen chess server to sign up for membership.
+ </para>
+ <para>
+ If you are not interested in obtaining a membership, but you still want to play chess online, some chess servers will allow you to play as a free guest without signing up for anything. This is strongly suggested for those who have never played chess online before.
+ </para>
+ <sect2 id="getting-started-online-connecting">
+ <title>Connecting to a Server</title>
+ <para>
+ To connect to a chess server, click on <menuchoice><guimenu>File</guimenu></menuchoice>, and then select <menuchoice><guimenuitem>Connect to Server</guimenuitem></menuchoice>.
+ </para>
+ <para>
+ A new window will pop up asking for your <menuchoice><guimenu>Login</guimenu></menuchoice> and <menuchoice><guimenu>Password</guimenu></menuchoice>. You should have recieved these when you signed up for membership with this chess server. If you do not have a membership yet, click on the <menuchoice><guimenu>Log in as guest</guimenu></menuchoice> option.
+ </para>
+ </sect2>
+ </sect1>
+ <sect1 id="online-tools">
+ <title>Online Tools</title>
+ <para>
+ Once Knights has established a connection with your chosen chess server, several new tools will be displayed to help you make the most of your time online.
+ </para>
+ <sect2 id="online-tools-console">
+ <title>The Console</title>
+ <para>
+ The Console is your primary communications tool while you're online. All of the messages that are sent to you are displayed here.
+ </para>
+ <para>
+ Messages can be colored differently depending on the type of message. For example, a message from a chat channel may be displayed in blue, while message sent specifically to you may be in green. These colors ( and fonts ) may be customized by going to <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure Knights...</guimenuitem></menuchoice>. Then click on <menuchoice><guimenu>Display</guimenu></menuchoice>, and then the <menuchoice><guimenu>Console</guimenu></menuchoice> tab.
+ </para>
+ <para>
+ This is also where you send your messages out. Just start typing on your keyboard to write a message, and press <keycombo action="simul"><keycap>Enter</keycap></keycombo> to send it. Knights will remember the last 100 messages you sent out, which you can access by pressing <keycombo action="simul"><keycap>SHIFT + UP</keycap></keycombo> and <keycombo action="simul"><keycap>SHIFT + DOWN</keycap></keycombo>.
+ </para>
+ <para>
+ There are several shortcuts available for the most commonly used server commands. To see a list of these, your should read the section of this document titled <link linkend="key-bindings">Command Reference</link>.
+ </para>
+ </sect2>
+ <sect2 id="online-tools-sought-list">
+ <title>The Sought Games List</title>
+ <para>
+ Ok, you've connected to a chess server. Now how do you play chess on it?
+ </para>
+ <para>
+ The Sought Games List will help. Right click on it, and select <menuchoice><guimenu>Seek Matches</guimenu></menuchoice>. A list of other players, who are also interested in playing a game of chess, will appear. When you find one you like, simply left click on it to start playing.
+ </para>
+ <para>
+ As you'll notice, there are a number of actions you can take when you right click on a match. They are:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <menuchoice><guimenu>Tell...</guimenu></menuchoice> will begin a private message between you and the player offering this match. Simply select this and type your message.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <menuchoice><guimenu>Assess</guimenu></menuchoice> will display a graph that shows you how your rating will be effected if you play a match against this opponent.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <menuchoice><guimenu>Player Info</guimenu></menuchoice>, otherwise known as "Finger", will display a wealth of information about this player. This information can include how long the player has been online, his rating for different types of chess matches, win/loss statistics, etc.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <menuchoice><guimenu>Player History</guimenu></menuchoice> shows the results of the last 14 or so games played by this opponent. There are columns in the history display for the players and their ratings (as adjusted by the result of the match), the winner, the type of match (blitz/standard, rated/unrated) and the date.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <menuchoice><guimenu>Add to Friends</guimenu></menuchoice> tells your ICS that you want to be notified whenever this player logs on and off the server. In the future, Knights will display your friends list so you can easily send them messages, observe their matches, and more.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <menuchoice><guimenu>Ignore This Player</guimenu></menuchoice> keeps you from hearing anything this player says, including private messages.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </sect2>
+ <sect2 id="online-tools-sought-graph">
+ <title>The Sought Games Graph</title>
+ <para>
+ The Sought Games Graph performs the same function as the Sought Games List, but with one difference: Instead of displaying a list of players, it displays a graph.
+ </para>
+ <para>
+ Usually, when you're interested in playing a chess match, you already know how long you want the match to be, and you already know that you want to play against an opponent of a particular skill level. The graph is very useful for this, because it organizes the available games based on it's length, and on your opponent's strength.
+ </para>
+ <para>
+ Stronger opponents are listed at the top of the graph, while weaker opponents are listed at the bottom. Shorter games are listed at the left, while longer games are listed at the right. Rated games are displayed using a solid square, while unrated games use a hollow square.
+ </para>
+ <para>
+ Right clicking on a match will display the same menu used in the Sought Games List. That menu includes:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <menuchoice><guimenu>Tell...</guimenu></menuchoice> will begin a private message between you and the player offering this match. Simply select this and type your message.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <menuchoice><guimenu>Assess</guimenu></menuchoice> will display a graph that shows you how your rating will be effected if you play a match against this opponent.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <menuchoice><guimenu>Player Info</guimenu></menuchoice>, otherwise known as "Finger", will display a wealth of information about this player. This information can include how long the player has been online, his rating for different types of chess matches, win/loss statistics, etc.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <menuchoice><guimenu>Player History</guimenu></menuchoice> shows the results of the last 14 or so games played by this opponent. There are columns in the history display for the players and their ratings (as adjusted by the result of the match), the winner, the type of match (blitz/standard, rated/unrated) and the date.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <menuchoice><guimenu>Add to Friends</guimenu></menuchoice> tells your ICS that you want to be notified whenever this player logs on and off the server. In the future, Knights will display your friends list so you can easily send them messages, observe their matches, and more.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <menuchoice><guimenu>Ignore This Player</guimenu></menuchoice> keeps you from hearing anything this player says, including private messages.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </sect2>
+ </sect1>
+ </chapter>
+
+ <chapter id="organizing-tabs">
+ <title>Organizing Your Tabs</title>
+ <para>
+ Knights often must display more than just the chessboard. For example, when you play chess online, Knights must open up a new window containing several new tools. These tools are stacked on top of each other using tabs to help keep your desktop from getting too cluttered, but what if you want to see more than one of these tools at a time?
+ </para>
+ <para>
+ At the top of each tab, you'll find a Grip widget. It looks like three horizontal lines, and when you move your pointer over it, the pointer will change into four arrows. When this happens, you can click and drag that tab to a different position on the screen. If you drag it to another tab, then they will merge together into the same window. If you do not drag it onto another tab, it will create it's own window at the new location.
+ </para>
+ <para>
+ To the right of the Grip is a Close button. Clicking on this button will close out this Tab. If this was the only Tab in it's window, then the window will be closed as well.
+ </para>
+ <note>
+ <para>
+ Whenever a tab is closed, Knights will remember the size of that tab.
+ </para>
+ </note>
+ </chapter>
+
+ <chapter id="configure">
+ <title>Settings</title>
+ <para>
+ One of our primary goals is to make Knights easy to setup and customize. When you need to customize Knights, select <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure Knights...</guimenuitem></menuchoice>. A new window will be displayed. The following sections describe the various options available from this new window.
+ </para>
+ <sect1 id="configure-general">
+ <title>General</title>
+ <para>
+ <menuchoice><guimenu>Your Name</guimenu></menuchoice> is the name Knights records on saved games for you.
+ </para>
+ <para>
+ <menuchoice><guimenu>When Knights Begins It Should:</guimenu></menuchoice> This allows you to customize Knights' behavior when you run the program.
+ </para>
+ <para>
+ <menuchoice><guimenu>Save Match on Close?</guimenu></menuchoice> When you close a chess match, Knights can automatically save it for you. If this match doesn't yet have a file name, you will be prompted for one.
+ </para>
+ <para>
+ The <menuchoice><guimenu>Append to Save File</guimenu></menuchoice> option tells Knights that you wish to save all your games to a single pgn file. This is useful for players who wish to analyze their matches later in a chess database program like <ulink url="http://scid.sourceforge.net/">SCID</ulink>.
+ </para>
+ <para>
+ <menuchoice><guimenu>Pause on Minimize</guimenu></menuchoice> This will cause Knights to pause all your matches when you minimize the Knights window.
+ </para>
+ <note>
+ <para>
+ Some types of matches ( like matches on <acronym>ICS</acronym> ) can not be paused in this way.
+ </para>
+ </note>
+ <para>
+ <menuchoice><guimenu>Always Promote to Queen</guimenu></menuchoice> When checked, any of your pawns that get promoted will automatically become a queen. Otherwise Knights will prompt you each time a pawn is promoted.
+ </para>
+ <para>
+ <menuchoice><guimenu>Call Flag Automatically</guimenu></menuchoice> This option will automatically declare you the winner of the match if your opponent's clock runs out of time.
+ </para>
+ </sect1>
+ <sect1 id="configure-display">
+ <title>Display</title>
+ <sect2 id="configure-display-general">
+ <title>General</title>
+ <para>
+ Use the <menuchoice><guimenu>Install New Themes</guimenu></menuchoice> button to install themes that you've downloaded.
+ </para>
+ <para>
+ Use the <menuchoice><guimenu>Board Themes</guimenu></menuchoice> and <menuchoice><guimenu>Chessman Themes</guimenu></menuchoice> buttons to select the look of your board. Knights only includes one board theme and one chessman theme, but others are available for download.<ulink url="http://sourceforge.net/project/showfiles.php?group_id=31461">Click here</ulink> to download the Knights Themepack.
+ </para>
+ <para>
+ <menuchoice><guimenu>Theme Size</guimenu></menuchoice> can be adjusted to make the board larger or smaller.
+ </para>
+ <para>
+ Using the <menuchoice><guimenu>Reverse Board Orientation</guimenu></menuchoice> option is like turning the chessboard 180 degrees. Normally, the board is displayed with your army on the bottom and your opponent's army on top. Checking this option puts your army on the top and your opponent's army on the bottom.
+ </para>
+ <para>
+ <menuchoice><guimenu>Display Startup Logo</guimenu></menuchoice> toggles the welcome screen.
+ </para>
+ <para>
+ <menuchoice><guimenu>Automatic Preview</guimenu></menuchoice> will enable the Preview feature for the left mouse button.
+ </para>
+ <para>
+ <menuchoice><guimenu>Show Last Move</guimenu></menuchoice> will highlight the chessman that moved on the previous turn.
+ </para>
+ <para>
+ <menuchoice><guimenu>Show Coordinates</guimenu></menuchoice> will draw the Rank and File coordinates on the board.
+ </para>
+ </sect2>
+ <sect2 id="configure-display-console">
+ <title>Console</title>
+ <para>
+ The Font buttons allow you to alter the font for each different kind of text displayed on the console. The Color buttons beside them let you change the color which that font will be displayed in. The seventh extra Color button changes the background color.
+ </para>
+ <para>
+ <menuchoice><guimenu>Restore Defaults</guimenu></menuchoice> will disregard any changes you've made to the font and color options, returning them to their original state.
+ </para>
+ </sect2>
+ </sect1>
+ <sect1 id="configure-audio">
+ <title>Audio</title>
+ <para>
+ Knights uses sounds to keep you informed of important events both on and off the board. For example, Knights can play a sound when a chessman is moved, or play another sound when someone sends you a private message online. This section describes the different options you have when it comes to Knights' sounds.
+ </para>
+ <para>
+ The <menuchoice><guimenu>enable Audio</guimenu></menuchoice> checkbox is like the power button on your stereo. Uncheck this, and all of Knights' sounds are turned off.
+ </para>
+ <para>
+ <menuchoice><guimenu>Audio Themes</guimenu></menuchoice> allows you to choose between different audio themes, which are similar to the graphical themes. Knights only includes one sound theme, but others may be available for download from the internet.
+ </para>
+ <para>
+ The <menuchoice><guimenu>Volume</guimenu></menuchoice> slider allows you to adjust how loudly Knights will play it's sounds.
+ </para>
+ <note>
+ <para>
+ This is independent of the volume controls in your mixer and on your speakers. In other words, if the volume in Knights is at maximum, but your mixer's volume is at minimum, then you will not be able to hear Knights' sounds.
+ </para>
+ </note>
+ <para>
+ <menuchoice><guimenu>For Current Match Only</guimenu></menuchoice> is a checkbox that allows you to turn off all sounds from chess matches that you are not actively watching. So if you have a match vs. GNUChess running, but you're looking at your match vs. Crafty, only the Crafty match will make sounds. When you click on the GNUChess match again, then it will make sounds again and the Crafty match will fall silent.
+ </para>
+ </sect1>
+ <sect1 id="configure-engines">
+ <title>Computer Opponents</title>
+ <para>
+ Here you'll be able to configure Knights to use various "Chess Engines", which are computer opponents you can play chess against. These engines are separate programs that do not come with Knights. To use them, you must first download a chess engine. Tim Mann's <ulink url="http://www.tim-mann.org/engines.html">Chess Engines</ulink> page has a great list of available engines for you to download. Knights should work with all of these. See the README and INSTALL instructions that come with each engine to install it.
+ </para>
+ <para>
+ Once you have a chess engine installed, click the <guimenu>Add...</guimenu> button on the right hand side of the window. A new window will be displayed.
+ </para>
+ <para>
+ The only things that you MUST enter to use the engine are the <guimenu>Protocol</guimenu> and the <guimenu>Engine Filename</guimenu>.
+ </para>
+ <para>
+ <guimenu>Engine Name</guimenu> is what Knights will call this engine when you select it as an opponent, or if there is an error. This is set for you if you leave it blank.
+ </para>
+ <para>
+ <guimenu>Protocol</guimenu> is a list of "languages" that computer opponents can speak. Knights acts like a translator by taking what the engine says and converting it into a move on the virtual chessboard. It is important to have the correct protocol or else the engine won't be able to play.
+ </para>
+ <note>
+ <para>
+ For most engines, you should select XBoard as the protocol. The Knights protocol is reserved for future engines to use.
+ </para>
+ </note>
+ <para>
+ <guimenu>Engine Filename</guimenu> should contain the actual location of the engine on your filesystem. Include the full path, unless the engine is in the search path. If you don't want to type this in, you can browse your filesystem with the folder icon on the right. Simply find the engine, left click on it, and left click Open.
+ </para>
+ <para>
+ <guimenu>Command Line Arguments</guimenu> is where you should add any special options for this engine. See the engine's documentation for a list of options and their useage.
+ </para>
+ <para>
+ <guimenu>Log File</guimenu> is a special text document which records the "conversation" between Knights and the engine. This is very useful for engine developers and for users who are having trouble getting Knights to work with a particular engine. Most users can leave this blank.
+ </para>
+ <para>
+ Click OK and Knights is now ready to use this engine!
+ </para>
+ <para>
+ You'll notice options which enable "Book Engines". Book engines are a kind of helper for the computer opponent. These types of engines are new and experimental. Therefore, you should not enable these unless you are a chess engine developer or unless you're sure that the engine supports "Bookengine" mode ( XBoard version 3 and Knights protocols ).
+ </para>
+ </sect1>
+ <sect1 id="configure-servers">
+ <title>Chess Servers</title>
+ <para>
+ This section is where you'll configure all your options related to Internet Chess Servers.
+ </para>
+ <sect2 id="configure-servers-servers">
+ <title>Servers</title>
+ <para>
+ If you'd like to configure Knights to use a new Chess Server, click the "Add..." button on the right hand side of the window. A new window will be displayed.
+ </para>
+ <para>
+ This window is used to tell Knights how it can connect to our chess server. <menuchoice><guimenu>Server Name</guimenu></menuchoice> is a descriptive title for the server. You can enter anything you want here. "My Chess Server", "FICS", etc.
+ </para>
+ <para>
+ <menuchoice><guimenu>Server URL</guimenu></menuchoice> is the address of the server.
+ </para>
+ <para>
+ <menuchoice><guimenu>Server Port</guimenu></menuchoice> tells Knights which port to communicate with the server on. If this is left blank, Knights will try to guess the port number.
+ </para>
+ <para>
+ <menuchoice><guimenu>Username</guimenu></menuchoice> and <menuchoice><guimenu>Password</guimenu></menuchoice> will store your login information. If you do not wish for Knights to remember your login information, just leave these blank and you will be prompted each time you connect.
+ </para>
+ <para>
+ A <menuchoice><guimenu>Timeseal</guimenu></menuchoice> is a program that helps to reduce the effect of Internet lag on your clock. It can be quite unpleasant to lose a match because your Internet connection is slow. If you have a Timeseal program that you'd like to use, enter the full path and filename for it here.
+ </para>
+ <para>
+ <menuchoice><guimenu>Log File</guimenu></menuchoice> can be used to keep a record of your session online. Be warned though: Knights does not maintain the size of your logfiles.
+ </para>
+ <para>
+ When all is done you can click <menuchoice><guimenuitem>OK</guimenuitem></menuchoice> to add this chess server to the list of those Knights will connect with.
+ </para>
+ </sect2>
+ <sect2 id="configure-servers-options">
+ <title>Options</title>
+ <para>
+ The <menuchoice><guimenu>Profanity Filter</guimenu></menuchoice> can be used to garble undesirable words. It has six levels of filtration.
+ </para>
+ <para>
+ <menuchoice><guimenu>Automatically Close Previous ICS Match</guimenu></menuchoice> does was it says. If you just played a match and you're starting a new one, Knights will go ahead and close the last one for you.
+ </para>
+ <para>
+ <menuchoice><guimenu>Private Matches</guimenu></menuchoice> will tell your ICS that you don't want your match to be observable.
+ </para>
+ <para>
+ The <menuchoice><guimenu>enable Premove</guimenu></menuchoice> option allows you to move your next chessman while it's still your opponent's turn. Knights will remember your selection and move the piece for you as soon as it's your turn again.
+ </para>
+ <para>
+ The <menuchoice><guimenu>enable Kibitzes</guimenu></menuchoice> option will display Kibitz message on the console if enabled.
+ </para>
+ <para>
+ <menuchoice><guimenu>enable Unregistered Tells</guimenu></menuchoice> will allow you to hear messages from unregistered users.
+ </para>
+ <para>
+ <menuchoice><guimenu>enable Shouts</guimenu></menuchoice> will allow you to hear shouts.
+ </para>
+ <para>
+ The <menuchoice><guimenu>enable Seeks</guimenu></menuchoice> option will display Sought Match messages.
+ </para>
+ <para>
+ <menuchoice><guimenu>Seconds Between Seek Updates</guimenu></menuchoice> This tells Knights how often you want it to refresh it's Sought Games List. Valid numbers range between 3 seconds to 2 minutes ( 120 seconds ).
+ </para>
+ </sect2>
+ </sect1>
+ </chapter>
+
+ <chapter id="key-bindings">
+ <title>Command Reference</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <keycombo action="simul"><keycap>UP</keycap></keycombo> - Pressing up will step backwards through the move list and show you the previous position.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <keycombo action="simul"><keycap>DOWN</keycap></keycombo> - Pressing down will step forward through the move list and show you the next board position.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <keycombo action="simul"><keycap>ENTER</keycap></keycombo> - Pressing Enter will always bring up the Console cursor so you can enter text. Pressing Enter again will remove it and send anything you typed in between.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <keycombo action="simul"><keycap>PAGE UP</keycap></keycombo> and <keycombo action="simul"><keycap>PAGE DOWN</keycap></keycombo> - Pressing these keys will scroll the Console up and down.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <keycombo action="simul"><keycap>SHIFT + UP</keycap></keycombo> and <keycombo action="simul"><keycap>SHIFT + DOWN</keycap></keycombo> - These will scroll through the history of what you've typed previously. Very handy for repeating commands.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <keycombo action="simul"><keycap>ALT + C</keycap></keycombo> - This will begin a reply to the last channel who sent you a tell.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <keycombo action="simul"><keycap>ALT + K</keycap></keycombo> - This will begin a kibitz, which can be heard by everyone observing a match, including the players.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <keycombo action="simul"><keycap>ALT + R</keycap></keycombo> - This will begin a reply to the last person who sent you a private tell.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <keycombo action="simul"><keycap>ALT + W</keycap></keycombo> - This will begin a whisper, which can be heard by everyone observing the current match, but not by the players of that match.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </chapter>
+
+ <chapter id="credits">
+ <title>Credits and License</title>
+ <para>
+ Knights
+ </para>
+ <para>
+ Program copyright 2001, 2002 Troy Corbin Jr. <email>tcorbin@users.sf.net</email>
+ </para>
+ <para>
+ Documentation copyright 2001, 2002 Troy Corbin Jr. <email>tcorbin@users.sf.net</email>
+ </para>
+ <!-- TRANS:CREDIT_FOR_TRANSLATORS -->
+ &underFDL;
+ &underGPL;
+ </chapter>
+
+ <appendix id="installation">
+ <title>Installation</title>
+ <sect1 id="installation-obtain-knights">
+ <title>How to obtain Knights</title>
+ <para>
+ The Knights Project is located at <ulink url="http://knights.sourceforge.net/">http://knights.sourceforge.net</ulink>. It will usually contain the most up-to-date information on Knights available.
+ </para>
+ <note>
+ <para>
+ If you're using the <ulink url="http://www.opennic.org/">OpenNIC</ulink> root service, then you can reach the Knights Project at <ulink url="http://www.knights.oss/">http://www.knights.oss</ulink>.
+ </para>
+ </note>
+ </sect1>
+ <sect1 id="installation-requirements">
+ <title>Requirements</title>
+ <para>
+ Before you can install Knights, you must have the <ulink url="http://www.kde.org">K Desktop Environment</ulink> version 3.x or newer installed on your system. Knights also requires that you have <ulink url="http://www.gnu.org/directory/Software_development/Program_build_automation/autoconf.html">Autoconf</ulink> version 2.5 and <ulink url="http://www.gnu.org/directory/Software_development/Program_build_automation/automake.html">Automake</ulink> version 1.6.
+ </para>
+ </sect1>
+ <sect1 id="installation-compilation">
+ <title>Compilation and Installation</title>
+ <para>
+ Knights uses <application>autoconf</application> and <application>automake</application> to ensure that compiling is easy. If for some reason Knights won't compile for you, help is available at the Knights Project website located at <ulink url="http://knights.sourceforge.net/">http://knights.sourceforge.net</ulink>.
+ </para>
+ <para>
+ You must have the KDEDIR environment variable defined before you begin the installation. Without this, Knights will not be able to access it's resources! To add the KDEDIR environment variable, you need to edit your /etc/profile ( or ~/.bash_profile ) and add the line:
+ </para>
+ <para>
+ <userinput><command>export KDEDIR="/usr"</command></userinput>
+ </para>
+ <para>
+ ...where /usr is your KDE's base directory.
+ </para>
+ <para>
+ Now, change the present working directory to the location where you unarchived Knights and type the following:
+ </para>
+<informalexample>
+<screen width="40">
+<prompt>%</prompt> <userinput><command>./configure</command></userinput>
+<prompt>%</prompt> <userinput><command>make</command></userinput>
+<prompt>%</prompt> <userinput><command>make</command> <option>install</option></userinput>
+</screen>
+</informalexample>
+ <para>
+ Knights should now be installed and ready to go. You can type <userinput><command>knights</command></userinput> in a terminal to start the game, or create an icon for it and select that.
+ </para>
+ </sect1>
+ </appendix>
+
+ <appendix id="command-line">
+ <title>Command Line Options</title>
+ <para>
+ Knights is a graphical chess interface and tries to make full use of it. Most every option you'd ever want should be available from Knights' Settings menu and Configure window. However, there are rare cases where a command line option is an absolute must. Here are descriptions for those options.
+ </para>
+<screen width="40">
+<prompt>%</prompt> <userinput><command>knights</command> <option>-d <replaceable>path</replaceable></option></userinput>
+</screen>
+ <para>
+ The use of this command line option is depreciated. If Knights displays garbage rather than a chessboard, then you did not set the KDEDIR environment variable correctly before compiling Knights. Please see the Installation instructions for the proper compiling procedures.
+ </para>
+<screen width="40">
+<prompt>%</prompt> <userinput><command>knights</command> <option><replaceable>filename</replaceable></option></userinput>
+</screen>
+ <para>
+ By appending a filename to the command line, you can start Knights with a chess match already loaded for you.
+ </para>
+ </appendix>
+
+ <appendix id="kml">
+ <title>Knights Markup Language</title>
+ <para>
+ The Knights Markup Language is a variation on HTML with the specific purpose of formatting and displaying PGN data. The formatting is actually done using Qt's default rich-text commands. Since these are already explained at length on Trolltech's <ulink url="http://doc.trolltech.com/3.1/qstylesheet.html#details">website</ulink>, they will not be covered here.
+ </para>
+ <para>
+ This appendix lists the macros used within KML to represent PGN data. These macros are case-sensitive.
+ </para>
+ <para>
+ <command>%whiteimage%</command> - This will be replaced with an image showing the white player's picture, or a generic image if Knights can't find it.
+ </para>
+ <para>
+ <command>%blackimage%</command> - This will be replaced with an image showing the black player's picture, or a generic image if Knights can't find it.
+ </para>
+ <para>
+ <command>%moves%</command> - This represents the move data. Recursive annotations appear in italics, while comments appear in bold type.
+ </para>
+ <para>
+ <command>%site%</command> - Represents the PGN tag: Site.
+ </para>
+ <para>
+ <command>%date%</command> - Represents the PGN tag: Date.
+ </para>
+ <para>
+ <command>%round%</command> - Represents the PGN tag: Round.
+ </para>
+ <para>
+ <command>%result%</command> - Represents the PGN tag: Result.
+ </para>
+ <para>
+ <command>%white%</command> - Represents the PGN tag: White.
+ </para>
+ <para>
+ <command>%whitetitle%</command> - Represents the PGN tag: White Title.
+ </para>
+ <para>
+ <command>%whiteelo%</command> - Represents the PGN tag: White ELO.
+ </para>
+ <para>
+ <command>%whiteuscf%</command> - Represents the PGN tag: White USCF.
+ </para>
+ <para>
+ <command>%whitena%</command> - Represents the PGN tag: White NA.
+ </para>
+ <para>
+ <command>%whitetype%</command> - Represents the PGN tag: White Type.
+ </para>
+ <para>
+ <command>%black%</command> - Represents the PGN tag: Black.
+ </para>
+ <para>
+ <command>%blacktitle%</command> - Represents the PGN tag: Black Title.
+ </para>
+ <para>
+ <command>%blackelo%</command> - Represents the PGN tag: Black ELO.
+ </para>
+ <para>
+ <command>%blackuscf%</command> - Represents the PGN tag: Black USCF.
+ </para>
+ <para>
+ <command>%blackna%</command> - Represents the PGN tag: Black NA.
+ </para>
+ <para>
+ <command>%blacktype%</command> - Represents the PGN tag: Black Type.
+ </para>
+ <para>
+ <command>%time%</command> - Represents the PGN tag: Time.
+ </para>
+ <para>
+ <command>%utctime%</command> - Represents the PGN tag: UTC Time.
+ </para>
+ <para>
+ <command>%utcdate%</command> - Represents the PGN tag: UTC Date.
+ </para>
+ <para>
+ <command>%event%</command> - Represents the PGN tag: Event.
+ </para>
+ <para>
+ <command>%eventdate%</command> - Represents the PGN tag: Event Date.
+ </para>
+ <para>
+ <command>%eventsponsor%</command> - Represents the PGN tag: Event Sponsor.
+ </para>
+ <para>
+ <command>%section%</command> - Represents the PGN tag: Section.
+ </para>
+ <para>
+ <command>%stage%</command> - Represents the PGN tag: Stage.
+ </para>
+ <para>
+ <command>%board%</command> - Represents the PGN tag: Board.
+ </para>
+ <para>
+ <command>%opening%</command> - Represents the PGN tag: Opening.
+ </para>
+ <para>
+ <command>%variation%</command> - Represents the PGN tag: Variation.
+ </para>
+ <para>
+ <command>%subvariation%</command> - Represents the PGN tag: Subvariation.
+ </para>
+ <para>
+ <command>%eco%</command> - Represents the PGN tag: ECO.
+ </para>
+ <para>
+ <command>%nic%</command> - Represents the PGN tag: NIC.
+ </para>
+ <para>
+ <command>%timecontrol%</command> - Represents the PGN tag: Time Control.
+ </para>
+ <para>
+ <command>%termination%</command> - Represents the PGN tag: Termination.
+ </para>
+ <para>
+ <command>%setup%</command> - Represents the PGN tag: Setup.
+ </para>
+ <para>
+ <command>%fen%</command> - Represents the PGN tag: FEN.
+ </para>
+ <para>
+ <command>%annotator%</command> - Represents the PGN tag: Annotator.
+ </para>
+ <para>
+ <command>%mode%</command> - Represents the PGN tag: Mode.
+ </para>
+ <para>
+ <command>%plycount%</command> - Represents the PGN tag: Plycount.
+ </para>
+ </appendix>
+</book>
+<!--
+Local Variables:
+mode: sgml
+sgml-omittag: nil
+sgml-shorttag: t
+End:
+-->
+
+
+
diff --git a/doc/help_fr.docbook b/doc/help_fr.docbook
new file mode 100644
index 0000000..0b3505f
--- /dev/null
+++ b/doc/help_fr.docbook
@@ -0,0 +1,658 @@
+<?xml version="1.0" ?>
+<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd" [
+ <!ENTITY kappname "Knights">
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % French "INCLUDE"
+> <!-- change language only here -->
+]>
+
+<book lang="&language;">
+ <bookinfo>
+ <title
+> </title>
+ <authorgroup>
+ <author
+> </author>
+ <othercredit role="developer">
+ <firstname
+>Troy</firstname>
+ <surname
+>Corbin Jr.</surname>
+ <affiliation>
+ <address>
+ <email
+>tcorbin@users.sf.net</email>
+ </address>
+ </affiliation>
+ <contrib
+></contrib>
+ </othercredit>
+ </authorgroup>
+ <!-- TRANS:ROLES_OF_TRANSLATORS -->
+ <copyright>
+ <year
+>2001, 2002</year>
+ <holder
+></holder>
+ </copyright>
+ <legalnotice>
+ &FDLNotice;
+ </legalnotice>
+ <date>
+ 2003-05-17
+ </date>
+ <releaseinfo>
+ 0.6
+ </releaseinfo>
+ <abstract>
+ <para
+> </para>
+ </abstract>
+ <keywordset>
+ <keyword
+></keyword>
+
+ <keyword
+></keyword>
+ <keyword
+></keyword>
+ <keyword
+></keyword>
+ <keyword
+></keyword>
+
+
+
+ </keywordset>
+ </bookinfo>
+
+ <chapter id="introduction">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ </chapter>
+
+ <chapter id="getting-started">
+ <title
+></title>
+ <para
+> </para>
+ <sect1 id="interface-chessboard">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <sect2 id="interface-chessboard-move">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ </sect2>
+ <sect2 id="interface-chessboard-preview">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <tip
+> <para
+> </para
+> </tip>
+ </sect2>
+ <sect2 id="interface-chessboard-notation">
+ <title
+></title>
+ <para
+> </para>
+ <note
+> <para
+> </para
+> </note>
+ </sect2>
+ </sect1>
+ <sect1 id="new-match">
+ <title
+></title>
+ <para
+> </para>
+ <sect2 id="new-match-dialog">
+ <title
+></title>
+ <para
+> </para>
+ <note
+> <para
+> </para
+> </note>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ </sect2>
+ </sect1>
+ </chapter>
+
+ <chapter id="online">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <sect1 id="getting-started-online">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <sect2 id="getting-started-online-connecting">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ </sect2>
+ </sect1>
+ <sect1 id="online-tools">
+ <title
+></title>
+ <para
+> </para>
+ <sect2 id="online-tools-console">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ </sect2>
+ <sect2 id="online-tools-sought-list">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <itemizedlist
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> </itemizedlist>
+ </sect2>
+ <sect2 id="online-tools-sought-graph">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <itemizedlist
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> </itemizedlist>
+ </sect2>
+ </sect1>
+ </chapter>
+
+ <chapter id="organizing-tabs">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <note
+> <para
+> </para
+> </note>
+ </chapter>
+
+ <chapter id="configure">
+ <title
+></title>
+ <para
+> </para>
+ <sect1 id="configure-general">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <note
+> <para
+> </para
+> </note>
+ <para
+> </para>
+ <para
+> </para>
+ </sect1>
+ <sect1 id="configure-display">
+ <title
+></title>
+ <sect2 id="configure-display-general">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ </sect2>
+ <sect2 id="configure-display-console">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ </sect2>
+ </sect1>
+ <sect1 id="configure-audio">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <note
+> <para
+> </para
+> </note>
+ <para
+> </para>
+ </sect1>
+ <sect1 id="configure-engines">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <note
+> <para
+> </para
+> </note>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ </sect1>
+ <sect1 id="configure-servers">
+ <title
+></title>
+ <para
+> </para>
+ <sect2 id="configure-servers-servers">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ </sect2>
+ <sect2 id="configure-servers-options">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ </sect2>
+ </sect1>
+ </chapter>
+
+ <chapter id="key-bindings">
+ <title
+></title>
+ <itemizedlist
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> <listitem
+> <para
+> </para
+> </listitem
+> </itemizedlist>
+ </chapter>
+
+ <chapter id="credits">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <!-- TRANS:CREDIT_FOR_TRANSLATORS -->
+ &underFDL;
+ &underGPL;
+ </chapter>
+
+ <appendix id="installation">
+ <title
+></title>
+ <sect1 id="installation-obtain-knights">
+ <title
+></title>
+ <para
+> </para>
+ <note
+> <para
+> </para
+> </note>
+ </sect1>
+ <sect1 id="installation-requirements">
+ <title
+></title>
+ <para
+> </para>
+ </sect1>
+ <sect1 id="installation-compilation">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> <userinput
+><command
+></command
+></userinput
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+<informalexample
+> <screen width="40">
+
+</screen
+> </informalexample>
+ <para
+> </para>
+ </sect1>
+ </appendix>
+
+ <appendix id="command-line">
+ <title
+></title>
+ <para
+> </para>
+<screen width="40">
+
+</screen>
+ <para
+> </para>
+<screen width="40">
+
+</screen>
+ <para
+> </para>
+ </appendix>
+
+ <appendix id="kml">
+ <title
+></title>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ <para
+> </para>
+ </appendix>
+</book>
+<!--
+Local Variables:
+mode: sgml
+sgml-omittag: nil
+sgml-shorttag: t
+End:
+-->
+
+
+
diff --git a/knights.lsm b/knights.lsm
new file mode 100644
index 0000000..9ad58c2
--- /dev/null
+++ b/knights.lsm
@@ -0,0 +1,15 @@
+Begin3
+Title: Knights
+Version: 0.6
+Entered-date:
+Description: A graphical chess interface for KDE
+Keywords: chess KDE FICS PGN ICS crafty gnuchess
+Author: Troy Corbin Jr. <troy@knights-chess.com>
+Maintained-by: Troy Corbin Jr. <troy@knights-chess.com>
+Primary-site: http://knights-chess.com
+Home-page:
+Original-site:
+Platforms: Linux and other Unices
+Copying-policy: GNU Public License
+End
+
diff --git a/knights.spec b/knights.spec
new file mode 100644
index 0000000..a67ba4b
--- /dev/null
+++ b/knights.spec
@@ -0,0 +1,95 @@
+#
+# Knights Spec File
+#
+# Writen with Knights 0.4.9
+#
+%define name knights
+%define version 0.4.9
+%define release 1mdk
+
+Summary: A chess interface for the K Desktop Environment
+Name: %{name}
+Version: %{version}
+Release: %{release}
+Copyright: GPL
+Group: Games/Boards
+Source:%{name}-%{version}.tar.gz
+URL: http://knights.sourceforge.net/
+Distribution: Mandrake Linux
+Vendor: Mandrake
+Packager: Troy Corbin Jr. <tcorbin@users.sourceforge.net>
+Requires: kde
+BuildRoot: %{_tmppath}/%{name}-buildroot
+
+%description
+A chess interface for the K Desktop Environment. Knights works with all
+XBoard compatible chess engines, FICS, and .pgn files.
+
+%prep
+rm -rf $RPM_BUILD_ROOT
+%setup -a 0
+
+%build
+./configure i586-mandrake-linux \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --includedir=/usr/include \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var/lib \
+ --sharedstatedir=/usr/com \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+%make
+%install
+# The menu entry used by debian and mandrake
+cat << EOF > $RPM_BUILD_ROOT/%{_menudir}/knights
+command="/usr/bin/knights"
+icon="knights.pgn"
+needs="kde"
+section="Amusement/Boards"
+title="Knights"
+longtitle="A graphical chess interface for KDE"
+EOF
+%makeinstall
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,0755)
+%doc README COPYING AUTHORS ChangeLog CreatingThemes TODO INSTALL
+/usr/bin/knights
+/usr/share/doc/HTML/en/knights/knights-01.png
+/usr/share/doc/HTML/en/knights/knights-02.png
+/usr/share/doc/HTML/en/knights/configure-02.png
+/usr/share/doc/HTML/en/knights/configure-1.png
+/usr/share/doc/HTML/en/knights/configure-3.png
+/usr/share/doc/HTML/en/knights/index.docbook
+/usr/share/apps/knights/splash.png
+/usr/share/apps/knights/wizard.png
+/usr/share/apps/knights/themes/KBDefault.tar.gz
+/usr/share/apps/knights/themes/KCDefault.tar.gz
+/usr/share/apps/knights/icon-display.png
+/usr/share/apps/knights/icon-general.png
+/usr/share/apps/knights/icon-console-bottom.png
+/usr/share/apps/knights/icon-console-detach.png
+/usr/share/apps/knights/icon-console-side.png
+/usr/share/icons/locolor/16x16/apps/knights.png
+/usr/share/icons/locolor/32x32/apps/knights.png
+/usr/share/icons/hicolor/16x16/apps/knights.png
+/usr/share/icons/hicolor/32x32/apps/knights.png
+/usr/share/icons/hicolor/48x48/apps/knights.png
+/usr/share/icons/hicolor/64x64/apps/knights.png
+/usr/share/icons/locolor/16x16/mimetypes/pgn.png
+/usr/share/icons/locolor/32x32/mimetypes/pgn.png
+/usr/share/icons/hicolor/16x16/mimetypes/pgn.png
+/usr/share/icons/hicolor/32x32/mimetypes/pgn.png
+/usr/share/icons/hicolor/48x48/mimetypes/pgn.png
+/usr/share/icons/hicolor/64x64/mimetypes/pgn.png
+/usr/share/applnk/Amusement/Boards/knights.desktop
+
diff --git a/knights/Makefile.am b/knights/Makefile.am
new file mode 100644
index 0000000..4bbec46
--- /dev/null
+++ b/knights/Makefile.am
@@ -0,0 +1,61 @@
+####### kdevelop will overwrite this part!!! (begin)##########
+bin_PROGRAMS = knights
+
+## INCLUDES were found outside kdevelop specific part
+
+knights_SOURCES = board_2d.cpp board_base.cpp setpagedisplay.cpp proto_xboard.cpp dlg_selectengine.cpp thinbuttons.cpp pgn.cpp io_engine.cpp dlg_challenge.cpp idmanager.cpp challenge_graph.cpp dlg_login.cpp tabgrip.cpp tabpage.cpp tab_seeklist.cpp dlg_engine.cpp setpageaudio.cpp proto_base.cpp dlg_server.cpp core.cpp match_param.cpp knightspixcache.cpp dlg_settings.cpp console.cpp match.cpp setpagegeneral.cpp splash.cpp audio.cpp main.cpp logic.cpp list_pgn.cpp challenge_graph_view.cpp accel.cpp dlg_selectemail.cpp challenge_rectangle.cpp knightstextview.cpp tabmanager.cpp command.cpp dlg_newmatch.cpp chessclock.cpp dlg_promote.cpp resource.cpp tabbox.cpp io_internet.cpp challenge_game.cpp knights.cpp tab_pgnview.cpp io_base.cpp wiz_setup.cpp setpageservers.cpp proto_uci.cpp setpageengines.cpp
+knights_LDADD = -lqt-mt -lartskde -lkio -lkdeprint -lkdeui -lkdecore $(LIBSOCKET)
+
+EXTRA_DIST = setpageengines.cpp proto_uci.cpp setpageservers.cpp wiz_setup.cpp setpageengines.h io_base.cpp knightsmap.h tab_pgnview.cpp knights.cpp challenge_game.cpp io_internet.cpp challenge_graph_view.h resource.h tabbox.cpp resource.cpp dlg_promote.cpp dlg_server.h pgn.h chessclock.cpp dlg_newmatch.cpp command.h io_internet.h challenge_rectangle.h command.cpp tabmanager.cpp dlg_promote.h definitions.h knightstextview.cpp challenge_rectangle.cpp dlg_selectemail.cpp splash.h list_pgn.h accel.cpp tabmanager.h match.h setpagedisplay.h challenge_graph_view.cpp list_pgn.cpp logic.h logic.cpp knightstextview.h main.cpp audio.cpp splash.cpp setpagegeneral.cpp match.cpp io_base.h console.h idmanager.h dlg_selectemail.h console.cpp tab_pgnview.h knights.h dlg_settings.cpp core.h knightspixcache.cpp thinbuttons.h dlg_settings.h setpageservers.h tab_seeklist.h match_param.cpp core.cpp match_param.h dlg_server.cpp pgn.desktop tabbox.h accel.h io_engine.h proto_base.cpp setpageaudio.cpp dlg_engine.cpp tab_seeklist.cpp tabpage.cpp challenge_graph.h tabgrip.cpp dlg_login.cpp challenge_graph.cpp proto_uci.h setpageaudio.h proto_base.h chessclock.h setpagegeneral.h idmanager.cpp dlg_challenge.cpp io_engine.cpp audio.h dlg_newmatch.h pgn.cpp dlg_engine.h thinbuttons.cpp wiz_setup.h dlg_selectengine.cpp challenge_game.h proto_xboard.cpp knightspixcache.h setpagedisplay.cpp tabgrip.h knights.desktop dlg_login.h proto_xboard.h dlg_challenge.h dlg_selectengine.h tabpage.h board_base.cpp board_base.h board_2d.cpp board_2d.h Makefile.am
+
+install-data-local:
+ $(mkinstalldirs) $(kde_mimedir)/application/
+ $(INSTALL_DATA) $(srcdir)/pgn.desktop $(kde_mimedir)/application/pgn.desktop
+ $(mkinstalldirs) $(kde_appsdir)/Games/Board/
+ $(INSTALL_DATA) $(srcdir)/knights.desktop $(kde_appsdir)/Games/Board/knights.desktop
+
+uninstall-local:
+ -rm -f $(kde_mimedir)/application/pgn.desktop
+ -rm -f $(kde_appsdir)/Games/Board/knights.desktop
+
+####### kdevelop will overwrite this part!!! (end)############
+# this 10 paths are KDE specific. Use them:
+# kde_htmldir Where your docs should go to. (contains lang subdirs)
+# kde_appsdir Where your application file (.kdelnk) should go to.
+# kde_icondir Where your icon should go to.
+# kde_minidir Where your mini icon should go to.
+# kde_datadir Where you install application data. (Use a subdir)
+# kde_locale Where translation files should go to.(contains lang subdirs)
+# kde_cgidir Where cgi-bin executables should go to.
+# kde_confdir Where config files should go to.
+# kde_mimedir Where mimetypes should go to.
+# kde_toolbardir Where general toolbar icons should go to.
+# kde_wallpaperdir Where general wallpapers should go to.
+
+# set the include path for X, qt and KDE
+INCLUDES= $(all_includes)
+
+METASOURCES = AUTO
+
+# the library search path.
+knights_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+
+# Uncomment the following two lines if you add a ui.rc file for your application to make use of
+# KDE´s XML GUI builing
+#rcdir = $(kde_datadir)/knights
+#rc_DATA = knightsui.rc
+
+#WARNING: if you use a ui.rc file above, use:
+
+# messages: rc.cpp
+
+# instead of
+
+# messages:
+
+messages:
+ LIST=`find $(srcdir) -name \*.h -o -name \*.hh -o -name \*.H -o -name \*.hxx -o -name \*.hpp -o -name \*.cpp -o -name \*.cc -o -name \*.cxx -o -name \*.ecpp -o -name \*.C`; \
+ if test -n "$$LIST"; then \
+ $(XGETTEXT) $$LIST -o $(podir)/knights.pot; \
+ fi
+
diff --git a/knights/accel.cpp b/knights/accel.cpp
new file mode 100644
index 0000000..c2ef168
--- /dev/null
+++ b/knights/accel.cpp
@@ -0,0 +1,60 @@
+/***************************************************************************
+ accel.cpp - description
+ -------------------
+ begin : Wed Nov 6 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "accel.moc"
+#include <klocale.h>
+
+Accel::Accel( QWidget *parent, QObject *target ) : KAccel( parent )
+{
+ insertItem( i18n("Previous Move"), "Previous Move", Key_Up, TRUE );
+ insertItem( i18n("Next Move"), "Next Move", Key_Down, TRUE );
+ insertItem( i18n("Enter Text"), "Enter Text", Key_Return, TRUE );
+ insertItem( i18n("Page Up"), "Page Up", Key_PageUp, TRUE );
+ insertItem( i18n("Page Down"), "Page Down", Key_PageDown, TRUE );
+ insertItem( i18n("Increase Board Size"), "Board Up", ALT + Key_Plus, TRUE );
+ insertItem( i18n("Decrease Board Size"), "Board Down", ALT + Key_Minus, TRUE );
+ insertItem( i18n("Last History Item"), "Last History Item", SHIFT + Key_Up, TRUE );
+ insertItem( i18n("Next History Item"), "Next History Item", SHIFT + Key_Down, TRUE );
+ insertItem( i18n("Reply to the Last Tell"), "Tell Reply", ALT + Key_R, TRUE );
+ insertItem( i18n("Reply to the Channel"), "Channel Reply", ALT + Key_C, TRUE );
+ insertItem( i18n("Kibitz"), "Kibitz", ALT + Key_K, TRUE );
+ insertItem( i18n("Whisper"), "Whisper", ALT + Key_W, TRUE );
+ readSettings();
+
+ if( target )
+ setTarget( target );
+}
+Accel::~Accel()
+{
+ writeSettings();
+}
+void Accel::setTarget( QObject *target )
+{
+ connectItem( "Board Down" , target, SIGNAL( board_down() ) );
+ connectItem( "Board Up" , target, SIGNAL( board_up() ) );
+ connectItem( "Previous Move" , target, SIGNAL( move_prev() ) );
+ connectItem( "Next Move" , target, SIGNAL( move_next() ) );
+ connectItem( "Page Up", target, SIGNAL( page_up() ) );
+ connectItem( "Page Down", target, SIGNAL( page_down() ) );
+ connectItem( "Last History Item", target, SIGNAL( history_prev() ) );
+ connectItem( "Next History Item", target, SIGNAL( history_next() ) );
+ connectItem( "Tell Reply", target, SIGNAL( reply_tell() ) );
+ connectItem( "Channel Reply", target, SIGNAL( reply_channel() ) );
+ connectItem( "Enter Text", target, SIGNAL( focus() ) );
+ connectItem( "Kibitz", target, SIGNAL( kibitz() ) );
+ connectItem( "Whisper", target, SIGNAL( whisper() ) );
+}
diff --git a/knights/accel.h b/knights/accel.h
new file mode 100644
index 0000000..6767a3e
--- /dev/null
+++ b/knights/accel.h
@@ -0,0 +1,59 @@
+/***************************************************************************
+ accel.h - description
+ -------------------
+ begin : Wed Nov 6 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef ACCEL_H
+#define ACCEL_H
+
+#include <kaccel.h>
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class Accel : public KAccel
+{
+ Q_OBJECT
+
+ public:
+ Accel( QWidget *parent=0, QObject *target=0 );
+ ~Accel();
+ void setTarget( QObject* );
+
+ signals:
+ void focus( void );
+ void focus( const QChar& );
+
+ void board_up( void );
+ void board_down( void );
+
+ void move_prev( void );
+ void move_next( void );
+
+ void page_up( void );
+ void page_down( void );
+
+ void history_prev( void );
+ void history_next( void );
+
+ void reply_tell( void );
+ void reply_channel( void );
+
+ void kibitz( void );
+ void whisper( void );
+};
+
+#endif
diff --git a/knights/audio.cpp b/knights/audio.cpp
new file mode 100644
index 0000000..f1b0d34
--- /dev/null
+++ b/knights/audio.cpp
@@ -0,0 +1,177 @@
+/***************************************************************************
+ audio.cpp - description
+ -------------------
+ begin : Mon Jan 7 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "audio.h"
+#include <arts/soundserver.h>
+#include <arts/dispatcher.h>
+#include <arts/flowsystem.h>
+#include <arts/connect.h>
+#include <ksimpleconfig.h>
+#include <kio/netaccess.h>
+#include <qptrlist.h>
+#include <qfile.h>
+#include <qmap.h>
+
+class audioPrivate
+{
+ public:
+ bool enabled;
+ bool firstTime;
+ QString theme;
+ Arts::Dispatcher dispatcher;
+ Arts::SoundServerV2 server;
+ Arts::PlayObjectFactory playObjectFactory;
+ QMap<int, Arts::PlayObject> audioMap;
+ QPtrList<KTempFile> fileRef;
+};
+
+audio::audio()
+{
+ a = new audioPrivate;
+ a->server = Arts::Reference("global:Arts_SoundServerV2");
+ a->fileRef.setAutoDelete( TRUE );
+ if( a->server.isNull() )
+ {
+ a->enabled = FALSE;
+ kdWarning() << "audio::audio: Can not create Arts::SoundServerV2" << endl;
+ }
+ else
+ {
+ a->enabled = TRUE;
+ a->playObjectFactory = Arts::Reference("global:Arts_PlayObjectFactory");
+ }
+ a->firstTime = TRUE;
+}
+audio::~audio()
+{
+ a->audioMap.clear();
+ a->fileRef.clear();
+ delete a;
+}
+void audio::play( const int snd )
+{
+ if( a->firstTime || !enabled || !a->enabled )
+ return;
+
+ QMap<int, Arts::PlayObject>::Iterator IT = a->audioMap.find( snd );
+
+ if( IT == a->audioMap.end() )
+ {
+ return;
+ }
+
+ Arts::PlayObject* current = &IT.data();
+
+ if( volume )
+ {
+ Arts::Synth_BUS_UPLINK uplink = Arts::DynamicCast( current->_getChild( "uplink" ) );
+ uplink.stop();
+ current->_node()->stop();
+ Arts::disconnect( *current, "left", uplink, "left" );
+ Arts::disconnect( *current, "right", uplink, "right" );
+ Arts::StereoVolumeControl volumeControl = Arts::DynamicCast( a->server.createObject( "Arts::StereoVolumeControl" ) );
+ current->_addChild( volumeControl, "volume" );
+ uplink.start();
+ volumeControl.start();
+ current->_node()->start();
+ Arts::connect( *current, "left", volumeControl, "inleft" );
+ Arts::connect( *current, "right", volumeControl, "inright" );
+ Arts::connect( volumeControl, "outleft", uplink, "left" );
+ Arts::connect( volumeControl, "outright", uplink, "right" );
+ volumeControl.scaleFactor( ( 100 - volume ) / 100.0 );
+ }
+
+ Arts::poTime time = current->currentTime();
+ time.seconds = 0;
+ time.ms = 0;
+ current->seek( time );
+ current->play();
+}
+
+void audio::setTheme( const QString &newTheme )
+{
+ QString configFile;
+ KSimpleConfig *themeConfig;
+
+ if( !enabled || !a->enabled )
+ return;
+
+ a->audioMap.clear();
+ a->fileRef.clear();
+
+ if( !KIO::NetAccess::download( newTheme + "theme.conf" , configFile ) )
+ {
+ kdWarning() << "audio::setTheme: Can not access theme.conf from " << newTheme << endl;
+ return;
+ }
+ themeConfig = new KSimpleConfig( configFile, TRUE );
+
+ /* Read the details about this theme */
+ themeConfig->setGroup( "General" );
+ themeHeader.name = themeConfig->readEntry( "Name", "Unknown" );
+ themeHeader.version = themeConfig->readEntry( "Version", "Unknown" );
+ themeHeader.author = themeConfig->readEntry( "Author", "Unknown" );
+ themeHeader.authorEmail = themeConfig->readEntry( "AuthorEmail", "Unknown" );
+ themeHeader.authorWWW = themeConfig->readEntry( "AuthorWWW", "Unknown" );
+ themeHeader.notes = themeConfig->readEntry( "Notes", "Unknown" );
+
+ /* Read the sounds */
+ themeConfig->setGroup( "Audio" );
+ a->theme = newTheme;
+ prepFile( a->theme + themeConfig->readEntry("Select"), SND_SELECT );
+ prepFile( a->theme + themeConfig->readEntry("Move"), SND_MOVE );
+ prepFile( a->theme + themeConfig->readEntry("Check"), SND_CHECK );
+ prepFile( a->theme + themeConfig->readEntry("MatchOver"), SND_MATCH_OVER );
+ prepFile( a->theme + themeConfig->readEntry("Challenge"), SND_CHALLENGE );
+ prepFile( a->theme + themeConfig->readEntry("Tell"), SND_TELL );
+ prepFile( a->theme + themeConfig->readEntry("Notification"), SND_NOTIFICATION );
+ prepFile( a->theme + themeConfig->readEntry("DrawOffer"), SND_DRAW_OFFER );
+ prepFile( a->theme + themeConfig->readEntry("Say"), SND_SAY );
+ prepFile( a->theme + themeConfig->readEntry("Promote"), SND_PROMOTE );
+ a->firstTime = FALSE;
+
+ delete themeConfig;
+ KIO::NetAccess::removeTempFile( configFile );
+}
+void audio::prepFile( const QString &source, const int &ref )
+{
+ Arts::PlayObject player;
+ KTempFile *dest;
+ QString filename;
+ if( source.isEmpty() )
+ return;
+
+ dest = new KTempFile( QString::null, source.right(4), 700 );
+ dest->setAutoDelete( TRUE );
+ filename = dest->name();
+
+ if( !KIO::NetAccess::download( source, filename ) )
+ {
+ kdWarning() << "audio::prepFile: Can not download " << source << endl;
+ delete dest;
+ return;
+ }
+ player = a->playObjectFactory.createPlayObject( QFile::encodeName( dest->name() ).data() );
+ if( player.isNull() )
+ {
+ delete dest;
+ return;
+ }
+ a->fileRef.append( dest );
+ a->audioMap[ ref ] = player;
+ return;
+}
diff --git a/knights/audio.h b/knights/audio.h
new file mode 100644
index 0000000..1270b85
--- /dev/null
+++ b/knights/audio.h
@@ -0,0 +1,64 @@
+/***************************************************************************
+ audio.h - description
+ -------------------
+ begin : Mon Jan 7 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef AUDIO_H
+#define AUDIO_H
+
+#include "definitions.h"
+#include <kurl.h>
+#include <ktempfile.h>
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+/*
+ These represent the various sounds that can be played.
+*/
+
+const int SND_NONE = 0x00;
+const int SND_SELECT = 0x01;
+const int SND_MOVE = 0x02;
+const int SND_MATCH_OVER = 0x03; // Deprecieated
+const int SND_CHECK = 0x04;
+const int SND_FLAG = 0x05;
+const int SND_CHALLENGE = 0x50;
+const int SND_TELL = 0x51;
+const int SND_NOTIFICATION = 0x52;
+const int SND_DRAW_OFFER = 0x53;
+const int SND_SAY = 0x54;
+const int SND_PROMOTE = 0x55;
+
+class audioPrivate;
+class audio
+{
+ public:
+ audio();
+ ~audio();
+ void play( const int );
+ void setTheme( const QString& );
+
+ bool enabled;
+ int volume;
+ ThemeHeader themeHeader;
+ protected:
+ void prepFile( const QString&, const int& );
+ private:
+ audioPrivate *a;
+};
+
+#endif
diff --git a/knights/board_2d.cpp b/knights/board_2d.cpp
new file mode 100644
index 0000000..f3a9b49
--- /dev/null
+++ b/knights/board_2d.cpp
@@ -0,0 +1,807 @@
+/***************************************************************************
+ board_2d.cpp - description
+ -------------------
+ begin : Fri Feb 28 2003
+ copyright : (C) 2003 by The Knights Project
+ email : knights-general@lists.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "board_2d.moc"
+#include "resource.h"
+#include "logic.h"
+#include "knightspixcache.h"
+#include <kiconeffect.h>
+#include <qpainter.h>
+#include <qtimer.h>
+
+static int MAX_STEPS = 18;
+
+board_2d::board_2d(QWidget *parent, const char *name, resource *Rsrc, logic *Lgc ) : board_base(parent,name,Rsrc,Lgc)
+{
+ updateX1 = updateY1 = 4000;
+ updateX2 = updateY2 = -4000;
+ init = TRUE;
+ premoveFrom = Null;
+ premoveTo = Null;
+ DragSprite = NULL;
+ lastMoveWasDrag = FALSE;
+ cache = myResource->pixCache;
+ int size = 8 + ( 1 * ( myResource->ThemeBorder == TRUE ) );
+ sprites.setAutoDelete( TRUE );
+
+ /* Setup Pixmaps */
+ myself.setOptimization( QPixmap::BestOptim );
+ myself.resize( myResource->ThemeSize * size, myResource->ThemeSize * size);
+ myself.fill();
+
+ /* Setup self */
+ setBackgroundMode( Qt::NoBackground );
+ show();
+}
+board_2d::~board_2d()
+{
+}
+///////////////////////////////////////
+//
+// board_2d::coords
+//
+///////////////////////////////////////
+QPoint board_2d::coords( const int &rank, const int &file )
+{
+ QPoint tmp;
+ if( orientation == 0 )
+ {
+ tmp.setX( myResource->ThemeSize * file );
+ tmp.setY( myResource->ThemeSize * ( 7 - rank ) );
+ }
+ else
+ {
+ tmp.setX( myResource->ThemeSize * ( 7 - file ) );
+ tmp.setY( myResource->ThemeSize * rank );
+ }
+ if( myResource->ThemeBorder )
+ {
+ tmp.setX( tmp.x() + ( myResource->ThemeSize >> 1 ) );
+ tmp.setY( tmp.y() + ( myResource->ThemeSize >> 1 ) );
+ }
+ return tmp;
+}
+///////////////////////////////////////
+//
+// board_2d::position
+//
+///////////////////////////////////////
+int board_2d::position( const QPoint &_point )
+{
+ int file, rank;
+ int themeSize = myResource->ThemeSize;
+ QPoint point( _point );
+
+ if( myResource->ThemeBorder )
+ {
+ point.setX( point.x() - ( themeSize >> 1 ) );
+ point.setY( point.y() - ( themeSize >> 1 ) );
+ }
+ if( !orientation )
+ {
+ file = point.x() / themeSize;
+ rank = 7 - ( point.y() / themeSize );
+ }
+ else
+ {
+ file = 7 - ( point.x() / themeSize );
+ rank = point.y() / themeSize;
+ }
+ return ( ( rank << 3 ) + file );
+}
+///////////////////////////////////////
+//
+// board_2d::drawMove
+//
+///////////////////////////////////////
+void board_2d::drawMove( const ChessMove &chessMove, const bool &reverse )
+{
+ char fromPtr, toPtr, takenPtr(Null);
+ if( reverse )
+ {
+ fromPtr = ( chessMove.toRank << 3 ) + chessMove.toFile;
+ toPtr = ( chessMove.fromRank << 3 ) + chessMove.fromFile;
+ }
+ else
+ {
+ fromPtr = ( chessMove.fromRank << 3 ) + chessMove.fromFile;
+ toPtr = ( chessMove.toRank << 3 ) + chessMove.toFile;
+ }
+
+ /* Position where Man was taken != Target Position; ie. en passant */
+ if( chessMove.ManTaken != Null )
+ {
+ takenPtr = myLogic->Pointer( myLogic->chessman[ chessMove.ManTaken ].File, myLogic->chessman[ chessMove.ManTaken ].Rank );
+ }
+
+ /* Show Highlights */
+ if( myResource->OPTION_Show_Last_Move )
+ {
+ myLogic->current[ fromPtr ].Note = NOTE_MOVE;
+ if( chessMove.ManTaken != Null )
+ {
+ myLogic->current[ toPtr ].Note = NOTE_ATTACK;
+ }
+ else
+ {
+ myLogic->current[ toPtr ].Note = NOTE_MOVE;
+ }
+ }
+
+ /* Show Animation */
+ if( myResource->OPTION_Animate_Moves && !lastMoveWasDrag && isVisible() )
+ {
+ QTimer::singleShot( 0, this, SLOT( updateSprites() ) );
+ sprite *spritePtr = new sprite;
+ spritePtr->Steps = 1;
+ spritePtr->Restore = FALSE;
+ spritePtr->POSITION_Origin = fromPtr;
+ spritePtr->POSITION_Destination = toPtr;
+ spritePtr->POSITION_TargetTaken = takenPtr;
+ if( !reverse )
+ {
+ spritePtr->POINT_Origin = coords( chessMove.fromRank, chessMove.fromFile );
+ spritePtr->POINT_Destination = coords( chessMove.toRank, chessMove.toFile );
+ spritePtr->PIXMAP_Sprite = getChessman( spritePtr->POSITION_Destination );
+ }
+ else
+ {
+ spritePtr->POINT_Origin = coords( chessMove.toRank, chessMove.toFile );
+ spritePtr->POINT_Destination = coords( chessMove.fromRank, chessMove.fromFile );
+ spritePtr->PIXMAP_Sprite = getChessman( spritePtr->POSITION_Origin );
+ }
+ spritePtr->POINT_Current = spritePtr->POINT_Origin;
+ spritePtr->PIXMAP_FlipFrame.resize( spritePtr->PIXMAP_Sprite.size() );
+ sprites.append( spritePtr );
+ }
+ else
+ {
+ /* Draw this position only if we're not animating */
+ drawPosition( toPtr );
+ if( takenPtr != Null )
+ {
+ drawPosition( takenPtr );
+ }
+ }
+ /* Draw the originating position */
+ drawPosition( fromPtr );
+
+ if( QString( chessMove.SAN ).contains( "o-o", FALSE ) )
+ {
+ /* This is a castle */
+ ChessMove newMove;
+ strcpy( newMove.SAN, QString( "no" ).latin1() );
+ newMove.fromRank = chessMove.fromRank;
+ newMove.toRank = chessMove.toRank;
+ newMove.ManTaken = Null;
+ if( QString( chessMove.SAN ).contains( "o-o-o", FALSE ) )
+ {
+ /* Queenside */
+ newMove.fromFile = 0;
+ newMove.toFile = 3;
+ }
+ else
+ {
+ /* Kingside */
+ newMove.fromFile = 7;
+ newMove.toFile = 5;
+ }
+ drawMove( newMove, reverse );
+ }
+ lastMoveWasDrag = FALSE;
+}
+///////////////////////////////////////
+//
+// board_2d::resizeBoard( SLOT )
+//
+///////////////////////////////////////
+void board_2d::resizeBoard( void )
+{
+ int size = 8 + ( 1 * ( myResource->ThemeBorder == TRUE ) );
+ init = FALSE;
+
+ /* Resize myself */
+ myself.resize( myResource->ThemeSize * size, myResource->ThemeSize * size);
+ myself.fill();
+
+ /* Finish up */
+ setFixedSize( myResource->ThemeSize * size, myResource->ThemeSize * size);
+ redrawAll();
+
+ int inverseSize = IMAGE_MAX - myResource->ThemeSize;
+ MAX_STEPS = ( ( inverseSize * inverseSize ) / IMAGE_MAX ) + 7;
+}
+///////////////////////////////////////
+//
+// board_2d::redrawAll
+//
+///////////////////////////////////////
+void board_2d::redrawAll( void )
+{
+ register char tmp(0);
+
+ if( init )
+ return;
+
+ /* Set Orientation */
+ orientation = myResource->OPTION_Board_Orientation;
+ if( localArmy != WHITE )
+ orientation = !orientation;
+ if( flip )
+ orientation = !orientation;
+
+ /* Set Border */
+ if( myResource->ThemeBorder )
+ {
+ if( orientation )
+ {
+ QWMatrix matrix;
+ matrix.rotate( 180.0 );
+ myself = cache->Border.xForm( matrix );
+ }
+ else
+ myself = cache->Border;
+ }
+
+ /* Redraw All Positions */
+ while( tmp < 64 )
+ drawPosition( tmp++ );
+ redrawLights();
+
+ /* Make sure everything is repainted */
+ updateX1 = updateY1 = 0;
+ updateX2 = updateY2 = IMAGE_MAX * 9;
+
+ commit();
+}
+///////////////////////////////////////
+//
+// board_2d::redrawLights
+//
+///////////////////////////////////////
+void board_2d::redrawLights( void )
+{
+ int half, four;
+ QPoint black, white;
+ if( myResource->ThemeBorder )
+ {
+ half = myResource->ThemeSize >> 1;
+ four = myResource->ThemeSize << 2;
+ if( !orientation )
+ {
+ black.setX( 0 );
+ black.setY( four );
+ white.setX( 0 );
+ white.setY( four + half );
+ }
+ else
+ {
+ black.setX( myself.width() - half );
+ black.setY( four + half );
+ white.setX( myself.width() - half );
+ white.setY( four );
+ }
+ if( myLogic->OnMove != WHITE )
+ {
+ myBlit( black, &cache->BorderLightOn, cache->BorderLightOn.rect() );
+ myBlit( white, &cache->BorderLightOff, cache->BorderLightOff.rect() );
+ }
+ else
+ {
+ myBlit( black, &cache->BorderLightOff, cache->BorderLightOff.rect() );
+ myBlit( white, &cache->BorderLightOn, cache->BorderLightOn.rect() );
+ }
+ }
+}
+///////////////////////////////////////
+//
+// board_2d::drawPosition
+//
+///////////////////////////////////////
+void board_2d::drawPosition( const int &pos )
+{
+ int rank = pos >> 3;
+ int file = pos % 8;
+ QPixmap buffer;
+ QString cacheName = QString::number( myResource->ThemeSize );
+ QImage tempImage;
+
+ if( ( pos < 0 ) || ( pos > 63 ) ) return;
+ /*
+ Build the cache ref name
+ */
+ if( color( rank, file ) )
+ cacheName += "L";
+ else
+ cacheName += "D";
+ if( !paused )
+ {
+ switch( myLogic->current[pos].Note )
+ {
+ case NOTE_SELECT:
+ case NOTE_HIGHLIGHT:
+ cacheName += "S";
+ break;
+ case NOTE_MOVE:
+ case NOTE_CASTLE:
+ case NOTE_PAWN_DOUBLE:
+ cacheName += "M";
+ break;
+ case NOTE_ATTACK:
+ case NOTE_ENPASSANT:
+ cacheName += "A";
+ break;
+ default:
+ cacheName += " ";
+ }
+ if( ( myLogic->current[pos].ManPtr != Null ) && ( !isSprite( pos ) ) )
+ {
+ if( myLogic->chessman[ myLogic->current[pos].ManPtr ].Army == WHITE )
+ cacheName += "W";
+ else
+ cacheName += "B";
+ switch( myLogic->chessman[myLogic->current[pos].ManPtr].Type )
+ {
+ case King:
+ cacheName += "K";
+ break;
+ case Queen:
+ cacheName += "Q";
+ break;
+ case Bishop:
+ cacheName += "B";
+ break;
+ case Knight:
+ cacheName += "N";
+ break;
+ case Rook:
+ cacheName += "R";
+ break;
+ case Pawn:
+ cacheName += "P";
+ break;
+ default:
+ break;
+ }
+ if( ( pos == premoveFrom ) || ( pos == premoveTo ) )
+ cacheName += "t"; // The means it's transparent
+ }
+ }
+ else
+ cacheName += " ";
+ if( cache->find( cacheName, buffer ) )
+ {
+ /*
+ Cache Hit... no need to redraw
+ */
+ if( myResource->OPTION_Show_Coord )
+ drawCoords( &buffer, pos );
+ myBlit( coords( rank, file ), &buffer, buffer.rect() );
+ return;
+ }
+
+ /*
+ Cache miss
+ Draw the pixmap
+ */
+ if( color( rank, file ) )
+ buffer = cache->SquareLight;
+ else
+ buffer = cache->SquareDark;
+
+ switch( myLogic->current[pos].Note )
+ {
+ case NOTE_HIGHLIGHT: // Fall Through
+ case NOTE_SELECT:
+ bitBlt( &buffer, 0, 0, &cache->HighlightSelect, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ break;
+ case NOTE_MOVE: // Fall Through
+ case NOTE_CASTLE: // Fall Through
+ case NOTE_PAWN_DOUBLE:
+ bitBlt( &buffer, 0, 0, &cache->HighlightMove, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ break;
+ case NOTE_ATTACK: // Fall Through
+ case NOTE_ENPASSANT:
+ bitBlt( &buffer, 0, 0, &cache->HighlightAttack, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ break;
+ default:
+ break;
+ }
+ if( !isSprite(pos) )
+ {
+ QPixmap chessman = getChessman( pos );
+ bitBlt( &buffer, 0, 0, &chessman, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ }
+ /* Now add this pixmap to the cache */
+ cache->add( cacheName, buffer );
+ /* */
+ if( myResource->OPTION_Show_Coord )
+ drawCoords( &buffer, pos );
+ myBlit( coords( rank, file ), &buffer, buffer.rect() );
+}
+///////////////////////////////////////
+//
+// board_2d::drawCoords
+//
+///////////////////////////////////////
+void board_2d::drawCoords( QPixmap *pic, const int &pos )
+{
+ QPainter painter;
+ QString letter;
+ int themeSize = myResource->ThemeSize - 4;
+ int targetRank, targetFile;
+
+ if( orientation == 0 )
+ {
+ targetRank = 0;
+ targetFile = 0;
+ }
+ else
+ {
+ targetRank = 7;
+ targetFile = 7;
+ }
+ /* Draw Rank */
+ if( ( pos >> 3 ) == targetRank )
+ {
+ letter = QString( QString("abcdefgh").at( pos % 8 ) );
+ painter.begin( pic );
+ painter.setFont( myResource->FONT_Standard );
+ painter.setPen( myResource->COLOR_Notation_Shadow );
+ painter.drawText( 3, 3, themeSize, themeSize,
+ Qt::AlignRight | Qt::AlignBottom, letter );
+ painter.setPen( myResource->COLOR_Notation );
+ painter.drawText( 2, 2, themeSize, themeSize,
+ Qt::AlignRight | Qt::AlignBottom, letter );
+ painter.end();
+ }
+ /* Draw File */
+ if( ( pos % 8 ) == targetFile )
+ {
+ letter = QString( QString("12345678").at( pos >> 3 ) );
+ painter.begin( pic );
+ painter.setFont( myResource->FONT_Standard );
+ painter.setPen( myResource->COLOR_Black );
+ painter.drawText( 3, 3, themeSize, themeSize,
+ Qt::AlignLeft | Qt::AlignTop, letter );
+ painter.setPen( myResource->COLOR_White );
+ painter.drawText( 2, 2, themeSize, themeSize,
+ Qt::AlignLeft | Qt::AlignTop, letter );
+ painter.end();
+ }
+}
+///////////////////////////////////////
+//
+// board_2d::mouseReleaseEvent
+//
+///////////////////////////////////////
+void board_2d::mouseReleaseEvent( QMouseEvent *event )
+{
+ event->accept();
+
+ if( DragSprite != NULL )
+ {
+ /* Destroy any sprites being dragged */
+ int tmp = DragSprite->POSITION_Origin;
+ myBlit( DragSprite->POINT_LastUpdate,
+ &DragSprite->PIXMAP_FlipFrame,
+ DragSprite->PIXMAP_FlipFrame.rect() );
+ sprites.removeRef( DragSprite );
+ DragSprite = NULL;
+ drawPosition( tmp );
+ commit();
+ lastMoveWasDrag = TRUE;
+ }
+
+ if(event->button() == Qt::LeftButton)
+ {
+ emit leftClick( position( event->pos() ) );
+ }
+ if(event->button() == Qt::RightButton)
+ {
+ emit rightClick( position( event->pos() ) );
+ }
+}
+///////////////////////////////////////
+//
+// board_2d::mousePressEvent
+//
+///////////////////////////////////////
+void board_2d::mousePressEvent( QMouseEvent *event )
+{
+ pressPoint = event->pos();
+ event->accept();
+}
+///////////////////////////////////////
+//
+// board_2d::mouseMoveEvent
+//
+///////////////////////////////////////
+void board_2d::mouseMoveEvent( QMouseEvent *event )
+{
+ event->accept();
+ if( DragSprite == NULL )
+ {
+ if( event->state() & Qt::LeftButton )
+ {
+ if( abs( pressPoint.x() - event->pos().x() ) + abs( pressPoint.y() - event->pos().y() ) > 6 )
+ {
+ /* Begin Dragging a piece */
+ DragSprite = new sprite;
+ sprites.append( DragSprite );
+ DragSprite->POINT_Origin = pressPoint;
+ DragSprite->POSITION_Origin = position( pressPoint );
+ emit leftClick( DragSprite->POSITION_Origin ); // Tell match that we just clicked on this piece
+
+ if( myLogic->current[ DragSprite->POSITION_Origin ].Note != NOTE_SELECT )
+ {
+ /* The selection didn't take.. back out. */
+ sprites.removeRef( DragSprite );
+ DragSprite = NULL;
+ drawPosition( position( pressPoint ) );
+ commit();
+ return;
+ }
+
+ /* Get the piece image and store it in dragPix */
+ DragSprite->PIXMAP_Sprite = getChessman( DragSprite->POSITION_Origin );
+ DragSprite->PIXMAP_FlipFrame.resize( DragSprite->PIXMAP_Sprite.size() );
+ DragSprite->Restore = FALSE;
+ }
+ else
+ /* Not enough dragging */
+ return;
+ } // End ( event->state() & Qt::LeftButton )
+ else
+ return; /* No dragging. Most events should end up here */
+ }
+
+ int halfSize = myResource->ThemeSize >> 1;
+ DragSprite->POINT_Current.setX( event->x() - halfSize );
+ DragSprite->POINT_Current.setY( event->y() - halfSize );
+ commit();
+}
+///////////////////////////////////////
+//
+// board_2d::getChessman
+//
+///////////////////////////////////////
+QPixmap board_2d::getChessman( const int &pos )
+{
+ QPixmap tmp;
+ register char type, army;
+
+ if( pos == premoveTo )
+ {
+ type = myLogic->chessman[myLogic->current[premoveFrom].ManPtr].Type;
+ army = myLogic->chessman[myLogic->current[premoveFrom].ManPtr].Army;
+ }
+ else
+ {
+ type = myLogic->chessman[myLogic->current[pos].ManPtr].Type;
+ army = myLogic->chessman[myLogic->current[pos].ManPtr].Army;
+ }
+ switch( type )
+ {
+ case King:
+ if( army == WHITE )
+ tmp = cache->WhiteKing;
+ else
+ tmp = cache->BlackKing;
+ break;
+ case Queen:
+ if( army == WHITE )
+ tmp = cache->WhiteQueen;
+ else
+ tmp = cache->BlackQueen;
+ break;
+ case Bishop:
+ if( army == WHITE )
+ tmp = cache->WhiteBishop;
+ else
+ tmp = cache->BlackBishop;
+ break;
+ case Knight:
+ if( army == WHITE )
+ tmp = cache->WhiteKnight;
+ else
+ tmp = cache->BlackKnight;
+ break;
+ case Rook:
+ if( army == WHITE )
+ tmp = cache->WhiteRook;
+ else
+ tmp = cache->BlackRook;
+ break;
+ case Pawn:
+ if( army == WHITE )
+ tmp = cache->WhitePawn;
+ else
+ tmp = cache->BlackPawn;
+ break;
+ default:
+ break;
+ }
+ if( ( pos == premoveFrom ) || ( pos == premoveTo ) )
+ {
+ KIconEffect::semiTransparent( tmp );
+ }
+ return tmp;
+}
+///////////////////////////////////////
+//
+// board_2d::setPremovePositions
+//
+///////////////////////////////////////
+void board_2d::setPremovePositions( const int &posF, const int &posT )
+{
+ premoveFrom = posF;
+ premoveTo = posT;
+ if( ( posF != Null ) && ( posT != Null ) )
+ {
+ myLogic->current[posF].Note = NOTE_NONE;
+ myLogic->current[posT].Note = NOTE_NONE;
+ drawPosition( posF );
+ drawPosition( posT );
+ commit();
+ }
+}
+///////////////////////////////////////
+//
+// board_2d::commit
+//
+///////////////////////////////////////
+void board_2d::commit( void )
+{
+ drawSprites();
+ bitBlt( this, updateX1, updateY1, &myself, updateX1, updateY1, updateX2, updateY2, Qt::CopyROP );
+ updateX1 = updateY1 = 4000;
+ updateX2 = updateY2 = -4000;
+}
+///////////////////////////////////////
+//
+// board_2d::paintEvent
+//
+///////////////////////////////////////
+void board_2d::paintEvent( QPaintEvent *event )
+{
+ /* Paint the Widget */
+ bitBlt( this, event->rect().topLeft(), &myself, event->rect(), Qt::CopyROP );
+}
+///////////////////////////////////////
+//
+// board_2d::drawSprites
+//
+///////////////////////////////////////
+void board_2d::drawSprites( void )
+{
+ int index;
+ sprite *spritePtr;
+
+ /* Remove all sprites from the pixmap */
+ for( index = (signed int)sprites.count() - 1; index > -1; index-- )
+ {
+ spritePtr = sprites.at(index);
+ if( spritePtr->Restore == FALSE )
+ {
+ spritePtr->Restore = TRUE;
+ }
+ else
+ {
+ myBlit( spritePtr->POINT_LastUpdate,
+ &spritePtr->PIXMAP_FlipFrame,
+ spritePtr->PIXMAP_FlipFrame.rect() );
+ }
+ }
+ /* Redraw all sprites */
+ for( index = 0; index < (signed int)sprites.count(); index++ )
+ {
+ spritePtr = sprites.at(index);
+
+ if( ( spritePtr == DragSprite ) || ( spritePtr->Steps < MAX_STEPS ) )
+ {
+ /* Redraw Sprite */
+ bitBlt( &spritePtr->PIXMAP_FlipFrame,
+ 0,
+ 0,
+ &myself,
+ spritePtr->POINT_Current.x(),
+ spritePtr->POINT_Current.y(),
+ spritePtr->PIXMAP_FlipFrame.width(),
+ spritePtr->PIXMAP_FlipFrame.height(),
+ Qt::CopyROP );
+ myBlit( spritePtr->POINT_Current,
+ &spritePtr->PIXMAP_Sprite,
+ spritePtr->PIXMAP_Sprite.rect() );
+ spritePtr->POINT_LastUpdate = spritePtr->POINT_Current;
+ }
+ else
+ {
+ /* Animation finished */
+ int origin = spritePtr->POSITION_Origin;
+ int destination = spritePtr->POSITION_Destination;
+ int target = spritePtr->POSITION_TargetTaken;
+ sprites.removeRef( spritePtr );
+ drawPosition( origin );
+ drawPosition( destination );
+ drawPosition( target );
+ index = -1;
+ }
+ }
+}
+///////////////////////////////////////
+//
+// board_2d::updateSprites
+//
+///////////////////////////////////////
+void board_2d::updateSprites( void )
+{
+ if( myResource->OPTION_Animate_Moves )
+ {
+ for( int index = 0; index < (signed int)sprites.count(); index++ )
+ {
+ sprite *spritePtr = sprites.at( index );
+ if( spritePtr == DragSprite )
+ continue;
+
+ QTimer::singleShot( 0, this, SLOT( updateSprites() ) );
+ if( spritePtr->Steps < MAX_STEPS )
+ {
+ double factor = ( 1.0 / (double)MAX_STEPS ) * (double)spritePtr->Steps;
+ int newX = (int)( ( spritePtr->POINT_Destination.x() - spritePtr->POINT_Origin.x() ) * factor );
+ int newY = (int)( ( spritePtr->POINT_Destination.y() - spritePtr->POINT_Origin.y() ) * factor );
+ spritePtr->POINT_Current = spritePtr->POINT_Origin + QPoint( newX, newY );
+ spritePtr->Steps += sprites.count();
+ }
+ }
+ commit();
+ }
+}
+///////////////////////////////////////
+//
+// board_2d::isSprite
+//
+///////////////////////////////////////
+bool board_2d::isSprite( const int &pos )
+{
+ for( unsigned int index = 0; index < sprites.count(); index++ )
+ {
+ sprite *tmpSprite = sprites.at( index );
+ if( tmpSprite->POSITION_Origin == pos )
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+///////////////////////////////////////
+//
+// board_2d::myBlit
+//
+///////////////////////////////////////
+void board_2d::myBlit( const QPoint &dp, const QPaintDevice *src, const QRect &sr )
+{
+ bitBlt( &myself, dp.x(), dp.y(), src, sr.x(), sr.y(), sr.width(), sr.height(), Qt::CopyROP );
+ if( dp.x() < updateX1 )
+ updateX1 = dp.x();
+ if( dp.y() < updateY1 )
+ updateY1 = dp.y();
+ if( dp.x() + sr.width() > updateX2 )
+ updateX2 = dp.x() + sr.width();
+ if( dp.y() + sr.height() > updateX2 )
+ updateX2 = dp.y() + sr.height();
+}
diff --git a/knights/board_2d.h b/knights/board_2d.h
new file mode 100644
index 0000000..f2291e2
--- /dev/null
+++ b/knights/board_2d.h
@@ -0,0 +1,99 @@
+/***************************************************************************
+ board_2d.h - description
+ -------------------
+ begin : Fri Feb 28 2003
+ copyright : (C) 2003 by The Knights Project
+ email : knights-general@lists.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef BOARD_2D_H
+#define BOARD_2D_H
+
+#include <board_base.h>
+#include <qpixmap.h>
+#include <qptrlist.h>
+
+/**
+ *@author The Knights Team
+ */
+
+typedef struct sprite
+{
+ bool Restore;
+ int Steps;
+ int POSITION_Origin;
+ int POSITION_Destination;
+ int POSITION_TargetTaken;
+ QPoint POINT_Origin;
+ QPoint POINT_Current;
+ QPoint POINT_LastUpdate;
+ QPoint POINT_Destination;
+ QPixmap PIXMAP_Sprite;
+ QPixmap PIXMAP_FlipFrame;
+};
+
+typedef QPtrList<sprite> SpriteList;
+class KnightsPixCache;
+
+class board_2d : public board_base
+{
+ Q_OBJECT
+ public:
+ board_2d(QWidget *parent=0, const char *name=0, resource *Rsrc=0, logic *Lgc=0);
+ ~board_2d();
+ virtual void drawMove( const ChessMove &chessMove, const bool &reverse=FALSE );
+ virtual void setPremovePositions( const int&, const int& );
+ virtual void redrawLights( void );
+ void paintEvent( QPaintEvent *event );
+ void mouseReleaseEvent( QMouseEvent *event );
+ void mousePressEvent( QMouseEvent *event );
+ void mouseMoveEvent( QMouseEvent *event );
+
+ public slots:
+ virtual void resizeBoard( void );
+ virtual void redrawAll( void );
+ virtual void drawPosition( const int& );
+ virtual void commit( void );
+
+ protected:
+ void drawCoords( QPixmap *pic, const int &pos );
+ QPoint coords( const int&, const int&);
+ int position( const QPoint& );
+ void drawSprites( void );
+ QPixmap getChessman( const int &pos );
+ bool isSprite( const int &pos );
+ void myBlit( const QPoint &dp, const QPaintDevice *src, const QRect &sr );
+
+ protected slots:
+ void updateSprites( void );
+
+ private:
+ SpriteList sprites;
+ sprite *DragSprite;
+ KnightsPixCache *cache;
+ QPixmap myself;
+ QPoint pressPoint;
+ bool orientation;
+ bool lastMoveWasDrag;
+ bool init;
+
+ int updateX1;
+ int updateY1;
+ int updateX2;
+ int updateY2;
+
+ /* Premove Positions */
+ int premoveFrom;
+ int premoveTo;
+};
+
+#endif
diff --git a/knights/board_base.cpp b/knights/board_base.cpp
new file mode 100644
index 0000000..6370644
--- /dev/null
+++ b/knights/board_base.cpp
@@ -0,0 +1,125 @@
+/***************************************************************************
+ board_base.cpp - description
+ -------------------
+ begin : Fri Feb 28 2003
+ copyright : (C) 2003 by The Knights Team
+ email : knights-general@lists.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "board_base.moc"
+#include "resource.h"
+#include "logic.h"
+
+board_base::board_base(QWidget *parent, const char *name, resource *Rsrc, logic *Lgc ) : QWidget(parent,name)
+{
+ /* Setup Variables */
+ myResource = Rsrc;
+ myLogic = Lgc;
+
+ paused = false;
+ flip = false;
+ localArmy = WHITE;
+}
+board_base::~board_base()
+{
+}
+///////////////////////////////////////
+//
+// board_base::setPaused
+//
+///////////////////////////////////////
+void board_base::setPaused( const bool &state )
+{
+ paused = state;
+ redrawAll();
+}
+///////////////////////////////////////
+//
+// board_base::setLocalArmy
+//
+///////////////////////////////////////
+void board_base::setLocalArmy( const bool &state )
+{
+ if( state == localArmy )
+ return;
+ localArmy = state;
+ redrawAll();
+}
+///////////////////////////////////////
+//
+// board_base::flipBoard
+//
+///////////////////////////////////////
+void board_base::flipBoard( void )
+{
+ flip = !flip;
+ redrawAll();
+}
+///////////////////////////////////////
+//
+// board_base::drawMove
+//
+///////////////////////////////////////
+void board_base::drawMove( const ChessMove&, const bool& )
+{
+ /* Subclasses MUST reimplement this */
+}
+///////////////////////////////////////
+//
+// board_base::resizeBoard
+//
+///////////////////////////////////////
+void board_base::resizeBoard( void )
+{
+ /* Subclasses MUST reimplement this */
+}
+///////////////////////////////////////
+//
+// board_base::redrawAll
+//
+///////////////////////////////////////
+void board_base::redrawAll( void )
+{
+ /* Subclasses MUST reimplement this */
+}
+///////////////////////////////////////
+//
+// board_base::drawPosition
+//
+///////////////////////////////////////
+void board_base::drawPosition( const int& )
+{
+}
+///////////////////////////////////////
+//
+// board_base::setPremovePositions
+//
+///////////////////////////////////////
+void board_base::setPremovePositions( const int&, const int& )
+{
+}
+///////////////////////////////////////
+//
+// board_base::commit
+//
+///////////////////////////////////////
+void board_base::commit( void )
+{
+}
+///////////////////////////////////////
+//
+// board_base::redrawLights
+//
+///////////////////////////////////////
+void board_base::redrawLights( void )
+{
+}
diff --git a/knights/board_base.h b/knights/board_base.h
new file mode 100644
index 0000000..305e686
--- /dev/null
+++ b/knights/board_base.h
@@ -0,0 +1,68 @@
+/***************************************************************************
+ board_base.h - description
+ -------------------
+ begin : Fri Feb 28 2003
+ copyright : (C) 2003 by The Knights Project
+ email : knights-general@lists.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef BOARD_BASE_H
+#define BOARD_BASE_H
+
+#include <stdlib.h>
+#include <qwidget.h>
+#include "definitions.h"
+
+/**
+ *@author The Knights Project
+ */
+
+class resource;
+class logic;
+
+class board_base : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ board_base(QWidget *parent=0, const char *name=0, resource *Rsrc=0, logic *Lgc=0);
+ virtual ~board_base();
+ virtual void drawMove( const ChessMove &chessMove, const bool &reverse=FALSE );
+ virtual void setPremovePositions( const int&, const int& );
+ virtual void redrawLights( void );
+
+ public slots:
+ virtual void resizeBoard( void );
+ virtual void redrawAll( void );
+ virtual void setPaused( const bool& );
+ virtual void setLocalArmy( const bool& );
+ virtual void drawPosition( const int& );
+ virtual void commit( void );
+ void flipBoard( void );
+
+ signals:
+ void leftClick( int );
+ void rightClick( int );
+
+ protected:
+ resource *myResource;
+ logic *myLogic;
+ bool paused;
+ bool localArmy;
+ bool flip;
+
+ protected:
+ inline bool color( const int &rank, const int &file )
+ { return abs( ( rank % 2 ) - ( file % 2 ) ); }
+};
+
+#endif
diff --git a/knights/challenge_game.cpp b/knights/challenge_game.cpp
new file mode 100644
index 0000000..b7d37cc
--- /dev/null
+++ b/knights/challenge_game.cpp
@@ -0,0 +1,37 @@
+/***************************************************************************
+ game.cpp - description
+ -------------------
+ begin : Mon Jan 7 2002
+ copyright : (C) 2003 by Eric Faccer
+ email : e.faccer@qut.edu.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <qapplication.h>
+#include "challenge_game.h"
+
+
+Challenge_Game::Challenge_Game(QString seeker, QString seeker_rating, QString match_kind, QString rated, QString time, QString incr, QString uid)
+: _player(seeker), _match_type(match_kind), _is_rated(rated)
+{
+ _id = uid.toInt();
+ if( seeker_rating == "++++" )
+ _player_rating = 0;
+ else
+ _player_rating = seeker_rating.toInt();
+ _clock = time.toInt();
+ _increment = incr.toInt();
+ if( _is_rated == "unrated" )
+ _rated = false;
+ else
+ _rated = true;
+}
+
diff --git a/knights/challenge_game.h b/knights/challenge_game.h
new file mode 100644
index 0000000..6857492
--- /dev/null
+++ b/knights/challenge_game.h
@@ -0,0 +1,47 @@
+/***************************************************************************
+ game.h - description
+ -------------------
+ begin : Mon Jan 7 2002
+ copyright : (C) 2003 by Eric Faccer
+ email : e.faccer@qut.edu.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef GAME_H
+#define GAME_H
+#include <qstring.h>
+
+class Challenge_Game {
+
+ public:
+ Challenge_Game(QString seeker, QString seeker_rating, QString match_kind, QString rated, QString time, QString incr, QString uid);
+
+ public:
+
+ int id() { return _id; };
+ int clock() { return _clock; };
+ int increment() { return _increment; };
+ bool rated() { return _rated; };
+ int rating() { return _player_rating; };
+ QString _player;
+ QString _match_type;
+ QString _is_rated;
+
+ private:
+ int _id;
+ bool _rated;
+ int _player_rating;
+ int _clock;
+ int _increment;
+};
+
+#endif
+
diff --git a/knights/challenge_graph.cpp b/knights/challenge_graph.cpp
new file mode 100644
index 0000000..5d36ff1
--- /dev/null
+++ b/knights/challenge_graph.cpp
@@ -0,0 +1,460 @@
+/***************************************************************************
+ challenge_graph.cpp - description
+ -------------------
+ begin : Mon Jan 7 2002
+ copyright : (C) 2003 by Eric Faccer
+ email : e.faccer@qut.edu.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <kiconloader.h>
+#include <kstddirs.h>
+#include <kpopupmenu.h>
+
+#include <qapplication.h>
+#include <qcanvas.h>
+#include <qlabel.h>
+#include <qpen.h>
+#include <qscrollview.h>
+#include <qwidget.h>
+#include <qrect.h>
+#include <qbrush.h>
+#include <qpainter.h>
+#include <qregexp.h>
+
+#include "challenge_graph.moc"
+#include "challenge_graph_view.h"
+#include "challenge_rectangle.h"
+#include "command.h"
+#include "definitions.h"
+
+/* SIZE is for the size of the challenge square. It could become a class variable */
+#define SIZE 8
+#define OFFSET 2
+#define SPACER SIZE+OFFSET
+
+///////////////////////////////////////
+//
+// Challenge_Graph::Constructor
+//
+///////////////////////////////////////
+Challenge_Graph::Challenge_Graph( QWidget* parent, const char* name, resource *Rsrc )
+ : QVBox(parent, name), myResource(Rsrc)
+{
+ max_rating = 2600;
+ max_time = 60;
+ seek = FALSE;
+
+ graph = new QCanvas( 0, "Challenge_Graph" );
+ myStatusBar = new QLabel( this, "Challenge_Graph_Status_Bar" );
+ myView = new Challenge_Graph_View( *graph, this, "Challenge_Graph_View", 0, myStatusBar );
+
+ QObject::connect(myView, SIGNAL(leftClick(int)), SLOT(selectMatch(int)));
+ QObject::connect(myView, SIGNAL(rightClick(Challenge_Game*, const QPoint&)), SLOT(display_menuSeek(Challenge_Game*, const QPoint&)));
+
+
+ /* Setup Style for myStatusBar */
+ myStatusBar->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::SingleLine );
+ myStatusBar->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ clear();
+
+ menuSeek = new KPopupMenu( this );
+ menuSeek->setCheckable( TRUE );
+ menuSeek->insertItem( i18n("Seek Matches"), this, SLOT( menuFunct(int) ), 0, MENU_SEEK );
+ menuSeek->insertSeparator();
+ menuSeek->insertItem( i18n("Accept This Match"), this, SLOT( menuFunct(int) ), 0, MENU_ACCEPT_MATCH );
+ menuSeek->insertItem( i18n("Tell..."), this, SLOT( menuFunct(int) ), 0, MENU_TELL );
+ menuSeek->insertItem( i18n("Assess..."), this, SLOT( menuFunct(int) ), 0, MENU_ASSESS );
+ menuSeek->insertItem( i18n("Player Info"), this, SLOT( menuFunct(int) ), 0, MENU_FINGER );
+ menuSeek->insertItem( QIconSet( myResource->LoadIcon( QString("history"), KIcon::Small ) ),
+ i18n("Player History"), this, SLOT( menuFunct(int) ), 0, MENU_HISTORY );
+ menuSeek->insertSeparator();
+ menuSeek->insertItem( i18n("Add to Friends"), this, SLOT( menuFunct(int) ), 0, MENU_NOTIFY );
+ menuSeek->insertItem( i18n("Ignore This Player"), this, SLOT( menuFunct(int) ), 0, MENU_CENSOR );
+ menuSeek->setItemChecked( MENU_SEEK, FALSE );
+}
+///////////////////////////////////////
+//
+// Challenge_Graph::Destructor
+//
+///////////////////////////////////////
+Challenge_Graph::~Challenge_Graph()
+{
+}
+///////////////////////////////////////
+//
+// Challenge_Graph::resizeEvent
+//
+///////////////////////////////////////
+void Challenge_Graph::resizeEvent( QResizeEvent *e )
+{
+ if( e->size() != e->oldSize() )
+ {
+ QSize newsize = e->size();
+ x_size = newsize.width() - 8;
+ y_size = newsize.height() - myStatusBar->height();
+ graph->resize( x_size, y_size );
+ createBackground();
+ }
+}
+///////////////////////////////////////
+//
+// Challenge_Graph::add
+//
+///////////////////////////////////////
+void Challenge_Graph::add(Challenge_Game *seek)
+{
+ double AdjustedClock = (float)seek->clock() + ( ( (float)seek->increment() / 60.0 ) * 20.0 );
+ double my_x = (float)x_size / (float)max_time * AdjustedClock;
+ double mag = (float)max_rating / (float)y_size;
+ double my_y = ( max_rating - seek->rating() ) / mag;
+
+ //bleah
+ //a bit of a hack for the status bar real estate & values larger then MAX
+ if ( seek->rating() < 250)
+ my_y = (max_rating - 250) / mag;
+ else if ( seek->rating() >= max_rating )
+ my_y = 10;
+
+ if ( seek->clock() > (max_time-3) )
+ my_x = x_size/max_time * (max_time-3);
+
+ int time_control_x = (int)(my_x);
+ int rating_y = (int)(my_y);
+
+ if ( isEmpty(time_control_x, rating_y) )
+ drawChallenge(time_control_x, rating_y, seek->rated(), seek);
+ else
+ addTo_Nearest_Neighbour(time_control_x, rating_y, seek->rated(), seek);
+}
+///////////////////////////////////////
+//
+// Challenge_Graph::clear
+//
+///////////////////////////////////////
+void Challenge_Graph::clear()
+{
+ myView->reset();
+ graph->update();
+}
+///////////////////////////////////////
+//
+// Challenge_Graph::drawChallenge
+//
+///////////////////////////////////////
+void Challenge_Graph::drawChallenge(int time_control_x, int rating_y, bool rated, Challenge_Game *challenge)
+{
+ /* This next peice of unelegant code is fairly unnecessary. It is to keep everything on the screen */
+ /* It's based on the theory of prophylaxis */
+ int my_x = time_control_x;
+ int my_y = rating_y;
+
+ if( my_y >= y_size - SPACER)
+ my_y = y_size - SPACER;
+ if( my_y < SPACER )
+ my_y = SPACER;
+ if( my_x >= x_size - ( SPACER ) )
+ my_x = x_size - ( SPACER ); /*Since squares draw from the top left */
+ if( my_x < SPACER )
+ my_x = SIZE;
+
+ QCanvasPolygonalItem *item = new Challenge_Rectangle(my_x, my_y, SIZE, SIZE, graph, challenge);
+
+ item->setPen( myResource->COLOR_GraphForeground );
+ item->move( time_control_x, rating_y );
+ item->show();
+
+ if( rated )
+ item->setBrush( QBrush(myResource->COLOR_GraphForeground) );
+ else
+ item->setBrush( QBrush(myResource->COLOR_GraphBackground, Qt::SolidPattern) );
+
+ item->show();
+ graph->update();
+}
+///////////////////////////////////////
+//
+// Challenge_Graph::isEmpty
+//
+///////////////////////////////////////
+bool Challenge_Graph::isEmpty(int x, int y)
+{
+ QCanvasItemList l = graph->collisions( QRect(x, y, SIZE, SIZE) );
+
+ if( l.count() )
+ return false;
+ return true;
+}
+
+/* This function does a spiral search for the nearest neighbour */
+/* Pre: TRUE
+ Post: Finds the nearest non-overlapping position to the original coordinates */
+///////////////////////////////////////
+//
+// Challenge_Graph::addTo_Nearest_Neighbour
+//
+///////////////////////////////////////
+bool Challenge_Graph::addTo_Nearest_Neighbour(int orig_x, int orig_y, bool rated, Challenge_Game * challenge, int searchdepth)
+{
+ int right = 1;
+ int down = 2;
+ int left = 2;
+ int up = 3;
+
+ int x = orig_x;
+ int y = orig_y - ( SIZE + OFFSET );
+
+ /* Check the location on top*/
+ if ( isEmpty( x, y ) )
+ {
+ drawChallenge( x, y, rated, challenge );
+ return true;
+ }
+
+ /* Now search in a spiral */
+ while( right < searchdepth )
+ {
+ for( int i = 0; i < right; i++ )
+ {
+ x += SPACER;
+ if( isEmpty( x, y ) )
+ {
+ drawChallenge( x, y, rated, challenge );
+ return true;
+ }
+ }
+ for( int i = 0; i < down; i++ )
+ {
+ y += SPACER;
+ if( isEmpty( x, y ) )
+ {
+ drawChallenge( x, y, rated, challenge );
+ return true;
+ }
+ }
+ for( int i = 0; i < left; i++ )
+ {
+ x -= SPACER;
+ if( isEmpty( x, y) )
+ {
+ drawChallenge( x, y, rated, challenge );
+ return true;
+ }
+ }
+ for( int i = 0; i < up; i++ )
+ {
+ y -= SPACER;
+ if( isEmpty( x, y ) )
+ {
+ drawChallenge( x, y, rated, challenge );
+ return true;
+ }
+ }
+
+ /* Grow the spiral bounds */
+ right += 2;
+ down += 2;
+ left += 2;
+ up += 2;
+ }
+ return false;
+}
+///////////////////////////////////////
+//
+// Challenge_Graph::createBackground
+//
+///////////////////////////////////////
+void Challenge_Graph::createBackground( void )
+{
+ QPainter painter;
+ QColor ink;
+ QWMatrix matrix;
+ int colorTotal;
+
+ background.resize( y_size, x_size );
+ background.fill( myResource->COLOR_GraphBackground );
+
+ /* Find out if we have a dark bgcolor or a light one. */
+ colorTotal = ( myResource->COLOR_GraphBackground.red() +
+ myResource->COLOR_GraphBackground.blue() +
+ myResource->COLOR_GraphBackground.green() );
+
+ /* Set our ink to something that will contrast well */
+ if( colorTotal < 384 ) // 384 = 50% gray
+ ink = myResource->COLOR_GraphBackground.light();
+ else
+ ink = myResource->COLOR_GraphBackground.dark();
+
+ /* Paint the text on */
+ painter.begin( &background );
+ painter.setFont( myResource->FONT_Standard );
+ painter.setPen( ink );
+ painter.drawText( 64, 12, i18n( "Rating" ) );
+ painter.end();
+ matrix.rotate( -90.0 );
+ background = background.xForm( matrix );
+ painter.begin( &background );
+ painter.setFont( myResource->FONT_Standard );
+ painter.setPen( ink );
+ painter.drawText( 64, y_size - 8, i18n( "Time" ) );
+ painter.end();
+
+ graph->setBackgroundPixmap( background );
+}
+///////////////////////////////////////
+//
+// Challenge_Graph::selectMatch
+//
+///////////////////////////////////////
+void Challenge_Graph::selectMatch( int matchID )
+{
+ if( matchID )
+ emit sendCMD( Command( 0, CMD_Start_Match, QString::number( matchID ) ) );
+}
+///////////////////////////////////////
+//
+// Challenge_Graph::menuFunct
+//
+///////////////////////////////////////
+void Challenge_Graph::menuFunct( int funct )
+{
+ switch( funct )
+ {
+ case MENU_SEEK:
+ emit sendCMD( Command( 0, CMD_Toggle_Seek ) );
+ break;
+ case MENU_FINGER:
+ emit sendCMD( Command( 0, CMD_Player_Finger, selectedPlayerName ) );
+ break;
+ case MENU_TELL:
+ emit sendCMD( Command( 0, CMD_Set_Input, QString( "tell %1 " ).arg( selectedPlayerName ) ) );
+ break;
+ case MENU_NOTIFY:
+ emit sendCMD( Command( 0, CMD_Add_Friend, selectedPlayerName ) );
+ break;
+ case MENU_CENSOR:
+ emit sendCMD( Command( 0, CMD_Ignore_Player, selectedPlayerName ) );
+ break;
+ case MENU_HISTORY:
+ emit sendCMD( Command( 0, CMD_Player_History, selectedPlayerName ) );
+ break;
+ case MENU_ACCEPT_MATCH:
+ emit sendCMD( Command( 0, CMD_Start_Match, QString::number( selectedMatchID ) ) );
+ break;
+ case MENU_ASSESS:
+ emit sendCMD( Command( 0, CMD_Assess, selectedPlayerName ) );
+ break;
+ default:
+ break;
+ }
+}
+///////////////////////////////////////
+//
+// Challenge_Graph::updateSoughtList
+//
+///////////////////////////////////////
+void Challenge_Graph::updateSoughtList( void )
+{
+ unsigned int loop;
+ Challenge_Game *cg;
+
+ clear();
+ for( loop = 0; loop < SF_01.count(); loop++ )
+ {
+ cg = new Challenge_Game( SF_01[loop],
+ SF_02[loop],
+ SF_03[loop],
+ SF_04[loop],
+ SF_05[loop],
+ SF_06[loop],
+ SF_07[loop] );
+ add( cg );
+ }
+ SF_01.clear();
+ SF_02.clear();
+ SF_03.clear();
+ SF_04.clear();
+ SF_05.clear();
+ SF_06.clear();
+ SF_07.clear();
+ seek = TRUE;
+}
+///////////////////////////////////////
+//
+// Challenge_Graph::addSoughtItem
+//
+///////////////////////////////////////
+void Challenge_Graph::addSoughtItem( const QString &src )
+{
+ QStringList fields = QStringList::split( QChar(' '), src, FALSE );
+ SF_01 << fields[2]; // Name
+ SF_02 << fields[1]; // Rating
+ SF_03 << fields[6]; // Match Type
+ SF_04 << fields[5]; // Is Rated?
+ SF_05 << fields[3]; // Base Time
+ SF_06 << fields[4]; // Increment
+ SF_07 << fields[0]; // ID#
+}
+///////////////////////////////////////
+//
+// Challenge_Graph::display_menuSeek
+//
+///////////////////////////////////////
+void Challenge_Graph::display_menuSeek( Challenge_Game *Item, const QPoint &Pos )
+{
+ bool enable;
+ if( Item != NULL )
+ {
+ selectedPlayerName = Item->_player.replace( QRegExp("\\(.+\\)"), QString("") );
+ selectedMatchID = Item->id();
+ enable = TRUE;
+ }
+ else
+ {
+ enable = FALSE;
+ }
+ menuSeek->setItemChecked( MENU_SEEK, seek );
+ menuSeek->setItemEnabled( MENU_FINGER, enable );
+ menuSeek->setItemEnabled( MENU_TELL, enable );
+ menuSeek->setItemEnabled( MENU_NOTIFY, enable );
+ menuSeek->setItemEnabled( MENU_CENSOR, enable );
+ menuSeek->setItemEnabled( MENU_HISTORY, enable );
+ menuSeek->setItemEnabled( MENU_ACCEPT_MATCH, enable );
+ menuSeek->setItemEnabled( MENU_ASSESS, enable );
+ menuSeek->popup( Pos );
+}
+///////////////////////////////////////
+//
+// Challenge_Graph::recvCMD
+//
+///////////////////////////////////////
+void Challenge_Graph::recvCMD( const Command& command )
+{
+ switch(((Command)command).getCommand())
+ {
+ case CMD_Add_Sought_Match:
+ addSoughtItem( ((Command)command).getData() );
+ break;
+ case CMD_Show_Sought_List:
+ updateSoughtList();
+ break;
+ case CMD_Hide_Sought_List:
+ clear();
+ seek = FALSE;
+ break;
+ default:
+ break;
+ }
+}
diff --git a/knights/challenge_graph.h b/knights/challenge_graph.h
new file mode 100644
index 0000000..e7963a3
--- /dev/null
+++ b/knights/challenge_graph.h
@@ -0,0 +1,93 @@
+/***************************************************************************
+ challenge_graph.h - description
+ -------------------
+ begin : Mon Jan 7 2002
+ copyright : (C) 2003 by Eric Faccer
+ email : e.faccer@qut.edu.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef CHALLENGE_GRAPH_H
+#define CHALLENGE_GRAPH_H
+
+#include <qstringlist.h>
+#include <qvbox.h>
+#include <qevent.h>
+#include <qcolor.h>
+
+#include "resource.h"
+#include "challenge_game.h"
+
+class KPopupMenu;
+class QCanvas;
+class QLabel;
+class Challenge_Graph_View;
+class Command;
+
+class Challenge_Graph : public QVBox
+{
+ Q_OBJECT
+
+ public:
+ Challenge_Graph(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ virtual ~Challenge_Graph();
+ void resizeEvent( QResizeEvent* );
+ void add( Challenge_Game *seek );
+ void clear();
+
+ signals:
+ void sendCMD( const Command& );
+
+ public slots:
+ void recvCMD( const Command& );
+ void display_menuSeek( Challenge_Game*, const QPoint& );
+ void selectMatch( int );
+ void menuFunct( int );
+
+ protected:
+ virtual bool isEmpty( int x, int y );
+ void drawChallenge( int time_control_x, int rating_y, bool rated, Challenge_Game *challenge );
+ bool addTo_Nearest_Neighbour( int orig_x, int orig_y, bool rated, Challenge_Game *challenge, int searchdepth=10 );
+ void createBackground( void );
+ void addSoughtItem( const QString& );
+ void updateSoughtList( void );
+
+ private:
+ int x_size;
+ int y_size;
+ int max_rating;
+ int max_time;
+ bool seek;
+
+ resource *myResource;
+ QCanvas *graph;
+ Challenge_Graph_View *myView;
+ QLabel *myStatusBar;
+ QPixmap background;
+
+ KPopupMenu *menuSeek;
+ int selectedMatchID;
+ QString selectedPlayerName;
+ /*
+ These StringLists temporarily store Sought Game data
+ until all ads have been displayed.
+ */
+ QStringList SF_01;
+ QStringList SF_02;
+ QStringList SF_03;
+ QStringList SF_04;
+ QStringList SF_05;
+ QStringList SF_06;
+ QStringList SF_07;
+};
+
+#endif
+
diff --git a/knights/challenge_graph_view.cpp b/knights/challenge_graph_view.cpp
new file mode 100644
index 0000000..734ed99
--- /dev/null
+++ b/knights/challenge_graph_view.cpp
@@ -0,0 +1,112 @@
+/***************************************************************************
+ challenge_graph_view.cpp - description
+ -------------------
+ begin : Mon Jan 7 2002
+ copyright : (C) 2003 by Eric Faccer
+ email : e.faccer@qut.edu.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <string>
+#include <qpoint.h>
+#include <qstring.h>
+
+#include "challenge_graph_view.moc"
+
+#include "challenge_graph.h"
+#include "challenge_rectangle.h"
+
+///////////////////////////////////////
+//
+// Challenge_Graph_View::Constructor
+//
+///////////////////////////////////////
+Challenge_Graph_View::Challenge_Graph_View(QCanvas& c, QWidget * parent,const char* name, WFlags f, QLabel *qsb)
+ : QCanvasView(&c,parent,name,f), canvas(c), statusbar(qsb)
+{
+ setHScrollBarMode( QScrollView::AlwaysOff );
+ setVScrollBarMode( QScrollView::AlwaysOff );
+
+ if ( parent )
+ parent->installEventFilter( this );
+ QScrollView::viewport()->setMouseTracking(true);
+}
+///////////////////////////////////////
+//
+// Challenge_Graph_View::Destructor
+//
+///////////////////////////////////////
+Challenge_Graph_View::~Challenge_Graph_View()
+{
+}
+///////////////////////////////////////
+//
+// Challenge_Graph_View::contentsMousePressEvent
+//
+///////////////////////////////////////
+void Challenge_Graph_View::contentsMousePressEvent(QMouseEvent* e)
+{
+ QCanvasItemList l = canvas.collisions(e->pos());
+ QCanvasItemList::Iterator it = l.begin();
+ for(; it != l.end(); ++it )
+ {
+ Challenge_Rectangle *cr = dynamic_cast<Challenge_Rectangle *>(*it);
+ Challenge_Game *g = cr->getGame();
+ if( e->button() == Qt::LeftButton )
+ emit leftClick( g->id() );
+ if( e->button() == Qt::RightButton )
+ emit rightClick( g, e->globalPos() );
+ return;
+ }
+ if( e->button() == Qt::RightButton )
+ emit rightClick( NULL, e->globalPos() ); // We need to catch all right clicks
+}
+///////////////////////////////////////
+//
+// Challenge_Graph_View::reset
+//
+///////////////////////////////////////
+void Challenge_Graph_View::reset()
+{
+ QCanvasItemList list = canvas.allItems();
+ QCanvasItemList::Iterator it = list.begin();
+ for(; it != list.end(); ++it )
+ {
+ Challenge_Rectangle *cr = dynamic_cast<Challenge_Rectangle *>(*it);
+ Challenge_Game *g = cr->getGame();
+ delete g;
+ if ( *it )
+ delete *it;
+ }
+}
+///////////////////////////////////////
+//
+// Challenge_Graph_View::contentsMouseMoveEvent
+//
+///////////////////////////////////////
+void Challenge_Graph_View::contentsMouseMoveEvent(QMouseEvent* e)
+{
+ QString match;
+ QCanvasItemList l = canvas.collisions(e->pos());
+ QCanvasItemList::Iterator it = l.begin();
+ for(; it!=l.end(); ++it)
+ {
+ Challenge_Rectangle *cr = dynamic_cast<Challenge_Rectangle *>(*it);
+ Challenge_Game *g = cr->getGame();
+
+ match = i18n( " Name: %1 Rating: %2 Match Type: %3 %4 Base Time: %5 Increment: %6" )
+ .arg( g->_player ).arg( g->rating() ).arg( g->_match_type ).arg( g->_is_rated )
+ .arg( g->clock() ).arg( g->increment() );
+ break;
+ }
+ statusbar->setText( match );
+}
+
diff --git a/knights/challenge_graph_view.h b/knights/challenge_graph_view.h
new file mode 100644
index 0000000..f1e89ba
--- /dev/null
+++ b/knights/challenge_graph_view.h
@@ -0,0 +1,50 @@
+/***************************************************************************
+ challenge_graph_view.h - description
+ -------------------
+ begin : Mon Jan 7 2002
+ copyright : (C) 2003 by Eric Faccer
+ email : e.faccer@qut.edu.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef CHALLENGE_GRAPH_VIEW_H
+#define CHALLENGE_GRAPH_VIEW_H
+
+#include <qevent.h>
+#include <qcanvas.h>
+#include <qlabel.h>
+#include "challenge_game.h"
+
+
+class Challenge_Graph_View : public QCanvasView
+{
+ Q_OBJECT
+
+ public:
+ Challenge_Graph_View(QCanvas&, QWidget* parent=0, const char* name=0, WFlags f=0, QLabel *qsb=0);
+ ~Challenge_Graph_View();
+ void reset();
+
+ signals:
+ void leftClick(int);
+ void rightClick(Challenge_Game*, const QPoint&);
+
+ protected:
+ void contentsMousePressEvent(QMouseEvent*);
+ void contentsMouseMoveEvent(QMouseEvent*);
+ void updateStatusBar(QString msg);
+
+ private:
+ QCanvas &canvas;
+ QLabel *statusbar;
+};
+
+#endif
diff --git a/knights/challenge_rectangle.cpp b/knights/challenge_rectangle.cpp
new file mode 100644
index 0000000..2587623
--- /dev/null
+++ b/knights/challenge_rectangle.cpp
@@ -0,0 +1,34 @@
+/***************************************************************************
+ challenge_rectangle.cpp - description
+ -------------------
+ begin : Mon Jan 7 2002
+ copyright : (C) 2003 by Eric Faccer
+ email : e.faccer@qut.edu.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "challenge_rectangle.h"
+
+Challenge_Rectangle::Challenge_Rectangle
+ (int x, int y, int width, int height, QCanvas * canvas, Challenge_Game * ptr)
+ : QCanvasRectangle(x,y,width,height,canvas), challenge(ptr)
+{
+}
+
+Challenge_Game* Challenge_Rectangle::getGame()
+{
+ return challenge;
+}
+
+Challenge_Rectangle::~Challenge_Rectangle()
+{
+ this->hide();
+}
diff --git a/knights/challenge_rectangle.h b/knights/challenge_rectangle.h
new file mode 100644
index 0000000..02488ff
--- /dev/null
+++ b/knights/challenge_rectangle.h
@@ -0,0 +1,36 @@
+/***************************************************************************
+ challenge_rectangle.h - description
+ -------------------
+ begin : Mon Jan 7 2002
+ copyright : (C) 2003 by Eric Faccer
+ email : e.faccer@qut.edu.au
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef CHALLENGE_RECTANGLE_H
+#define CHALLENGE_RECTANGLE_H
+
+#include <qcanvas.h>
+#include "challenge_game.h"
+
+class Challenge_Rectangle : public QCanvasRectangle
+{
+ public:
+ Challenge_Rectangle(int x=0, int y=0, int width=0, int height=0, QCanvas * canvas=0, Challenge_Game * ptr=0);
+ ~Challenge_Rectangle();
+ Challenge_Game* getGame();
+
+ private:
+ Challenge_Game * challenge;
+
+};
+#endif
+
diff --git a/knights/chessclock.cpp b/knights/chessclock.cpp
new file mode 100644
index 0000000..bde4745
--- /dev/null
+++ b/knights/chessclock.cpp
@@ -0,0 +1,195 @@
+/***************************************************************************
+ chessclock.cpp - description
+ -------------------
+ begin : Mon Jul 2 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "chessclock.moc"
+#include "audio.h"
+
+chessclock::chessclock(QWidget *parent, const char *name, resource *Rsrc ) : QWidget(parent,name)
+{
+ Resource = Rsrc;
+ Silent = TRUE;
+ WhiteIndex = 0;
+ BlackIndex = 0;
+ Flag[WHITE] = FALSE;
+ Flag[BLACK] = FALSE;
+ whiteClock = " 0:00:00 ";
+ blackClock = " 0:00:00 ";
+}
+chessclock::~chessclock()
+{
+}
+///////////////////////////////////////
+//
+// chessclock::Set
+//
+///////////////////////////////////////
+void chessclock::Set( const int WhiteSec, const int BlackSec, const bool onMove )
+{
+ /* these times are in centi seconds */
+ White.Seconds = WhiteSec / 10;
+ Black.Seconds = BlackSec / 10;
+ ArmyOnMove = onMove;
+}
+///////////////////////////////////////
+//
+// chessclock::Reset
+//
+///////////////////////////////////////
+void chessclock::Reset( void )
+{
+ Pause();
+ WhiteIndex = 0;
+ BlackIndex = 0;
+
+ White = Resource->TCPWhite[WhiteIndex];
+ Black = Resource->TCPBlack[BlackIndex];
+
+ White.Seconds *= 10;
+ White.Increment *= 10;
+ Black.Seconds *= 10;
+ Black.Increment *= 10;
+
+ ArmyOnMove = WHITE;
+ External = FALSE;
+ UpdateStrings();
+}
+///////////////////////////////////////
+//
+// chessclock::Pause
+//
+///////////////////////////////////////
+void chessclock::Pause( void )
+{
+ Silent = TRUE;
+}
+///////////////////////////////////////
+//
+// chessclock::Resume
+//
+///////////////////////////////////////
+void chessclock::Resume( void )
+{
+ Silent = FALSE;
+}
+///////////////////////////////////////
+//
+// chessclock::getCentiseconds
+//
+///////////////////////////////////////
+int chessclock::getCentiseconds( const bool Army )
+{
+ if( Army == WHITE )
+ {
+ return White.Seconds * 10;
+ }
+ return Black.Seconds * 10;
+}
+///////////////////////////////////////
+//
+// chessclock::Moved
+//
+///////////////////////////////////////
+void chessclock::Moved( void )
+{
+ Pause();
+ if( ArmyOnMove == WHITE )
+ {
+ ArmyOnMove = BLACK;
+ White.Moves--;
+ White.Seconds += White.Increment;
+ if( White.Moves < 1 )
+ {
+ WhiteIndex++;
+ if( WhiteIndex == (signed)Resource->TCPWhite.count() ) WhiteIndex--;
+ White = Resource->TCPWhite[WhiteIndex];
+ White.Seconds *= 10;
+ White.Increment *= 10;
+ }
+ }
+ else
+ {
+ ArmyOnMove = WHITE;
+ Black.Moves--;
+ Black.Seconds += Black.Increment;
+ if( Black.Moves < 1 )
+ {
+ BlackIndex++;
+ if( BlackIndex == (signed)Resource->TCPBlack.count() ) BlackIndex--;
+ Black = Resource->TCPBlack[BlackIndex];
+ Black.Seconds *= 10;
+ Black.Increment *= 10;
+ }
+ }
+ Resume();
+}
+///////////////////////////////////////
+//
+// chessclock::Tick
+//
+///////////////////////////////////////
+void chessclock::Tick( void )
+{
+ if( Silent ) return;
+ if( ArmyOnMove == WHITE )
+ {
+ White.Seconds--;
+ if( ( White.Seconds < 0 ) && ( Flag[WHITE] == FALSE ) )
+ {
+ Flag[WHITE] = TRUE;
+ emit flagFell( WHITE );
+ Resource->play( SND_FLAG );
+ }
+ }
+ else
+ {
+ Black.Seconds--;
+ if( ( Black.Seconds < 0 ) && ( Flag[BLACK] == FALSE ) )
+ {
+ Flag[BLACK] = TRUE;
+ emit flagFell( BLACK );
+ Resource->play( SND_FLAG );
+ }
+ }
+ UpdateStrings();
+}
+///////////////////////////////////////
+//
+// chessclock::UpdateStrings
+//
+///////////////////////////////////////
+void chessclock::UpdateStrings( void )
+{
+ int tmp;
+ int h, m, s;
+ char sign;
+
+ sign = ' ';
+ if( White.Seconds < 0 ) sign = '-';
+ tmp = abs(White.Seconds / 10);
+ s = ( tmp % 60 );
+ m = ( ( tmp / 60 ) % 60 );
+ h = ( ( tmp / 60 ) / 60 );
+ whiteClock.sprintf( " %c%.1d:%.2d:%.2d ", sign, h, m, s );
+
+ sign = ' ';
+ if( Black.Seconds < 0 ) sign = '-';
+ tmp = abs(Black.Seconds / 10);
+ s = ( tmp % 60 );
+ m = ( ( tmp / 60 ) % 60 );
+ h = ( ( tmp / 60 ) / 60 );
+ blackClock.sprintf( " %c%.1d:%.2d:%.2d ", sign, h, m, s );
+}
diff --git a/knights/chessclock.h b/knights/chessclock.h
new file mode 100644
index 0000000..ce2a1fd
--- /dev/null
+++ b/knights/chessclock.h
@@ -0,0 +1,75 @@
+/***************************************************************************
+ chessclock.h - description
+ -------------------
+ begin : Mon Jul 2 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef CHESSCLOCK_H
+#define CHESSCLOCK_H
+
+#include <qwidget.h>
+#include <qstring.h>
+#include <stdlib.h>
+#include "definitions.h"
+#include "resource.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class chessclock : public QWidget
+{
+ Q_OBJECT
+
+ public:
+
+ chessclock( QWidget *parent=0, const char *name=0, resource *Rsrc=0 );
+ ~chessclock();
+
+ /* The Set function accepts Centiseconds ( 1/100 second ) */
+ void Set( const int WhiteSec, const int BlackSec, const bool onMove );
+ void Reset( void );
+ void Pause( void );
+ void Resume( void );
+ void Moved( void );
+ int getCentiseconds( const bool Army );
+
+ QString whiteClock;
+ QString blackClock;
+ bool Silent;
+ bool Flag[2];
+
+ public slots:
+ void Tick( void );
+
+ signals:
+ void flagFell( const bool );
+
+ private:
+
+ resource *Resource;
+
+ TCP White;
+ TCP Black;
+
+ int WhiteIndex;
+ int BlackIndex;
+
+ bool ArmyOnMove;
+ bool External;
+
+ void UpdateStrings( void );
+};
+
+#endif
diff --git a/knights/command.cpp b/knights/command.cpp
new file mode 100644
index 0000000..a67088a
--- /dev/null
+++ b/knights/command.cpp
@@ -0,0 +1,98 @@
+/***************************************************************************
+ command.cpp - description
+ -------------------
+ begin : Sun Jun 30 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "command.h"
+
+Command::Command( int ID, int Command, int WhiteTime, int BlackTime, struct ChessMove Move )
+{
+ white_time = WhiteTime;
+ black_time = BlackTime;
+ move = Move;
+ id = ID;
+ command = Command;
+}
+
+Command::Command( int ID, int Command, int WhiteTime, int BlackTime, struct ChessMove Move, QString Data )
+{
+ white_time = WhiteTime;
+ black_time = BlackTime;
+ data = Data;
+ move = Move;
+ id = ID;
+ command = Command;
+}
+
+Command::Command( int ID, int Command, int WhiteTime, int BlackTime, QString Data )
+{
+ white_time = WhiteTime;
+ black_time = BlackTime;
+ data = Data;
+ id = ID;
+ command = Command;
+}
+
+Command::Command( int ID, int Command )
+{
+ clear();
+ id = ID;
+ command = Command;
+}
+
+Command::Command( int ID, int Command, QString Data )
+{
+ clear();
+ id = ID;
+ command = Command;
+ data = Data;
+}
+
+Command::Command()
+{
+ clear();
+}
+
+Command::~Command()
+{
+}
+
+void Command::clear(void)
+{
+ white_time = 0;
+ black_time = 0;
+ command = CMD_None;
+ clearMove( &move );
+}
+///////////////////////////////////////
+//
+// Command::clearMove
+//
+///////////////////////////////////////
+void Command::clearMove( ChessMove *Move )
+{
+ Move->fromFile = Null;
+ Move->fromRank = Null;
+ Move->toFile = Null;
+ Move->toRank = Null;
+ Move->Promote = Null;
+ Move->ManTaken = Null;
+ Move->NAG = 0;
+ Move->ICS_MoveCounter = 0;
+ Move->ICS_PawnPushFile = Null;
+ Move->ICS_Mode = Null;
+ Move->ICS_OnMove = 0;
+ Move->ICS_ClockTicking = TRUE;
+}
diff --git a/knights/command.h b/knights/command.h
new file mode 100644
index 0000000..c10e300
--- /dev/null
+++ b/knights/command.h
@@ -0,0 +1,194 @@
+/***************************************************************************
+ command.h - description
+ -------------------
+ begin : Sun Jun 30 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef COMMAND_H
+#define COMMAND_H
+
+#include <qstring.h>
+#include "definitions.h"
+
+/**
+ *@author Alexander Wels.
+ */
+ /* Commands */
+
+/*
+ These constants represent the game's desire to send the IOs a command.
+ SendCMD will convert them to the correct command for the current protocol.
+*/
+
+const int CMD_None = 0x00000000;
+const int CMD_Init = 0x00000001;
+const int CMD_NewGame = 0x00000002;
+const int CMD_Exit = 0x00000003;
+const int CMD_MoveNow = 0x00000004;
+const int CMD_Pause = 0x00000005;
+const int CMD_Resume = 0x00000006;
+const int CMD_Move = 0x00000007;
+const int CMD_Illegal = 0x00000008;
+const int CMD_Play_White = 0x00000009;
+const int CMD_Play_Black = 0x0000000a;
+const int CMD_Result_White = 0x0000000b;
+const int CMD_Result_Black = 0x0000000c;
+const int CMD_Result_Draw = 0x0000000d;
+const int CMD_Your_Time = 0x0000000e;
+const int CMD_Enemy_Time = 0x0000000f;
+const int CMD_Offer_Draw = 0x00000010;
+const int CMD_Ponder = 0x00000011;
+const int CMD_No_Pondering = 0x00000012;
+const int CMD_Book_Mode = 0x00000013;
+const int CMD_Out_Of_Book = 0x00000014;
+const int CMD_Check_Book = 0x00000015;
+const int CMD_Retract_Move = 0x00000016;
+const int CMD_Hint = 0x00000017;
+const int CMD_Listen = 0x00000018;
+const int CMD_Play = 0x00000019;
+const int CMD_Tell_User = 0x0000001a;
+const int CMD_Tell_User_Error = 0x0000001b;
+const int CMD_White_Resign = 0x0000001c;
+const int CMD_Black_Resign = 0x0000001d;
+const int CMD_White_Called_Flag = 0x0000001e;
+const int CMD_Black_Called_Flag = 0x0000001f;
+const int CMD_Set_Depth = 0x00000020;
+const int CMD_Set_Board = 0x00000021;
+const int CMD_Set_Difficulty = 0x00000022;
+const int CMD_Tell_Opponent = 0x00000023;
+const int CMD_Tell_Others = 0x00000024;
+const int CMD_Tell_All = 0x00000025;
+const int CMD_Tell_ICS = 0x00000026;
+const int CMD_Set_Name = 0x00000028;
+
+/* Engine Specific */
+const int CMD_UCI_Hint = 0x00100001;
+const int CMD_Send_SIGTERM = 0x00100002;
+const int CMD_Send_SIGINT = 0x00100003;
+
+/* Internet specific commands */
+const int CMD_Reject_Draw = 0x01000001;
+const int CMD_Reset_Server = 0x01000002;
+const int CMD_Examine_Forward = 0x01000003;
+const int CMD_Examine_Backward = 0x01000004;
+const int CMD_Lost_Contact = 0x01000005;
+const int CMD_Bad_Login = 0x01000006;
+const int CMD_Toggle_Seek = 0x01000007;
+const int CMD_Assess = 0x01000008;
+const int CMD_Player_Finger = 0x01000009;
+const int CMD_Player_History = 0x0100000a;
+const int CMD_Add_Friend = 0x0100000b;
+const int CMD_Ignore_Player = 0x0100000c;
+const int CMD_Start_Match = 0x0100000d;
+
+/* These commands are from Match to Core ONLY */
+const int CMD_New_Players = 0x02000001;
+
+/* These commands are sent to ICS Related Widgets */
+const int CMD_Add_Sought_Match = 0x03000001;
+const int CMD_Show_Sought_List = 0x03000002;
+const int CMD_Hide_Sought_List = 0x03000003;
+const int CMD_Set_Input = 0x03000004;
+const int CMD_Set_Src_Tell = 0x03000005;
+const int CMD_Set_Src_Channel = 0x03000006;
+const int CMD_Append_To_Console = 0x03000007;
+const int CMD_Send_To_ICS = 0x03000008;
+
+class Command
+{
+
+protected:
+ int white_time; // Centiseconds
+ int black_time; // Centiseconds
+ struct ChessMove move;
+ int command;
+ int id;
+ QString data; // Generic String... used for ICS and FEN, etc.
+
+public:
+ Command( int ID, int Command );
+ Command( int ID, int Command, QString Data );
+ Command( int ID, int Command, int WhiteTime, int BlackTime, struct ChessMove Move );
+ Command( int ID, int Command, int WhiteTime, int BlackTime, struct ChessMove Move, QString Data );
+ Command( int ID, int Command, int WhiteTime, int BlackTime, QString Data );
+ Command();
+ ~Command();
+ void clear( void );
+
+ /* Static Public Members */
+ static void clearMove( struct ChessMove *Move );
+
+ /* Inline Members */
+ int getWhiteTime( void )
+ {
+ return white_time;
+ }
+
+ int getBlackTime( void )
+ {
+ return black_time;
+ }
+
+ struct ChessMove& getMove( void )
+ {
+ return move;
+ }
+
+ int getID( void )
+ {
+ return id;
+ }
+
+ int getCommand( void )
+ {
+ return command;
+ }
+
+ QString& getData( void )
+ {
+ return data;
+ }
+
+ void setWhiteTime( int time )
+ {
+ white_time = time;
+ }
+
+ void setBlackTime( int time )
+ {
+ black_time = time;
+ }
+
+ void setMove( struct ChessMove &NewMove )
+ {
+ move = NewMove;
+ }
+
+ void setID( int NewID )
+ {
+ id = NewID;
+ }
+
+ void setCommand( int &NewCommand )
+ {
+ command = NewCommand;
+ }
+
+ void setData( QString &NewData )
+ {
+ data = NewData;
+ }
+};
+
+#endif
diff --git a/knights/console.cpp b/knights/console.cpp
new file mode 100644
index 0000000..33bbbd5
--- /dev/null
+++ b/knights/console.cpp
@@ -0,0 +1,264 @@
+/***************************************************************************
+ console.cpp - description
+ -------------------
+ begin : Sun May 27 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "console.moc"
+#include "knightstextview.h"
+#include "accel.h"
+#include "tabmanager.h"
+
+/* KDE */
+#include <klineedit.h>
+#include <kiconloader.h>
+#include <qregexp.h>
+#include <qstyle.h>
+
+Console::Console(QWidget *parent,
+ const char *name,
+ resource *Rsrc ) : QVBox(parent,name)
+{
+ myResource = Rsrc;
+ SelfMoving = FALSE;
+ QStyle& Style = QApplication::style();
+
+ margin = Style.defaultFrameWidth();
+ myTextView = new KnightsTextView( this, myResource );
+ myLineEdit = new KLineEdit( this, "console_edit" );
+ /* Configure misc */
+ setBG();
+ myTextView->setStaticBackground( FALSE );
+
+ connect( myLineEdit, SIGNAL( returnPressed( const QString& ) ), this, SLOT( getText( const QString& ) ) );
+ connect( myResource->myAccel, SIGNAL( history_prev() ), this, SLOT( historyBackward() ) );
+ connect( myResource->myAccel, SIGNAL( history_next() ), this, SLOT( historyForward() ) );
+ connect( myResource->myAccel, SIGNAL( page_up() ), this, SLOT( pageUp() ) );
+ connect( myResource->myAccel, SIGNAL( page_down() ), this, SLOT( pageDown() ) );
+ connect( myResource->myAccel, SIGNAL( kibitz() ), this, SLOT( kibitz() ) );
+ connect( myResource->myAccel, SIGNAL( whisper() ), this, SLOT( whisper() ) );
+ connect( myResource->myAccel, SIGNAL( reply_tell() ), this, SLOT( replyPrivate() ) );
+ connect( myResource->myAccel, SIGNAL( reply_channel() ), this, SLOT( replyChannel() ) );
+ connect( myResource->myAccel, SIGNAL( focus() ), this, SLOT( getFocus() ) );
+ connect( myResource->myAccel, SIGNAL( focus( const QChar& ) ), this, SLOT( getFocus( const QChar& ) ) );
+
+ myTextView->show();
+ myLineEdit->show();
+ show();
+}
+Console::~Console()
+{
+ delete myLineEdit;
+ delete myTextView;
+}
+///////////////////////////////////////
+//
+// Console::pageDown
+//
+///////////////////////////////////////
+void Console::pageDown( void )
+{
+ myTextView->pageMove( Qt::Key_PageDown );
+}
+///////////////////////////////////////
+//
+// Console::pageUp
+//
+///////////////////////////////////////
+void Console::pageUp( void )
+{
+ myTextView->pageMove();
+}
+///////////////////////////////////////
+//
+// Console::recvCMD
+//
+///////////////////////////////////////
+void Console::recvCMD( const Command& command )
+{
+ QString modText; /* this will hold the text to append after it has been modified with anchors */
+
+ switch(((Command)command).getCommand())
+ {
+ case CMD_Append_To_Console:
+ if( myTextView->contentsY() >= ( myTextView->contentsHeight() - myTextView->visibleHeight() - 12 ) )
+ {
+ modText = insertTags(((Command)command).getData());
+ myTextView->append(modText);
+ myTextView->scrollToBottom();
+ }
+ else
+ {
+ modText = insertTags(((Command)command).getData());
+ myTextView->append(modText);
+ }
+ break;
+ case CMD_Set_Input:
+ myLineEdit->setText( ((Command)command).getData() );
+ if( !myLineEdit->hasFocus() )
+ getFocus();
+ break;
+ case CMD_Set_Src_Tell:
+ lastPrivateSource = ((Command)command).getData();
+ break;
+ case CMD_Set_Src_Channel:
+ lastChannelSource = ((Command)command).getData();
+ break;
+ default:
+ break;
+ }
+}
+///////////////////////////////////////
+//
+// Console::getText
+//
+///////////////////////////////////////
+void Console::getText( const QString &text )
+{
+ /* Append this text into our history */
+ history.append( text );
+ if( history.count() > 100 )
+ history.remove( history.begin() );
+ historyIT = history.end();
+ emit sendCMD( Command( 0, CMD_Send_To_ICS, text ) );
+ myLineEdit->clear();
+}
+///////////////////////////////////////
+//
+// Console::historyBack
+//
+///////////////////////////////////////
+void Console::historyBackward( void )
+{
+ if( history.count() && ( historyIT != history.begin() ) )
+ {
+ historyIT--;
+ myLineEdit->setText( (*historyIT) );
+ }
+ if( !myLineEdit->hasFocus() )
+ getFocus();
+}
+///////////////////////////////////////
+//
+// Console::historyForward
+//
+///////////////////////////////////////
+void Console::historyForward( void )
+{
+ if( history.count() && ( historyIT != history.end() ) )
+ {
+ historyIT++;
+ myLineEdit->setText( (*historyIT) );
+ }
+ if( !myLineEdit->hasFocus() )
+ getFocus();
+}
+///////////////////////////////////////
+//
+// Console::replyPrivate
+//
+///////////////////////////////////////
+void Console::replyPrivate( void )
+{
+ myLineEdit->setText( QString( "tell %1 " ).arg( lastPrivateSource ) );
+ if( !myLineEdit->hasFocus() )
+ getFocus();
+}
+///////////////////////////////////////
+//
+// Console::replyChannel
+//
+///////////////////////////////////////
+void Console::replyChannel( void )
+{
+ myLineEdit->setText( QString( "tell %1 " ).arg( lastChannelSource ) );
+ if( !myLineEdit->hasFocus() )
+ getFocus();
+}
+///////////////////////////////////////
+//
+// Console::kibitz
+//
+///////////////////////////////////////
+void Console::kibitz( void )
+{
+ myLineEdit->setText( QString( "kibitz " ) );
+ if( !myLineEdit->hasFocus() )
+ getFocus();
+}
+///////////////////////////////////////
+//
+// Console::whisper
+//
+///////////////////////////////////////
+void Console::whisper( void )
+{
+ myLineEdit->setText( QString( "whisper " ) );
+ if( !myLineEdit->hasFocus() )
+ getFocus();
+}
+///////////////////////////////////////
+//
+// Console::getFocus
+//
+///////////////////////////////////////
+void Console::getFocus( void )
+{
+ if( myLineEdit->hasFocus() )
+ {
+ getText( myLineEdit->text() );
+ }
+ setActiveWindow();
+ myResource->tabManager->showTab( this );
+ myLineEdit->setFocus();
+}
+void Console::getFocus( const QChar &c )
+{
+ myLineEdit->setText( myLineEdit->text() + QString( c ) );
+ if( !myLineEdit->hasFocus() )
+ getFocus();
+}
+///////////////////////////////////////
+//
+// Console::setBG
+//
+///////////////////////////////////////
+void Console::setBG( void )
+{
+ myTextView->setPaper( QBrush( myResource->COLOR_Background ) );
+}
+
+///////////////////////////////////////
+//
+// Console::insertTags(QString data)
+//
+///////////////////////////////////////
+QString Console::insertTags(QString data)
+{
+ QRegExp hyperLinks("(http://(?:.)+(?:\\.(?:[^\\s\\r\\t<])+)+)");
+ QRegExp mailLinks("\\b((?:\\w|\\d)+\\@(?:\\w|\\d)+(?:\\.(?:\\d|\\w)+)+)\\b");
+ int pos = 0;
+
+ pos = hyperLinks.search(data, 0);
+ if(pos >= 0)
+ {
+ data.replace(hyperLinks, "<A HREF=\"" + hyperLinks.cap(0) + "\">" + hyperLinks.cap(0) + "</A>");
+ }
+ pos = mailLinks.search(data, 0);
+ if(pos >= 0)
+ {
+ data.replace(mailLinks, "<A HREF=\"mailto:" + mailLinks.cap(0) + "\">" + mailLinks.cap(0) + "</A>");
+ }
+ return data;
+}
diff --git a/knights/console.h b/knights/console.h
new file mode 100644
index 0000000..ec38ec9
--- /dev/null
+++ b/knights/console.h
@@ -0,0 +1,87 @@
+/***************************************************************************
+ console.h - description
+ -------------------
+ begin : Sun May 27 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef CONSOLE_H
+#define CONSOLE_H
+
+/* Qt */
+#include <qstringlist.h>
+#include <qvbox.h>
+#include <qlayout.h>
+/* Local */
+#include "definitions.h"
+#include "resource.h"
+#include "command.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class KLineEdit;
+class KnightsTextView;
+
+class Console : public QVBox
+{
+ Q_OBJECT
+
+ public:
+
+ enum Direction
+ {
+ Up = 1,
+ Down = 0
+ };
+
+ Console(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ ~Console();
+ void buildAccel( void );
+
+ public slots:
+ void recvCMD( const Command& );
+ void getText( const QString& );
+ void historyBackward( void );
+ void historyForward( void );
+ void pageUp( void );
+ void pageDown( void );
+ void getFocus( void );
+ void getFocus( const QChar& );
+ void setBG( void );
+ void replyPrivate( void );
+ void replyChannel( void );
+ void kibitz( void );
+ void whisper( void );
+
+ signals:
+ void sendCMD( const Command& );
+
+ private:
+ QString insertTags(QString);
+
+ resource *myResource;
+ int margin;
+ bool SelfMoving;
+
+ KnightsTextView *myTextView;
+ KLineEdit *myLineEdit;
+
+ QStringList history;
+ QStringList::Iterator historyIT;
+ QString lastPrivateSource;
+ QString lastChannelSource;
+};
+
+#endif
diff --git a/knights/core.cpp b/knights/core.cpp
new file mode 100644
index 0000000..e0b09ce
--- /dev/null
+++ b/knights/core.cpp
@@ -0,0 +1,892 @@
+/***************************************************************************
+ core.cpp - description
+ -------------------
+ begin : Tue Oct 2 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+/* KDE */
+#include <kfiledialog.h>
+#include <kmessagebox.h>
+
+/* Qt */
+#include <qpushbutton.h>
+
+/* Local */
+#include "core.moc"
+#include "match.h"
+#include "list_pgn.h"
+#include "thinbuttons.h"
+#include "io_engine.h"
+#include "io_internet.h"
+#include "match_param.h"
+
+/* Tabs */
+#include "tabmanager.h"
+
+///////////////////////////////////////
+//
+// core::core
+//
+///////////////////////////////////////
+core::core(QWidget *parent, const char *name, resource *Rsrc ) : QWidget(parent,name)
+{
+ myResource = Rsrc;
+ listPGN = NULL;
+ currentMatch = NULL;
+
+ myButtonGroup = new thinbuttons( this, "ButtonGroup", myResource );
+ myButtonGroup->show();
+ connect( myButtonGroup, SIGNAL( leftClick(int) ), this, SLOT( setMatch(int) ) );
+ connect( myButtonGroup, SIGNAL( menuItemSelected(int,int) ), this, SLOT( thinButtonMenu(int,int) ) );
+
+ myCoreClock.start( 100, FALSE );
+ resize();
+}
+
+///////////////////////////////////////
+//
+// core::~core
+//
+///////////////////////////////////////
+core::~core()
+{
+ myCoreClock.stop();
+ delete myButtonGroup;
+}
+
+///////////////////////////////////////
+//
+// core::createNewIO
+//
+///////////////////////////////////////
+void core::createNewIO( int type, int ID, int side, int str )
+{
+ io_internet *internetioPtr = NULL;
+ io_engine *engineioPtr = NULL;
+// io_email *ioEmailPtr = NULL;
+ switch( type )
+ {
+ /* PLAYERTCP */
+ case PLAYERTCP:
+ if( ID == Null )
+ {
+ /* Create a NEW internetIO */
+ internetioPtr = new io_internet( this, myResource );
+ myIOMap.add( ID, internetioPtr );
+ internetioPtr->setID( ID );
+ connect( internetioPtr, SIGNAL( sendCMD( const Command& ) ), this, SLOT( command2Match( const Command& ) ) );
+ }
+ else
+ {
+ /* Use an existing internetIO */
+ internetioPtr = (io_internet*) myIOMap.find(Null);
+ if( internetioPtr == NULL )
+ {
+ kdWarning() << "core::createNewIO: Trying to connect a match to an internetIO that doesn't exsist." << endl;
+ }
+ else
+ {
+ myIOMap.add( ID, internetioPtr );
+ }
+ }
+ break;
+ /* PLAYEREXAMINE */
+ case PLAYEREXAMINE:
+ /* examine mode needs only 1 io mapped to it */
+ if( ID == Null )
+ {
+ /* Create a NEW internetIO */
+ internetioPtr = new io_internet( this, myResource );
+ myIOMap.add( ID, internetioPtr );
+ internetioPtr->setID( ID );
+ connect( internetioPtr, SIGNAL( sendCMD( const Command& ) ), this, SLOT( command2Match( const Command& ) ) );
+ }
+ else
+ {
+ internetioPtr = (io_internet*) myIOMap.find(ID);
+ if( internetioPtr == NULL )
+ {
+ /* no io mapped to the ID yet, use the internetio */
+ /* Use an existing internetIO */
+ internetioPtr = (io_internet*) myIOMap.find(Null);
+ if( internetioPtr == NULL )
+ {
+ kdWarning() << "core::createNewIO: Trying to connect a match to an internetIO that doesn't exsist." << endl;
+ }
+ else
+ {
+ myIOMap.add( ID, internetioPtr );
+ }
+ }
+ /* this ID is already mapped we don't need another one */
+ }
+ break;
+ /* PLAYERPC */
+ case PLAYERPC:
+ engineioPtr = new io_engine( this, myResource );
+ myIOMap.add( ID, engineioPtr );
+ engineioPtr->setID( ID );
+ connect( engineioPtr, SIGNAL( sendCMD( const Command& ) ), this, SLOT( command2Match( const Command& ) ) );
+ engineioPtr->Start( side );
+ engineioPtr->recvCMD( Command( ID, CMD_Set_Difficulty, QString().setNum( 1 << str ) ) );
+ break;
+ /* PLAYEREMAIL */
+ case PLAYEREMAIL:
+// ioEmailPtr = new io_email( this, myResource );
+// myIOMap.add( ID, ioEmailPtr );
+// ioEmailPtr->setID( ID );
+// connect( ioEmailPtr, SIGNAL( sendCMD( const Command& ) ), this, SLOT( command2Match( const Command& ) ) );
+ break;
+ default:
+ /* No IO needed */
+ break;
+ }
+}
+
+///////////////////////////////////////
+//
+// core::newMatch(match_params* param);
+//
+///////////////////////////////////////
+match* core::newMatch( match_param* param )
+{
+ match *match_ptr = NULL;
+ int newID;
+
+ /* create a new ID for the match */
+ newID = myIDManager.getNewID();
+
+ /* Create the match navigation button */
+ myButtonGroup->create( newID );
+
+ /* Create the match */
+ match_ptr = new match(this, param, myResource);
+ match_ptr->setID( newID );
+ myMatchMap.add( newID, match_ptr );
+
+ /* Create IOs */
+ createNewIO( param->type(WHITE), newID, WHITE, param->strength(WHITE) );
+ createNewIO( param->type(BLACK), newID, BLACK, param->strength(BLACK) );
+
+ /* Connect Signals */
+ connect( match_ptr, SIGNAL( sendCMD( const Command& ) ), this, SLOT( command2IO( const Command& ) ) );
+ connect( &myCoreClock, SIGNAL( timeout() ), match_ptr, SLOT( tick() ) );
+
+ /* Set this new match as the current match */
+ setMatch( newID );
+ setActiveWindow();
+
+ /* Save our configuration settings */
+ myResource->ConfigWrite();
+
+ return match_ptr;
+}
+
+///////////////////////////////////////
+//
+// core::setMatch
+//
+///////////////////////////////////////
+void core::setMatch( int ID )
+{
+ /*
+ Disconnect the current match from the display
+ */
+ if( currentMatch != NULL )
+ {
+ currentMatch->setCurrent( FALSE );
+ disconnect( currentMatch, SIGNAL( setClocks() ), this, SLOT( slot_setClocks() ) );
+ disconnect( currentMatch, SIGNAL( setStatusBar( const int&, const QString& ) ), this, SLOT( slot_setStatusBar( const int&, const QString& ) ) );
+ disconnect( currentMatch, SIGNAL( setNotation() ), this, SLOT( slot_setNotation() ) );
+ currentMatch->setVisibility( FALSE );
+ }
+ /*
+ Now display the new match, and connect it's signals to the GUI
+ */
+ currentMatch = myMatchMap.find( ID );
+ currentMatch->setVisibility( TRUE );
+ myButtonGroup->setButton( ID );
+ connect( currentMatch, SIGNAL( setClocks() ), this, SLOT( slot_setClocks() ) );
+ connect( currentMatch, SIGNAL( setStatusBar( const int&, const QString& ) ), this, SLOT( slot_setStatusBar( const int&, const QString& ) ) );
+ connect( currentMatch, SIGNAL( setNotation() ), this, SLOT( slot_setNotation() ) );
+ currentMatch->setCurrent( TRUE );
+ emit requestResize();
+ emit initMatch();
+ currentMatch->resendStatusBar();
+
+ /* Give Ourselves Focus */
+ setActiveWindow();
+ topLevelWidget()->raise();
+}
+
+///////////////////////////////////////
+//
+// core::clearAll
+//
+///////////////////////////////////////
+bool core::clearAll( void )
+{
+ while( myMatchMap.count() )
+ {
+ if( clearMatch() != TRUE ) return FALSE;
+ }
+ return TRUE;
+}
+///////////////////////////////////////
+//
+// core::clearMatch
+//
+///////////////////////////////////////
+bool core::clearMatch( int id )
+{
+ match *departingMatch, *nextMatch;
+ io_base *ioPtr;
+
+ if( id == Null )
+ {
+ if( currentMatch != NULL )
+ {
+ id = currentMatch->getID();
+ }
+ else
+ {
+ return FALSE;
+ }
+ }
+ departingMatch = myMatchMap.find(id);
+
+ /* A bad ID was passed */
+ if( departingMatch == NULL )
+ {
+ kdError() << "core::clearMatch: Bad matchID " << id << " could not be cleared." << endl;
+ return FALSE;
+ }
+
+ /* Save if needed */
+ if( departingMatch->modified() )
+ {
+ if( save( id, TRUE, FALSE ) == FALSE )
+ {
+ return FALSE;
+ }
+ }
+
+ /* Get ID of another match so it can become the current match */
+ if( departingMatch == currentMatch )
+ {
+ /* Find another match in the map */
+ nextMatch = --myMatchMap;
+ if( nextMatch == NULL )
+ {
+ ++myMatchMap;
+ nextMatch = ++myMatchMap;
+ }
+ /* Set the new current match */
+ if( nextMatch != NULL )
+ {
+ setMatch( nextMatch->getID() );
+ }
+ else
+ {
+ currentMatch = NULL;
+ emit initMatch();
+ }
+ }
+
+ /* Remove IOs in this match... */
+ ioPtr = myIOMap.find(id);
+ while( ioPtr != NULL )
+ {
+ myIOMap.remove( id );
+ if( ioPtr->getType() != io_base::INTERNET )
+ {
+ delete ioPtr;
+ }
+ ioPtr = myIOMap.find(id);
+ }
+
+ /* ...and remove the match */
+ myMatchMap.remove( id );
+ myButtonGroup->remove( id );
+ delete departingMatch;
+
+ resize();
+ return TRUE;
+}
+///////////////////////////////////////
+//
+// core::resize
+//
+///////////////////////////////////////
+void core::resize( void )
+{
+ int size = 8 + ( 1 * ( myResource->ThemeBorder == TRUE ) );
+
+ if( currentMatch != NULL )
+ {
+ currentMatch->resize();
+ myButtonGroup->resize( currentMatch->width() );
+ myButtonGroup->move( 0, currentMatch->height() );
+ setFixedSize( currentMatch->width(), currentMatch->height() + myButtonGroup->height() );
+ }
+ else
+ {
+ myButtonGroup->resize( myResource->ThemeSize * size );
+ myButtonGroup->move( 0, myResource->ThemeSize * size );
+ setFixedSize( myResource->ThemeSize * size, ( myResource->ThemeSize * size ) + myButtonGroup->height() );
+ }
+}
+///////////////////////////////////////
+//
+// core::command2IO
+//
+///////////////////////////////////////
+void core::command2IO( const Command &command )
+{
+ io_base *io;
+ int id = ((Command)command).getID();
+
+ io = myIOMap.find(id);
+ while( io != NULL )
+ {
+ io->recvCMD(command);
+ io = myIOMap.findNext();
+ }
+}
+///////////////////////////////////////
+//
+// core::command2Match
+//
+///////////////////////////////////////
+void core::command2Match( const Command &command )
+{
+ match_param *paramPtr;
+ match *matchPtr;
+ Command cmd = command;
+
+ matchPtr = myMatchMap.find( cmd.getID() );
+ while( matchPtr != NULL )
+ {
+ /* Catch Commands Meant for Core */
+ switch( cmd.getCommand() )
+ {
+ case CMD_Hint:
+ KMessageBox::information( this, cmd.getData(), i18n("Hint") );
+ break;
+ case CMD_Tell_User:
+ KMessageBox::information( this, cmd.getData(), i18n( "Tell User" ) );
+ break;
+ case CMD_Tell_User_Error:
+ KMessageBox::sorry( this, cmd.getData(), i18n( "Tell User Error" ) );
+ break;
+ case CMD_Tell_Opponent:
+ paramPtr = matchPtr->getParam();
+ if( ( paramPtr->type( WHITE ) == PLAYERLOCAL ) ||
+ ( paramPtr->type( BLACK ) == PLAYERLOCAL ) )
+ KMessageBox::information( this, cmd.getData(), i18n( "Tell Opponent" ) );
+ else
+ command2IO( command );
+ break;
+ case CMD_Tell_Others:
+ command2IO( command );
+ break;
+ case CMD_Tell_ICS:
+ command2IO( command );
+ break;
+ case CMD_Tell_All:
+ paramPtr = matchPtr->getParam();
+ if( ( paramPtr->type( WHITE ) == PLAYERLOCAL ) ||
+ ( paramPtr->type( BLACK ) == PLAYERLOCAL ) )
+ KMessageBox::information( this, cmd.getData(), i18n( "Tell All" ) );
+ command2IO( command );
+ break;
+ case CMD_Out_Of_Book:
+// engine[enginePtr - 1]->sendCMD( CMD_Check_Book );
+ break;
+ default:
+ /* Just send it to the Match */
+ matchPtr->recvCMD( command );
+ break;
+ }
+ matchPtr = myMatchMap.findNext();
+ }
+}
+///////////////////////////////////////
+//
+// core::flag
+//
+///////////////////////////////////////
+bool core::flag( const bool Army )
+{
+ if( currentMatch == NULL ) return FALSE;
+ return currentMatch->flag( Army );
+ return false;
+}
+///////////////////////////////////////
+//
+// core::clock
+//
+///////////////////////////////////////
+QString core::clock( const bool Army )
+{
+ if( currentMatch == NULL ) return QString::null;
+ return currentMatch->clock( Army );
+ return "";
+}
+///////////////////////////////////////
+//
+// core::modified
+//
+///////////////////////////////////////
+bool core::modified( void )
+{
+ if( currentMatch == NULL ) return FALSE;
+ return currentMatch->modified();
+ return false;
+}
+///////////////////////////////////////
+//
+// core::paused
+//
+///////////////////////////////////////
+bool core::paused( void )
+{
+ if( currentMatch == NULL ) return FALSE;
+ return currentMatch->paused();
+ return false;
+}
+///////////////////////////////////////
+//
+// core::isOnline
+//
+///////////////////////////////////////
+bool core::isOnline( void )
+{
+ unsigned int index;
+ for( index=0; index < myIOMap.count(); index++ )
+ {
+ if( myIOMap[index]->getType() == io_base::INTERNET )
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+///////////////////////////////////////
+//
+// core::onMove
+//
+///////////////////////////////////////
+char core::onMove( void )
+{
+ if( currentMatch == NULL ) return Null;
+ return currentMatch->onMove();
+}
+///////////////////////////////////////
+//
+// core::caption
+//
+///////////////////////////////////////
+QString core::caption( void )
+{
+ QButton *Button;
+ if( currentMatch == NULL ) return QString::null;
+ Button = myButtonGroup->find( currentMatch->getID() );
+ if( Button != NULL ) Button->setText( currentMatch->caption() );
+ return currentMatch->caption();
+}
+///////////////////////////////////////
+//
+// core::whiteInput
+//
+///////////////////////////////////////
+char core::whiteInput(void)
+{
+ if( currentMatch == NULL ) return Null;
+ return currentMatch->input(WHITE);
+}
+///////////////////////////////////////
+//
+// core::blackInput
+//
+///////////////////////////////////////
+char core::blackInput(void)
+{
+ if( currentMatch == NULL ) return Null;
+ return currentMatch->input(BLACK);
+}
+///////////////////////////////////////
+//
+// core::review
+//
+///////////////////////////////////////
+void core::review( int Index )
+{
+ if( currentMatch == NULL ) return;
+ currentMatch->review( Index );
+}
+///////////////////////////////////////
+//
+// core::inputOnMove
+//
+///////////////////////////////////////
+char core::inputOnMove( bool reverse )
+{
+ if( currentMatch == NULL ) return Null;
+ return currentMatch->inputOnMove( reverse );
+}
+///////////////////////////////////////
+//
+// core::notation
+//
+///////////////////////////////////////
+QStringList* core::notation( void )
+{
+ if( currentMatch == NULL ) return NULL;
+ return currentMatch->notation();
+}
+///////////////////////////////////////
+//
+// core::slot_setNotation
+//
+///////////////////////////////////////
+void core::slot_setNotation( void )
+{
+ emit setNotation();
+}
+///////////////////////////////////////
+//
+// core::slot_setStatusBar
+//
+///////////////////////////////////////
+void core::slot_setStatusBar( const int &ID, const QString& MSG )
+{
+ emit setStatusBar( ID, MSG );
+}
+///////////////////////////////////////
+//
+// core::slot_setClocks
+//
+///////////////////////////////////////
+void core::slot_setClocks( void )
+{
+ emit setClocks();
+}
+///////////////////////////////////////
+//
+// core::print
+//
+///////////////////////////////////////
+void core::print( int ID )
+{
+ match *m2p;
+
+ if( ID == Null )
+ {
+ m2p = currentMatch;
+ }
+ else
+ {
+ m2p = myMatchMap.find( ID );
+ }
+ if( m2p == NULL ) return;
+ m2p->print();
+ return;
+}
+///////////////////////////////////////
+//
+// core::load
+//
+///////////////////////////////////////
+bool core::load( void )
+{
+ const QString fileFilter( "*.pgn *.Pgn *.PGN|Portable Game Notation (.pgn)\n*|All Files" );
+ QString URL;
+ URL = KFileDialog::getOpenFileName( QString::null, QString( fileFilter ), this, i18n( "Load PGN..." ) );
+ if( URL.isEmpty() ) return FALSE;
+ return load( URL );
+}
+bool core::load( const QString &IncURL )
+{
+ listPGN = new list_pgn( 0, "listPGN" );
+ myResource->tabManager->addTab( listPGN, IncURL.section( '/', -1 ) );
+ connect( listPGN, SIGNAL( selected( const QString&, const int& ) ), this, SLOT( load( const QString&, const int& ) ) );
+ listPGN->setURL( IncURL );
+return TRUE;
+}
+bool core::load( const QString &url, const int &pos )
+{
+ newMatch( new match_param( myResource, PLAYERLOAD, PLAYERLOAD ) );
+ return currentMatch->load( url, pos );
+}
+///////////////////////////////////////
+//
+// core::save
+//
+///////////////////////////////////////
+bool core::save( const int ID, const bool Prompt, const bool SaveAs )
+{
+ const QString fileFilter( "*.pgn *.Pgn *.PGN|Portable Game Notation (.pgn)\n*|All Files" );
+ match *match2bSaved;
+ int answer;
+ QString URL;
+
+ if( ID == Null )
+ {
+ /* Use current match */
+ match2bSaved = currentMatch;
+ }
+ else
+ {
+ match2bSaved = myMatchMap.find( ID );
+ }
+ if( match2bSaved == NULL ) return FALSE;
+ if( Prompt )
+ {
+ /* Prompt for the save */
+ myResource->ConfigWrite();
+ answer = KMessageBox::warningYesNoCancel( this,
+ i18n("Would you like to save this match?"),
+ i18n("Save Match?"),
+ QString::null,
+ QString::null,
+ QString("PromptForSaving") );
+ myResource->ConfigRead();
+ if( answer == KMessageBox::Cancel )
+ {
+ return FALSE;
+ }
+ if( answer == KMessageBox::No )
+ {
+ return TRUE;
+ }
+ }
+ /* Get the last URL we used */
+ URL = match2bSaved->url();
+ if( ( URL.isEmpty() ) || ( SaveAs ) )
+ {
+ /* Get a new URL */
+ URL = KFileDialog::getSaveFileName( QString::null, QString( fileFilter ), this, i18n( "Save Match..." ) );
+ if( URL.isNull() )
+ {
+ return FALSE;
+ }
+ if( URL.findRev( ".pgn", -1, FALSE ) == -1 )
+ {
+ URL += ".pgn";
+ }
+ }
+ if( match2bSaved->save( URL ) == FALSE )
+ {
+ emit setStatusBar( SAVE_ERROR );
+ return FALSE;
+ }
+ emit setStatusBar( SAVE_OK );
+ match2bSaved->setModified( FALSE );
+ return TRUE;
+}
+///////////////////////////////////////
+//
+// core::matchMenu
+//
+///////////////////////////////////////
+void core::matchMenu( int opt )
+{
+ unsigned int index;
+ switch(opt)
+ {
+ /* Offer / Accept Draw */
+ case MENU_OFFER_DRAW: // Fall Through
+ case MENU_ACCEPT_DRAW:
+ if( whiteInput() == PLAYERLOCAL )
+ {
+ command2Match( Command( currentMatch->getID(), CMD_Offer_Draw, QString("W") ) );
+ }
+ if( blackInput() == PLAYERLOCAL )
+ {
+ command2Match( Command( currentMatch->getID(), CMD_Offer_Draw, QString("B") ) );
+ }
+ command2IO( Command( currentMatch->getID(), CMD_Offer_Draw ) );
+ break;
+ /* Reject Draw */
+ case MENU_REJECT_DRAW:
+ command2IO( Command( currentMatch->getID(), CMD_Reject_Draw ) );
+ break;
+ /* Resign */
+ case MENU_RESIGN:
+ if( ( whiteInput() == PLAYERLOCAL ) && ( currentMatch->onMove() == WHITE ) )
+ {
+ command2IO( Command( currentMatch->getID(), CMD_White_Resign ) );
+ currentMatch->recvCMD( Command( currentMatch->getID(), CMD_White_Resign ) );
+ }
+ if( ( blackInput() == PLAYERLOCAL ) && ( currentMatch->onMove() == BLACK ) )
+ {
+ command2IO( Command( currentMatch->getID(), CMD_Black_Resign ) );
+ currentMatch->recvCMD( Command( currentMatch->getID(), CMD_Black_Resign ) );
+ }
+ break;
+ /* Retract */
+ case MENU_RETRACT:
+ command2IO( Command( currentMatch->getID(), CMD_Retract_Move ) );
+ currentMatch->retract();
+ currentMatch->retract();
+ emit setNotation();
+ if( onMove() == WHITE )
+ emit setStatusBar( WHITE_TURN );
+ else
+ emit setStatusBar( BLACK_TURN );
+ break;
+ /* Move Now */
+ case MENU_MOVE_NOW:
+ command2IO( Command( currentMatch->getID(), CMD_MoveNow ) );
+ break;
+ /* Hint */
+ case MENU_HINT:
+ currentMatch->requestHint();
+ break;
+ /* Orientation */
+ case MENU_ORIENTATION:
+ currentMatch->flip();
+ break;
+ /* Ponder */
+ case MENU_PONDER:
+ if( myResource->OPTION_Ponder )
+ {
+ command2IO( Command( currentMatch->getID(), CMD_Ponder ) );
+ }
+ else
+ {
+ command2IO( Command( currentMatch->getID(), CMD_No_Pondering ) );
+ }
+ break;
+ /* Pause */
+ case MENU_PAUSE:
+ currentMatch->setPaused( !currentMatch->paused() );
+ if( currentMatch->paused() )
+ {
+ command2IO( Command( currentMatch->getID(), CMD_Pause ) );
+ }
+ else
+ {
+ command2IO( Command( currentMatch->getID(), CMD_Resume ) );
+ }
+ break;
+ /* Pause All */
+ case MENU_PAUSEALL:
+ if( myMatchMap.count() )
+ {
+ for( index = 0; index < myMatchMap.count(); index++ )
+ {
+ if( ( whiteInput() == PLAYERTCP ) || ( blackInput() == PLAYERTCP ) )
+ continue;
+ myMatchMap[index]->setPaused( !myMatchMap[index]->paused() );
+ if( myMatchMap[index]->paused() )
+ {
+ command2IO( Command( currentMatch->getID(), CMD_Pause ) );
+ }
+ else
+ {
+ command2IO( Command( currentMatch->getID(), CMD_Resume ) );
+ }
+ }
+ }
+ break;
+ /* Call Flag */
+ case MENU_CALL_FLAG:
+ if( whiteInput() == PLAYERLOCAL )
+ {
+ command2IO( Command( currentMatch->getID(), CMD_White_Called_Flag ) );
+ currentMatch->recvCMD( Command( currentMatch->getID(), CMD_White_Called_Flag ) );
+ }
+ if( blackInput() == PLAYERLOCAL )
+ {
+ command2IO( Command( currentMatch->getID(), CMD_Black_Called_Flag ) );
+ currentMatch->recvCMD( Command( currentMatch->getID(), CMD_Black_Called_Flag ) );
+ }
+ break;
+ default:
+ break;
+ }
+}
+///////////////////////////////////////
+//
+// core::thinButtonMenu
+//
+///////////////////////////////////////
+void core::thinButtonMenu( int id, int item )
+{
+ switch( item )
+ {
+ case MENU_SAVE:
+ save( id, FALSE, FALSE );
+ break;
+ case MENU_SAVEAS:
+ save( id, FALSE, TRUE );
+ break;
+ case MENU_PRINT:
+ print( id );
+ break;
+ case MENU_CLOSE:
+ clearMatch( id );
+ break;
+ default:
+ break;
+ }
+}
+
+///////////////////////////////////////
+//
+// core::resetServer
+//
+///////////////////////////////////////
+void core::resetServer( void )
+{
+ command2IO( Command( Null, CMD_Reset_Server ) );
+}
+
+///////////////////////////////////////
+//
+// core::goOffline()
+//
+///////////////////////////////////////
+void core::goOffline(void)
+{
+ unsigned int index(0);
+ io_base *ioPtr(NULL);
+
+ while( index < myIOMap.count() )
+ {
+ if( myIOMap[index]->getType() == io_base::INTERNET )
+ {
+ ioPtr = myIOMap[index];
+
+ if( myIOMap.keyAt(index) != Null )
+ {
+ clearMatch( myIOMap.keyAt(index) );
+ }
+ else
+ {
+ myIOMap.remove( Null );
+ }
+
+ index = 0;
+ continue;
+ }
+ index++;
+ }
+ if( ioPtr != NULL )
+ delete ioPtr;
+}
+
diff --git a/knights/core.h b/knights/core.h
new file mode 100644
index 0000000..5723112
--- /dev/null
+++ b/knights/core.h
@@ -0,0 +1,107 @@
+/***************************************************************************
+ core.h - description
+ -------------------
+ begin : Tue Oct 2 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef CORE_H
+#define CORE_H
+
+#include <qwidget.h>
+#include <qtimer.h>
+#include "definitions.h"
+#include "resource.h"
+#include "knightsmap.h"
+#include "idmanager.h"
+#include "io_base.h"
+
+class list_pgn;
+class thinbuttons;
+class match;
+class match_param;
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+typedef KnightsMap<int, match*> MatchMap;
+typedef KnightsMap<int, io_base*> IOMap;
+
+class core : public QWidget
+{
+ Q_OBJECT
+ public:
+ core(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ ~core();
+ QStringList* notation( void );
+ QString caption( void );
+ bool modified( void );
+ bool paused( void );
+ bool isOnline( void );
+ bool flag( const bool );
+ char onMove( void );
+ char whiteInput( void );
+ char blackInput( void );
+ char inputOnMove( bool reverse=FALSE );
+ void createNewIO( int type, int ID, int side=BLACK, int str=0 );
+ void goOffline(void);
+
+ public slots:
+ match* newMatch( match_param* );
+ bool clearMatch( int id=Null );
+ bool clearAll( void );
+ void setMatch( int );
+ void command2IO( const Command& );
+ void command2Match( const Command& );
+ void resetServer( void );
+ void matchMenu( int );
+ void resize( void );
+ bool save( const int ID, const bool Prompt, const bool SaveAs );
+ bool load( void );
+ bool load( const QString& );
+ bool load( const QString&, const int& );
+ void slot_setNotation( void );
+ void slot_setClocks( void );
+ void slot_setStatusBar( const int&, const QString& );
+ void print( int ID=Null );
+ void review( int );
+ QString clock( const bool );
+
+ signals:
+ void requestResize( void );
+ void setStatusBar( const int &ID, const QString& MSG=QString::null );
+ void setNotation( void );
+ void setClocks( void );
+ void initMatch( void );
+ void serverDestroyed( void );
+
+ protected:
+ bool findMatch( const int );
+ void serverSelfDestruct( void );
+
+ protected slots:
+ void thinButtonMenu( int id, int item );
+
+ private:
+ IDManager myIDManager;
+ resource *myResource;
+ QTimer myCoreClock;
+ thinbuttons *myButtonGroup;
+ list_pgn *listPGN;
+ IOMap myIOMap;
+ MatchMap myMatchMap;
+ match *currentMatch;
+};
+
+#endif
diff --git a/knights/definitions.h b/knights/definitions.h
new file mode 100644
index 0000000..858331d
--- /dev/null
+++ b/knights/definitions.h
@@ -0,0 +1,292 @@
+/***************************************************************************
+ definitions.h - description
+ -------------------
+ begin : Sun Jul 1 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+
+#ifndef _DEFINITIONS_H
+#define _DEFINITIONS_H
+
+#ifndef TRUE
+# define TRUE 1
+# define FALSE 0
+#endif
+
+#ifndef _VERSION_
+# define _VERSION_ "0.6"
+#endif
+
+#define IMAGE_MAX 144
+#define IMAGE_MIN 32
+
+#define CONFIG_VERSION 1
+
+#include <kdebug.h>
+#include <qvaluelist.h>
+
+/*
+ These are used to define the game's states.
+*/
+const int WHITE = 0x00;
+const int BLACK = 0x01;
+const int WHITE_HELPER = 0x02;
+const int BLACK_HELPER = 0x03;
+const int BOTH = 0x04;
+
+const int PLAYERPC = 0x00; // Chess Engine
+const int PLAYEREMAIL = 0x01; // Email Opponent
+const int PLAYERTCP = 0x02; // Internet Chess Engine
+const int PLAYERLOAD = 0x03; // Load from PGN
+
+ /* Add a mask of 0x10 to players that accept user input */
+const int PLAYERLOCAL = 0x10; // Human sitting at the PC
+const int PLAYEREXAMINE = 0x11; // ICS Examine Mode
+
+const int ENGINE_WHITE = 0x01;
+const int ENGINE_WHITE_BK = 0x02;
+const int ENGINE_BLACK = 0x04;
+const int ENGINE_BLACK_BK = 0x08;
+
+ /* Menu Entries */
+
+/*
+ These represent the various choices found
+ throughout the game's menubar.
+*/
+
+/* File Menu */
+const int MENU_NEWGAME = 0x01;
+const int MENU_LOAD = 0x02;
+const int MENU_SAVE = 0x03;
+const int MENU_SAVEAS = 0x04;
+const int MENU_PRINT = 0x05;
+const int MENU_QUIT = 0x06;
+const int MENU_CLOSE = 0x08;
+const int MENU_CLOSEALL = 0x09;
+const int MENU_CONNECT = 0x0A;
+/* Options Menu */
+const int MENU_BINDINGS_DIALOG = 0x13;
+const int MENU_SETTINGS_DIALOG = 0x14;
+const int MENU_INSTALL_THEMES = 0x15;
+/* New Games Menu */
+const int MENU_SOLITARE = 0x21;
+const int MENU_VS_PC = 0x22;
+const int MENU_VS_TCPIP = 0x23;
+const int MENU_VS_EMAIL = 0x24;
+const int MENU_PC_VS_PC = 0x25;
+/* Match Menu */
+const int MENU_RETRACT = 0x31;
+const int MENU_DRAW = 0x32;
+const int MENU_MOVE_NOW = 0x33;
+const int MENU_HINT = 0x34;
+const int MENU_PONDER = 0x35;
+const int MENU_PAUSE = 0x36;
+const int MENU_PAUSEALL = 0x37;
+const int MENU_ORIENTATION = 0x38;
+const int MENU_RESIGN = 0x39;
+const int MENU_CALL_FLAG = 0x3A;
+/* Draw Menu */
+const int MENU_OFFER_DRAW = 0x41;
+const int MENU_ACCEPT_DRAW = 0x42;
+const int MENU_REJECT_DRAW = 0x43;
+const int MENU_IGNORE_DRAW = 0x44;
+/* Seek Menu */
+const int MENU_SEEK = 0x51;
+const int MENU_FINGER = 0x52;
+const int MENU_TELL = 0x53;
+const int MENU_NOTIFY = 0x54;
+const int MENU_ACCEPT_MATCH = 0x55;
+const int MENU_CENSOR = 0x56;
+const int MENU_HISTORY = 0x57;
+const int MENU_ASSESS = 0x58;
+/* View Menu */
+const int MENU_COPY = 0x61;
+const int MENU_SELECT_ALL = 0x62;
+const int MENU_CLEAR_ALL = 0x63;
+const int MENU_FIND = 0x64;
+const int MENU_FIND_NEXT = 0x65;
+const int MENU_ZOOM_IN = 0x66;
+const int MENU_ZOOM_OUT = 0x67;
+/* Tutorial Menu */
+const int MENU_OPEN_TUTORIAL = 0x71;
+
+ /* Messages */
+
+/*
+ The following constants define messages
+ viewed in the statusbar.
+*/
+const int READY = 0x00000000;
+const int WHITE_TURN = 0x00000001;
+const int BLACK_TURN = 0x00000002;
+const int WHITE_WIN = 0x00000003;
+const int BLACK_WIN = 0x00000004;
+const int GAME_DRAW = 0x00000005;
+const int GAME_50_MOVES = 0x00000006;
+const int WAITING = 0x00000007;
+const int ILLEGAL_MOVE = 0x00000008;
+const int NO_MOVE_WHILE_REVIEW = 0x00000009;
+const int LOAD_OK = 0x00000010;
+const int SAVE_OK = 0x00000011;
+const int PAUSED = 0x00000012;
+const int READING_FILE = 0x00000013;
+const int WHITE_DRAW_OFFER = 0x00000014;
+const int BLACK_DRAW_OFFER = 0x00000015;
+const int LOAD_ERROR = 0x00000020;
+const int SAVE_ERROR = 0x00000021;
+const int BOOK_ERROR_1 = 0x00000022;
+const int BOOK_ERROR_2 = 0x00000023;
+const int BOOK_ERROR_3 = 0x00000024;
+const int BOOK_ERROR_4 = 0x00000025;
+const int ENGINE_DIED_ERROR = 0x00000026;
+const int WHITE_RESIGN = 0x00000027;
+const int BLACK_RESIGN = 0x00000028;
+const int WHITE_FLAG = 0x00000029;
+const int BLACK_FLAG = 0x00000030;
+const int WHITE_CALL_FLAG = 0x00000031;
+const int BLACK_CALL_FLAG = 0x00000032;
+const int WHITE_CHECKMATE = 0x00000033;
+const int BLACK_CHECKMATE = 0x00000034;
+const int LOST_CONTACT = 0x00000035;
+const int COMMENT = 0x00010000;
+const int ERROR = 0x00100000;
+
+ /* Variations */
+/*
+ These define the variations on chess
+ that can be supported.
+*/
+
+const int Type_Standard = 0x00000001;
+const int Type_WildCastle = 0x00000002;
+const int Type_NoCastle = 0x00000004;
+const int Type_FischerRandom = 0x00000008;
+const int Type_BugHouse = 0x00000010;
+const int Type_CrazyHouse = 0x00000020;
+const int Type_Losers = 0x00000040;
+const int Type_Suicide = 0x00000080;
+const int Type_Giveaway = 0x00000100;
+const int Type_TwoKings = 0x00000200;
+const int Type_Atomic = 0x00000400;
+const int Type_Kriegspiel = 0x00000800;
+const int Type_ThreeCheck = 0x00001000;
+
+ /* Protocols */
+
+const int XBoard = 0x02;
+const int UCI = 0x04;
+
+ /* Events */
+
+/*
+ These constants represent QEvent types.
+*/
+
+const int EVENT_Del_IO_Net = 0x000003e9;
+
+
+ /* Position Notes */
+
+/*
+ These represent the various NOTES that can appear on a
+ given position
+*/
+
+const char NOTE_NONE = 0x00;
+const char NOTE_HIGHLIGHT = 0x01;
+const char NOTE_SELECT = 0x02;
+const char NOTE_MOVE = 0x10;
+const char NOTE_CASTLE = 0x11;
+const char NOTE_PAWN_DOUBLE = 0x12;
+const char NOTE_ATTACK = 0x20;
+const char NOTE_ENPASSANT = 0x21;
+
+ /* Chessmen */
+
+/*
+ These represent the various chessmen, or Types of chessmen
+ found on the playing board.
+*/
+const char Null = -1;
+const char King = 0;
+const char Queen = 1;
+const char Bishop = 2;
+const char Knight = 3;
+const char Rook = 4;
+const char Pawn = 5;
+
+ /* ICS Game Modes */
+
+const char ICS_Normal = 0;
+const char ICS_Examine = 1;
+const char ICS_Observe = 2;
+const char ICS_Movelist = 3;
+
+typedef struct ThemeHeader
+{
+ QString name;
+ QString version;
+ QString author;
+ QString authorEmail;
+ QString authorWWW;
+ QString notes;
+};
+
+typedef struct ChessMove
+{
+ char fromFile;
+ char fromRank;
+ char toFile;
+ char toRank;
+ char Promote;
+ char ManTaken;
+ char SAN[8];
+ char CAN[6];
+unsigned char NAG;
+ /* Following used for ICS Only */
+ char ICS_Mode;
+ char ICS_PawnPushFile;
+ int ICS_MoveCounter;
+ bool ICS_OnMove;
+ bool ICS_ClockTicking;
+};
+
+typedef struct Chessman
+{
+ bool Army;
+ char Type;
+ char File;
+ char Rank;
+};
+
+typedef struct Position
+{
+ char File;
+ char Rank;
+ char ManPtr;
+ char Note;
+};
+
+/* Time Control Period */
+typedef struct TCP
+{
+ int Moves;
+ int Seconds;
+ int Increment;
+};
+
+typedef QValueList<TCP> TCPList;
+
+#endif
diff --git a/knights/dlg_challenge.cpp b/knights/dlg_challenge.cpp
new file mode 100644
index 0000000..51a983f
--- /dev/null
+++ b/knights/dlg_challenge.cpp
@@ -0,0 +1,159 @@
+/***************************************************************************
+ dlg_challenge.cpp - description
+ -------------------
+ begin : Sun Jan 20 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <qregexp.h>
+#include "dlg_challenge.moc"
+
+dlg_challenge::dlg_challenge(QWidget *parent, const char *name, resource *Rsrc ) :
+ KDialogBase( parent,
+ name,
+ FALSE,
+ i18n("You've Been Challenged:"),
+ User1|User2,
+ Ok,
+ TRUE,
+ i18n("Accept"),
+ i18n("Decline") )
+{
+ Resource = Rsrc;
+
+ BOX_Parent = makeVBoxMainWidget();
+
+ LABEL_Headline = new QLabel( BOX_Parent );
+ COMBO_Rated = new KComboBox( BOX_Parent );
+ BOX_Time = new QHBox( BOX_Parent );
+ BOX_White = new QGroupBox( 2, Qt::Horizontal, "-", BOX_Time );
+ BOX_WhiteBase = new QSpinBox( BOX_White );
+ LABEL_WhiteBase = new QLabel( BOX_White );
+ BOX_WhiteInc = new QSpinBox( BOX_White );
+ LABEL_WhiteInc = new QLabel( BOX_White );
+ BOX_Black = new QGroupBox( 2, Qt::Horizontal, "-", BOX_Time );
+ BOX_BlackBase = new QSpinBox( BOX_Black );
+ LABEL_BlackBase = new QLabel( BOX_Black );
+ BOX_BlackInc = new QSpinBox( BOX_Black );
+ LABEL_BlackInc = new QLabel( BOX_Black );
+ BUTTON_TimeOdds = new QCheckBox( i18n("Time Odds Match"),BOX_Parent );
+
+ LABEL_Headline->setAlignment( Qt::AlignCenter );
+ COMBO_Rated->setEditable( FALSE );
+ COMBO_Rated->insertItem( i18n("Unrated"), 0 );
+ COMBO_Rated->insertItem( i18n("Rated"), 1 );
+
+ BOX_WhiteBase->setMinValue( 0 );
+ BOX_WhiteInc->setMinValue( 0 );
+ BOX_WhiteBase->setMaxValue( 300 );
+ BOX_WhiteInc->setMaxValue( 300 );
+ BOX_WhiteBase->setSuffix( i18n(" min.") );
+ BOX_WhiteInc->setSuffix( i18n(" sec.") );
+ LABEL_WhiteBase->setText( i18n( "Base Time" ) );
+ LABEL_WhiteInc->setText( i18n( "Increment" ) );
+
+ BOX_BlackBase->setMinValue( 0 );
+ BOX_BlackInc->setMinValue( 0 );
+ BOX_BlackBase->setMaxValue( 300 );
+ BOX_BlackInc->setMaxValue( 300 );
+ BOX_BlackBase->setSuffix( i18n(" min.") );
+ BOX_BlackInc->setSuffix( i18n(" sec.") );
+ LABEL_BlackBase->setText( i18n( "Base Time" ) );
+ LABEL_BlackInc->setText( i18n( "Increment" ) );
+
+ showButton( User1, TRUE );
+ showButton( User2, TRUE );
+ enableButton( User1, TRUE );
+ enableButton( User2, TRUE );
+ show();
+}
+
+dlg_challenge::~dlg_challenge()
+{
+}
+
+void dlg_challenge::setValues( const QString &string, const QString &local )
+{
+ /* we only need the first line, strip the rest */
+ QString myString( string.section('\n', 0, 0) );
+ QStringList list;
+
+ /*remove all the white space between the rating brackets*/
+ myString.replace( QRegExp("\\(\\s"), "(" );
+ myString.replace( QRegExp("\\s\\)"), ")" );
+
+ list = QStringList::split( QChar(' '), myString, FALSE );
+ list[7].replace(QRegExp("\\."), "");
+ if( list[0] == local )
+ {
+ localRating = list[1];
+ otherPlayer = list[2];
+ otherRating = list[3];
+ }
+ else
+ {
+ otherPlayer = list[0];
+ otherRating = list[1];
+ localRating = list[3];
+ }
+ LABEL_Headline->setText( i18n("%1 %2 vs. %3 %4\nin a %5 match.")
+ .arg(local).arg(localRating).arg(otherPlayer).arg(otherRating).arg(list[5]) );
+ if( list[4].lower() == "rated" )
+ {
+ COMBO_Rated->setCurrentItem(1);
+ }
+ else
+ {
+ COMBO_Rated->setCurrentItem(0);
+ }
+ BOX_WhiteBase->setValue( list[6].toInt() );
+ BOX_WhiteInc->setValue( list[7].toInt() );
+ BOX_BlackBase->setValue( list[6].toInt() );
+ BOX_BlackInc->setValue( list[7].toInt() );
+ BOX_White->setTitle( i18n("Time Controls") );
+ BOX_Black->setTitle( i18n("Time Controls") );
+// BOX_Black->setEnabled( FALSE );
+// BUTTON_TimeOdds->setChecked( FALSE );
+
+ connect( COMBO_Rated, SIGNAL( activated(int) ), this, SLOT( slot_changed(int) ) );
+ connect( BOX_WhiteBase, SIGNAL( valueChanged(int) ), this, SLOT( slot_changed(int) ) );
+ connect( BOX_WhiteInc, SIGNAL( valueChanged(int) ), this, SLOT( slot_changed(int) ) );
+ connect( BOX_BlackBase, SIGNAL( valueChanged(int) ), this, SLOT( slot_changed(int) ) );
+ connect( BOX_BlackInc, SIGNAL( valueChanged(int) ), this, SLOT( slot_changed(int) ) );
+ connect( BUTTON_TimeOdds, SIGNAL( stateChanged(int) ), this, SLOT( slot_changed(int) ) );
+ connect( BUTTON_TimeOdds, SIGNAL( toggled(bool) ), this, SLOT( slot_timeOdds(bool) ) );
+}
+
+QString dlg_challenge::values( void )
+{
+ QString match;
+ match = QString("match %1").arg(otherPlayer);
+ if( COMBO_Rated->currentItem() == 0 )
+ match += " unrated";
+ else
+ match += " rated";
+ match += QString(" %1 %1").arg(BOX_WhiteBase->value()).arg(BOX_WhiteInc->value());
+ if( BUTTON_TimeOdds->isChecked() )
+ match += QString(" %1 %1").arg(BOX_BlackBase->value()).arg(BOX_BlackInc->value());
+ return match;
+}
+
+void dlg_challenge::slot_changed( int )
+{
+ setButtonText( User1, i18n("Counter Offer") );
+}
+
+void dlg_challenge::slot_timeOdds( bool state )
+{
+ BOX_Black->setEnabled( state );
+}
diff --git a/knights/dlg_challenge.h b/knights/dlg_challenge.h
new file mode 100644
index 0000000..2fbfb68
--- /dev/null
+++ b/knights/dlg_challenge.h
@@ -0,0 +1,69 @@
+/***************************************************************************
+ dlg_challenge.h - description
+ -------------------
+ begin : Sun Jan 20 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef DLG_CHALLENGE_H
+#define DLG_CHALLENGE_H
+
+#include <kdialogbase.h>
+#include <kcombobox.h>
+#include <qgroupbox.h>
+#include <qspinbox.h>
+#include <qcheckbox.h>
+#include <qlabel.h>
+#include <qvbox.h>
+#include <qhbox.h>
+#include "resource.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class dlg_challenge : public KDialogBase
+{
+ Q_OBJECT
+ public:
+ dlg_challenge(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ ~dlg_challenge();
+ void setValues( const QString&, const QString& );
+ QString values( void );
+ public slots:
+ void slot_changed( int );
+ void slot_timeOdds( bool );
+ private:
+ resource *Resource;
+ QString otherPlayer;
+ QString localRating;
+ QString otherRating;
+
+ QVBox *BOX_Parent;
+ QLabel *LABEL_Headline;
+ KComboBox *COMBO_Rated;
+ QHBox *BOX_Time;
+ QGroupBox *BOX_White;
+ QSpinBox *BOX_WhiteBase;
+ QSpinBox *BOX_WhiteInc;
+ QLabel *LABEL_WhiteBase;
+ QLabel *LABEL_WhiteInc;
+ QGroupBox *BOX_Black;
+ QSpinBox *BOX_BlackBase;
+ QSpinBox *BOX_BlackInc;
+ QLabel *LABEL_BlackBase;
+ QLabel *LABEL_BlackInc;
+ QCheckBox *BUTTON_TimeOdds;
+};
+
+#endif
diff --git a/knights/dlg_engine.cpp b/knights/dlg_engine.cpp
new file mode 100644
index 0000000..c2f767e
--- /dev/null
+++ b/knights/dlg_engine.cpp
@@ -0,0 +1,226 @@
+/***************************************************************************
+ dlg_engine.cpp - description
+ -------------------
+ begin : Wed Jul 18 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <kfiledialog.h>
+#include <kicontheme.h>
+#include "dlg_engine.moc"
+
+dlg_engine::dlg_engine(QWidget *parent, const char *name, resource *Rsrc, QString ItemName ) :
+ KDialogBase( parent,
+ name,
+ TRUE,
+ i18n("Configure Engine"),
+ Help|Ok|Apply|Cancel,
+ Ok,
+ TRUE )
+{
+ Resource = Rsrc;
+ Name = ItemName;
+
+ BOX_Parent = makeVBoxMainWidget();
+ BOX_NameProto = new QHBox( BOX_Parent );
+ BOX_Name = new QGroupBox( 1,
+ Qt::Horizontal,
+ i18n( "Engine Name" ),
+ BOX_NameProto );
+ EDIT_Name = new KLineEdit( BOX_Name );
+ BOX_Protocol = new QGroupBox( 1,
+ Qt::Horizontal,
+ i18n( "Protocol" ),
+ BOX_NameProto );
+ EDIT_Protocol = new KComboBox( BOX_Protocol );
+ BOX_Filename = new QGroupBox( 2,
+ Qt::Horizontal,
+ i18n( "Engine Filename" ),
+ BOX_Parent );
+ EDIT_Filename = new KLineEdit( BOX_Filename );
+ BUTTON_Filename = new QPushButton( BOX_Filename );
+ BOX_Arguments = new QGroupBox( 1,
+ Qt::Horizontal,
+ i18n( "Command Line Arguments" ),
+ BOX_Parent );
+ EDIT_Arguments = new KLineEdit( BOX_Arguments );
+ BOX_LogFile = new QGroupBox( 2,
+ Qt::Horizontal,
+ i18n( "Log File" ),
+ BOX_Parent );
+ EDIT_LogFile = new KLineEdit( BOX_LogFile );
+ BUTTON_LogFile = new QPushButton( BOX_LogFile );
+ setMainWidget( BOX_Parent );
+ BUTTON_Filename->setPixmap( Resource->LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) );
+ BUTTON_LogFile->setPixmap( Resource->LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) );
+ EDIT_Name->setMinimumWidth( 150 );
+ EDIT_Filename->setMinimumWidth( 300 );
+ EDIT_Arguments->setMinimumWidth( 300 );
+ /* Protocol ComboBox */
+ EDIT_Protocol->insertItem( QString( "XBoard" ) );
+ EDIT_Protocol->insertItem( QString( "UCI" ) );
+ EDIT_Protocol->setEditable( FALSE );
+ /* Load in data if this is a modification */
+ if( !Name.isEmpty() )
+ {
+ for ( enginesIT = Resource->engines.begin(); enginesIT != Resource->engines.end(); ++enginesIT )
+ {
+ if( (*enginesIT).Name == Name ) break;
+ }
+ EDIT_Name->setText( (*enginesIT).Name );
+ EDIT_Filename->setText( (*enginesIT).Filename );
+ EDIT_Arguments->setText( (*enginesIT).Arguments );
+ EDIT_LogFile->setText( (*enginesIT).LogFile );
+ switch( (*enginesIT).Protocol )
+ {
+ case XBoard:
+ EDIT_Protocol->setCurrentItem(0);
+ break;
+ case UCI:
+ EDIT_Protocol->setCurrentItem(1);
+ break;
+ default:
+ break;
+ }
+ }
+ /* Init the buttons */
+ showButtonCancel( TRUE );
+ showButtonOK( TRUE );
+ showButtonApply( TRUE );
+ showButton( Help, TRUE );
+
+ enableButtonCancel( TRUE );
+ enableButtonOK( TRUE );
+ enableButtonApply( FALSE );
+ enableButton( Help, TRUE );
+
+ setHelp( QString( "configure-engines" ) );
+ /* Make Connections */
+ connect( BUTTON_Filename, SIGNAL( clicked() ), this, SLOT( slotFilenameDialog() ) );
+ connect( BUTTON_LogFile, SIGNAL( clicked() ), this, SLOT( slotLogFileDialog() ) );
+ connect( EDIT_Protocol, SIGNAL( activated(int) ), this, SLOT( slotProtocol(int) ) );
+ show();
+}
+///////////////////////////////////////
+//
+// dlg_engine::~dlg_engine
+//
+///////////////////////////////////////
+dlg_engine::~dlg_engine()
+{
+}
+///////////////////////////////////////
+//
+// dlg_engine::slotOk
+//
+///////////////////////////////////////
+void dlg_engine::slotOk( void )
+{
+ slotApply();
+ slotDelayedDestruct();
+}
+///////////////////////////////////////
+//
+// dlg_engine::slotApply
+//
+///////////////////////////////////////
+void dlg_engine::slotApply( void )
+{
+ engineResource newEngine;
+
+ if( Name.isEmpty() )
+ {
+ enginesIT = Resource->engines.append( newEngine );
+ Name = "notemptyanymore";
+ (*enginesIT).Wins = 0;
+ (*enginesIT).Losses = 0;
+ (*enginesIT).Draws = 0;
+ (*enginesIT).CurrentRef = 0;
+ }
+ (*enginesIT).Name = EDIT_Name->text();
+ (*enginesIT).Filename = EDIT_Filename->text();
+ (*enginesIT).Arguments = EDIT_Arguments->text();
+ (*enginesIT).LogFile = EDIT_LogFile->text();
+ switch( EDIT_Protocol->currentItem() )
+ {
+ case 0:
+ (*enginesIT).Protocol = XBoard;
+ break;
+ case 1:
+ (*enginesIT).Protocol = UCI;
+ break;
+ default:
+ break;
+ }
+ enableButtonApply( FALSE );
+}
+///////////////////////////////////////
+//
+// dlg_engine::slotCancel
+//
+///////////////////////////////////////
+void dlg_engine::slotCancel( void )
+{
+ slotDelayedDestruct();
+}
+///////////////////////////////////////
+//
+// dlg_engine::slotFilenameDialog
+//
+///////////////////////////////////////
+void dlg_engine::slotFilenameDialog( void )
+{
+ QString temp;
+ int tmp;
+
+ temp = KFileDialog::getOpenFileName( QString::null,
+ QString( "*" ),
+ this,
+ QString( "Find Engine..." ) );
+ if( temp.isEmpty() ) return;
+ EDIT_Filename->setText( temp );
+ if( EDIT_Name->text().isEmpty() )
+ {
+ tmp = temp.findRev( '/' );
+ EDIT_Name->setText( temp.remove( 0, tmp + 1 ) );
+ }
+ enableButtonApply( TRUE );
+}
+///////////////////////////////////////
+//
+// dlg_engine::slotLogFileDialog
+//
+///////////////////////////////////////
+void dlg_engine::slotLogFileDialog( void )
+{
+ QString temp;
+
+ temp = KFileDialog::getOpenFileName( QString::null,
+ QString( "*" ),
+ this,
+ QString( "Find Log..." ) );
+ if( temp.isEmpty() ) return;
+ EDIT_LogFile->setText( temp );
+ enableButtonApply( TRUE );
+}
+///////////////////////////////////////
+//
+// dlg_engine::slotProtocol
+//
+///////////////////////////////////////
+void dlg_engine::slotProtocol( int Index )
+{
+ if(Index); // No-op to stop compile warning.
+ enableButtonApply( TRUE );
+}
+
diff --git a/knights/dlg_engine.h b/knights/dlg_engine.h
new file mode 100644
index 0000000..0bd13af
--- /dev/null
+++ b/knights/dlg_engine.h
@@ -0,0 +1,77 @@
+/***************************************************************************
+ dlg_engine.h - description
+ -------------------
+ begin : Wed Jul 18 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef DLG_ENGINE_H
+#define DLG_ENGINE_H
+
+#include <kdialogbase.h>
+#include <klineedit.h>
+#include <kcombobox.h>
+#include <qgroupbox.h>
+#include <qpushbutton.h>
+#include <qvbox.h>
+#include <qhbox.h>
+#include <qstring.h>
+#include "definitions.h"
+#include "resource.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class dlg_engine : public KDialogBase
+{
+ Q_OBJECT
+ public:
+ dlg_engine(QWidget *parent=0, const char *name=0, resource *Rsrc=0, QString ItemName="" );
+ ~dlg_engine();
+
+ public slots:
+ void slotOk( void );
+ void slotApply( void );
+ void slotCancel( void );
+ void slotFilenameDialog( void );
+ void slotLogFileDialog( void );
+ void slotProtocol( int Index );
+
+ private:
+ engineList::Iterator enginesIT;
+ resource *Resource;
+ QString Name;
+
+ QVBox *BOX_Parent;
+ QHBox *BOX_NameProto;
+
+ QGroupBox *BOX_Name;
+ KLineEdit *EDIT_Name;
+
+ QGroupBox *BOX_Protocol;
+ KComboBox *EDIT_Protocol;
+
+ QGroupBox *BOX_Filename;
+ KLineEdit *EDIT_Filename;
+ QPushButton *BUTTON_Filename;
+
+ QGroupBox *BOX_LogFile;
+ KLineEdit *EDIT_LogFile;
+ QPushButton *BUTTON_LogFile;
+
+ QGroupBox *BOX_Arguments;
+ KLineEdit *EDIT_Arguments;
+};
+
+#endif
diff --git a/knights/dlg_login.cpp b/knights/dlg_login.cpp
new file mode 100644
index 0000000..103ff91
--- /dev/null
+++ b/knights/dlg_login.cpp
@@ -0,0 +1,161 @@
+/***************************************************************************
+ dlg_login.cpp - description
+ -------------------
+ begin : Sat Sep 29 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "dlg_login.moc"
+
+dlg_login::dlg_login(QWidget *parent, const char *name, resource *rsrc) :
+ KDialogBase(parent, name, TRUE, i18n("Login Prompt"), Help|Ok|Cancel, Ok,TRUE )
+{
+ serverList::Iterator i;
+ serverList::Iterator currentServer;
+ int counter = 0;
+
+ myResource = rsrc;
+
+ BOX_Parent = makeVBoxMainWidget();
+
+ /* Select which server to connect to */
+ GROUP_Select_Server = new QGroupBox( 1, Qt::Vertical, i18n( "Select Server" ), BOX_Parent );
+
+ COMBO_Select_Server = new KComboBox ( GROUP_Select_Server );
+ COMBO_Select_Server->setEditable( FALSE );
+
+ /* fill the combobox with servers */
+ for(i = myResource->servers.begin(); i != myResource->servers.end(); i++)
+ {
+ COMBO_Select_Server->insertItem((*i).Name);
+ if((*i).CurrentRef == TRUE)
+ {
+ COMBO_Select_Server->setCurrentItem(counter);
+ currentServer = i;
+ }
+ counter++;
+ }
+ /* connect to right signal to the combobox */
+ connect( COMBO_Select_Server, SIGNAL( activated(const QString &) ), this, SLOT( slotUpdateUser(const QString &) ) );
+
+ GROUP_Username = new QGroupBox( 1, Qt::Horizontal, i18n("User info"), BOX_Parent);
+ BOX_ALIGN = new QHBox( GROUP_Username );
+ BOX_TEXT = new QVBox( BOX_ALIGN );
+ TEXT_Login = new QLabel( BOX_TEXT );
+ TEXT_Password = new QLabel( BOX_TEXT );
+
+ TEXT_Login->setText( i18n("Login:") );
+ TEXT_Password->setText( i18n("Password:") );
+
+ BOX_EDIT = new QVBox( BOX_ALIGN );
+ EDIT_Login = new KLineEdit( BOX_EDIT );
+ EDIT_Password = new KLineEdit( BOX_EDIT );
+
+ CHECKBOX_GUEST = new QCheckBox(i18n("Log in as guest"), GROUP_Username);
+
+ EDIT_Password->setEchoMode( QLineEdit::Password );
+
+ connect(CHECKBOX_GUEST, SIGNAL(toggled(bool)), this, SLOT(slotGuestToggle(bool)));
+
+ /* Init the buttons */
+ showButtonCancel( TRUE );
+ showButtonOK( TRUE );
+ showButton( Help, TRUE );
+
+ enableButtonCancel( TRUE );
+ enableButtonOK( TRUE );
+ enableButton( Help, TRUE );
+ setButtonOKText( i18n("Login"), i18n("Log in to the chess server using this name and password.") );
+ setButtonCancelText( i18n("Cancel"), i18n("Abort logging into the server") );
+ setHelp("prefs");
+ disableResize();
+ show();
+ /* make sure the username for the default server is displayed */
+ slotUpdateUser((*currentServer).Name);
+}
+///////////////////////////////////////
+//
+// dlg_login::~dlg_login
+//
+///////////////////////////////////////
+dlg_login::~dlg_login()
+{
+}
+///////////////////////////////////////
+//
+// dlg_login::slotOk
+//
+///////////////////////////////////////
+void dlg_login::slotOk( void )
+{
+ if(BOX_ALIGN->isEnabled())
+ {
+ emit login(EDIT_Login->text(), EDIT_Password->text());
+ }
+ else
+ {
+ emit login("guest", "");
+ }
+ emit okClicked();
+ slotDelayedDestruct();
+}
+
+///////////////////////////////////////
+//
+// dlg_login::slotGuestToggle
+//
+///////////////////////////////////////
+void dlg_login::slotGuestToggle( bool on )
+{
+ BOX_ALIGN->setEnabled(!on);
+}
+
+///////////////////////////////////////
+//
+// dlg_login::slotUpdateUser
+//
+///////////////////////////////////////
+void dlg_login::slotUpdateUser(const QString &name)
+{
+ /* this function retrieves the correct serverResource from
+ the resources and uses that to fill in the username and
+ password fields */
+ serverList::Iterator i;
+
+ for(i = myResource->servers.begin(); i != myResource->servers.end(); i++)
+ {
+ if((*i).CurrentRef)
+ {
+ (*i).CurrentRef = FALSE;
+ }
+ if((*i).Name == name )
+ {
+ (*i).CurrentRef = TRUE;
+ EDIT_Login->setText((*i).UserName);
+ EDIT_Password->setText((*i).Password);
+ server = &(*i);
+ }
+ }
+}
+
+///////////////////////////////////////
+//
+// dlg_login::slotUpdateUser
+//
+///////////////////////////////////////
+void dlg_login::disableServerSelect()
+{
+ COMBO_Select_Server->setEnabled(false);
+}
+
+
diff --git a/knights/dlg_login.h b/knights/dlg_login.h
new file mode 100644
index 0000000..1c02f18
--- /dev/null
+++ b/knights/dlg_login.h
@@ -0,0 +1,73 @@
+/***************************************************************************
+ dlg_login.h - description
+ -------------------
+ begin : Sat Sep 29 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef DLG_LOGIN_H
+#define DLG_LOGIN_H
+
+#include <qwidget.h>
+#include <qvbox.h>
+#include <qhbox.h>
+#include <qcheckbox.h>
+#include <qlabel.h>
+#include <qgroupbox.h>
+
+#include <kdialogbase.h>
+#include <klineedit.h>
+#include <kcombobox.h>
+
+#include "resource.h"
+
+/**
+ *@author Troy Corbin Jr. / Alexander Wels
+ */
+
+class dlg_login : public KDialogBase
+{
+ Q_OBJECT
+
+ public:
+ dlg_login(QWidget *parent, const char *name=0, resource *rsrc = NULL);
+ ~dlg_login();
+ void disableServerSelect();
+
+ public slots:
+ void slotOk( void );
+ void slotGuestToggle( bool );
+ void slotUpdateUser(const QString&);
+
+ signals:
+ void login(QString userName, QString passWord);
+
+ private:
+ QVBox *BOX_Parent;
+ QVBox *BOX_TEXT;
+ QVBox *BOX_EDIT;
+ QHBox *BOX_ALIGN;
+ KLineEdit *EDIT_Login;
+ KLineEdit *EDIT_Password;
+ QLabel *TEXT_Login;
+ QLabel *TEXT_Password;
+ QCheckBox *CHECKBOX_GUEST;
+ QGroupBox *GROUP_Select_Server;
+ QGroupBox *GROUP_Username;
+ KComboBox *COMBO_Select_Server;
+
+ resource *myResource;
+ struct serverResource *server;
+};
+
+#endif
diff --git a/knights/dlg_newmatch.cpp b/knights/dlg_newmatch.cpp
new file mode 100644
index 0000000..ff85497
--- /dev/null
+++ b/knights/dlg_newmatch.cpp
@@ -0,0 +1,385 @@
+/***************************************************************************
+ dlg_newmatch.cpp - description
+ -------------------
+ begin : Tue Jun 25 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "dlg_newmatch.moc"
+#include <kcombobox.h>
+#include <qgroupbox.h>
+#include <qbuttongroup.h>
+#include <qspinbox.h>
+#include <qradiobutton.h>
+#include <qcheckbox.h>
+#include <qlabel.h>
+#include <qvbox.h>
+#include <qhbox.h>
+#include <qgrid.h>
+#include "resource.h"
+#include "dlg_selectengine.h"
+#include "dlg_selectemail.h"
+
+#define _TYPE_HUMAN_ 0
+#define _TYPE_PC_ 1
+#define _TYPE_EMAIL_ 2
+
+dlg_newmatch::dlg_newmatch(QWidget *parent, const char *name, resource *Rsrc ) :
+KDialogBase(parent, name, TRUE, i18n("Start a New Match"), Cancel|Ok|Help, Ok, TRUE )
+{
+ myResource = Rsrc;
+ Param = new match_param( myResource );
+ BOX_Parent = makeHBoxMainWidget();
+ BOX_Players = new QVBox( BOX_Parent );
+
+ BOX_White = new QGroupBox(3, Qt::Horizontal, i18n("White"), BOX_Players );
+ BOX_Black = new QGroupBox(3, Qt::Horizontal, i18n("Black"), BOX_Players );
+
+ IMAGE_White = new QLabel( BOX_White );
+ IMAGE_Black = new QLabel( BOX_Black );
+
+ BOX_White_Detail = new QVBox( BOX_White );
+ BOX_Black_Detail = new QVBox( BOX_Black );
+
+ LABEL_White_Name = new QLabel( BOX_White_Detail );
+ LABEL_Black_Name = new QLabel( BOX_Black_Detail );
+
+ GROUP_White_Type = new QButtonGroup( 3, Qt::Vertical, BOX_White_Detail );
+ GROUP_White_Type->setExclusive( TRUE );
+ RADIO_White_Human = new QRadioButton( i18n("Human"), GROUP_White_Type );
+ RADIO_White_PC = new QRadioButton( i18n("Computer"), GROUP_White_Type );
+ RADIO_White_Email = new QRadioButton( i18n("Email"), GROUP_White_Type );
+ connect( GROUP_White_Type, SIGNAL( clicked(int)), this, SLOT( slotWhiteType(int)));
+
+ GROUP_Black_Type = new QButtonGroup( 3, Qt::Vertical, BOX_Black_Detail );
+ GROUP_Black_Type->setExclusive( TRUE );
+ RADIO_Black_Human = new QRadioButton( i18n("Human"), GROUP_Black_Type );
+ RADIO_Black_PC = new QRadioButton( i18n("Computer"), GROUP_Black_Type );
+ RADIO_Black_Email = new QRadioButton( i18n("Email"), GROUP_Black_Type );
+ connect( GROUP_Black_Type, SIGNAL( clicked(int)), this, SLOT( slotBlackType(int)));
+
+ /* Disable Unconfigured Types */
+ if( !myResource->engines.count() )
+ {
+ RADIO_White_PC->setEnabled( FALSE );
+ RADIO_Black_PC->setEnabled( FALSE );
+ }
+ if( 1 )
+ {
+ RADIO_White_Email->setEnabled( FALSE );
+ RADIO_Black_Email->setEnabled( FALSE );
+ }
+
+ /* Time for White */
+ GRID_White_Time = new QGrid( 2, Qt::Horizontal, BOX_White );
+ LABEL_White_Base = new QLabel( i18n("Base Time:"), GRID_White_Time );
+ SPIN_White_Base = new QSpinBox( 0, 120, 1, GRID_White_Time );
+ SPIN_White_Base->setSuffix( i18n(" min.") );
+ connect( SPIN_White_Base, SIGNAL( valueChanged(int)), this, SLOT( slotWhiteBase(int)));
+
+ LABEL_White_Moves = new QLabel( i18n("Moves Per Base Time"), GRID_White_Time );
+ SPIN_White_Moves = new QSpinBox( 0, 100, 5, GRID_White_Time );
+ SPIN_White_Moves->setSuffix( i18n(" moves") );
+ connect( SPIN_White_Moves, SIGNAL( valueChanged(int)), this, SLOT( slotWhiteMoves(int)));
+
+ LABEL_White_Inc = new QLabel( i18n("Increment Per Move"), GRID_White_Time );
+ SPIN_White_Inc = new QSpinBox( 0, 120, 1, GRID_White_Time );
+ SPIN_White_Inc->setSuffix( i18n(" sec.") );
+ connect( SPIN_White_Inc, SIGNAL( valueChanged(int)), this, SLOT( slotWhiteInc(int)));
+
+ /* Time for Black */
+ GRID_Black_Time = new QGrid( 2, Qt::Horizontal, BOX_Black );
+ LABEL_Black_Base = new QLabel( i18n("Base Time:"), GRID_Black_Time );
+ SPIN_Black_Base = new QSpinBox( 0, 120, 1, GRID_Black_Time );
+ SPIN_Black_Base->setSuffix( i18n(" min.") );
+ connect( SPIN_Black_Base, SIGNAL( valueChanged(int)), this, SLOT( slotBlackBase(int)));
+
+ LABEL_Black_Moves = new QLabel( i18n("Moves Per Base Time"), GRID_Black_Time );
+ SPIN_Black_Moves = new QSpinBox( 0, 100, 5, GRID_Black_Time );
+ SPIN_Black_Moves->setSuffix( i18n(" moves") );
+ connect( SPIN_Black_Moves, SIGNAL( valueChanged(int)), this, SLOT( slotBlackMoves(int)));
+
+ LABEL_Black_Inc = new QLabel( i18n("Increment Per Move"), GRID_Black_Time );
+ SPIN_Black_Inc = new QSpinBox( 0, 120, 1, GRID_Black_Time );
+ SPIN_Black_Inc->setSuffix( i18n(" sec.") );
+ connect( SPIN_Black_Inc, SIGNAL( valueChanged(int)), this, SLOT( slotBlackInc(int)));
+
+ setTCP();
+ setTypes();
+ setNames();
+ setImages();
+ setHelp( QString( "new-match-dialog" ) );
+}
+
+dlg_newmatch::~dlg_newmatch()
+{
+}
+
+///////////////////////////////////////
+//
+// dlg_newmatch::setTCP
+//
+///////////////////////////////////////
+void dlg_newmatch::setTCP( void )
+{
+ TCPList tmpList( Param->time(WHITE) );
+ TCP tmpTCP = tmpList[0];
+
+ SPIN_White_Base->setValue( tmpTCP.Seconds / 60 );
+ SPIN_White_Moves->setValue( tmpTCP.Moves );
+ SPIN_White_Inc->setValue( tmpTCP.Increment );
+
+ tmpList = Param->time(BLACK);
+ tmpTCP = tmpList[0];
+
+ SPIN_Black_Base->setValue( tmpTCP.Seconds / 60 );
+ SPIN_Black_Moves->setValue( tmpTCP.Moves );
+ SPIN_Black_Inc->setValue( tmpTCP.Increment );
+}
+///////////////////////////////////////
+//
+// dlg_newmatch::setTypes
+//
+///////////////////////////////////////
+void dlg_newmatch::setTypes( void )
+{
+ switch( Param->type(WHITE) )
+ {
+ case PLAYERPC:
+ GROUP_White_Type->setButton( _TYPE_PC_ );
+ break;
+ case PLAYEREMAIL:
+ GROUP_White_Type->setButton( _TYPE_EMAIL_ );
+ break;
+ case PLAYERLOCAL:
+ default:
+ GROUP_White_Type->setButton( _TYPE_HUMAN_ );
+ slotWhiteType( _TYPE_HUMAN_ );
+ break;
+ }
+ if( GROUP_White_Type->selected() != _TYPE_HUMAN_ )
+ {
+ if( !GROUP_White_Type->selected()->isEnabled() )
+ {
+ GROUP_White_Type->setButton( _TYPE_HUMAN_ );
+ slotWhiteType( _TYPE_HUMAN_ );
+ }
+ }
+ else
+ {
+ Param->setType( WHITE, PLAYERLOCAL );
+ GROUP_White_Type->setButton( _TYPE_HUMAN_ );
+ }
+
+ switch( Param->type(BLACK) )
+ {
+ case PLAYERPC:
+ GROUP_Black_Type->setButton( _TYPE_PC_ );
+ break;
+ case PLAYEREMAIL:
+ GROUP_Black_Type->setButton( _TYPE_EMAIL_ );
+ break;
+ case PLAYERLOCAL:
+ default:
+ GROUP_Black_Type->setButton( _TYPE_HUMAN_ );
+ slotBlackType( _TYPE_HUMAN_ );
+ break;
+ }
+ if( GROUP_Black_Type->selected() != _TYPE_HUMAN_ )
+ {
+ if( !GROUP_Black_Type->selected()->isEnabled() )
+ {
+ GROUP_Black_Type->setButton( _TYPE_HUMAN_ );
+ slotBlackType( _TYPE_HUMAN_ );
+ }
+ }
+ else
+ {
+ Param->setType( BLACK, PLAYERLOCAL );
+ GROUP_Black_Type->setButton( _TYPE_HUMAN_ );
+ }
+}
+
+///////////////////////////////////////
+//
+// dlg_newmatch::setImages
+//
+///////////////////////////////////////
+void dlg_newmatch::setImages( void )
+{
+ IMAGE_White->setPixmap( Param->image( WHITE ) );
+ IMAGE_Black->setPixmap( Param->image( BLACK ) );
+}
+
+///////////////////////////////////////
+//
+// dlg_newmatch::setNames
+//
+///////////////////////////////////////
+void dlg_newmatch::setNames( void )
+{
+ LABEL_White_Name->setText( Param->name( WHITE ) );
+ LABEL_Black_Name->setText( Param->name( BLACK ) );
+}
+
+///////////////////////////////////////
+//
+// dlg_newmatch::slotWhiteType
+//
+///////////////////////////////////////
+void dlg_newmatch::slotWhiteType( int type )
+{
+ if( type == _TYPE_PC_ )
+ {
+ EngineSelect = new dlg_selectengine( this, myResource, WHITE );
+ connect( EngineSelect, SIGNAL( valuesChanged() ), this, SLOT( slotReparse() ) );
+ EngineSelect->exec();
+ Param->setType( WHITE, PLAYERPC );
+ }
+ else if( type == _TYPE_EMAIL_ )
+ {
+ EmailSelect = new dlg_selectemail( this, myResource );
+ connect( EmailSelect, SIGNAL( valuesChanged() ), this, SLOT( slotReparse() ) );
+ EmailSelect->exec();
+ Param->setType( WHITE, PLAYEREMAIL );
+ }
+ else
+ {
+ Param->setType( WHITE, PLAYERLOCAL );
+ }
+ setNames();
+ setImages();
+}
+
+///////////////////////////////////////
+//
+// dlg_newmatch::slotWhiteBase
+//
+///////////////////////////////////////
+void dlg_newmatch::slotWhiteBase( int time )
+{
+ TCPList tmpList( Param->time(WHITE) );
+ TCP tmpTCP = tmpList[0];
+ tmpTCP.Seconds = time * 60;
+ tmpList[0] = tmpTCP;
+ Param->setTime( WHITE, tmpList );
+}
+
+///////////////////////////////////////
+//
+// dlg_newmatch::slotWhiteMoves
+//
+///////////////////////////////////////
+void dlg_newmatch::slotWhiteMoves( int time )
+{
+ TCPList tmpList( Param->time(WHITE) );
+ TCP tmpTCP = tmpList[0];
+ tmpTCP.Moves = time;
+ tmpList[0] = tmpTCP;
+ Param->setTime( WHITE, tmpList );
+}
+
+///////////////////////////////////////
+//
+// dlg_newmatch::slotWhiteInc
+//
+///////////////////////////////////////
+void dlg_newmatch::slotWhiteInc( int time )
+{
+ TCPList tmpList( Param->time(WHITE) );
+ TCP tmpTCP = tmpList[0];
+ tmpTCP.Increment = time;
+ tmpList[0] = tmpTCP;
+ Param->setTime( WHITE, tmpList );
+}
+
+///////////////////////////////////////
+//
+// dlg_newmatch::slotBlackType
+//
+///////////////////////////////////////
+void dlg_newmatch::slotBlackType( int type )
+{
+ if( type == _TYPE_PC_ )
+ {
+ EngineSelect = new dlg_selectengine( this, myResource, BLACK );
+ connect( EngineSelect, SIGNAL( valuesChanged() ), this, SLOT( slotReparse() ) );
+ EngineSelect->exec();
+ Param->setType( BLACK, PLAYERPC );
+ }
+ else if( type == _TYPE_EMAIL_ )
+ {
+ EmailSelect = new dlg_selectemail( this, myResource );
+ connect( EmailSelect, SIGNAL( valuesChanged() ), this, SLOT( slotReparse() ) );
+ EmailSelect->exec();
+ Param->setType( BLACK, PLAYEREMAIL );
+ }
+ else
+ {
+ Param->setType( BLACK, PLAYERLOCAL );
+ }
+ setNames();
+ setImages();
+}
+
+///////////////////////////////////////
+//
+// dlg_newmatch::slotBlackBase
+//
+///////////////////////////////////////
+void dlg_newmatch::slotBlackBase( int time )
+{
+ TCPList tmpList( Param->time(BLACK) );
+ TCP tmpTCP = tmpList[0];
+ tmpTCP.Seconds = time * 60;
+ tmpList[0] = tmpTCP;
+ Param->setTime( BLACK, tmpList );
+}
+///////////////////////////////////////
+//
+// dlg_newmatch::slotBlackMoves
+//
+///////////////////////////////////////
+void dlg_newmatch::slotBlackMoves( int time )
+{
+ TCPList tmpList( Param->time(BLACK) );
+ TCP tmpTCP = tmpList[0];
+ tmpTCP.Moves = time;
+ tmpList[0] = tmpTCP;
+ Param->setTime( BLACK, tmpList );
+}
+///////////////////////////////////////
+//
+// dlg_newmatch::slotBlackInc
+//
+///////////////////////////////////////
+void dlg_newmatch::slotBlackInc( int time )
+{
+ TCPList tmpList( Param->time(BLACK) );
+ TCP tmpTCP = tmpList[0];
+ tmpTCP.Increment = time;
+ tmpList[0] = tmpTCP;
+ Param->setTime( BLACK, tmpList );
+}
+///////////////////////////////////////
+//
+// dlg_newmatch::slotReparse
+//
+///////////////////////////////////////
+void dlg_newmatch::slotReparse( void )
+{
+ setNames();
+ setImages();
+ Param->setStrength( WHITE, myResource->Strength[WHITE] );
+ Param->setStrength( BLACK, myResource->Strength[BLACK] );
+}
diff --git a/knights/dlg_newmatch.h b/knights/dlg_newmatch.h
new file mode 100644
index 0000000..82b5e57
--- /dev/null
+++ b/knights/dlg_newmatch.h
@@ -0,0 +1,110 @@
+/***************************************************************************
+ dlg_newmatch.h - description
+ -------------------
+ begin : Tue Jun 25 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef DLG_NEWMATCH_H
+#define DLG_NEWMATCH_H
+
+#include <qwidget.h>
+#include <kdialogbase.h>
+
+#include "match_param.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class dlg_selectengine;
+class dlg_selectemail;
+class resource;
+class QLabel;
+class QSpinBox;
+class QRadioButton;
+class QCheckBox;
+class QVBox;
+class QHBox;
+class QGrid;
+class QButtonGroup;
+class QGroupBox;
+class KComboBox;
+
+class dlg_newmatch : public KDialogBase
+{
+ Q_OBJECT
+ private:
+ resource *myResource;
+ match_param *Param;
+ dlg_selectengine *EngineSelect;
+ dlg_selectemail *EmailSelect;
+
+ QHBox *BOX_Parent;
+ QVBox *BOX_Players;
+ QGroupBox *BOX_White;
+ QLabel *IMAGE_White;
+ QVBox *BOX_White_Detail;
+ QLabel *LABEL_White_Name;
+ QButtonGroup *GROUP_White_Type;
+ QRadioButton *RADIO_White_Human;
+ QRadioButton *RADIO_White_PC;
+ QRadioButton *RADIO_White_Email;
+ QGrid *GRID_White_Time;
+ QLabel *LABEL_White_Base;
+ QSpinBox *SPIN_White_Base;
+ QLabel *LABEL_White_Inc;
+ QSpinBox *SPIN_White_Inc;
+ QLabel *LABEL_White_Moves;
+ QSpinBox *SPIN_White_Moves;
+ QGroupBox *BOX_Black;
+ QLabel *IMAGE_Black;
+ QVBox *BOX_Black_Detail;
+ QLabel *LABEL_Black_Name;
+ QButtonGroup *GROUP_Black_Type;
+ QRadioButton *RADIO_Black_Human;
+ QRadioButton *RADIO_Black_PC;
+ QRadioButton *RADIO_Black_Email;
+ QGrid *GRID_Black_Time;
+ QLabel *LABEL_Black_Base;
+ QSpinBox *SPIN_Black_Base;
+ QLabel *LABEL_Black_Inc;
+ QSpinBox *SPIN_Black_Inc;
+ QLabel *LABEL_Black_Moves;
+ QSpinBox *SPIN_Black_Moves;
+
+ public:
+ dlg_newmatch(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ ~dlg_newmatch();
+ match_param* paramaters( void ) { return Param; }
+ protected slots:
+ void slotWhiteType( int );
+ void slotWhiteBase( int );
+ void slotWhiteMoves( int );
+ void slotWhiteInc( int );
+
+ void slotBlackType( int );
+ void slotBlackBase( int );
+ void slotBlackMoves( int );
+ void slotBlackInc( int );
+
+ void slotReparse( void );
+
+ protected:
+ void setTCP( void );
+ void setTypes( void );
+ void setImages( void );
+ void setNames( void );
+};
+
+#endif
diff --git a/knights/dlg_promote.cpp b/knights/dlg_promote.cpp
new file mode 100644
index 0000000..d98ad83
--- /dev/null
+++ b/knights/dlg_promote.cpp
@@ -0,0 +1,123 @@
+/***************************************************************************
+ dlg_promote.cpp - description
+ -------------------
+ begin : Fri Jul 13 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "definitions.h"
+#include "dlg_promote.moc"
+#include "knightspixcache.h"
+#include <qimage.h>
+
+dlg_promote::dlg_promote(QWidget *parent, const char *name, resource *Rsrc ) :
+ QDialog( parent, name, TRUE, Qt::WStyle_Customize | Qt::WStyle_DialogBorder )
+{
+ Resource = Rsrc;
+ Queen = new QPushButton( this );
+ Bishop = new QPushButton( this );
+ Knight = new QPushButton( this );
+ Rook = new QPushButton( this );
+ Description = new QLabel( this );
+}
+
+dlg_promote::~dlg_promote()
+{
+ delete Queen;
+ delete Bishop;
+ delete Knight;
+ delete Rook;
+ delete Description;
+}
+
+void dlg_promote::Init( bool Army )
+{
+ KnightsPixCache *cache = Resource->pixCache;
+ QImage tempImage;
+ QPixmap buffer;
+ int margin;
+
+ margin = 2;
+ buffer.resize( Resource->ThemeSize, Resource->ThemeSize );
+ Description->setFixedSize( Resource->ThemeSize * 2 , 20 );
+ Queen->setFixedSize( Resource->ThemeSize, Resource->ThemeSize );
+ Bishop->setFixedSize( Resource->ThemeSize, Resource->ThemeSize );
+ Knight->setFixedSize( Resource->ThemeSize, Resource->ThemeSize );
+ Rook->setFixedSize( Resource->ThemeSize, Resource->ThemeSize );
+ setFixedSize( ( margin * 4 ) + ( Resource->ThemeSize * 2 ),
+ ( margin * 6 ) + ( Resource->ThemeSize * 2 ) + 20 );
+
+ Description->move( margin, margin );
+ Queen->move( margin, ( margin * 3 ) + 20 );
+ Bishop->move( ( margin * 3 ) + Resource->ThemeSize, ( margin * 3 ) + 20 );
+ Knight->move( margin, ( margin * 5 ) + 20 + Resource->ThemeSize );
+ Rook->move( ( margin * 3 ) + Resource->ThemeSize, ( margin * 5 ) + 20 + Resource->ThemeSize );
+
+ /* Queen */
+ buffer = cache->SquareLight;
+ if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteQueen, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ else bitBlt( &buffer, 0, 0, &cache->BlackQueen, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ Queen->setPixmap( buffer );
+ Queen->show();
+
+ /* Bishop */
+ buffer = cache->SquareDark;
+ if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteBishop, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ else bitBlt( &buffer, 0, 0, &cache->BlackBishop, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ Bishop->setPixmap( buffer );
+ Bishop->show();
+
+ /* Knight */
+ buffer = cache->SquareDark;
+ if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteKnight, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ else bitBlt( &buffer, 0, 0, &cache->BlackKnight, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ Knight->setPixmap( buffer );
+ Knight->show();
+
+ /* Rook */
+ buffer = cache->SquareLight;
+ if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteRook, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ else bitBlt( &buffer, 0, 0, &cache->BlackRook, 0, 0, -1, -1, Qt::CopyROP, FALSE);
+ Rook->setPixmap( buffer );
+ Rook->show();
+
+ Description->setText( i18n( "Promote your pawn to..." ) );
+ Description->show();
+ connect( Queen, SIGNAL( clicked() ), this, SLOT( queenClick() ) );
+ connect( Bishop, SIGNAL( clicked() ), this, SLOT( bishopClick() ) );
+ connect( Knight, SIGNAL( clicked() ), this, SLOT( knightClick() ) );
+ connect( Rook, SIGNAL( clicked() ), this, SLOT( rookClick() ) );
+ Queen->setFocus();
+ setCaption( i18n( "Pawn Promotion" ) );
+}
+
+void dlg_promote::queenClick( void )
+{
+ done( 'q' );
+}
+
+void dlg_promote::bishopClick( void )
+{
+ done( 'b' );
+}
+
+void dlg_promote::knightClick( void )
+{
+ done( 'n' );
+}
+
+void dlg_promote::rookClick( void )
+{
+ done( 'r' );
+}
+
diff --git a/knights/dlg_promote.h b/knights/dlg_promote.h
new file mode 100644
index 0000000..0eb117e
--- /dev/null
+++ b/knights/dlg_promote.h
@@ -0,0 +1,58 @@
+/***************************************************************************
+ dlg_promote.h - description
+ -------------------
+ begin : Fri Jul 13 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef DLG_PROMOTE_H
+#define DLG_PROMOTE_H
+
+#include <klocale.h>
+#include <qpixmap.h>
+#include <qstring.h>
+#include <qdialog.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include "resource.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class dlg_promote : public QDialog
+{
+ Q_OBJECT
+ public:
+
+ dlg_promote(QWidget *parent=0, const char *name=0, resource *Rsrc=0 );
+ ~dlg_promote();
+
+ void Init( bool Army );
+
+ public slots:
+ void queenClick( void );
+ void bishopClick( void );
+ void knightClick( void );
+ void rookClick( void );
+
+ private:
+ resource *Resource;
+ QLabel *Description;
+ QPushButton *Queen;
+ QPushButton *Bishop;
+ QPushButton *Knight;
+ QPushButton *Rook;
+};
+
+#endif
diff --git a/knights/dlg_selectemail.cpp b/knights/dlg_selectemail.cpp
new file mode 100644
index 0000000..5c7b583
--- /dev/null
+++ b/knights/dlg_selectemail.cpp
@@ -0,0 +1,46 @@
+/***************************************************************************
+ dlg_selectemail.cpp - description
+ -------------------
+ begin : Sun Oct 27 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "dlg_selectemail.moc"
+#include <qvbox.h>
+#include <qlineedit.h>
+#include "resource.h"
+
+dlg_selectemail::dlg_selectemail(QWidget *parent, resource *Rsrc ) :
+ KDialogBase( parent,
+ 0,
+ TRUE,
+ i18n("Select Email Address"),
+ Help|Ok,
+ Ok,
+ TRUE )
+{
+ myResource = Rsrc;
+ BOX_Parent = makeVBoxMainWidget();
+
+ EDIT_Email = new QLineEdit( BOX_Parent );
+ EDIT_Email->setText( myResource->Email_Address );
+ connect( EDIT_Email, SIGNAL( returnPressed() ), this, SLOT( changeValue() ) );
+}
+dlg_selectemail::~dlg_selectemail()
+{
+}
+void dlg_selectemail::changeValue( void )
+{
+ myResource->Email_Address = EDIT_Email->text();
+ emit valuesChanged();
+}
diff --git a/knights/dlg_selectemail.h b/knights/dlg_selectemail.h
new file mode 100644
index 0000000..6abf799
--- /dev/null
+++ b/knights/dlg_selectemail.h
@@ -0,0 +1,52 @@
+/***************************************************************************
+ dlg_selectemail.h - description
+ -------------------
+ begin : Sun Oct 27 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef DLG_SELECTEMAIL_H
+#define DLG_SELECTEMAIL_H
+
+#include <qwidget.h>
+#include <kdialogbase.h>
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class resource;
+class QVBox;
+class QLineEdit;
+
+class dlg_selectemail : public KDialogBase
+{
+ Q_OBJECT
+ public:
+ dlg_selectemail(QWidget *parent, resource *Rsrc );
+ ~dlg_selectemail();
+
+ signals:
+ void valuesChanged( void );
+
+ protected slots:
+ void changeValue( void );
+
+ private:
+ resource *myResource;
+
+ QVBox *BOX_Parent;
+ QLineEdit *EDIT_Email;
+};
+
+#endif
diff --git a/knights/dlg_selectengine.cpp b/knights/dlg_selectengine.cpp
new file mode 100644
index 0000000..e827184
--- /dev/null
+++ b/knights/dlg_selectengine.cpp
@@ -0,0 +1,201 @@
+/***************************************************************************
+ dlg_selectengine.cpp - description
+ -------------------
+ begin : Wed Aug 28 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "dlg_selectengine.moc"
+#include <qvbox.h>
+#include <qgroupbox.h>
+#include <qslider.h>
+#include <qlabel.h>
+#include <kcombobox.h>
+#include "resource.h"
+
+dlg_selectengine::dlg_selectengine(QWidget *parent, resource *Rsrc, bool army ) :
+ KDialogBase( parent,
+ 0,
+ TRUE,
+ i18n("Select Computer Player"),
+ Help|Ok,
+ Ok,
+ TRUE )
+{
+ Resource = Rsrc;
+ Army = army;
+ BOX_Parent = makeVBoxMainWidget();
+
+ BOX_Engine = new QGroupBox( 1,
+ Qt::Horizontal,
+ i18n( "Computer Players" ),
+ BOX_Parent );
+ COMBO_Engine = new KComboBox( BOX_Engine );
+ COMBO_Engine->setEditable( FALSE );
+
+// BOX_EngineHelper = new QGroupBox( 1,
+// Qt::Horizontal,
+// i18n( "Computer Players' Helper" ),
+// BOX_Parent );
+// COMBO_EngineHelper = new KComboBox( BOX_Engine );
+// COMBO_EngineHelper->setEditable( FALSE );
+
+ buildEngineData();
+
+ connect( COMBO_Engine, SIGNAL( activated(int) ), this, SLOT( slotCurrent(int) ) );
+// connect( COMBO_EngineHelper, SIGNAL( activated(int) ), this, SLOT( slotCurrentHelper(int) ) );
+
+
+ GROUP_Strength = new QGroupBox( 3,
+ Qt::Horizontal,
+ i18n( "Player Strength" ),
+ BOX_Parent );
+ LABEL_Str_Min = new QLabel( i18n( "Weak" ), GROUP_Strength );
+ SLIDER_Strength = new QSlider ( 1,
+ 7,
+ 1,
+ Resource->Strength[ 1 * ( Army == BLACK ) ],
+ QSlider::Horizontal,
+ GROUP_Strength );
+ LABEL_Str_Max = new QLabel( i18n( "Strong" ), GROUP_Strength );
+ SLIDER_Strength->setTickmarks( QSlider::Below );
+ connect( SLIDER_Strength, SIGNAL( valueChanged(int) ), this, SLOT( slotStrength(int) ) );
+}
+dlg_selectengine::~dlg_selectengine()
+{
+}
+///////////////////////////////////////
+//
+// dlg_selectengine::buildEngineData
+//
+///////////////////////////////////////
+void dlg_selectengine::buildEngineData( void )
+{
+ bool FLAG1(FALSE);
+// bool FLAG2(FALSE);
+ int Index(0);
+ QStringList EngineList;
+ engineList::Iterator enginesIT;
+
+ /* Clear Comboboxes */
+ COMBO_Engine->clear();
+// COMBO_EngineHelper->clear();
+
+ /* Handle status of Book-engine boxes */
+// White_Use_Book->setChecked( Resource->OPTION_Book_White );
+// Engines_White_Book->setEnabled( Resource->OPTION_Book_White );
+
+ if( Army == WHITE )
+ {
+ Engine1F = ENGINE_WHITE;
+ Engine2F = ENGINE_WHITE_BK;
+ }
+ else
+ {
+ Engine1F = ENGINE_BLACK;
+ Engine2F = ENGINE_BLACK_BK;
+ }
+
+ /* Read the engine list */
+ if( Resource->engines.isEmpty() ) return;
+ for ( enginesIT = Resource->engines.begin(); enginesIT != Resource->engines.end(); ++enginesIT )
+ {
+ EngineList.append( (*enginesIT).Name );
+ }
+
+ /* Insert engines into comboboxes */
+ EngineList.sort();
+ COMBO_Engine->insertStringList( EngineList );
+// COMBO_EngineHelper->insertStringList( EngineList );
+
+ /* Now run the list again, setting the current engine for each combobox */
+ for ( enginesIT = Resource->engines.begin(); enginesIT != Resource->engines.end(); ++enginesIT )
+ {
+ if( (*enginesIT).CurrentRef & Engine1F )
+ for( Index = 0; Index < COMBO_Engine->count(); Index++ )
+ if( COMBO_Engine->text(Index) == (*enginesIT).Name )
+ {
+ COMBO_Engine->setCurrentItem(Index);
+ FLAG1 = TRUE;
+ }
+// if( (*enginesIT).CurrentRef & Engine2F )
+// for( Index = 0; Index < COMBO_Engine->count(); Index++ )
+// if( COMBO_EngineHelper->text(Index) == (*enginesIT).Name )
+// {
+// COMBO_EngineHelper->setCurrentItem(Index);
+// FLAG2 = TRUE;
+// }
+ }
+
+ /*
+ This prevents a bug where you had to modify the
+ current_engine_comboboxes before you could get any engines to run.
+ */
+ if( ( !FLAG1 ) && ( COMBO_Engine->count() ) ) slotCurrent( COMBO_Engine->currentItem() );
+// if( ( !FLAG2 ) && ( COMBO_EngineHelper->count() ) ) slotCurrentHelper( COMBO_EngineHelper->currentItem() );
+}
+///////////////////////////////////////
+//
+// dlg_selectengine::slotCurrent
+//
+///////////////////////////////////////
+void dlg_selectengine::slotCurrent( int Index )
+{
+ QString Name;
+ engineList::Iterator enginesIT;
+
+ Name = COMBO_Engine->text(Index);
+ for ( enginesIT = Resource->engines.begin(); enginesIT != Resource->engines.end(); ++enginesIT )
+ {
+ if( (*enginesIT).CurrentRef & Engine1F ) (*enginesIT).CurrentRef -= Engine1F;
+ if( (*enginesIT).Name == Name ) (*enginesIT).CurrentRef |= Engine1F;
+ }
+ emit valuesChanged();
+}
+///////////////////////////////////////
+//
+// dlg_selectengine::slotCurrentHelper
+//
+///////////////////////////////////////
+void dlg_selectengine::slotCurrentHelper( int Index )
+{
+ QString Name;
+ engineList::Iterator enginesIT;
+
+ Name = COMBO_EngineHelper->text(Index);
+ for ( enginesIT = Resource->engines.begin(); enginesIT != Resource->engines.end(); ++enginesIT )
+ {
+ if( (*enginesIT).CurrentRef & Engine2F ) (*enginesIT).CurrentRef -= Engine2F;
+ if( (*enginesIT).Name == Name ) (*enginesIT).CurrentRef |= Engine2F;
+ }
+ emit valuesChanged();
+}
+///////////////////////////////////////
+//
+// dlg_selectengine::strength
+//
+///////////////////////////////////////
+int dlg_selectengine::strength( void )
+{
+ return SLIDER_Strength->value();
+}
+///////////////////////////////////////
+//
+// dlg_selectengine::slotStrength
+//
+///////////////////////////////////////
+void dlg_selectengine::slotStrength( int value )
+{
+ Resource->Strength[Army] = value;
+ emit valuesChanged();
+}
diff --git a/knights/dlg_selectengine.h b/knights/dlg_selectengine.h
new file mode 100644
index 0000000..a9dffdb
--- /dev/null
+++ b/knights/dlg_selectengine.h
@@ -0,0 +1,72 @@
+/***************************************************************************
+ dlg_selectengine.h - description
+ -------------------
+ begin : Wed Aug 28 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef DLG_SELECTENGINE_H
+#define DLG_SELECTENGINE_H
+
+#include <qwidget.h>
+#include <kdialogbase.h>
+#include "definitions.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class QVBox;
+class QSlider;
+class QLabel;
+class KComboBox;
+class QGroupBox;
+class resource;
+
+class dlg_selectengine : public KDialogBase
+{
+ Q_OBJECT
+ public:
+ dlg_selectengine(QWidget *parent, resource *Rsrc, bool army );
+ ~dlg_selectengine();
+ int strength( void );
+ bool Army;
+
+ protected:
+ void buildEngineData( void );
+
+ protected slots:
+ void slotCurrent( int Index );
+ void slotCurrentHelper( int Index );
+ void slotStrength( int );
+
+ signals:
+ void valuesChanged( void );
+
+ private:
+ resource *Resource;
+ int Engine1F;
+ int Engine2F;
+
+ QVBox *BOX_Parent;
+ QGroupBox *BOX_Engine;
+ KComboBox *COMBO_Engine;
+ QGroupBox *BOX_EngineHelper;
+ KComboBox *COMBO_EngineHelper;
+ QGroupBox *GROUP_Strength;
+ QLabel *LABEL_Str_Min;
+ QSlider *SLIDER_Strength;
+ QLabel *LABEL_Str_Max;
+};
+
+#endif
diff --git a/knights/dlg_server.cpp b/knights/dlg_server.cpp
new file mode 100644
index 0000000..89073cb
--- /dev/null
+++ b/knights/dlg_server.cpp
@@ -0,0 +1,240 @@
+/***************************************************************************
+ dlg_server.cpp - description
+ -------------------
+ begin : Thu Aug 16 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <kicontheme.h>
+#include "dlg_server.moc"
+
+dlg_server::dlg_server(QWidget *parent, const char *name, resource *Rsrc, QString ItemName ) :
+ KDialogBase( parent,
+ name,
+ TRUE,
+ i18n("Configure Server"),
+ Help|Ok|Apply|Cancel,
+ Ok,
+ TRUE )
+{
+ Resource = Rsrc;
+ Name = ItemName;
+
+ BOX_Parent = makeVBoxMainWidget();
+
+ BOX_Name = new QGroupBox( 1,
+ Qt::Horizontal,
+ i18n( "Server Name" ),
+ BOX_Parent );
+ EDIT_Name = new KLineEdit( BOX_Name );
+
+ BOX_URLPort = new QHBox( BOX_Parent );
+ BOX_URL = new QGroupBox( 1,
+ Qt::Horizontal,
+ i18n( "Server URL" ),
+ BOX_URLPort );
+ EDIT_URL = new KLineEdit( BOX_URL );
+ BOX_Port = new QGroupBox( 1,
+ Qt::Horizontal,
+ i18n( "Server Port" ),
+ BOX_URLPort );
+ EDIT_Port = new KLineEdit( BOX_Port );
+
+ BOX_UNameStore = new QHBox( BOX_Parent );
+ BOX_UserName = new QGroupBox( 1,
+ Qt::Horizontal,
+ i18n( "Username" ),
+ BOX_UNameStore );
+ EDIT_UserName = new KLineEdit( BOX_UserName );
+ CHECK_StorePass = new QCheckBox( i18n( "Remember My Password" ), BOX_UNameStore );
+
+ BOX_Pass = new QHBox( BOX_Parent );
+ BOX_Password = new QGroupBox( 1,
+ Qt::Vertical,
+ i18n( "Password" ),
+ BOX_Pass );
+ EDIT_Password = new KLineEdit( BOX_Password );
+ EDIT_Password->setEchoMode( QLineEdit::Password );
+
+ BOX_PasswordRetype = new QGroupBox( 1,
+ Qt::Vertical,
+ i18n( "Confirm Password" ),
+ BOX_Pass );
+ EDIT_PasswordRetype = new KLineEdit( BOX_PasswordRetype );
+ EDIT_PasswordRetype->setEchoMode( QLineEdit::Password );
+
+ /* Use Timeseal? */
+ GROUP_Timeseal = new QGroupBox( 2,
+ Qt::Horizontal,
+ i18n( "Timeseal" ),
+ BOX_Parent );
+ EDIT_Timeseal = new KLineEdit( GROUP_Timeseal );
+ BUTTON_Timeseal = new QPushButton( GROUP_Timeseal );
+ BUTTON_Timeseal->setPixmap( Resource->LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) );
+ connect( BUTTON_Timeseal, SIGNAL( clicked() ), this, SLOT( slot_Timeseal() ) );
+
+ BOX_LogFile = new QGroupBox( 2,
+ Qt::Horizontal,
+ i18n( "Log File" ),
+ BOX_Parent );
+ EDIT_LogFile = new KLineEdit( BOX_LogFile );
+ BUTTON_LogFile = new QPushButton( BOX_LogFile );
+
+ setMainWidget( BOX_Parent );
+ BUTTON_LogFile->setPixmap( Resource->LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) );
+ EDIT_Name->setMinimumWidth( 120 );
+ EDIT_URL->setMinimumWidth( 120 );
+ EDIT_UserName->setMinimumWidth( 120 );
+ EDIT_Password->setMinimumWidth( 120 );
+ EDIT_PasswordRetype->setMinimumWidth( 120 );
+ /* Load in data if this is a modification */
+ if( !Name.isEmpty() )
+ {
+ for ( serversIT = Resource->servers.begin(); serversIT != Resource->servers.end(); ++serversIT )
+ {
+ if( (*serversIT).Name == Name ) break;
+ }
+ EDIT_Name->setText( (*serversIT).Name );
+ EDIT_URL->setText( (*serversIT).URL );
+ EDIT_Port->setText( QString("").setNum( (*serversIT).Port ) );
+ EDIT_UserName->setText( (*serversIT).UserName );
+ CHECK_StorePass->setChecked( (*serversIT).StorePass );
+ EDIT_Password->setText( (*serversIT).Password );
+ EDIT_PasswordRetype->setText( (*serversIT).Password );
+ EDIT_LogFile->setText( (*serversIT).LogFile );
+ EDIT_Timeseal->setText( (*serversIT).Timeseal );
+ }
+ if( CHECK_StorePass->isChecked() )
+ {
+ EDIT_Password->setEnabled( TRUE );
+ EDIT_PasswordRetype->setEnabled( TRUE );
+ }
+ else
+ {
+ EDIT_Password->setEnabled( FALSE );
+ EDIT_PasswordRetype->setEnabled( FALSE );
+ }
+ /* Init the buttons */
+ showButtonCancel( TRUE );
+ showButtonOK( TRUE );
+ showButtonApply( TRUE );
+ showButton( Help, TRUE );
+
+ enableButtonCancel( TRUE );
+ enableButtonOK( TRUE );
+ enableButtonApply( FALSE );
+ enableButton( Help, TRUE );
+
+ setHelp( QString( "configure-servers" ) );
+ /* Make Connections */
+ connect( BUTTON_LogFile, SIGNAL( clicked() ), this, SLOT( slotLogFileDialog() ) );
+ connect( CHECK_StorePass, SIGNAL( toggled(bool) ), this, SLOT( slotStorePass(bool) ) );
+ connect( EDIT_Name, SIGNAL( textChanged( const QString&) ), this, SLOT( slotEnableApply( const QString&) ) );
+ connect( EDIT_URL, SIGNAL( textChanged( const QString&) ), this, SLOT( slotEnableApply( const QString&) ) );
+ connect( EDIT_Port, SIGNAL( textChanged( const QString&) ), this, SLOT( slotEnableApply( const QString&) ) );
+ connect( EDIT_UserName, SIGNAL( textChanged( const QString&) ), this, SLOT( slotEnableApply( const QString&) ) );
+ connect( EDIT_Password, SIGNAL( textChanged( const QString&) ), this, SLOT( slotEnableApply( const QString&) ) );
+ connect( EDIT_Timeseal, SIGNAL( textChanged( const QString&) ), this, SLOT( slotEnableApply( const QString&) ) );
+ show();
+}
+dlg_server::~dlg_server()
+{
+}
+
+void dlg_server::slotOk( void )
+{
+ slotApply();
+ slotDelayedDestruct();
+}
+
+void dlg_server::slotApply( void )
+{
+ serverResource newServer;
+
+ if( ( EDIT_Password->text() != EDIT_PasswordRetype->text() ) && ( CHECK_StorePass->isChecked() ) )
+ {
+ return;
+ }
+ if( Name.isEmpty() )
+ {
+ serversIT = Resource->servers.append( newServer );
+ Name = "notemptyanymore";
+ (*serversIT).CurrentRef = 0;
+ }
+ (*serversIT).Name = EDIT_Name->text();
+ (*serversIT).URL = EDIT_URL->text();
+ (*serversIT).Port = QString( EDIT_Port->text() ).toInt();
+ (*serversIT).UserName = EDIT_UserName->text();
+ (*serversIT).Password = EDIT_Password->text();
+ (*serversIT).LogFile = EDIT_LogFile->text();
+ (*serversIT).StorePass = CHECK_StorePass->isChecked();
+ (*serversIT).Timeseal = EDIT_Timeseal->text();
+
+ enableButtonApply( FALSE );
+}
+
+void dlg_server::slotCancel( void )
+{
+ slotDelayedDestruct();
+}
+
+void dlg_server::slotLogFileDialog( void )
+{
+ QString temp;
+
+ temp = KFileDialog::getOpenFileName( QString::null,
+ QString( "*" ),
+ this,
+ QString( "Find Log..." ) );
+ if( temp.isEmpty() ) return;
+ EDIT_LogFile->setText( temp );
+ enableButtonApply( TRUE );
+}
+
+void dlg_server::slotEnableApply( const QString& )
+{
+ enableButtonApply( TRUE );
+}
+
+void dlg_server::slotStorePass( bool )
+{
+ if( CHECK_StorePass->isChecked() )
+ {
+ EDIT_Password->setEnabled( TRUE );
+ EDIT_PasswordRetype->setEnabled( TRUE );
+ }
+ else
+ {
+ EDIT_Password->setEnabled( FALSE );
+ EDIT_PasswordRetype->setEnabled( FALSE );
+ }
+ enableButtonApply( TRUE );
+}
+///////////////////////////////////////
+//
+// dlg_server::slot_Timeseal
+//
+///////////////////////////////////////
+void dlg_server::slot_Timeseal( void )
+{
+ QString temp;
+
+ temp = KFileDialog::getOpenFileName( QString::null,
+ QString( "*" ),
+ 0,
+ QString( "Find Timeseal..." ) );
+ if( temp.isEmpty() ) return;
+ EDIT_Timeseal->setText( temp );
+ enableButtonApply( TRUE );
+}
+
diff --git a/knights/dlg_server.h b/knights/dlg_server.h
new file mode 100644
index 0000000..5d9c316
--- /dev/null
+++ b/knights/dlg_server.h
@@ -0,0 +1,92 @@
+/***************************************************************************
+ dlg_server.h - description
+ -------------------
+ begin : Thu Aug 16 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef DLG_SERVER_H
+#define DLG_SERVER_H
+
+#include <kdialogbase.h>
+#include <klineedit.h>
+#include <kcombobox.h>
+#include <kfiledialog.h>
+#include <qgroupbox.h>
+#include <qpushbutton.h>
+#include <qvbox.h>
+#include <qhbox.h>
+#include <qcheckbox.h>
+#include <qstring.h>
+#include "definitions.h"
+#include "resource.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class dlg_server : public KDialogBase
+{
+ Q_OBJECT
+ public:
+ dlg_server(QWidget *parent=0, const char *name=0, resource *Rsrc=0, QString ItemName="" );
+ ~dlg_server();
+
+ public slots:
+ void slotOk( void );
+ void slotApply( void );
+ void slotCancel( void );
+ void slotLogFileDialog( void );
+ void slotEnableApply( const QString& );
+ void slotStorePass( bool state );
+ void slot_Timeseal( void );
+
+ private:
+ serverList::Iterator serversIT;
+ resource *Resource;
+ QString Name;
+
+ QVBox *BOX_Parent;
+ QHBox *BOX_URLPort;
+ QHBox *BOX_UNameStore;
+ QHBox *BOX_Pass;
+
+ QGroupBox *BOX_Name;
+ KLineEdit *EDIT_Name;
+
+ QGroupBox *BOX_URL;
+ KLineEdit *EDIT_URL;
+
+ QGroupBox *BOX_Port;
+ KLineEdit *EDIT_Port;
+
+ QGroupBox *BOX_UserName;
+ KLineEdit *EDIT_UserName;
+ QCheckBox *CHECK_StorePass;
+
+ QGroupBox *BOX_Password;
+ KLineEdit *EDIT_Password;
+
+ QGroupBox *BOX_PasswordRetype;
+ KLineEdit *EDIT_PasswordRetype;
+
+ QGroupBox *GROUP_Timeseal;
+ KLineEdit *EDIT_Timeseal;
+ QPushButton *BUTTON_Timeseal;
+
+ QGroupBox *BOX_LogFile;
+ KLineEdit *EDIT_LogFile;
+ QPushButton *BUTTON_LogFile;
+};
+
+#endif
diff --git a/knights/dlg_settings.cpp b/knights/dlg_settings.cpp
new file mode 100644
index 0000000..82fa117
--- /dev/null
+++ b/knights/dlg_settings.cpp
@@ -0,0 +1,201 @@
+/***************************************************************************
+ dlg_settings.cpp - description
+ -------------------
+ begin : Mon Jul 16 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <kicontheme.h>
+#include <kstddirs.h>
+#include "definitions.h"
+#include "dlg_settings.moc"
+#include "setpagedisplay.h"
+#include "setpageaudio.h"
+#include "setpageengines.h"
+#include "setpageservers.h"
+#include "setpagegeneral.h"
+
+///////////////////////////////////////
+//
+// dlg_settings::Constructor
+//
+///////////////////////////////////////
+dlg_settings::dlg_settings(QWidget *parent, const char *name, resource *Rsrc ) :
+ KDialogBase( IconList,
+ i18n("Configure"),
+ Help|Ok|Apply|Cancel,
+ Ok,
+ parent,
+ name,
+ FALSE,
+ FALSE )
+{
+ QString buffer;
+ Resource = Rsrc;
+ Resource->ConfigWrite();
+
+ /* General Page */
+ FRAME_General = addPage( i18n( "General" ),
+ i18n( "Various aspects of Knights get configured here." ),
+ QPixmap( locate( "data", "knights/icon-general.png" ) ) );
+ PAGE_General = new setPageGeneral( FRAME_General, Resource );
+ connect( PAGE_General, SIGNAL( enableApply() ), this, SLOT( slotEnableApply() ) );
+
+ /* Display Page */
+ FRAME_Display = addPage( i18n( "Display" ),
+ i18n( "These settings determine how Knights displays itself to you." ),
+ QPixmap( locate( "data", "knights/icon-display.png" ) ) );
+ PAGE_Display = new setPageDisplay( FRAME_Display, Resource );
+ connect( PAGE_Display, SIGNAL( enableApply() ), this, SLOT( slotEnableApply() ) );
+
+ /* Audio Page */
+ FRAME_Audio = addPage( i18n( "Audio" ),
+ i18n( "These settings determine what Knights sounds like." ),
+ Resource->LoadIcon( QString("multimedia"), KIcon::Panel ) );
+ PAGE_Audio = new setPageAudio( FRAME_Audio, Resource );
+ connect( PAGE_Audio, SIGNAL( enableApply() ), this, SLOT( slotEnableApply() ) );
+
+ /* Engines Page */
+ FRAME_Engines = addPage( i18n( "Computer Opponents" ),
+ i18n( "Configure your chess engines here." ),
+ Resource->LoadIcon( QString("gear"), KIcon::Panel ) );
+ PAGE_Engines = new setPageEngines( FRAME_Engines, Resource );
+ connect( PAGE_Engines, SIGNAL( enableApply() ), this, SLOT( slotEnableApply() ) );
+
+ /* Servers Page */
+ FRAME_Servers = addPage( i18n( "Chess Servers" ),
+ i18n( "Configure your internet chess servers here." ),
+ Resource->LoadIcon( QString("network"), KIcon::Panel ) );
+ PAGE_Servers = new setPageServers( FRAME_Servers, Resource );
+ connect( PAGE_Servers, SIGNAL( enableApply() ), this, SLOT( slotEnableApply() ) );
+
+ connect( this, SIGNAL( aboutToShowPage( QWidget* ) ), this, SLOT( slotPageChanging( QWidget* ) ) );
+
+ /* Init the buttons */
+ showButtonCancel( TRUE );
+ showButtonOK( TRUE );
+ showButtonApply( TRUE );
+ showButton( Help, TRUE );
+
+ enableButtonCancel( TRUE );
+ enableButtonOK( TRUE );
+ enableButtonApply( FALSE );
+ enableButton( Help, TRUE );
+
+ setHelp( QString( "configure" ) );
+ show();
+}
+///////////////////////////////////////
+//
+// dlg_settings::Destructor
+//
+///////////////////////////////////////
+dlg_settings::~dlg_settings()
+{
+}
+///////////////////////////////////////
+//
+// dlg_settings::slotOk
+//
+///////////////////////////////////////
+void dlg_settings::slotOk( void )
+{
+ slotApply();
+ slotDelayedDestruct();
+}
+///////////////////////////////////////
+//
+// dlg_settings::slotApply
+//
+///////////////////////////////////////
+void dlg_settings::slotApply( void )
+{
+ if( PAGE_Display->changeTheme )
+ {
+ PAGE_Display->changeTheme = FALSE;
+ emit themeChanged( PAGE_Display->NewBoards, PAGE_Display->NewChessmen );
+ }
+ if( PAGE_Display->refreshBoard )
+ {
+ PAGE_Display->refreshBoard = FALSE;
+ emit redrawBoard();
+ }
+ if( PAGE_Display->rebuildConsole )
+ {
+ Resource->buildStyle();
+ PAGE_Display->rebuildConsole = FALSE;
+ emit rebuildConsole();
+ }
+ if( PAGE_Audio->changeTheme )
+ {
+ PAGE_Audio->changeTheme = FALSE;
+ Resource->setAudio( PAGE_Audio->NewSounds );
+ }
+ if( PAGE_Servers->resetServer )
+ {
+ PAGE_Servers->resetServer = FALSE;
+ emit resetServer();
+ }
+ Resource->ConfigWrite();
+ enableButtonApply( FALSE );
+}
+///////////////////////////////////////
+//
+// dlg_settings::slotCancel
+//
+///////////////////////////////////////
+void dlg_settings::slotCancel( void )
+{
+ Resource->ConfigRead();
+ slotDelayedDestruct();
+}
+///////////////////////////////////////
+//
+// dlg_settings::slotEnableApply
+//
+///////////////////////////////////////
+void dlg_settings::slotEnableApply( void )
+{
+ enableButtonApply( TRUE );
+}
+///////////////////////////////////////
+//
+// dlg_settings::slotThemesAdded
+//
+///////////////////////////////////////
+void dlg_settings::slotThemesAdded( void )
+{
+ PAGE_Display->buildThemeList();
+ PAGE_Audio->buildThemeList();
+}
+///////////////////////////////////////
+//
+// dlg_settings::slotPageChanging
+//
+///////////////////////////////////////
+void dlg_settings::slotPageChanging( QWidget *page )
+{
+ if( page == FRAME_General )
+ setHelp( QString( "configure-general" ) );
+ else if( page == FRAME_Display )
+ setHelp( QString( "configure-display" ) );
+ else if( page == FRAME_Audio )
+ setHelp( QString( "configure-audio" ) );
+ else if( page == FRAME_Engines )
+ setHelp( QString( "configure-engines" ) );
+ else if( page == FRAME_Servers )
+ setHelp( QString( "configure-servers" ) );
+}
+
+
+
diff --git a/knights/dlg_settings.h b/knights/dlg_settings.h
new file mode 100644
index 0000000..997db07
--- /dev/null
+++ b/knights/dlg_settings.h
@@ -0,0 +1,80 @@
+/***************************************************************************
+ dlg_settings.h - description
+ -------------------
+ begin : Mon Jul 16 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef DLG_SETTINGS_H
+#define DLG_SETTINGS_H
+
+#include <klocale.h>
+#include <kdialogbase.h>
+#include <qwidget.h>
+#include <qlayout.h>
+#include <qgroupbox.h>
+#include <qvbox.h>
+#include "definitions.h"
+#include "resource.h"
+
+class setPageDisplay;
+class setPageAudio;
+class setPageEngines;
+class setPageServers;
+class setPageGeneral;
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class dlg_settings : public KDialogBase
+{
+ Q_OBJECT
+ public:
+ dlg_settings(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ ~dlg_settings();
+
+ public slots:
+ void slotOk( void );
+ void slotApply( void );
+ void slotCancel( void );
+ void slotEnableApply( void );
+ void slotThemesAdded( void );
+ void slotPageChanging( QWidget* );
+
+ signals:
+ void themeChanged( int, int );
+ void redrawBoard( void );
+ void rebuildConsole( void );
+ void resetServer( void );
+
+ private:
+ resource *Resource;
+
+ QFrame *FRAME_General;
+ setPageGeneral *PAGE_General;
+
+ QFrame *FRAME_Display;
+ setPageDisplay *PAGE_Display;
+
+ QFrame *FRAME_Audio;
+ setPageAudio *PAGE_Audio;
+
+ QFrame *FRAME_Engines;
+ setPageEngines *PAGE_Engines;
+
+ QFrame *FRAME_Servers;
+ setPageServers *PAGE_Servers;
+};
+
+#endif
diff --git a/knights/idmanager.cpp b/knights/idmanager.cpp
new file mode 100644
index 0000000..dd979c3
--- /dev/null
+++ b/knights/idmanager.cpp
@@ -0,0 +1,37 @@
+/***************************************************************************
+ idmanager.cpp - description
+ -------------------
+ begin : Wed Jun 26 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "idmanager.h"
+
+IDManager::IDManager()
+{
+ counter = 0;
+}
+
+
+IDManager::~IDManager()
+{
+ counter = 0;
+}
+
+unsigned int IDManager::getNewID()
+{
+ counter++;
+ return counter;
+ /* this might be a problem if there are more than MAX
+ unsigned int matches going on at the same time */
+}
diff --git a/knights/idmanager.h b/knights/idmanager.h
new file mode 100644
index 0000000..04be2c1
--- /dev/null
+++ b/knights/idmanager.h
@@ -0,0 +1,42 @@
+/***************************************************************************
+ idmanager.h - description
+ -------------------
+ begin : Wed Jun 26 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef IDMANAGER_H
+#define IDMANAGER_H
+
+#include <qobject.h>
+
+/**
+ *@author Alexander Wels
+ */
+
+/////////////////////////////////////////////////////
+// This class generates and manages ID's for matches
+// The ID's generated are unsigned integers
+/////////////////////////////////////////////////////
+
+class IDManager : public QObject
+{
+public:
+ IDManager();
+ ~IDManager();
+ unsigned int getNewID();
+private:
+ unsigned int counter;
+};
+
+#endif
diff --git a/knights/io_base.cpp b/knights/io_base.cpp
new file mode 100644
index 0000000..db62330
--- /dev/null
+++ b/knights/io_base.cpp
@@ -0,0 +1,57 @@
+/***************************************************************************
+ io_base.cpp - description
+ -------------------
+ begin : Tue Jun 18 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "io_base.moc"
+
+io_base::io_base(resource *resc)
+{
+ this->myResource = resc;
+}
+
+io_base::io_base(resource *resc, int ID)
+{
+ this->myResource = resc;
+ this->myID = ID;
+}
+
+io_base::io_base(QWidget* parent, resource *rsrc)
+{
+ this->myParent = parent;
+ this->myResource = rsrc;
+}
+
+io_base::~io_base()
+{
+
+}
+
+void io_base::setID(const int ID)
+{
+ this->myID = ID;
+}
+
+int io_base::getID()
+{
+ return myID;
+}
+
+int io_base::getType()
+{
+ return myType;
+}
+
+
diff --git a/knights/io_base.h b/knights/io_base.h
new file mode 100644
index 0000000..7feeff0
--- /dev/null
+++ b/knights/io_base.h
@@ -0,0 +1,68 @@
+/***************************************************************************
+ io_base.h - description
+ -------------------
+ begin : Tue Jun 18 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef IO_BASE_H
+#define IO_BASE_H
+
+
+#include "definitions.h"
+#include "resource.h"
+#include "command.h"
+#include "match_param.h"
+
+#include <qobject.h>
+#include <qwidget.h>
+/**
+ *@author Alexander Wels.
+ */
+
+class io_base : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ enum ioType
+ {
+ INTERNET = 0,
+ LOCAL = 1
+ };
+
+ io_base(QWidget *parent=NULL, resource *rsrc=NULL);
+ io_base(resource *rsrc);
+ io_base(resource *rsrc, int ID);
+ virtual ~io_base();
+ int getID( void );
+ void setID( const int ID );
+ int getType( void );
+
+public slots:
+ virtual void recvCMD(const Command& command) = 0; // sub classes have to implement this
+
+signals:
+ virtual void sendCMD(const Command& command) = 0; // sub classes have to implement this
+
+
+protected:
+ // The knightio object needs to know its ID
+ QWidget *myParent;
+ int myID;
+ resource *myResource;
+ ioType myType;
+};
+
+#endif
diff --git a/knights/io_engine.cpp b/knights/io_engine.cpp
new file mode 100644
index 0000000..d9a15a7
--- /dev/null
+++ b/knights/io_engine.cpp
@@ -0,0 +1,312 @@
+/***************************************************************************
+ io_engine.cpp - description
+ -------------------
+ begin : Sat Jun 30 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <kprocess.h>
+#include <kicontheme.h>
+
+#include <qregexp.h>
+#include <qfile.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "io_engine.moc"
+#include "definitions.h"
+#include "proto_base.h"
+#include "proto_xboard.h"
+#include "proto_uci.h"
+
+io_engine::io_engine( QWidget *parent, resource *Rsrc ) : io_base( parent, Rsrc )
+{
+ myType = io_base::LOCAL;
+ engine = NULL;
+ Log = NULL;
+ proto = NULL;
+ SafeToSend = TRUE;
+ CleanBuffer = TRUE;
+ SendSIGINT = FALSE;
+ Forced = TRUE;
+ Protocol = XBoard;
+ FIFO_In = "";
+ FIFO_Out = "";
+}
+//
+io_engine::~io_engine()
+{
+ if( engine )
+ {
+ Kill();
+ }
+ if( Log )
+ {
+ Log->close();
+ delete Log;
+ }
+ if( proto )
+ {
+ delete proto;
+ }
+}
+///////////////////////////////////////
+//
+// io_engine::Start
+//
+///////////////////////////////////////
+void io_engine::Start( const int side )
+{
+ QStringList args;
+ unsigned int tmp;
+ int ID;
+ bool Army;
+
+ /* Stop accidents */
+ if( engine != NULL )
+ return;
+ engine = new KProcess();
+
+ /* Convert 'side' to 'ID' */
+ if( side == WHITE )
+ {
+ ID = ENGINE_WHITE;
+ Army = WHITE;
+ }
+ else if( side == BLACK )
+ {
+ ID = ENGINE_BLACK;
+ Army = BLACK;
+ }
+ else if( side == WHITE_HELPER )
+ {
+ ID = ENGINE_WHITE_BK;
+ Army = WHITE;
+ }
+ else
+ {
+ ID = ENGINE_BLACK_BK;
+ Army = BLACK;
+ }
+
+ /* Get and parse engine config from resource */
+ for( IT = myResource->engines.begin(); IT != myResource->engines.end(); ++IT )
+ {
+ if( (*IT).CurrentRef & ID )
+ break;
+ }
+ if( IT == myResource->engines.end() )
+ {
+ kdError() << "io_engine::Start: Can not find engine resource ID " << ID << endl;
+ return;
+ }
+
+ /* ...protocol */
+ Protocol = (*IT).Protocol;
+ switch( Protocol )
+ {
+ case UCI:
+ proto = new proto_uci( myID );
+ break;
+ case XBoard:
+ default:
+ proto = new proto_xboard( myID );
+ break;
+ }
+ connect( proto, SIGNAL( output( const QString& ) ), this, SLOT( WriteFIFO( const QString& ) ) );
+ connect( proto, SIGNAL( output( const Command& ) ), this, SLOT( recvProtoCMD( const Command& ) ) );
+
+ /* ...engine's display name */
+ proto->parse( Command( myID, CMD_Set_Name, (*IT).Name ) );
+
+ /* ...engine file name */
+ (*engine) << (*IT).Filename;
+
+ /* ...command line arguments */
+ args = QStringList::split( QString(" "), (*IT).Arguments, FALSE );
+ for( tmp = 0; tmp < args.count(); tmp++ )
+ {
+ (*engine) << args[tmp];
+ }
+
+ /* ...log file */
+ if( !(*IT).LogFile.isEmpty() )
+ {
+ Log = new QFile( (*IT).LogFile );
+ if( !Log->open( IO_WriteOnly | IO_Append ) )
+ if( !Log->open( IO_WriteOnly ) )
+ kdError() << "io_engine::Start: Can not open " << (*IT).LogFile << " for writing." << endl;
+ }
+
+ /* Showtime */
+ if( !engine->start( KProcess::NotifyOnExit, KProcess::All ) )
+ {
+ kdError() << "io_engine::Start: Can not run the engine: " << (*IT).Filename << endl;
+ return;
+ }
+ connect( engine, SIGNAL( wroteStdin( KProcess* ) ), this, SLOT( SendClear( KProcess* ) ) );
+ connect( engine, SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, SLOT( Recv( KProcess*, char*, int ) ) );
+ connect( engine, SIGNAL( receivedStderr( KProcess*, char*, int ) ), this, SLOT( Recv( KProcess*, char*, int ) ) );
+
+ proto->parse( Command( myID, CMD_Init ) );
+
+ if( myResource->OPTION_Ponder )
+ proto->parse( Command( myID, CMD_Ponder ) );
+ else
+ proto->parse( Command( myID, CMD_No_Pondering ) );
+
+ proto->parse( Command( myID, CMD_NewGame ) );
+
+ if( Army == WHITE )
+ proto->parse( Command( myID, CMD_Play_White ) );
+ else
+ proto->parse( Command( myID, CMD_Play_Black ) );
+ return;
+}
+///////////////////////////////////////
+//
+// io_engine::Kill
+//
+///////////////////////////////////////
+void io_engine::Kill( void )
+{
+ proto->parse( Command( myID, CMD_Exit ) );
+ if( engine != NULL )
+ delete engine;
+}
+///////////////////////////////////////
+//
+// io_engine::sendToChild
+//
+///////////////////////////////////////
+void io_engine::sendToChild( void )
+{
+ if( !SafeToSend || FIFO_Out.isEmpty() || !engine->isRunning() )
+ return;
+
+ /* Interrupt those engines that want or need it */
+ if( SendSIGINT )
+ {
+ engine->kill( SIGINT );
+ SendSIGINT = FALSE;
+ }
+
+ /* Write it */
+ SafeToSend = FALSE;
+ if( engine->writeStdin( FIFO_Out.latin1(), FIFO_Out.length() ) )
+ {
+ /* Print the output to the log file */
+ if( Log )
+ {
+ FIFO_Out.prepend( "<- " );
+ Log->writeBlock( FIFO_Out.latin1(), FIFO_Out.length() );
+ }
+ FIFO_Out = "";
+ }
+ else
+ kdError() << "io_engine::sendToChild: Could not write to engine." << endl;
+}
+///////////////////////////////////////
+//
+// io_engine::Recv
+//
+///////////////////////////////////////
+void io_engine::Recv( KProcess*, char *buffer, int bufLen )
+{
+ char *newBuff = new char[bufLen + 1];
+ strncpy( newBuff, buffer, bufLen );
+ newBuff[bufLen] = 0;
+ FIFO_In += newBuff;
+ delete newBuff;
+
+ if( FIFO_In.contains( QChar('\n') ) )
+ {
+ QString proc = FIFO_In.left( FIFO_In.findRev( QChar('\n') ) );
+ FIFO_In = FIFO_In.right( FIFO_In.length() - proc.length() );
+
+ /* Split and Parse Full Lines of Input */
+ QStringList strList = QStringList::split( "\n", proc );
+ for( unsigned int loop = 0; loop < strList.count(); loop++ )
+ {
+ /* Print the input to the log file */
+ if( Log )
+ {
+ QString data = "-> " + strList[loop] + "\n";
+ Log->writeBlock( data.latin1(), data.length() );
+ }
+ proto->parse( strList[loop] );
+ }
+ }
+ return;
+}
+///////////////////////////////////////
+//
+// io_engine::WriteFIFO
+//
+///////////////////////////////////////
+void io_engine::WriteFIFO( const QString &Data )
+{
+ QString data = Data;
+ if( data.isEmpty() )
+ return;
+ if( data.right(1) != "\n" )
+ data += "\n";
+ FIFO_Out += data;
+ sendToChild();
+ return;
+}
+///////////////////////////////////////
+//
+// io_engine::recvCMD
+//
+///////////////////////////////////////
+void io_engine::recvCMD( const Command &command )
+{
+ proto->parse( command );
+}
+
+///////////////////////////////////////
+//
+// io_engine::recvProtoCMD
+//
+///////////////////////////////////////
+void io_engine::recvProtoCMD( const Command &command )
+{
+ Command cmd = command;
+
+ switch( cmd.getCommand() )
+ {
+ /* Command: Send_SIGTERM */
+ case CMD_Send_SIGTERM:
+ engine->kill();
+ break;
+ /* Command: Send_SIGINT */
+ case CMD_Send_SIGINT:
+ SendSIGINT = TRUE;
+ break;
+ /* Command to Core */
+ default:
+ emit sendCMD( command );
+ break;
+ }
+}
+
+void io_engine::SendClear( KProcess* )
+{
+ SafeToSend = TRUE;
+ if( !FIFO_Out.isEmpty() )
+ sendToChild();
+}
+
diff --git a/knights/io_engine.h b/knights/io_engine.h
new file mode 100644
index 0000000..3952d60
--- /dev/null
+++ b/knights/io_engine.h
@@ -0,0 +1,81 @@
+/***************************************************************************
+ io_engine.h - description
+ -------------------
+ begin : Sat Jun 30 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef IO_ENGINE_H
+#define IO_ENGINE_H
+
+#include <qstring.h>
+#include <qvaluelist.h>
+#include "io_base.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class QFile;
+class KProcess;
+class resource;
+class proto_base;
+
+class io_engine : public io_base
+{
+ Q_OBJECT
+ public:
+ io_engine( QWidget *parent=NULL, resource *Rsrc=0 );
+ ~io_engine();
+
+ void Start( const int side );
+
+ public slots:
+ virtual void recvCMD( const Command& command );
+ void recvProtoCMD( const Command& command );
+ void SendClear( KProcess* );
+ void Recv( KProcess*, char*, int );
+
+ signals:
+ virtual void sendCMD(const Command& command);
+
+ protected slots:
+ void sendToChild( void );
+ void WriteFIFO( const QString &Data );
+
+ protected:
+ void Kill( void );
+
+ private:
+
+ engineList::Iterator IT;
+ proto_base *proto;
+
+ /* States */
+ bool SafeToSend;
+ bool SendSIGINT;
+ bool CleanBuffer;
+ bool Forced;
+
+ /* References */
+ QFile *Log;
+ int Protocol;
+ ChessMove Move;
+
+ /* Data */
+ KProcess *engine;
+ QString FIFO_In;
+ QString FIFO_Out;
+};
+
+#endif
diff --git a/knights/io_internet.cpp b/knights/io_internet.cpp
new file mode 100644
index 0000000..e5325cd
--- /dev/null
+++ b/knights/io_internet.cpp
@@ -0,0 +1,1138 @@
+/***************************************************************************
+ io_internet.cpp - description
+ -------------------
+ begin : Thu Aug 16 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+/* KDE */
+#include <ksock.h>
+#include <kprocess.h>
+#include <kmessagebox.h>
+
+/* Qt */
+#include <qobject.h>
+#include <qwidget.h>
+#include <qregexp.h>
+#include <qdns.h>
+#include <qsocket.h>
+#include <qptrlist.h>
+
+/* Local */
+#include "io_internet.moc"
+#include "resource.h"
+#include "dlg_login.h"
+#include "dlg_challenge.h"
+#include "match.h"
+#include "core.h"
+#include "audio.h"
+#include "../config.h"
+
+static const int TXT_Std = 0;
+static const int TXT_Pvt = 1;
+static const int TXT_Ch = 2;
+static const int TXT_Sht = 3;
+static const int TXT_Wsp = 4;
+static const int TXT_Not = 5;
+
+io_internet::io_internet( QWidget *parent, resource *rsrc )
+{
+ myResource = rsrc;
+ challenge = NULL;
+ myTimeseal = NULL;
+ socket = NULL;
+ loginStage = LOGIN_STAGE_NAME;
+ lineBuffer = "";
+ Log = NULL;
+
+ /* set type */
+ this->myType = io_base::INTERNET;
+
+ /* initialize various variables */
+ this->waiting_for_move_list = false;
+ this->myParent = parent;
+ connected = false; /* we are not connected to a server */
+
+ /* create the login dialog and show it to the user */
+ loginDlg = new dlg_login( myParent, "LoginDialog", myResource);
+ connect(loginDlg, SIGNAL( okClicked() ), this, SLOT( connectToServer() ) );
+ connect(loginDlg, SIGNAL( cancelClicked() ), this, SLOT( selfDestruct() ) );
+ connect(loginDlg, SIGNAL( login(QString, QString) ), this, SLOT( setUserInfo(QString, QString) ) );
+}
+
+///////////////////////////////////////////////////////////
+// Destructor
+///////////////////////////////////////////////////////////
+io_internet::~io_internet()
+{
+ TabMap::Iterator i;
+
+ /* Close and remove socket */
+ if( socket != NULL )
+ {
+ if(socket->socket() != -1)
+ {
+ send("quit");
+ }
+ delete socket;
+ }
+ /* Close and remove logfile */
+ if( Log )
+ {
+ Log->close();
+ delete Log;
+ Log = NULL;
+ }
+ /* Remove Timeseal */
+ if( myTimeseal != NULL )
+ {
+ myTimeseal->kill();
+ delete myTimeseal;
+ }
+ /* Close and remove Tabs */
+
+ for(i = myTabList.begin(); i != myTabList.end(); i++)
+ {
+ if(myResource->tabManager->isTab(*i))
+ {
+ myResource->tabManager->removeTab(*i);
+ }
+ }
+}
+
+void io_internet::connectToServer()
+{
+ serverList::iterator i;
+ QWidget *tempTab;
+ QWidget *consoleTab;
+ QValueList<Command>::iterator j;
+
+ qApp->mainWidget()->setCursor( myResource->CURSOR_Thinking );
+ /* Get and parse server config from resource */
+ myServer = NULL;
+ for( i = myResource->servers.begin(); i != myResource->servers.end(); i++ )
+ {
+ if( (*i).CurrentRef )
+ {
+ myServer = &(*i);
+ }
+ }
+ if(myServer == NULL)
+ {
+ /* No server configured. Notify User and die gracefully */
+ qApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
+ kdError() << "internetio::internetio: Can not find server resource CurrentRef " << endl;
+ KMessageBox::sorry( (QWidget*)myParent, i18n( "There are no servers configured.\nPlease make sure you have at least one server configured." ), i18n( "Cannot find a server."));
+ QApplication::postEvent( qApp->mainWidget(), new QCustomEvent( EVENT_Del_IO_Net ) );
+ return;
+ }
+
+ if(myServer->Port == 0)
+ {
+ myServer->Port = 5000;
+ }
+
+ if(!myServer->Timeseal.isEmpty())
+ {
+ myTimeseal = new KProcess();
+ (*myTimeseal) << myServer->Timeseal << myServer->URL << QString().setNum( myServer->Port )
+ << QString( "-p" ) << QString().setNum(myServer->Port + 1);
+ if(!myTimeseal->start())
+ {
+ /* Couldn't start Timeseal. Notify User and die gracefully */
+ qApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
+ KMessageBox::sorry( (QWidget*)myParent, i18n( "Knights can not start Timeseal.\nPlease make sure you have the correct path and filename configured." ), i18n( "Cannot find Timeseal."));
+ QApplication::postEvent( qApp->mainWidget(), new QCustomEvent( EVENT_Del_IO_Net ) );
+ return;
+ }
+ socket = new KSocket("127.0.0.1", myServer->Port + 1, 30);
+ if(socket->socket() == -1)
+ {
+ /* try again on a different port, somehow the port hasn't been freed yet */
+ delete socket;
+ myTimeseal->kill();
+
+ myTimeseal = new KProcess();
+ (*myTimeseal) << myServer->Timeseal << myServer->URL << QString().setNum( myServer->Port )
+ << QString( "-p" ) << QString().setNum(myServer->Port + 2);
+ if(!myTimeseal->start())
+ {
+ /* Couldn't start Timeseal. Notify User and die gracefully */
+ qApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
+ KMessageBox::sorry( (QWidget*)myParent, i18n( "Knights can not start Timeseal.\nPlease make sure you have the correct path and filename configured." ), i18n( "Cannot find Timeseal."));
+ QApplication::postEvent( qApp->mainWidget(), new QCustomEvent( EVENT_Del_IO_Net ) );
+ return;
+ }
+ socket = new KSocket("127.0.0.1", myServer->Port + 2, 30);
+ if(socket->socket() == -1)
+ {
+ /* if we can't do it the second time, give up */
+ /* Couldn't connect to server through Timeseal. Notify User and die gracefully */
+ qApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
+ KMessageBox::sorry( (QWidget*)myParent, i18n( "Knights is unable to connect to the server.\n Please make sure your internet connection is working and try again."), i18n( "Cannot connect to server(timeseal)."));
+ QApplication::postEvent( qApp->mainWidget(), new QCustomEvent( EVENT_Del_IO_Net ) );
+ return;
+ }
+ }
+ }
+ else
+ {
+ socket = new KSocket(myServer->URL, myServer->Port, 30);
+ if(socket->socket() == -1)
+ {
+ /* Couldn't connect to server. Notify User and die gracefully */
+ qApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
+ KMessageBox::sorry( (QWidget*)myParent, i18n( "Knights is unable to connect to the server.\n Please make sure your internet connection is working and try again."), i18n( "Cannot connect to server."));
+ QApplication::postEvent( qApp->mainWidget(), new QCustomEvent( EVENT_Del_IO_Net ) );
+ return;
+ }
+ }
+ socket->enableRead(true);
+ socket->enableWrite(true);
+
+ /* connect a signal to readReady */
+ connect(socket, SIGNAL(readEvent(KSocket *)), this, SLOT(readCommand(KSocket *)));
+
+ /* setup the seekTimer and turn it off by default */
+ seekTimer = new QTimer(this);
+ connect(seekTimer, SIGNAL(timeout()), this, SLOT(processSeekTimer()));
+
+ /* succesfully connected to the server, turn connected on and flush the command buffer */
+ connected = true;
+ for(j = myCommandBuffer.begin(); j != myCommandBuffer.end(); j++)
+ {
+ recvCMD(*j);
+ }
+
+ /*
+ Create ICS Related Tabs
+
+ These will need to be moved into thier own functions because we want to be able to open
+ and close these tabs at will, or have multiple open at once. ALL communication to our tabs
+ needs to be done with SIGNALS & SLOTS to facilitate this.
+ */
+ consoleTab = new Console( 0, myServer->Name, myResource );
+ myTabList[consoleTab] = consoleTab;
+ myResource->tabManager->addTab( myTabList[consoleTab], i18n( "%1 Console" ).arg( myServer->Name ) );
+ connect( myTabList[consoleTab], SIGNAL( sendCMD( const Command& ) ), this, SLOT( recvCMD( const Command& ) ) );
+ connect( this, SIGNAL( sendCMD( const Command& ) ), myTabList[consoleTab], SLOT( recvCMD( const Command& ) ) );
+
+ tempTab = new tab_SeekList( 0, "seekList", myResource );
+ myTabList[tempTab] = tempTab;
+ myResource->tabManager->addTab( myTabList[tempTab], i18n( "Sought Matches List" ) );
+ connect( myTabList[tempTab], SIGNAL( sendCMD( const Command& ) ), this, SLOT( recvCMD( const Command& ) ) );
+ connect( this, SIGNAL( sendCMD( const Command& ) ), myTabList[tempTab], SLOT( recvCMD( const Command& ) ) );
+
+ tempTab = new Challenge_Graph( 0, "seekGraph", myResource );
+ myTabList[tempTab] = tempTab;
+ myResource->tabManager->addTab( myTabList[tempTab], i18n( "Sought Matches Graph" ) );
+ connect( myTabList[tempTab], SIGNAL( sendCMD( const Command& ) ), this, SLOT( recvCMD( const Command& ) ) );
+ connect( this, SIGNAL( sendCMD( const Command& ) ), myTabList[tempTab], SLOT( recvCMD( const Command& ) ) );
+
+ myResource->tabManager->showTab(consoleTab);
+
+ /* ...log file */
+ if( !myServer->LogFile.isEmpty() )
+ {
+ Log = new QFile( myServer->LogFile );
+ if( !Log->open( IO_WriteOnly | IO_Append ) )
+ {
+ if( !Log->open( IO_WriteOnly ) )
+ {
+ kdError() << "Can not open " << myServer->LogFile << " for writing." << endl;
+ }
+ }
+ }
+ qApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
+}
+
+void io_internet::recvCMD(const Command& command)
+{
+ QString error_message;
+
+ if(!connected)
+ {
+ myCommandBuffer.push_back(command);
+ return;
+ }
+
+ switch(((Command)command).getCommand())
+ {
+ case CMD_Move:
+ send(((Command)command).getMove().SAN);
+ break;
+ case CMD_Reset_Server:
+ sendUserSettings();
+ break;
+ case CMD_Toggle_Seek:
+ if(seekTimer->isActive())
+ {
+ /* timer running stop it */
+ seekTimer->stop();
+ emit sendCMD( Command( 0, CMD_Hide_Sought_List ) );
+ }
+ else
+ {
+ /* timer not running start it */
+ seekTimer->start(myResource->Seek_Timer * 100);
+ /* send a sought now */
+ processSeekTimer();
+ }
+ break;
+ case CMD_Player_Finger:
+ send("$finger " + ((Command)command).getData());
+ break;
+ case CMD_Add_Friend:
+ send("$+notify " + ((Command)command).getData());
+ break;
+ case CMD_Ignore_Player:
+ send("$+censor " + ((Command)command).getData());
+ break;
+ case CMD_Player_History:
+ send("$history " + ((Command)command).getData());
+ break;
+ case CMD_Start_Match:
+ send("$play " + ((Command)command).getData());
+ break;
+ case CMD_Assess:
+ send("$assess " + ((Command)command).getData());
+ break;
+ case CMD_Set_Input:
+ sendCMD( command );
+ break;
+ case CMD_Send_To_ICS:
+ if(((Command)command).getData().contains(QRegExp("^(?:\\.|tell)")))
+ {
+ writeToConsole(((Command)command).getData(), "K_PVT");
+ }
+ send(((Command)command).getData());
+ break;
+ case CMD_Examine_Forward:
+ send("$forward 1");
+ break;
+ case CMD_Examine_Backward:
+ send("$backward 1");
+ break;
+ case CMD_White_Resign:
+ case CMD_Black_Resign:
+ send("$resign");
+ break;
+ case CMD_Offer_Draw:
+ send("$draw");
+ break;
+ case CMD_Reject_Draw:
+ send("$decline t draw");
+ break;
+ default:
+ /* do nothing unknown command */
+ kdWarning() << "InternetIO::sendCMD received an unknown command: " << ((Command)command).getCommand() << endl;
+ }
+}
+
+///////////////////////////////////////
+//
+// io_internet::send
+//
+///////////////////////////////////////
+void io_internet::send(const QString& msg)
+{
+ QString tmp(msg);
+ ssize_t len;
+
+ /* Attach events to specific outgoing text */
+ if( ( tmp == "accept" ) ||
+ ( tmp == "decline" ) ||
+ ( tmp.left(6) == "match " ) )
+ {
+ if( challenge != NULL )
+ {
+ delete challenge;
+ nullifyChallenge();
+ }
+ }
+ if( tmp.right(1) != "\n" )
+ {
+ tmp += "\n";
+ }
+
+ len = write(socket->socket(), tmp.latin1(), tmp.length() );
+
+ if( Log )
+ {
+ Log->writeBlock( QString("<< ").latin1(), 3 );
+ Log->writeBlock( tmp.latin1(), tmp.length() );
+ }
+ if( len < (signed)tmp.length() )
+ {
+ kdWarning() << "io_internet::Send: Failed to write full block of data to socket." << endl;
+ }
+}
+
+///////////////////////////////////////
+//
+// io_internet::readCommand
+//
+///////////////////////////////////////
+void io_internet::readCommand(KSocket* socket)
+{
+ char buffer[READ_BUFFER_SIZE];
+ QString tmp;
+ QStringList lines;
+
+ memset(buffer, 0, READ_BUFFER_SIZE);
+ read(socket->socket(), buffer, READ_BUFFER_SIZE);
+ tmp = buffer;
+
+ tmp = lineBuffer + tmp;
+ if( Log )
+ {
+ Log->writeBlock( tmp.latin1(), tmp.length() );
+ }
+ if(loginStage != LOGIN_STAGE_LOGGED_IN)
+ {
+ // route all the data to the login parser
+ parseLoginData(tmp);
+ this->parseMode = NORMAL_MODE;
+ }
+ else
+ {
+ lines = QStringList::split( QRegExp("\n\r?"), tmp, FALSE );
+ if(!(tmp.endsWith("\n\r") || tmp.endsWith("\n")))
+ {
+ lineBuffer = (*(--lines.end()));
+ }
+ else
+ {
+ lineBuffer = "";
+ }
+ for(QStringList::iterator i = lines.begin(); i != lines.end(); i++)
+ {
+ if(lineBuffer == "" || i != --lines.end())
+ {
+ (*i).replace( QRegExp( "\\a" ), "" );
+ parseLine(*i);
+ }
+ }
+ }
+}
+///////////////////////////////////////
+//
+// io_internet::sendUserName
+//
+///////////////////////////////////////
+void io_internet::sendUserName()
+{
+ loginStage = LOGIN_STAGE_PASSWORD;
+ send(userName);
+}
+///////////////////////////////////////
+//
+// io_internet::sendPassword
+//
+///////////////////////////////////////
+void io_internet::sendPassword()
+{
+ send(passWord);
+}
+
+///////////////////////////////////////
+//
+// io_internet::parseLoginData
+//
+///////////////////////////////////////
+void io_internet::parseLoginData( QString data )
+{
+ QStringList lines;
+
+ if(loginStage == LOGIN_STAGE_NAME)
+ {
+ if(data.contains( "login:" ))
+ {
+ sendUserName();
+ }
+ lines = QStringList::split( QRegExp("\n\r?"), data, FALSE );
+ for(QStringList::iterator i = lines.begin(); i != lines.end(); i++)
+ {
+ writeToConsole((*i), "K_STD");
+ }
+ }
+ else if(loginStage == LOGIN_STAGE_PASSWORD)
+ {
+ if(data.contains("**** Invalid password! ****") ||
+ data.contains("Sorry, names can only consist of lower and upper case letters. Try again.") ||
+ data.contains("If you are not a registered player, enter guest or a unique ID."))
+ {
+ loginDlg = new dlg_login( myParent, "LoginDialog", myResource);
+ loginDlg->disableServerSelect();
+ connect(loginDlg, SIGNAL( okClicked() ), this, SLOT( sendUserName() ) );
+ connect(loginDlg, SIGNAL( cancelClicked() ), this, SLOT( selfDestruct() ) );
+ connect(loginDlg, SIGNAL( login(QString, QString) ), this, SLOT( setUserInfo(QString, QString) ) );
+ }
+ else if(data.contains("Press return to enter the server as"))
+ {
+ QRegExp guestName("Logging you in as \"(\\w*)\"");
+ int pos = guestName.search(data);
+ if(pos > -1)
+ {
+ userName = guestName.cap(1);
+ }
+ send("\n");
+ }
+ else if(data.contains("password:"))
+ {
+ sendPassword();
+ }
+ else
+ {
+ loginStage = LOGIN_STAGE_LOGGED_IN;
+ sendUserSettings();
+ }
+ lines = QStringList::split( QRegExp("\n\r?"), data, FALSE );
+ for(QStringList::iterator i = lines.begin(); i != lines.end(); i++)
+ {
+ writeToConsole((*i), "K_STD");
+ }
+ }
+ else
+ {
+ lines = QStringList::split( QRegExp("\n\r?"), data, FALSE );
+ for(QStringList::iterator i = lines.begin(); i != lines.end(); i++)
+ {
+ writeToConsole((*i), "K_STD");
+ }
+ }
+}
+
+///////////////////////////////////////
+//
+// io_internet::ParseLine
+//
+///////////////////////////////////////
+void io_internet::parseLine( QString line )
+{
+ int i, j;
+ QString tmp;
+
+ switch(parseMode)
+ {
+ case NORMAL_MODE: /* determine which mode we should go into */
+ if(line.contains(QRegExp("^\\s*\\d{1,3}\\s+(?:\\d{1,4}|\\+\\+\\+\\+|\\-\\-\\-\\-)\\s+\\w{3,17}(\\(C\\))?\\s+\\d{1,3}\\s+\\d{1,3}")))
+ {
+ updateSoughtList(line);
+ parseMode = UPDATE_SOUGHT_MODE;
+ }
+ /* CHALLENGE */
+ else if( line.contains(QRegExp("^\\s*Challenge: ")))
+ {
+ myResource->play( SND_CHALLENGE );
+ if( challenge != NULL )
+ {
+ delete challenge;
+ }
+ challenge = new dlg_challenge( 0, "Challenge", myResource );
+ connect( challenge, SIGNAL( destroyed() ), this, SLOT( nullifyChallenge() ) );
+ connect( challenge, SIGNAL( user1Clicked() ), this, SLOT( acceptChallenge() ) );
+ connect( challenge, SIGNAL( user2Clicked() ), this, SLOT( declineChallenge() ) );
+ line.replace(QRegExp("^\\s*Challenge: "), "");
+ challenge->setValues( line, userName );
+ parseMode = CHALLENGE_MODE;
+ }
+ else if( ( line.left(15) == "Challenge from " ) && ( line.right(9) == " removed." ) )
+ {
+ if( challenge != NULL )
+ {
+ delete challenge;
+ }
+ }
+ /* SOUGHT GAME */
+ else if(line.contains("seeking"))
+ {
+ // writeToConsole("seeking", "K_CH");
+ }
+ /* PRIVATE TELL */
+ else if(line.contains(QRegExp(".+ tells you: .*")))
+ {
+ /* First grab the user name so we can auto-respond later */
+ emit sendCMD( Command( 0, CMD_Set_Src_Tell, line.section(' ', 0, 0) ) );
+ myResource->play( SND_TELL );
+ writeToConsole(line, "K_PVT");
+ }
+ /* SAY */
+ else if(line.contains( QRegExp(".+ says: .*")))
+ {
+ myResource->play(SND_SAY);
+ writeToConsole(line, "K_PVT");
+ return;
+ }
+ /* WHISPER & KIBITZ */
+ else if(line.contains(QRegExp(".+ whispers: .*")) || line.contains(QRegExp(".+ kibitzes: .*")))
+ {
+ writeToConsole(line, "K_WSP");
+ }
+ /* Important System Messages: Use Whisper Color */
+ else if(line.contains(QRegExp("declines the draw request\\.$" )))
+ {
+ writeToConsole(line, "K_WSP");
+ }
+ /* DRAW OFFER */
+ else if(line.right(19) == " offers you a draw.")
+ {
+ writeToConsole(line, "K_WSP");
+ }
+ else if( line.contains( QRegExp(".+rating adjustment:.+" ) ) )
+ {
+ writeToConsole(line, "K_WSP");
+ }
+ /* SHOUTS */
+ else if( line.contains( QRegExp("^c?t?s?-?shouts: ") ) )
+ {
+ writeToConsole(line, "K_SHT");
+ }
+ /* NOTIFY */
+ else if((line.contains(QRegExp("\\s*Notification:"))) ||
+ (line.contains(QRegExp("\\s*Present company includes:"))) ||
+ (line.contains(QRegExp("\\s*Your arrival was noted by:"))))
+ {
+ writeToConsole(line, "K_NOT");
+ myResource->play( SND_NOTIFICATION );
+ }
+ /* CHANNEL TELLS */
+ else if(line.contains(QRegExp( ".\\(\\d+\\):" )))
+ {
+ /* First grab the channel # so we can auto-respond later */
+ j = line.find(QString("):"));
+ i = line.findRev(QString("("), j) + 1;
+ emit sendCMD( Command( 0, CMD_Set_Src_Channel, line.mid(i, j - i) ) );
+ writeToConsole(line, "K_CH");
+ }
+ else if(line.contains(QRegExp("^<12>\\s")))
+ {
+ /* a game move */
+ parseStyle12(line, PARSE12_MODE_MOVE);
+ }
+ else if(line.contains(QRegExp("^<b1>\\s")))
+ {
+ /* a bughouse piece has been passed or a piece has been captured in crazyhouse */
+ writeToConsole(line, "K_CH");
+ }
+ else if(line.contains(QRegExp("^\\\\")))
+ {
+ writeToConsole(line, lastTag);
+ }
+ else if(line.contains(QRegExp("^\\{?Game \\d+")) && line.contains("Creating", TRUE))
+ {
+ parseMode = NEW_GAME_MODE;
+ }
+ else if(line.contains("You are now observing game"))
+ {
+ parseMode = OBSERVE_GAME_MODE;
+ }
+ else if(line.startsWith("Movelist for game"))
+ {
+ QRegExp gameNumber("\\d+");
+ int pos = gameNumber.search(line);
+ if(pos > -1)
+ {
+ ficsMoveListNumber = gameNumber.cap(0).toInt();
+ }
+ parseMode = PARSE_MOVE_LIST_MODE;
+ }
+ else if((line.contains(QRegExp("^\\{?Game \\d+")) || line.contains(QRegExp("Game \\d+"))) &&
+ (
+ line.contains(" forfeits by disconnection", TRUE) ||
+ line.contains(" forfeits by disconnection}", TRUE) ||
+ line.contains(" forfeits on time} ", TRUE) ||
+ line.contains(" forfeits on time ", TRUE) ||
+ line.contains(" resigns} ", TRUE) ||
+ line.contains(" resigns ", TRUE) ||
+ line.contains(" Game drawn by mutual agreement ", TRUE) ||
+ line.contains(" Game drawn by mutual agreement} ", TRUE) ||
+ line.contains(", has lost contact or quit.", TRUE) ||
+ line.contains(" checkmated ", TRUE) ||
+ line.contains(" checkmated} ", TRUE) ||
+ line.contains("lost connection", TRUE) ||
+ line.contains("has no material to mate", TRUE)
+ )
+ )
+ {
+ sendEndOfGameCommand(line);
+ }
+ else
+ {
+ /* don't know what to do with it, just send it to the console */
+ /* don't write the prompt to the console */
+ if( line.contains( QRegExp( "^a?d?f?g?s?z?ics% " ) ) ||
+ line.contains( QRegExp( "^cex% " ) ) ||
+ line.contains( QRegExp( "^chess% " ) ) )
+ break;
+ writeToConsole(line, "K_STD");
+ }
+ break;
+ case UPDATE_SOUGHT_MODE:
+ if(line.contains(QRegExp("\\d+\\s+ads? displayed.")))
+ {
+ updateSoughtList(line);
+ parseMode = NORMAL_MODE;
+ }
+ else
+ {
+ updateSoughtList(line);
+ }
+ break;
+ case NEW_GAME_MODE:
+ if(line.contains(QRegExp("<12>\\s")))
+ {
+ /* a game move */
+ parseStyle12(line, PARSE12_MODE_NEW);
+ }
+ else if((line.startsWith("fics%") && line.length() == 6))
+ {
+ parseMode = NORMAL_MODE;
+ }
+ break;
+ case OBSERVE_GAME_MODE:
+ if(line.contains(QRegExp("<12>\\s")))
+ {
+ /* a game move */
+ parseStyle12(line, PARSE12_MODE_NEW);
+ send("moves");
+ parseMode = NORMAL_MODE;
+ }
+ break;
+ case CHALLENGE_MODE:
+ if(line.startsWith("You can \"accept\" or \"decline\", or propose"))
+ {
+ parseMode = NORMAL_MODE;
+ }
+ break;
+ case PARSE_MOVE_LIST_MODE:
+ if(!line.contains("{Still in progress}"))
+ {
+ if(line.contains(QRegExp("\\d\\.")))
+ {
+ parseMoveList(line);
+ }
+ }
+ else
+ {
+ parseMode = NORMAL_MODE;
+ }
+ break;
+ default: /* do nothing */
+ break;
+ };
+}
+
+///////////////////////////////////////
+//
+// io_internet::ParseStyle12
+//
+///////////////////////////////////////
+void io_internet::parseStyle12(QString line, const unsigned int Mode)
+{
+// kdWarning() << line << endl;
+
+ struct ChessMove move;
+ QStringList fields;
+ QString position_line = "";
+ match_param *param = NULL;
+ Command::clearMove(&move);
+ switch(Mode)
+ {
+ case PARSE12_MODE_NEW:
+ {
+ /* a new game that we are playing, or observing */
+ param = new match_param(this->myResource);
+ fields = QStringList::split( QChar(' '), line, FALSE );
+
+ /* set white time control */
+ TCPList tmpListWhite(param->time(WHITE));
+ TCP tmpTCPWhite = tmpListWhite[0];
+ tmpTCPWhite.Seconds = fields[20].toInt() * 60;
+ tmpTCPWhite.Increment = fields[21].toInt();
+ tmpListWhite[0] = tmpTCPWhite;
+ param->setTime(WHITE, tmpListWhite);
+
+ /* set black time control */
+ TCPList tmpListBlack(param->time(BLACK));
+ TCP tmpTCPBlack = tmpListBlack[0];
+ tmpTCPBlack.Seconds = fields[20].toInt() * 60;
+ tmpTCPBlack.Increment = fields[21].toInt();
+ tmpListBlack[0] = tmpTCPBlack;
+ param->setTime(BLACK, tmpListBlack);
+
+ if((userName.upper() == fields[17].upper()) &&
+ ((fields[19].toInt() == -1) || (fields[19].toInt() == 1)))
+ {
+ /* I am playing white */
+ param->setType(WHITE, PLAYERLOCAL);
+ }
+ else if(fields[19].toInt() != 2)
+ {
+ /* I am not playing white */
+ param->setType(WHITE, PLAYERTCP);
+ }
+
+ if((userName.upper() == fields[18].upper()) &&
+ ((fields[19].toInt() == -1) || (fields[19].toInt() == 1)))
+ {
+ /* I am playing black */
+ param->setType(BLACK, PLAYERLOCAL);
+ }
+ else if(fields[19].toInt() != 2)
+ {
+ /* I am not playing black */
+ param->setType(BLACK, PLAYERTCP);
+ }
+
+ if(fields[19].toInt() == 2)
+ {
+ param->setType(WHITE, PLAYEREXAMINE);
+ param->setType(BLACK, PLAYEREXAMINE);
+ }
+ //param->setVariation(something); figure out how to get the variation
+ param->setName(WHITE, fields[17]);
+ param->setName(BLACK, fields[18]);
+ /* tell core to connect us to a new match */
+ fics_to_knights[fields[16].toInt()] = ((core*)myParent)->newMatch(param)->getID();
+ }
+ case PARSE12_MODE_MOVE:
+ {
+ fields = QStringList::split( QChar(' '), line, FALSE );
+
+ /* various ICS stuff for ChessMove */
+ move.ICS_ClockTicking = fields[31].toInt();
+ move.ICS_PawnPushFile = fields[10].toShort();
+ move.ICS_MoveCounter = fields[15].toInt();
+ if(fields[9] == "W")
+ {
+ move.ICS_OnMove = BLACK;
+ }
+ else if( fields[9] == "B" )
+ {
+ move.ICS_OnMove = WHITE;
+ }
+
+ switch( fields[19].toInt() )
+ {
+ /* Examining a game */
+ case 2:
+ move.ICS_Mode = ICS_Examine;
+ if(fics_to_knights[fields[16].toInt()] == 0)
+ {
+ /* no new game started yet, call parsestyle 12 with a different mode */
+ parseStyle12(line, PARSE12_MODE_NEW);
+ return;
+ }
+ break;
+ /* Observing a game */
+ case -2:
+ case 0:
+ move.ICS_Mode = ICS_Observe;
+ break;
+ /* Playing a game */
+ default:
+ move.ICS_Mode = ICS_Normal;
+ break;
+ }
+
+ /* Verbose Coordinate Notation of previous move ( USE AS CAN ) */
+ strcpy(move.CAN, fields[27].right(fields[27].length() - 2).replace(QRegExp("-"), ""));
+ /* SAN */
+ strcpy(move.SAN, fields[29].replace(QRegExp("\\+"), "").replace(QRegExp("#"), ""));
+
+ /* fill the line for the command */
+ position_line += fields[1]; /* Internal Rank #7 */
+ position_line += fields[2]; /* Internal Rank #6 */
+ position_line += fields[3]; /* Internal Rank #5 */
+ position_line += fields[4]; /* Internal Rank #4 */
+ position_line += fields[5]; /* Internal Rank #3 */
+ position_line += fields[6]; /* Internal Rank #2 */
+ position_line += fields[7]; /* Internal Rank #1 */
+ position_line += fields[8]; /* Internal Rank #0 */
+ /* Can White Castle Short (boolean) */
+ position_line += fields[11];
+ /* Can White Castle Long (boolean) */
+ position_line += fields[12];
+ /* Can Black Castle Short (boolean) */
+ position_line += fields[13];
+ /* Can Black Castle Long (boolean) */
+ position_line += fields[14];
+
+ Command command(fics_to_knights[fields[16].toInt()], CMD_Move, fields[24].toInt() * 100,
+ fields[25].toInt() * 100, move);
+ command.setData(position_line);
+ emit sendCMD(command);
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+///////////////////////////////////////
+//
+// io_internet::ParsePlayer
+//
+///////////////////////////////////////
+//void io_internet::ParsePlayer( QString Handle )
+//{
+// player.Raw = Handle;
+ /* SysAdmin */
+// if( Handle.contains( QRegExp("\\(\\*\\)") ) )
+// {
+// player.SysAdmin = TRUE;
+// Handle.replace( QRegExp("\\(\\*\\)"), QString("") );
+// }
+// else player.SysAdmin = FALSE;
+ /* ServiceRep */
+// if( Handle.contains( QRegExp("\\(SR\\)") ) )
+// {
+// player.ServiceRep = TRUE;
+// Handle.replace( QRegExp("\\(SR\\)"), QString("") );
+// }
+// else player.ServiceRep = FALSE;
+ /* Computer */
+// if( Handle.contains( QRegExp("\\(C\\)") ) )
+// {
+// player.Computer = TRUE;
+// Handle.replace( QRegExp("\\(C\\)"), QString("") );
+// }
+// else player.Computer = FALSE;
+ /* Unregistered */
+// if( Handle.contains( QRegExp("\\(U\\)") ) )
+// {
+// player.Unregistered = TRUE;
+// Handle.replace( QRegExp("\\(U\\)"), QString("") );
+// }
+// else player.Unregistered = FALSE;
+// return;
+//}
+///////////////////////////////////////
+//
+// io_internet::nullifyChallenge
+//
+///////////////////////////////////////
+void io_internet::nullifyChallenge( void )
+{
+ challenge = NULL;
+}
+
+///////////////////////////////////////
+//
+// io_internet::declineChallenge
+//
+///////////////////////////////////////
+void io_internet::declineChallenge( void )
+{
+ send( "decline" );
+ delete challenge;
+ challenge = NULL;
+}
+///////////////////////////////////////
+//
+// io_internet::acceptChallenge
+//
+///////////////////////////////////////
+void io_internet::acceptChallenge( void )
+{
+ send( challenge->values() );
+ delete challenge;
+ challenge = NULL;
+}
+
+///////////////////////////////////////
+//
+// io_internet::writeToConsole
+//
+///////////////////////////////////////
+void io_internet::writeToConsole(QString text, QString tag)
+{
+ lastTag = tag;
+ /* Remove Bells */
+ text.replace( QRegExp("\\x0007") , "" );
+ /* Replace misc characters with rich-text friendly counterparts */
+ text.replace( QRegExp("\\x003c"), "&#60;" );
+ text.replace( QRegExp("\\x007c"), "&#124;" );
+ text.replace( QRegExp( "\\f"), "");
+ text.replace( QRegExp( "\\n"), "");
+ text.replace( QRegExp( "\\r*" ), "" );
+ emit sendCMD( Command( 0, CMD_Append_To_Console, "<" + tag + ">" + text + "</" + tag + ">" ) );
+}
+
+///////////////////////////////////////
+//
+// io_internet::updateSoughtList
+//
+///////////////////////////////////////
+void io_internet::updateSoughtList(QString soughtLine)
+{
+ /* "ADS DISPLAYED" MESSAGE */
+ if(soughtLine.contains(QRegExp("\\d+\\s+ads? displayed.")))
+ {
+ emit sendCMD( Command( 0, CMD_Show_Sought_List ) );
+ }
+ else
+ {
+ emit sendCMD( Command( 0, CMD_Add_Sought_Match, soughtLine ) );
+ }
+}
+
+///////////////////////////////////////
+//
+// io_internet::sendUserSettings()
+//
+///////////////////////////////////////
+void io_internet::sendUserSettings()
+{
+ send("set style 12");
+ send(QString("set interface Knights %1").arg(_VERSION_));
+ send(QString("set private %1").arg(myResource->OPTION_Private));
+ send(QString("set kibitz %1").arg(myResource->OPTION_Kibitz));
+ send(QString("set tell %1").arg(myResource->OPTION_Tell));
+ send(QString("set shout %1").arg(myResource->OPTION_Shout));
+ send(QString("set seek %1").arg(myResource->OPTION_Seek));
+ send(QString("set tolerance %1").arg(myResource->OPTION_Profanity));
+}
+
+///////////////////////////////////////
+//
+// io_internet::parseMoveList(QString data)
+//
+///////////////////////////////////////
+void io_internet::parseMoveList(QString line)
+{
+ QStringList two_plys;
+ struct ChessMove move;
+ Command command;
+ int move_counter = 0;
+
+ /* white */
+ two_plys = QStringList::split(QRegExp("\\s+"), line, FALSE);
+ Command::clearMove(&move);
+ move_counter = two_plys[0].left(two_plys[0].length() - 1).length(); /* remove the . */
+ move.ICS_MoveCounter = move_counter;
+ move.ICS_Mode = ICS_Movelist;
+ move.ICS_OnMove = WHITE;
+ strcpy(move.SAN, two_plys[1]);
+ command.setCommand((int&)CMD_Move);
+ command.setID(fics_to_knights[ficsMoveListNumber]);
+ command.setMove(move);
+ emit sendCMD(command);
+
+ /* black */
+ if(two_plys.size() > 3)
+ {
+ Command::clearMove(&move);
+ move.ICS_MoveCounter = move_counter;
+ move.ICS_Mode = ICS_Movelist;
+ move.ICS_OnMove = BLACK;
+ strcpy(move.SAN, two_plys[3]);
+ command.setCommand((int&)CMD_Move);
+ command.setID(fics_to_knights[ficsMoveListNumber]);
+ command.setMove(move);
+ emit sendCMD(command);
+ }
+}
+
+///////////////////////////////////////
+//
+// io_internet::sendEndOfGameCommand(QString line)
+//
+///////////////////////////////////////
+void io_internet::sendEndOfGameCommand(QString line)
+{
+ QStringList fields;
+ Command command;
+
+ fields = QStringList::split( QChar(' '), line, FALSE );
+ if(fields[1].endsWith(":"))
+ {
+ fields[1] = fields[1].left(fields[1].length() - 1);
+ }
+ command.setID(fics_to_knights[fields[1].toInt()]);
+ fields[fields.count() - 1] = fields[fields.count() - 1].stripWhiteSpace();
+ if(fields[fields.count() - 1] == "1-0" )
+ {
+ if(fields[fields.count() - 2].contains("resigns"))
+ {
+ command.setCommand((int&)CMD_Black_Resign);
+ }
+ else if(fields[fields.count() - 2].contains("time"))
+ {
+ command.setCommand((int&)CMD_White_Called_Flag);
+ }
+ else
+ {
+ command.setCommand((int&)CMD_Result_White);
+ }
+ }
+ else if(fields[fields.count() - 1] == "0-1")
+ {
+ if(fields[fields.count() - 2].contains("resigns"))
+ {
+ command.setCommand((int&)CMD_White_Resign);
+ }
+ else if(fields[fields.count() - 2].contains("time"))
+ {
+ command.setCommand((int&)CMD_Black_Called_Flag);
+ }
+ else
+ {
+ command.setCommand((int&)CMD_Result_Black);
+ }
+ }
+ else if(fields[fields.count() - 1] == "1/2-1/2")
+ {
+ command.setCommand((int&)CMD_Result_Draw);
+ }
+ else
+ {
+ command.setCommand((int&)CMD_Lost_Contact);
+ }
+ emit sendCMD(command);
+}
+
+///////////////////////////////////////
+//
+// io_internet::processSeekTimer()
+//
+///////////////////////////////////////
+void io_internet::processSeekTimer()
+{
+ /* timer timed out, send out a sought */
+ send("sought");
+}
+
+///////////////////////////////////////
+//
+// io_internet::selfDestruct()
+//
+///////////////////////////////////////
+void io_internet::selfDestruct()
+{
+ /* cause the io_internet to delete itself */
+ QApplication::postEvent( qApp->mainWidget(), new QCustomEvent( EVENT_Del_IO_Net ) );
+}
+
+///////////////////////////////////////
+//
+// io_internet::setUserInfo()
+//
+///////////////////////////////////////
+void io_internet::setUserInfo(QString userName, QString passWord)
+{
+ this->userName = userName;
+ this->passWord = passWord;
+}
+
diff --git a/knights/io_internet.h b/knights/io_internet.h
new file mode 100644
index 0000000..cf56379
--- /dev/null
+++ b/knights/io_internet.h
@@ -0,0 +1,138 @@
+/***************************************************************************
+ io_internet.h - description
+ -------------------
+ begin : Thu Aug 16 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef IO_INTERNET_H
+#define IO_INTERNET_H
+
+/* Local */
+#include "definitions.h"
+#include "io_base.h"
+#include "match_param.h"
+#include "command.h"
+
+/* Tabs */
+#include "tabmanager.h"
+#include "console.h"
+#include "challenge_graph.h"
+#include "tab_seeklist.h"
+
+class KSocket;
+class KProcess;
+class resource;
+class core;
+class dlg_login;
+class dlg_challenge;
+
+#include <qfile.h>
+
+/**
+ *@author Troy Corbin Jr / Alexander Wels.
+ */
+
+struct MatchRecord
+{
+ int knightsID;
+ int serverID;
+ bool observing;
+ bool examining;
+ bool finished;
+};
+
+const int READ_BUFFER_SIZE = 64 * 1024; /* 64k is max ip packet size */
+
+const int LOGIN_STAGE_NAME = 1;
+const int LOGIN_STAGE_PASSWORD = 2;
+const int LOGIN_STAGE_LOGGED_IN = 3;
+
+const unsigned int NORMAL_MODE = 1;
+const unsigned int UPDATE_SOUGHT_MODE = 2;
+const unsigned int NEW_GAME_MODE = 3;
+const unsigned int OBSERVE_GAME_MODE = 4;
+const unsigned int CHALLENGE_MODE = 5;
+const unsigned int PARSE_MOVE_LIST_MODE = 6;
+
+const unsigned int PARSE12_MODE_NEW = 1;
+const unsigned int PARSE12_MODE_MOVE = 2;
+
+typedef QMap<QWidget *, QWidget *> TabMap;
+
+class io_internet : public io_base
+{
+ Q_OBJECT
+ public:
+ io_internet(QWidget *parent = NULL, resource *Rsrc = NULL);
+ ~io_internet();
+
+ public slots:
+ virtual void recvCMD(const Command& command);
+ void readCommand(KSocket *);
+ void sendUserName(void);
+ void sendPassword(void);
+ void send(const QString&);
+ void nullifyChallenge( void );
+ void acceptChallenge( void );
+ void declineChallenge( void );
+ void processSeekTimer( void );
+ void connectToServer( void );
+ void selfDestruct( void );
+ void setUserInfo(QString userName, QString passWord);
+ signals:
+ virtual void sendCMD(const Command& command);
+ void setLastPrivateSource( const QString& );
+ void setLastChannelSource( const QString& );
+
+ protected:
+ void parseLine(QString command);
+ void parseLoginData(QString command);
+ void writeToConsole(QString text, QString tag);
+ void updateSoughtList(QString text);
+ void parseStyle12(QString line, const unsigned int mode);
+ void sendUserSettings(void);
+ void parseMoveList(QString data);
+ void sendEndOfGameCommand(QString line);
+ private:
+
+ dlg_login *loginDlg;
+ dlg_challenge *challenge;
+
+ /* These are used to handle the automagic seek command */
+ QTimer *seekTimer;
+
+ /* These are used for the connection & logon */
+ QFile *Log;
+ KSocket *socket;
+ KProcess *myTimeseal;
+ struct serverResource *myServer;
+ int loginStage;
+ unsigned int parseMode;
+ QString lastTag;
+ int ficsMoveListNumber;
+ QString lineBuffer;
+ bool connected;
+ QString userName;
+ QString passWord;
+
+ /* communication with the server */
+ QStringList command_list; /* this is a temp buffer while waiting for the movelist */
+ bool waiting_for_move_list;
+ QMap<match_param *, int> fics_ids;
+ QMap<int, int> fics_to_knights; /* maps fics id's to knights id's */
+ TabMap myTabList; /* maintains the list of the tabs currently owned by this io_internet */
+ QValueList<Command> myCommandBuffer; /* this is a buffer for all the commands io_internet received while not connected to a server */
+};
+
+#endif
diff --git a/knights/knights.cpp b/knights/knights.cpp
new file mode 100644
index 0000000..ae68539
--- /dev/null
+++ b/knights/knights.cpp
@@ -0,0 +1,1024 @@
+/***************************************************************************
+ knights.cpp - description
+ -------------------
+ begin : Thu Mar 1 10:43:51 CST 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+/* Local */
+#include "knights.moc"
+#include "core.h"
+#include "wiz_setup.h"
+#include "pgn.h"
+#include "splash.h"
+#include "dlg_settings.h"
+#include "dlg_newmatch.h"
+/* KDE */
+#include <kmenubar.h>
+#include <kmessagebox.h>
+#include <kicontheme.h>
+#include <kkeydialog.h>
+#include <kcombobox.h>
+#include <kpopupmenu.h>
+#include <klocale.h>
+/* KFile */
+#include <kfiledialog.h>
+/* Qt */
+#include <qpalette.h>
+#include <qiconset.h>
+#include <qlabel.h>
+#include <qframe.h>
+#include <qstyle.h>
+
+Knights::Knights(KCmdLineArgs *Args, QWidget *parent, const char *name) : KMainWindow(parent, name)
+{
+ InitAll = TRUE;
+ ResizeFlag = TRUE;
+ Minimized = FALSE;
+ args = Args;
+ SplashScreen = NULL;
+ setFocusPolicy( ClickFocus );
+}
+Knights::~Knights()
+{
+ if( !InitAll )
+ KillAll();
+}
+///////////////////////////////////////
+//
+// Knights::BirthAll
+//
+///////////////////////////////////////
+void Knights::BirthAll(void)
+{
+ SettingsDialog = NULL;
+ Resource = new resource(args);
+
+ if( Resource->OPTION_Show_Splash )
+ SplashScreen = new splash();
+
+ aboutData = new KAboutData( "knights", I18N_NOOP("Knights"), _VERSION_ );
+ topMenu = menuBar();
+ myAccel = new Accel( this, Resource->myAccel );
+ help = helpMenu();
+ fileMenu = new KPopupMenu( this , "fileMenu");
+ settingsMenu = new KPopupMenu( this, "settingsMenu");
+ matchMenu = new KPopupMenu( this, "matchMenu");
+ drawMenu = new KPopupMenu( this, "drawMenu");
+ tutorialMenu = new KPopupMenu( this, "tutorialMenu");
+ MainFrame = new QFrame( this, "MainFrame" );
+ Core = new core( MainFrame, "Core", Resource );
+ Message = new QLabel( MainFrame, "Message");
+ whiteTimeLabel = new QLabel( MainFrame, "whiteTimeLabel");
+ blackTimeLabel = new QLabel( MainFrame, "blackTimeLabel");
+ notationBar = new KComboBox( MainFrame, "notationBar");
+
+ /* Connect all Signals & Slots */
+ connect( Core, SIGNAL( requestResize() ), this, SLOT( resizeMainFrame() ) );
+ connect( Core, SIGNAL( setStatusBar(const int&, const QString& ) ), this, SLOT( setStatusBar(const int&, const QString& ) ) );
+ connect( Core, SIGNAL( setNotation() ), this, SLOT( setNotation() ) );
+ connect( Core, SIGNAL( initMatch() ), this, SLOT( initMatch() ) );
+ connect( Core, SIGNAL( setClocks() ), this, SLOT( setClocks() ) );
+ connect( Core, SIGNAL( serverDestroyed() ), this, SLOT( netConnect() ) );
+ connect( notationBar, SIGNAL( activated(int) ), Core, SLOT( review(int) ) );
+}
+///////////////////////////////////////
+//
+// Knights::menuClose
+//
+///////////////////////////////////////
+void Knights::menuClose(void)
+{
+ if( !queryClose() )
+ return;
+ qApp->quit();
+}
+///////////////////////////////////////
+//
+// Knights::queryClose
+//
+///////////////////////////////////////
+bool Knights::queryClose(void)
+{
+ return Core->clearAll();
+}
+///////////////////////////////////////
+//
+// Knights::KillAll
+//
+///////////////////////////////////////
+void Knights::KillAll(void)
+{
+ delete Core;
+ delete fileMenu;
+ delete matchMenu;
+ delete drawMenu;
+ delete tutorialMenu;
+ delete settingsMenu;
+ delete whiteTimeLabel;
+ delete blackTimeLabel;
+ delete notationBar;
+ delete Message;
+ delete aboutData;
+ delete MainFrame;
+ delete myAccel;
+ delete Resource;
+ InitAll = TRUE;
+}
+///////////////////////////////////////
+//
+// Knights::init
+//
+///////////////////////////////////////
+bool Knights::init( void )
+{
+ wiz_setup *Wizard;
+ QColorGroup GroupWhite;
+ QColorGroup GroupBlack;
+
+ BirthAll();
+ SelectTheme(-1,-1);
+ Resource->setAudio();
+ ResizeFlag = FALSE;
+
+ /*
+ Connect Accelerators
+ */
+ connect( Resource->myAccel, SIGNAL( board_up() ), this, SLOT( boardBigger() ) );
+ connect( Resource->myAccel, SIGNAL( board_down() ), this, SLOT( boardSmaller() ) );
+ connect( Resource->myAccel, SIGNAL( move_prev() ), this, SLOT( PrevNotation() ) );
+ connect( Resource->myAccel, SIGNAL( move_next() ), this, SLOT( NextNotation() ) );
+ connect( this, SIGNAL( focus( const QChar& ) ), Resource->myAccel, SIGNAL( focus( const QChar& ) ) );
+
+ initMenus();
+
+ /* Init Message */
+ Message->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::SingleLine );
+
+ /* Init White Time Label */
+ GroupWhite.setColor( QColorGroup::Background, Resource->COLOR_White );
+ GroupWhite.setColor( QColorGroup::Foreground, Resource->COLOR_Black );
+ whiteTimeLabel->setPalette( QPalette( GroupWhite, GroupWhite, GroupWhite ) );
+ whiteTimeLabel->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ whiteTimeLabel->setAlignment( Qt::AlignCenter | Qt::SingleLine );
+
+ /* Init Black Time Label */
+ GroupBlack.setColor( QColorGroup::Background, Resource->COLOR_Black );
+ GroupBlack.setColor( QColorGroup::Foreground, Resource->COLOR_White );
+ blackTimeLabel->setPalette( QPalette( GroupBlack, GroupBlack, GroupBlack ) );
+ blackTimeLabel->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ blackTimeLabel->setAlignment( Qt::AlignCenter | Qt::SingleLine );
+
+ /* Configure self */
+ setCentralWidget( MainFrame );
+ InitAll = FALSE;
+ resizeMainFrame();
+ show();
+ setStatusBar( READY );
+
+ /* Remove the Splash Screen */
+ if( SplashScreen != NULL )
+ {
+ delete SplashScreen;
+ }
+
+ /* Run the Setup Wizard if needed */
+ if( Resource->Config_Version < CONFIG_VERSION )
+ {
+ Wizard = new wiz_setup( this, "wiz_setup", Resource );
+ Wizard->exec();
+ delete Wizard;
+ resizeMainFrame();
+ /* if( !Resource->Accepted_License )
+ return FALSE;*/
+ Resource->Config_Version = CONFIG_VERSION;
+ }
+
+ /* Begin loading file from command line */
+ if( args->count() )
+ {
+ Core->load( QString( args->arg( 0 ) ) );
+ }
+ else
+ {
+ /* Bring up a match or pgn file */
+ switch( Resource->OPTION_On_Init )
+ {
+ case MENU_SOLITARE:
+ Core->newMatch( new match_param( Resource, PLAYERLOCAL, PLAYERLOCAL ) );
+ break;
+ case MENU_VS_PC:
+ if( Resource->engines.count() )
+ {
+ Core->newMatch( new match_param( Resource, PLAYERLOCAL, PLAYERPC ) );
+ }
+ break;
+ case MENU_CONNECT:
+ netConnect();
+ break;
+ default:
+ break;
+ }
+ }
+ return TRUE;
+}
+///////////////////////////////////////
+//
+// Knights::initMenus
+//
+///////////////////////////////////////
+void Knights::initMenus( void )
+{
+ /*
+ matchMenu menu
+ */
+ matchMenu->setCheckable(TRUE);
+ // MENU_DRAW
+ matchMenu->insertItem( i18n( "&Draw" ), drawMenu, MENU_DRAW );
+ matchMenu->setItemEnabled( MENU_DRAW, FALSE );
+ // MENU_RETRACT
+ matchMenu->insertItem( QIconSet( Resource->LoadIcon( QString("undo"), KIcon::Small ) ),
+ i18n( "&Retract Move" ), Core, SLOT(matchMenu(int)), 0, MENU_RETRACT );
+ matchMenu->setItemEnabled( MENU_RETRACT, FALSE );
+ matchMenu->setWhatsThis( MENU_RETRACT, i18n( "Select this to retract your last move." ) );
+ // MENU_RESIGN
+ matchMenu->insertItem( i18n( "Resign" ), Core, SLOT(matchMenu(int)), 0, MENU_RESIGN );
+ matchMenu->setItemEnabled( MENU_RESIGN, FALSE );
+ matchMenu->setWhatsThis( MENU_RESIGN, i18n( "Use this to concede the match to your opponent." ) );
+ // MENU_CALL_FLAG
+ matchMenu->insertItem( i18n( "&Call Flag" ), Core, SLOT(matchMenu(int)), 0, MENU_CALL_FLAG );
+ matchMenu->setItemEnabled( MENU_CALL_FLAG, FALSE );
+ matchMenu->setWhatsThis( MENU_CALL_FLAG, i18n( "Use this to declare the match over, due to your opponent being out of time." ) );
+ // MENU_HINT
+ matchMenu->insertItem( i18n( "&Hint" ), Core, SLOT(matchMenu(int)), 0, MENU_HINT );
+ matchMenu->setItemEnabled( MENU_HINT, FALSE );
+ matchMenu->setWhatsThis( MENU_HINT, i18n( "This will ask your opponent for a hint." ) );
+ // MENU_MOVE_NOW
+ matchMenu->insertItem( i18n( "Move &Now" ), Core, SLOT(matchMenu(int)), 0, MENU_MOVE_NOW );
+ matchMenu->setItemEnabled( MENU_MOVE_NOW, FALSE );
+ matchMenu->setWhatsThis( MENU_MOVE_NOW, i18n( "Clicking this option will force your opponent to move immediately." ) );
+ // MENU_ORIENTATION
+ matchMenu->insertItem( i18n( "&Flip View" ), Core, SLOT(matchMenu(int)), Key_F2, MENU_ORIENTATION );
+ matchMenu->setItemEnabled( MENU_ORIENTATION, FALSE );
+ matchMenu->setWhatsThis( MENU_ORIENTATION, i18n( "This will reverse the chessboard's orientation by 180 degrees." ) );
+ // MENU_PONDER
+ matchMenu->insertItem( i18n( "&Ponder" ), this, SLOT(Settings(int)), 0, MENU_PONDER );
+ matchMenu->setItemChecked( MENU_PONDER, Resource->OPTION_Ponder );
+ matchMenu->setItemEnabled( MENU_PONDER, FALSE );
+ matchMenu->setWhatsThis( MENU_PONDER, i18n( "This toggles your opponent's ability to think while it's your turn." ) );
+ matchMenu->insertSeparator();
+ // MENU_PAUSE
+ matchMenu->insertItem( QIconSet( Resource->LoadIcon( QString("player_pause"), KIcon::Small ) ),
+ i18n( "Pause" ), this, SLOT( Settings(int) ), Key_F12, MENU_PAUSE );
+ matchMenu->setItemEnabled( MENU_PAUSE, FALSE );
+ matchMenu->setWhatsThis( MENU_PAUSE, i18n( "Select this to pause the clock for this match." ) );
+ /*
+ drawMenu menu
+ */
+ // MENU_OFFER_DRAW
+ drawMenu->insertItem( i18n( "&Offer Draw" ), Core, SLOT(matchMenu(int)), 0, MENU_OFFER_DRAW );
+ drawMenu->setWhatsThis( MENU_OFFER_DRAW, i18n( "Clicking this will inform your opponent that you are willing draw the match." ) );
+ // MENU_ACCEPT_DRAW
+ drawMenu->insertItem( i18n( "&Accept Draw" ), Core, SLOT(matchMenu(int)), 0, MENU_ACCEPT_DRAW );
+ drawMenu->setWhatsThis( MENU_ACCEPT_DRAW, i18n( "Clicking this will accept a draw offered by your opponent." ) );
+ // MENU_REJECT_DRAW
+ drawMenu->insertItem( i18n( "&Reject Draw" ), Core, SLOT(matchMenu(int)), 0, MENU_REJECT_DRAW );
+ drawMenu->setWhatsThis( MENU_REJECT_DRAW, i18n( "Clicking this will reject a draw offered by your opponent." ) );
+ // MENU_IGNORE_DRAW
+ drawMenu->insertItem( i18n( "&Ignore Draw" ), Core, SLOT(matchMenu(int)), 0, MENU_IGNORE_DRAW );
+ drawMenu->setWhatsThis( MENU_IGNORE_DRAW, i18n( "Clicking this will ignore future draw offers from your opponent." ) );
+ /*
+ fileMenu menu
+ */
+ // MENU_NEWGAME
+ fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("filenew"), KIcon::Small ) ),
+ i18n( "&New Match..." ), this, SLOT( openNewMatchDialog() ), CTRL+Key_N, MENU_NEWGAME );
+ fileMenu->setWhatsThis( MENU_NEWGAME, i18n( "This allows you to begin a new match." ) );
+ // MENU_LOAD
+ fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("fileopen"), KIcon::Small ) ),
+ i18n( "&Load Match..." ), Core, SLOT( load() ), CTRL+Key_L, MENU_LOAD );
+ fileMenu->setWhatsThis( MENU_LOAD, i18n( "The Load command will allow you to select a previously saved match and play it again." ) );
+ fileMenu->insertSeparator();
+ // MENU_SAVE
+ fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("filesave"), KIcon::Small ) ),
+ i18n( "&Save Match" ), this, SLOT( SaveGame() ), CTRL+Key_S, MENU_SAVE );
+ fileMenu->setItemEnabled( MENU_SAVE, FALSE );
+ fileMenu->setWhatsThis( MENU_SAVE, i18n( "The Save command will allow you to store a copy of your current match for later use." ) );
+ // MENU_SAVEAS
+ fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("filesave"), KIcon::Small ) ),
+ i18n( "Save Match &As..." ), this, SLOT( SaveGameAs() ), CTRL+Key_A, MENU_SAVEAS );
+ fileMenu->setItemEnabled( MENU_SAVEAS, FALSE );
+ fileMenu->setWhatsThis( MENU_SAVEAS, i18n( "The Save command will allow you to store a copy of your current match for later use." ) );
+ fileMenu->insertSeparator();
+ // MENU_CONNECT
+ fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("connect_creating"), KIcon::Small ) ),
+ i18n( "Connect to Server" ), this, SLOT( netConnect() ), CTRL+Key_C, MENU_CONNECT );
+ fileMenu->setWhatsThis( MENU_CONNECT, i18n( "Clicking this will connect Knights with an internet chess server." ) );
+ fileMenu->insertSeparator();
+ // MENU_PRINT
+ fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("fileprint"), KIcon::Small ) ),
+ i18n( "&Print Notation..." ), Core, SLOT( print() ), CTRL+Key_P, MENU_PRINT );
+ fileMenu->setItemEnabled( MENU_PRINT, FALSE );
+ fileMenu->setWhatsThis( MENU_PRINT, i18n( "The Print command will allow you to print this game's notation on your printer." ) );
+ fileMenu->insertSeparator();
+ // MENU_CLOSE
+ fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("fileclose"), KIcon::Small ) ),
+ i18n( "&Close Match" ), Core, SLOT( clearMatch() ), CTRL+Key_W, MENU_CLOSE );
+ fileMenu->setItemEnabled( MENU_CLOSE, FALSE );
+ fileMenu->setWhatsThis( MENU_CLOSE, i18n( "This command removes the current match." ) );
+ // MENU_CLOSEALL
+ fileMenu->insertItem( i18n( "Close All" ), Core, SLOT( clearAll() ), 0, MENU_CLOSEALL );
+ fileMenu->setItemEnabled( MENU_CLOSEALL, FALSE );
+ fileMenu->setWhatsThis( MENU_CLOSEALL, i18n( "This command will remove all matches that are currently loaded." ) );
+ fileMenu->insertSeparator();
+ // MENU_QUIT
+ fileMenu->insertItem( QIconSet( Resource->LoadIcon( QString("exit"), KIcon::Small ) ),
+ i18n( "&Quit" ), this, SLOT(menuClose()), CTRL+Key_Q, MENU_QUIT );
+ fileMenu->setWhatsThis( MENU_QUIT, i18n( "The Quit command will stop all matches and exit Knights." ) );
+ /*
+ settingsMenu menu
+ */
+ // MENU_INSTALL_THEMES
+ settingsMenu->insertItem( i18n( "&Install Themes" ), this, SLOT(installThemes()), 0, MENU_INSTALL_THEMES );
+ settingsMenu->setWhatsThis( MENU_INSTALL_THEMES, i18n( "This lets you install downloaded themes into Knights." ) );
+ // MENU_BINDINGS_DIALOG
+ settingsMenu->insertItem( QIconSet( Resource->LoadIcon( QString("key_bindings"), KIcon::Small ) ),
+ i18n( "Configure &Key Bindings..." ), this, SLOT(openKeyBindingDialog()), 0, MENU_BINDINGS_DIALOG );
+ settingsMenu->setWhatsThis( MENU_BINDINGS_DIALOG, i18n( "Click this if you want to change the keyboard shortcuts that Knights uses." ) );
+ // MENU_SETTINGS_DIALOG
+ settingsMenu->insertItem( QIconSet( Resource->LoadIcon( QString("configure"), KIcon::Small ) ),
+ i18n( "&Configure Knights..." ), this, SLOT(openSettingsDialog()), 0, MENU_SETTINGS_DIALOG );
+ settingsMenu->setWhatsThis( MENU_SETTINGS_DIALOG, i18n( "This opens a new window which allows you to customize Knights to your particular tastes." ) );
+ /*
+ tutorialMenu menu
+ */
+ tutorialMenu->setCheckable(TRUE);
+ // MENU_OPEN_TUTORIAL
+ tutorialMenu->insertItem( i18n( "Begin a Tutorial" ), this, SLOT(Settings(int)), 0, MENU_OPEN_TUTORIAL );
+// tutorialMenu->setWhatsThis( MENU_OPEN_TUTORIAL, i18n( "" ) );
+ /*
+ topMenu menu
+ */
+ topMenu->insertItem( i18n( "&File" ), fileMenu );
+ topMenu->insertItem( i18n( "&Match" ), matchMenu );
+ topMenu->insertItem( i18n( "&Settings" ), settingsMenu );
+// topMenu->insertItem( i18n( "&Tutorials" ), tutorialMenu );
+ topMenu->insertSeparator();
+ topMenu->insertItem( i18n( "&Help" ), help );
+}
+///////////////////////////////////////
+//
+// Knights::resizeMainFrame
+//
+///////////////////////////////////////
+void Knights::resizeMainFrame(void)
+{
+ QStyle& Style = QApplication::style();
+ QSize S_Message;
+ QSize S_Menu;
+
+ int statusY(0);
+ int statusX(0);
+ int statusHeight(0);
+
+ /* Get some numbers */
+ margin = Style.defaultFrameWidth();
+ /* Take care of the Core first */
+ Core->move( 0, 0 );
+ Core->resize();
+ /* Get our size hints */
+ S_Message = Message->sizeHint();
+ S_Menu = topMenu->sizeHint();
+ statusHeight = S_Message.height() + ( margin << 1 );
+ statusY += Core->height() + margin + statusHeight + margin;
+ statusX = Core->width();
+
+ MainFrame->setFixedSize( statusX, statusY );
+ setFixedSize( statusX, statusY + S_Menu.height() );
+
+ /* enable or disable games in the menu */
+ if( Resource->servers.count() )
+ {
+ fileMenu->setItemEnabled( MENU_CONNECT, TRUE );
+ }
+ else
+ {
+ fileMenu->setItemEnabled( MENU_CONNECT, FALSE );
+ }
+}
+///////////////////////////////////////
+//
+// Knights::event
+//
+///////////////////////////////////////
+bool Knights::event( QEvent *e )
+{
+ if( e->type() == EVENT_Del_IO_Net )
+ {
+ netConnect();
+ return TRUE;
+ }
+ return KMainWindow::event( e );
+}
+///////////////////////////////////////
+//
+// Knights::resizeEvent
+//
+///////////////////////////////////////
+void Knights::resizeEvent( QResizeEvent * )
+{
+ QSize S_Message;
+ int tmp(0);
+ int statusHeight(0);
+ int statusY(0);
+ int statusX(0);
+ int gridX(0);
+
+ if( ResizeFlag ) return;
+ /* Get the height & Y of the status bar */
+ gridX = Core->width() >> 3;
+ S_Message = Message->sizeHint() + QSize( 2, 2 );
+ statusHeight = S_Message.height() + ( margin << 1 );
+ Resource->Widget_Height = statusHeight;
+ statusY += Core->height() + margin;
+
+ if( InitAll ) return;
+ /* Do the Message box */
+ tmp = gridX * 3;
+ Message->setFixedSize( tmp - ( margin << 1 ), statusHeight );
+ Message->move( margin, statusY );
+ statusX = tmp;
+ /* Do the White Time */
+ tmp = gridX + ( gridX >> 1 );
+ whiteTimeLabel->setFixedSize( tmp - margin, statusHeight );
+ whiteTimeLabel->move( statusX, statusY );
+ statusX += tmp;
+ /* Do the Black Time */
+ tmp = gridX + ( gridX >> 1 );
+ blackTimeLabel->setFixedSize( tmp - margin, statusHeight );
+ blackTimeLabel->move( statusX, statusY );
+ statusX += tmp;
+ /* Do the Notation Bar */
+ tmp = gridX << 1;
+ notationBar->setFixedSize( tmp - margin, statusHeight );
+ notationBar->move( statusX, statusY );
+ statusX += tmp;
+}
+///////////////////////////////////////
+//
+// Knights::keyPressEvent
+//
+///////////////////////////////////////
+void Knights::keyPressEvent( QKeyEvent *e )
+{
+ QChar input;
+
+ if( ( e->state() | Qt::ShiftButton ) == Qt::ShiftButton )
+ {
+ input = e->text().at(0);
+ if( input.isLetterOrNumber() )
+ {
+ emit focus( input );
+ e->accept();
+ return;
+ }
+ }
+ e->ignore();
+}
+///////////////////////////////////////
+//
+// Knights::hideEvent
+//
+///////////////////////////////////////
+void Knights::hideEvent( QHideEvent* )
+{
+ if( !Resource->OPTION_Pause_On_Minimize )
+ return;
+ Core->matchMenu( MENU_PAUSEALL );
+ Minimized = TRUE;
+}
+///////////////////////////////////////
+//
+// Knights::showEvent
+//
+///////////////////////////////////////
+void Knights::showEvent( QShowEvent* )
+{
+ if( !Minimized )
+ return;
+ Core->matchMenu( MENU_PAUSEALL );
+ Minimized = FALSE;
+}
+///////////////////////////////////////
+//
+// Knights::wheelEvent
+//
+///////////////////////////////////////
+void Knights::wheelEvent( QWheelEvent *event )
+{
+ event->accept();
+ if( event->delta() > 0 ) PrevNotation();
+ if( event->delta() < 0 ) NextNotation();
+}
+///////////////////////////////////////
+//
+// Knights::SelectTheme
+//
+///////////////////////////////////////
+void Knights::SelectTheme( int boardIndex, int chessmenIndex )
+{
+ Resource->setTheme( boardIndex, chessmenIndex );
+ resizeMainFrame();
+}
+///////////////////////////////////////
+//
+// Knights::setStatusBar
+//
+///////////////////////////////////////
+void Knights::setStatusBar( const int &ID, const QString &MSG )
+{
+ /* Game comments as specified in http://www.schachprobleme.de/chessml/faq/pgn/
+ Section 10: Numeric Annotation Glyphs */
+ if( ( ID & COMMENT ) == COMMENT )
+ {
+ Message->setText( pgn::getNAG( ID - COMMENT ) );
+ return;
+ }
+ /* Knights specific messages */
+ switch( ID )
+ {
+ /* Error Codes */
+ case BOOK_ERROR_1:
+ Message->setText( i18n( "Error with white engine" ) );
+ KMessageBox::sorry( this,
+ i18n("You selected %1 to play white,\nbut it can only be used as a book engine.\nPlease select another engine to play white.").arg( MSG ),
+ i18n("White Engine Problem") );
+ break;
+ case BOOK_ERROR_2:
+ Message->setText( i18n( "Error with white book engine" ) );
+ KMessageBox::sorry( this,
+ i18n("You selected %1 to play white's book,\nbut it can only be used as a regular engine.\nPlease select another engine to play white's book.").arg( MSG ),
+ i18n("White Book Engine Problem") );
+ break;
+ case BOOK_ERROR_3:
+ Message->setText( i18n( "Error with black engine" ) );
+ KMessageBox::sorry( this,
+ i18n("You selected %1 to play black,\nbut it can only be used as a book engine.\nPlease select another engine to play black.").arg( MSG ),
+ i18n("Black Engine Problem") );
+ break;
+ case BOOK_ERROR_4:
+ Message->setText( i18n( "Error with black book engine" ) );
+ KMessageBox::sorry( this,
+ i18n("You selected %1 to play black's book,\nbut it can only be used as a regular engine.\nPlease select another engine to play black's book.").arg( MSG ),
+ i18n("Black Book Engine Problem") );
+ break;
+ case ENGINE_DIED_ERROR:
+ Message->setText( i18n( "The computer opponent assigned to play %1 has crashed" ).arg( MSG ) );
+ break;
+ case LOAD_ERROR:
+ Message->setText( i18n( "There was an error while loading the file" ) );
+ break;
+ case SAVE_ERROR:
+ Message->setText( i18n( "There was an error while saving the file" ) );
+ break;
+ /* Standard Codes */
+ case LOAD_OK:
+ Message->setText( i18n( "Loading complete" ) );
+ break;
+ case SAVE_OK:
+ Message->setText( i18n( "Saving complete" ) );
+ break;
+ case READING_FILE:
+ Message->setText( i18n( "Reading File" ) );
+ break;
+ case NO_MOVE_WHILE_REVIEW:
+ Message->setText( i18n( "Can not move a chessman while reviewing the match" ) );
+ break;
+ case ILLEGAL_MOVE:
+ Message->setText( i18n( "Illegal Move" ) );
+ break;
+ case WHITE_TURN:
+ Message->setText( i18n( "White's turn" ) );
+ break;
+ case BLACK_TURN:
+ Message->setText( i18n( "Black's turn" ) );
+ break;
+ case WHITE_WIN:
+ Message->setText( i18n( "White wins" ) );
+ break;
+ case BLACK_WIN:
+ Message->setText( i18n( "Black wins" ) );
+ break;
+ case WHITE_CHECKMATE:
+ Message->setText( i18n( "Checkmate, White wins" ) );
+ break;
+ case BLACK_CHECKMATE:
+ Message->setText( i18n( "Checkmate, Black wins" ) );
+ break;
+ case WHITE_RESIGN:
+ Message->setText( i18n( "White resigns" ) );
+ break;
+ case BLACK_RESIGN:
+ Message->setText( i18n( "Black resigns" ) );
+ break;
+ case WHITE_FLAG:
+ Message->setText( i18n( "White's flag fell" ) );
+ break;
+ case BLACK_FLAG:
+ Message->setText( i18n( "Black's flag fell" ) );
+ break;
+ case WHITE_CALL_FLAG:
+ Message->setText( i18n( "Black's flag was called, White wins" ) );
+ break;
+ case BLACK_CALL_FLAG:
+ Message->setText( i18n( "White's flag was called, Black wins" ) );
+ break;
+ case GAME_DRAW:
+ Message->setText( i18n( "Draw match" ) );
+ break;
+ case GAME_50_MOVES:
+ Message->setText( i18n( "50 moves rule, draw match" ) );
+ break;
+ case WAITING:
+ Message->setText( i18n( "Starting computer players, please wait" ) );
+ break;
+ case PAUSED:
+ Message->setText( i18n( "Match paused" ) );
+ break;
+ case WHITE_DRAW_OFFER:
+ Message->setText( i18n( "White has offered a draw" ) );
+ break;
+ case BLACK_DRAW_OFFER:
+ Message->setText( i18n( "Black has offered a draw" ) );
+ break;
+ case LOST_CONTACT:
+ Message->setText( i18n( "Lost contact with opponent" ) );
+ case READY:
+ default:
+ Message->setText( i18n( "Ready" ) );
+ break;
+ }
+}
+///////////////////////////////////////
+//
+// Knights::setClocks
+//
+///////////////////////////////////////
+void Knights::setClocks( void )
+{
+ whiteTimeLabel->setText( Core->clock( WHITE ) );
+ blackTimeLabel->setText( Core->clock( BLACK ) );
+ if( Core->flag( WHITE ) )
+ if( Core->blackInput() == PLAYERLOCAL )
+ matchMenu->setItemEnabled( MENU_CALL_FLAG, TRUE );
+ else
+ matchMenu->setItemEnabled( MENU_CALL_FLAG, FALSE );
+ if( Core->flag( BLACK ) )
+ if( Core->whiteInput() == PLAYERLOCAL )
+ matchMenu->setItemEnabled( MENU_CALL_FLAG, TRUE );
+ else
+ matchMenu->setItemEnabled( MENU_CALL_FLAG, FALSE );
+}
+///////////////////////////////////////
+//
+// Knights::setNotation
+//
+///////////////////////////////////////
+void Knights::setNotation( void )
+{
+ QStringList *list;
+ QStringList::Iterator IT;
+ int count(0);
+
+ setCaption( Core->caption() );
+ notationBar->clear();
+ list = Core->notation();
+ /*
+ Several menu items' status changes based upon the availability
+ of notation data. Therefore, we'll enable & disable those here
+ since we've gathered the notation data anyway.
+ */
+ if( list == NULL )
+ {
+ /* Disable Save & Print Functions */
+ fileMenu->setItemEnabled( MENU_SAVE, FALSE );
+ fileMenu->setItemEnabled( MENU_SAVEAS, FALSE );
+ fileMenu->setItemEnabled( MENU_PRINT, FALSE );
+ matchMenu->setItemEnabled( MENU_RETRACT, FALSE );
+ return;
+ }
+ if( Core->modified() )
+ fileMenu->setItemEnabled( MENU_SAVE, TRUE );
+ else
+ fileMenu->setItemEnabled( MENU_SAVE, FALSE );
+ /* Core->onMove is called before it is updated by Match->slot_Move. Because of this, the following
+ if statement checks for the wrong player's turn. On purpose */
+ if( ( Core->inputOnMove() == PLAYERLOCAL ) && ( Core->inputOnMove(TRUE) == PLAYERPC ) && list->count() )
+ matchMenu->setItemEnabled( MENU_RETRACT, TRUE );
+ else
+ matchMenu->setItemEnabled( MENU_RETRACT, FALSE );
+ fileMenu->setItemEnabled( MENU_SAVEAS, TRUE );
+ fileMenu->setItemEnabled( MENU_PRINT, TRUE );
+
+ /* Create the List */
+ for( IT = list->begin(); IT != list->end(); ++IT )
+ {
+ notationBar->insertItem( (*IT), count++ );
+ }
+ notationBar->setCurrentItem( --count );
+ delete list;
+}
+///////////////////////////////////////
+//
+// Knights::PrevNotation
+//
+///////////////////////////////////////
+void Knights::PrevNotation( void )
+{
+ int tmp( notationBar->currentItem() - 1 );
+ Core->review( tmp ); // Do this before the bounds checking in case this is examine mode
+ if( tmp < 0 )
+ return;
+ notationBar->setCurrentItem( tmp );
+}
+///////////////////////////////////////
+//
+// Knights::NextNotation
+//
+///////////////////////////////////////
+void Knights::NextNotation( void )
+{
+ int tmp( notationBar->currentItem() + 1 );
+ Core->review( tmp ); // Do this before the bounds checking in case this is examine mode
+ if( tmp > ( notationBar->count() - 1 ) )
+ return;
+ notationBar->setCurrentItem( tmp );
+}
+///////////////////////////////////////
+//
+// Knights::initMatch
+//
+///////////////////////////////////////
+void Knights::initMatch( void )
+{
+ setNotation();
+
+ /* Are there any players? ( ie - is this a match or a null? */
+ if( ( Core->whiteInput() == Null ) || ( Core->blackInput() == Null ) )
+ {
+ fileMenu->setItemEnabled( MENU_CLOSE, FALSE );
+ fileMenu->setItemEnabled( MENU_CLOSEALL, FALSE );
+ matchMenu->setItemEnabled( MENU_ORIENTATION, FALSE );
+ whiteTimeLabel->setText( "" );
+ blackTimeLabel->setText( "" );
+ setStatusBar( READY );
+ }
+ else
+ {
+ fileMenu->setItemEnabled( MENU_CLOSE, TRUE );
+ fileMenu->setItemEnabled( MENU_CLOSEALL, TRUE );
+ matchMenu->setItemEnabled( MENU_ORIENTATION, TRUE );
+ }
+
+ /* Is there a local player? */
+ if( ( Core->whiteInput() == PLAYERLOCAL ) || ( Core->blackInput() == PLAYERLOCAL ) )
+ {
+ matchMenu->setItemEnabled( MENU_DRAW, TRUE );
+ matchMenu->setItemEnabled( MENU_RESIGN, TRUE );
+ /* Is there also a PC player? */
+ if( ( Core->whiteInput() == PLAYERPC ) || ( Core->blackInput() == PLAYERPC ) )
+ {
+ }
+ }
+ else
+ {
+ matchMenu->setItemEnabled( MENU_DRAW, FALSE );
+ matchMenu->setItemEnabled( MENU_RESIGN, FALSE );
+ }
+ /* Is there a PC player? */
+ if( ( Core->whiteInput() == PLAYERPC ) || ( Core->blackInput() == PLAYERPC ) )
+ {
+ matchMenu->setItemEnabled( MENU_MOVE_NOW, TRUE );
+ matchMenu->setItemEnabled( MENU_HINT, TRUE );
+ matchMenu->setItemEnabled( MENU_PONDER, TRUE );
+ matchMenu->setItemEnabled( MENU_PAUSE, TRUE );
+ }
+ else
+ {
+ matchMenu->setItemEnabled( MENU_MOVE_NOW, FALSE );
+ matchMenu->setItemEnabled( MENU_HINT, FALSE );
+ matchMenu->setItemEnabled( MENU_PONDER, FALSE );
+ matchMenu->setItemEnabled( MENU_PAUSE, FALSE );
+ }
+ /* Is there a TCP player? */
+// if( ( Core->whiteInput() == PLAYERTCP ) || ( Core->blackInput() == PLAYERTCP ) )
+// {
+// }
+// else
+// {
+// }
+}
+///////////////////////////////////////
+//
+// Knights::netConnect
+//
+///////////////////////////////////////
+void Knights::netConnect( void )
+{
+ if(Core->isOnline())
+ {
+ fileMenu->changeItem( MENU_CONNECT, QIconSet( Resource->LoadIcon( QString("connect_creating"),
+ KIcon::Small ) ), i18n( "Connect to Server" ));
+ Core->goOffline();
+ setCursor( Resource->CURSOR_Standard );
+ }
+ else
+ {
+ fileMenu->changeItem( MENU_CONNECT, QIconSet( Resource->LoadIcon( QString("connect_no"),
+ KIcon::Small ) ), i18n( "Disconnect from Server" ) );
+ /*
+ By passing Null as the ID, we're telling core that we're
+ creating a new internetio, not reusing an exsisting one.
+ */
+ Core->createNewIO( PLAYERTCP, Null);
+ }
+}
+///////////////////////////////////////
+//
+// Knights::openSettingsDialog
+//
+///////////////////////////////////////
+void Knights::openSettingsDialog( void )
+{
+ SettingsDialog = new dlg_settings( this, "settings", Resource );
+ connect( SettingsDialog, SIGNAL( themeChanged(int,int) ), this, SLOT( SelectTheme(int,int) ) );
+ connect( SettingsDialog, SIGNAL( redrawBoard() ), Core, SLOT( resize() ) );
+ connect( SettingsDialog, SIGNAL( resetServer() ), Core, SLOT( resetServer() ) );
+ connect( this, SIGNAL( themesAdded() ), SettingsDialog, SLOT( slotThemesAdded() ) );
+ SettingsDialog->show();
+}
+///////////////////////////////////////
+//
+// Knights::openNewMatchDialog
+//
+///////////////////////////////////////
+void Knights::openNewMatchDialog( void )
+{
+ NewMatch = new dlg_newmatch( this, "NewMatch", Resource );
+ connect( NewMatch, SIGNAL( okClicked() ), this, SLOT( newMatch() ) );
+ NewMatch->show();
+}
+///////////////////////////////////////
+//
+// Knights::newMatch
+//
+///////////////////////////////////////
+void Knights::newMatch( void )
+{
+ Core->newMatch( NewMatch->paramaters() );
+}
+///////////////////////////////////////
+//
+// Knights::openKeyBindingDialog
+//
+///////////////////////////////////////
+void Knights::openKeyBindingDialog( void )
+{
+ KKeyDialog::configureKeys( myAccel, TRUE, this );
+}
+///////////////////////////////////////
+//
+// Knights::Settings
+//
+///////////////////////////////////////
+void Knights::Settings(int opt)
+{
+ switch(opt)
+ {
+ case MENU_PONDER:
+ Resource->OPTION_Ponder = 1 - Resource->OPTION_Ponder;
+ matchMenu->setItemChecked(MENU_PONDER, Resource->OPTION_Ponder );
+ Core->matchMenu( MENU_PONDER );
+ break;
+ case MENU_PAUSE:
+ if( Core->paused() )
+ {
+ matchMenu->changeItem( MENU_PAUSE,
+ QIconSet( Resource->LoadIcon( QString("player_pause"), KIcon::Small ) ),
+ i18n( "Pause" ) );
+ }
+ else
+ {
+ matchMenu->changeItem( MENU_PAUSE,
+ QIconSet( Resource->LoadIcon( QString("1rightarrow"), KIcon::Small ) ),
+ i18n( "Resume" ) );
+ }
+ Core->matchMenu( MENU_PAUSE );
+ break;
+ default:
+ break;
+ }
+}
+///////////////////////////////////////
+//
+// Knights::SaveGame & Variants
+//
+///////////////////////////////////////
+bool Knights::SaveGame( void )
+{
+ /* We use 'Null' to indicate the current match */
+ return Core->save( Null, FALSE, FALSE );
+}
+bool Knights::SaveGamePrompt( void )
+{
+ return Core->save( Null, TRUE, FALSE );
+}
+bool Knights::SaveGameAs( void )
+{
+ return Core->save( Null, FALSE, TRUE );
+}
+///////////////////////////////////////
+//
+// Knights::boardBigger
+//
+///////////////////////////////////////
+void Knights::boardBigger( void )
+{
+ Resource->resizeTheme( Resource->ThemeSize + 8 );
+ resizeMainFrame();
+}
+///////////////////////////////////////
+//
+// Knights::boardSmaller
+//
+///////////////////////////////////////
+void Knights::boardSmaller( void )
+{
+ Resource->resizeTheme( Resource->ThemeSize - 8 );
+ resizeMainFrame();
+}
+
+///////////////////////////////////////
+//
+// Knights::installThemes
+//
+///////////////////////////////////////
+void Knights::installThemes( void )
+{
+ bool localFlag(FALSE);
+ bool installError(FALSE);
+ unsigned int loop;
+ QString allerror;
+ QString fileFilter( "KB* KC* KS*|" );
+ fileFilter += i18n( "Knights Themes" );
+ KURL::List files = KFileDialog::getOpenURLs( QString::null, fileFilter, this, i18n( "Install Theme..." ) );
+ for( loop = 0; loop < files.count(); loop++ )
+ {
+ /* Try writing to the global theme dir */
+ if( !KIO::NetAccess::copy( files[loop], KURL( QString( Resource->themeDir() + files[loop].filename() ) ) ) )
+ {
+ /* Nope... Try a local .knights dir */
+ allerror += "\n\n" + QString( Resource->themeDir() + files[loop].filename() )
+ + " - " + KIO::NetAccess::lastErrorString();
+ if( !KIO::NetAccess::exists( KURL( QString( QDir::homeDirPath() + "/.knights" ) ) ) )
+ {
+ /* Create local .knights dir */
+ KIO::NetAccess::mkdir( KURL( QString( QDir::homeDirPath() + "/.knights" ) ) );
+ }
+ if( !KIO::NetAccess::copy( files[loop], KURL( QString( QDir::homeDirPath() + "/.knights/" + files[loop].filename() ) ) ) )
+ {
+ /* Nope, can't copy it anywhere */
+ installError = TRUE;
+ allerror += "\n\n" + QString( QDir::homeDirPath() + "/.knights/"
+ + files[loop].filename() ) + " - " + KIO::NetAccess::lastErrorString();
+ }
+ else
+ {
+ localFlag = TRUE;
+ }
+ }
+ }
+ if( localFlag )
+ {
+ KMessageBox::sorry( this,
+ i18n("You do not have permission to install this theme systemwide, so Knights installed it locally."),
+ i18n("Installed theme locally") );
+ }
+ if( installError )
+ {
+ KMessageBox::sorry( this,
+ i18n("The theme could not be installed:\n%1").arg( allerror ),
+ i18n("Can not install theme") );
+ }
+ return;
+}
diff --git a/knights/knights.desktop b/knights/knights.desktop
new file mode 100644
index 0000000..603108c
--- /dev/null
+++ b/knights/knights.desktop
@@ -0,0 +1,16 @@
+[Desktop Entry]
+Type=Application
+Exec=knights
+Icon=knights.png
+MiniIcon=knights.png
+Name=Knights
+Name[de]=Knights
+Comment=A graphical chess interface
+Comment[de]=A graphical chess interface
+InitialPreference=1
+MimeType=application/x-chess-pgn,Application
+ServiceTypes=
+DocPath=knights/index.html
+Terminal=false
+
+
diff --git a/knights/knights.h b/knights/knights.h
new file mode 100644
index 0000000..a17aaa6
--- /dev/null
+++ b/knights/knights.h
@@ -0,0 +1,145 @@
+/***************************************************************************
+ knights.h - description
+ -------------------
+ begin : Thu Mar 1 10:43:51 CST 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef KNIGHTS_H
+#define KNIGHTS_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+/* KDEBase */
+#include <kapp.h>
+#include <kmainwindow.h>
+#include <khelpmenu.h>
+#include <kaboutdata.h>
+#include <kstatusbar.h>
+#include <kcmdlineargs.h>
+/* QT */
+#include <qlayout.h>
+#include <qwidget.h>
+#include <qpixmap.h>
+#include <qstring.h>
+/* Local */
+#include "definitions.h"
+#include "resource.h"
+#include "accel.h"
+
+class KMenuBar;
+class KPopupMenu;
+class KComboBox;
+class QLabel;
+class QFrame;
+class dlg_settings;
+class dlg_newmatch;
+class core;
+class splash;
+
+/**
+ Knights is the top-level widget of the project.
+ It is responsable for creating the menu bar and it's contents,
+ as well as creating an instance of the game itself ( class Grid )
+**/
+class Knights : public KMainWindow
+{
+ Q_OBJECT
+ public:
+ KAboutData *aboutData;
+ resource *Resource;
+
+ Knights( KCmdLineArgs *Args, QWidget* parent=0, const char *name=0 );
+ ~Knights();
+ bool init( void );
+ void initMenus( void );
+ void BirthAll( void );
+ void keyPressEvent( QKeyEvent* );
+
+ public slots:
+ void KillAll( void );
+ void menuClose( void );
+ /** Yeah, they're sloppy, but I need my own geometry managment routines
+ because I don't like the "default" look my statusbar was getting
+ ( double-height ). Plus, I want the console to appear only when needed. */
+ void resizeMainFrame( void );
+
+ bool event( QEvent* );
+ void resizeEvent( QResizeEvent* );
+ void hideEvent( QHideEvent* );
+ void showEvent( QShowEvent* );
+ void wheelEvent( QWheelEvent* );
+
+ void setStatusBar( const int &ID, const QString& MSG=QString::null );
+
+ void setClocks( void );
+ void initMatch( void );
+
+ void setNotation( void );
+ void PrevNotation( void );
+ void NextNotation( void );
+
+ void SelectTheme( int boardIndex, int chessmenIndex );
+ void Settings( int opt );
+ void openSettingsDialog( void );
+ void openNewMatchDialog( void );
+ void openKeyBindingDialog( void );
+ bool SaveGame( void );
+ bool SaveGamePrompt( void );
+ bool SaveGameAs( void );
+
+ void netConnect( void );
+
+ signals:
+ void themesAdded( void );
+ void focus( const QChar& );
+
+ protected:
+ bool queryClose( void );
+
+ protected slots:
+ void boardSmaller( void );
+ void boardBigger( void );
+ void installThemes( void );
+ void newMatch( void );
+
+ private:
+ KCmdLineArgs *args;
+ KMenuBar *topMenu;
+ KPopupMenu *help;
+ KPopupMenu *fileMenu;
+ KPopupMenu *settingsMenu;
+ KPopupMenu *matchMenu;
+ KPopupMenu *drawMenu;
+ KPopupMenu *tutorialMenu;
+ KComboBox *notationBar;
+ QFrame *MainFrame;
+ QLabel *whiteTimeLabel;
+ QLabel *blackTimeLabel;
+ QLabel *Message;
+ dlg_settings *SettingsDialog;
+ dlg_newmatch *NewMatch;
+ core *Core;
+ splash *SplashScreen;
+ Accel *myAccel;
+
+ int NotationIndex;
+ bool InitAll;
+ bool Minimized;
+ bool ResizeFlag;
+ int margin;
+};
+
+#endif
diff --git a/knights/knightsmap.h b/knights/knightsmap.h
new file mode 100644
index 0000000..a3b1d3d
--- /dev/null
+++ b/knights/knightsmap.h
@@ -0,0 +1,178 @@
+/***************************************************************************
+ knightsmap.h - description
+ -------------------
+ begin : Sun Aug 25 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <qvaluelist.h>
+
+#ifndef KNIGHTSMAP_H
+#define KNIGHTSMAP_H
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+template<class Key, class T>
+class KnightsMap
+{
+public:
+ typedef Key KeyType;
+ typedef T DataType;
+ typedef struct Pair
+ {
+ KeyType key;
+ DataType data;
+ };
+
+private:
+ QValueList<Pair> pairList;
+
+ Key searchKey;
+ unsigned int searchIndex;
+ T nullValue;
+ T tempValue;
+
+public:
+ /*
+ Constructor
+ */
+ KnightsMap()
+ {
+ nullValue = 0;
+ clear();
+ }
+
+ /*
+ Destructor
+ */
+ ~KnightsMap()
+ { clear(); }
+
+ /*
+ Returns the number of items in the map
+ */
+unsigned int count( void )
+ { return pairList.count(); }
+
+ /*
+ Clears the map
+ */
+void clear( void )
+ {
+ searchIndex = 0;
+ pairList.clear();
+ }
+
+ /*
+ Add a Key/Value pair to the map
+ */
+void add( KeyType key, DataType data )
+ {
+ Pair newPair;
+ newPair.key = key;
+ newPair.data = data;
+ pairList.append( newPair );
+ }
+
+ /*
+ Return the next Value associated with the Key given
+ in the last call to 'find'. If there are none, then
+ NULL is returned.
+ */
+T& findNext( void )
+ {
+ unsigned int maxIndex( pairList.count() );
+ for( ; searchIndex < maxIndex ; searchIndex++ )
+ {
+ if( searchKey != pairList[searchIndex].key )
+ {
+ continue;
+ }
+ return pairList[searchIndex++].data;
+ }
+ return nullValue;
+ }
+
+ /*
+ Lookup a Value by it's key. This will always return
+ the first Value that's associated with the given Key.
+ If no Value has the given Key, NULL is returned.
+ */
+T& find( KeyType key )
+ {
+ searchKey = key;
+ searchIndex = 0;
+ return findNext();
+ }
+
+ /* Removes all Values that are associated with Key */
+T& remove( KeyType key )
+ {
+ QValueListIterator<Pair> IT( pairList.begin() );
+ while( IT != pairList.end() )
+ {
+ if( (*IT).key == key )
+ {
+ tempValue = (*IT).data;
+ IT = pairList.remove( IT );
+ return tempValue;
+ }
+ IT++;
+ }
+ return nullValue;
+ }
+
+ /* Return the Value stored at Index i */
+T& operator[]( unsigned int i )
+ { return pairList[i].data; }
+
+ /* Return the Key stored at Index i */
+Key& keyAt( unsigned int i )
+ { return pairList[i].key; }
+
+ /*
+ Return the Value stored one Index position previous
+ to the last returned search Value. If already at the
+ begining of the Map, then NULL is returned.
+ */
+T& operator--( void )
+ {
+ if( searchIndex > 1 )
+ {
+ searchIndex -= 2;
+ }
+ else
+ {
+ return nullValue;
+ }
+ return pairList[searchIndex++].data;
+ }
+
+ /*
+ Return the Value stored one Index position after
+ the last returned search Value. If already at the
+ end of the Map, then NULL is returned.
+ */
+T& operator++( void )
+ {
+ if( searchIndex >= count() )
+ {
+ return nullValue;
+ }
+ return pairList[searchIndex++].data;
+ }
+};
+
+#endif
diff --git a/knights/knightspixcache.cpp b/knights/knightspixcache.cpp
new file mode 100644
index 0000000..5f7a26e
--- /dev/null
+++ b/knights/knightspixcache.cpp
@@ -0,0 +1,156 @@
+/***************************************************************************
+ knightspixcache.cpp - description
+ -------------------
+ begin : Mon Aug 20 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "knightspixcache.h"
+#include "definitions.h"
+
+KnightsPixCache::KnightsPixCache()
+{
+ bytesTotal = 1024 * 1024;
+ bytesUsed = 0;
+}
+KnightsPixCache::~KnightsPixCache()
+{
+ clear();
+ bytesUsed = 0;
+}
+///////////////////////////////////////
+//
+// KnightsPixCache::cacheLimit
+//
+///////////////////////////////////////
+unsigned int KnightsPixCache::cacheLimit( void )
+{
+ return ( bytesTotal / 1024 );
+}
+///////////////////////////////////////
+//
+// KnightsPixCache::setCacheLimit
+//
+///////////////////////////////////////
+void KnightsPixCache::setCacheLimit( const unsigned int &limit )
+{
+ bytesTotal = limit * 1024;
+}
+///////////////////////////////////////
+//
+// KnightsPixCache::clear
+//
+///////////////////////////////////////
+void KnightsPixCache::clear( void )
+{
+ list.clear();
+}
+///////////////////////////////////////
+//
+// KnightsPixCache::cleanCache
+//
+///////////////////////////////////////
+void KnightsPixCache::cleanCache( const unsigned int &space )
+{
+ pixmapList::Iterator tmpIT;
+ register unsigned int age;
+
+ while( bytesUsed + space > bytesTotal )
+ {
+ if( list.count() == 0 ) return;
+ age = 0;
+ for( IT = list.begin(); IT != list.end(); ++IT )
+ {
+ if( (*IT).age > age )
+ {
+ age = (*IT).age;
+ tmpIT = IT;
+ }
+ }
+ bytesUsed -= (*tmpIT).bytes;
+ list.remove( tmpIT );
+ }
+}
+///////////////////////////////////////
+//
+// KnightsPixCache::add
+//
+///////////////////////////////////////
+void KnightsPixCache::add( const QString &label, const QPixmap &pixmap )
+{
+ unsigned int tmp;
+ cacheItem newItem;
+
+ if( pixmap.isNull() )
+ return;
+ tmp = ( pixmap.width() * pixmap.height() * pixmap.depth() ) >> 3;
+ if( ( bytesUsed + tmp ) > bytesTotal )
+ cleanCache(tmp);
+
+ newItem.label = label;
+ newItem.bytes = tmp;
+ newItem.item = pixmap;
+ newItem.age = 0;
+ list.append( newItem );
+ bytesUsed += tmp;
+}
+///////////////////////////////////////
+//
+// KnightsPixCache::find
+//
+///////////////////////////////////////
+bool KnightsPixCache::find( const QString &label, QPixmap &pixmap )
+{
+ bool status(FALSE);
+ for( IT = list.begin(); IT != list.end(); ++IT )
+ {
+ if( (*IT).label == label )
+ {
+ pixmap = (*IT).item;
+ (*IT).age = 0;
+ status = TRUE;
+ }
+ else
+ (*IT).age++;
+ }
+ return status;
+}
+///////////////////////////////////////
+//
+// KnightsPixCache::resize
+//
+///////////////////////////////////////
+void KnightsPixCache::resize( const int &size )
+{
+ SquareLight.convertFromImage( Orig_SquareLight.smoothScale( size, size ) );
+ SquareDark.convertFromImage( Orig_SquareDark.smoothScale( size, size ) );
+ HighlightSelect.convertFromImage( Orig_HighlightSelect.smoothScale( size, size ) );
+ HighlightMove.convertFromImage( Orig_HighlightMove.smoothScale( size, size ) );
+ HighlightAttack.convertFromImage( Orig_HighlightAttack.smoothScale( size, size ) );
+ BlackKing.convertFromImage( Orig_BlackKing.smoothScale( size, size ) );
+ BlackQueen.convertFromImage( Orig_BlackQueen.smoothScale( size, size ) );
+ BlackBishop.convertFromImage( Orig_BlackBishop.smoothScale( size, size ) );
+ BlackKnight.convertFromImage( Orig_BlackKnight.smoothScale( size, size ) );
+ BlackRook.convertFromImage( Orig_BlackRook.smoothScale( size, size ) );
+ BlackPawn.convertFromImage( Orig_BlackPawn.smoothScale( size, size ) );
+ WhiteKing.convertFromImage( Orig_WhiteKing.smoothScale( size, size ) );
+ WhiteQueen.convertFromImage( Orig_WhiteQueen.smoothScale( size, size ) );
+ WhiteBishop.convertFromImage( Orig_WhiteBishop.smoothScale( size, size ) );
+ WhiteKnight.convertFromImage( Orig_WhiteKnight.smoothScale( size, size ) );
+ WhiteRook.convertFromImage( Orig_WhiteRook.smoothScale( size, size ) );
+ WhitePawn.convertFromImage( Orig_WhitePawn.smoothScale( size, size ) );
+ Border.convertFromImage( Orig_Border.smoothScale( size * 9, size * 9) );
+ BorderLightOn.convertFromImage( Orig_BorderLightOn.smoothScale( size / 2, size / 2) );
+ BorderLightOff.convertFromImage( Orig_BorderLightOff.smoothScale( size / 2, size / 2) );
+ return;
+}
diff --git a/knights/knightspixcache.h b/knights/knightspixcache.h
new file mode 100644
index 0000000..75b9cc7
--- /dev/null
+++ b/knights/knightspixcache.h
@@ -0,0 +1,104 @@
+/***************************************************************************
+ knightspixcache.h - description
+ -------------------
+ begin : Mon Aug 20 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef KNIGHTSPIXCACHE_H
+#define KNIGHTSPIXCACHE_H
+
+#include <qvaluelist.h>
+#include <qpixmap.h>
+#include <qimage.h>
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+typedef struct cacheItem
+{
+ QString label;
+ QPixmap item;
+ unsigned int bytes;
+ unsigned int age;
+};
+
+typedef QValueList<cacheItem> pixmapList;
+
+class KnightsPixCache
+{
+ public:
+ QPixmap SquareLight;
+ QPixmap SquareDark;
+ QPixmap HighlightSelect;
+ QPixmap HighlightMove;
+ QPixmap HighlightAttack;
+ QPixmap BlackKing;
+ QPixmap BlackQueen;
+ QPixmap BlackBishop;
+ QPixmap BlackKnight;
+ QPixmap BlackRook;
+ QPixmap BlackPawn;
+ QPixmap WhiteKing;
+ QPixmap WhiteQueen;
+ QPixmap WhiteBishop;
+ QPixmap WhiteKnight;
+ QPixmap WhiteRook;
+ QPixmap WhitePawn;
+ QPixmap Border;
+ QPixmap BorderLightOn;
+ QPixmap BorderLightOff;
+
+ QImage Orig_SquareLight;
+ QImage Orig_SquareDark;
+ QImage Orig_HighlightSelect;
+ QImage Orig_HighlightMove;
+ QImage Orig_HighlightAttack;
+ QImage Orig_BlackKing;
+ QImage Orig_BlackQueen;
+ QImage Orig_BlackBishop;
+ QImage Orig_BlackKnight;
+ QImage Orig_BlackRook;
+ QImage Orig_BlackPawn;
+ QImage Orig_WhiteKing;
+ QImage Orig_WhiteQueen;
+ QImage Orig_WhiteBishop;
+ QImage Orig_WhiteKnight;
+ QImage Orig_WhiteRook;
+ QImage Orig_WhitePawn;
+ QImage Orig_Border;
+ QImage Orig_BorderLightOn;
+ QImage Orig_BorderLightOff;
+
+ KnightsPixCache();
+ ~KnightsPixCache();
+ void clear( void );
+ void setCacheLimit( const unsigned int &limit );
+ unsigned int cacheLimit( void );
+ void add( const QString &label, const QPixmap &pixmap );
+ bool find( const QString &label, QPixmap &pixmap);
+ void resize( const int &size );
+
+ private:
+
+ pixmapList list;
+ pixmapList::Iterator IT;
+
+ unsigned int bytesUsed;
+ unsigned int bytesTotal;
+
+ void cleanCache( const unsigned int &space );
+};
+
+#endif
diff --git a/knights/knightstextview.cpp b/knights/knightstextview.cpp
new file mode 100644
index 0000000..dc14936
--- /dev/null
+++ b/knights/knightstextview.cpp
@@ -0,0 +1,238 @@
+/***************************************************************************
+ knightstextview.cpp - description
+ -------------------
+ begin : Sun Dec 16 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "knightstextview.moc"
+#include "definitions.h"
+#include "resource.h"
+#include <kdebug.h>
+#include <kpopupmenu.h>
+#include <kiconloader.h>
+#include <kurl.h>
+#include <krun.h>
+
+// Used for printing functionality
+#include <qpaintdevicemetrics.h>
+#include <qpainter.h>
+#include <qfontmetrics.h>
+#include <kprinter.h>
+#include <qsimplerichtext.h>
+
+KnightsTextView::KnightsTextView(QWidget *parent, resource *Rsrc ) : QTextBrowser(parent)
+{
+ myResource = Rsrc;
+ setReadOnly( TRUE );
+ setTextFormat( Qt::RichText );
+ menuView = new KPopupMenu( this );
+ /*
+ Configure functions in the View right click menu
+ */
+ menuView->insertItem( QIconSet( Rsrc->LoadIcon( QString("editcopy"), KIcon::Small ) ),
+ i18n( "&Copy" ), this, SLOT( menuFunct(int) ), CTRL+Key_C, MENU_COPY );
+ menuView->insertItem( i18n("Select &All"), this, SLOT( menuFunct(int) ), CTRL+Key_A, MENU_SELECT_ALL );
+ menuView->insertSeparator();
+ menuView->insertItem( QIconSet( Rsrc->LoadIcon( QString("fileprint"), KIcon::Small ) ),
+ i18n( "&Print" ), this, SLOT( menuFunct(int) ), CTRL+Key_P, MENU_PRINT );
+// menuView->insertItem( QIconSet( Rsrc->LoadIcon( QString("find"), KIcon::Small ) ),
+// i18n( "&Find" ), this, SLOT( menuFunct(int) ), CTRL+Key_F, MENU_FIND );
+// menuView->insertItem( QIconSet( Rsrc->LoadIcon( QString("next"), KIcon::Small ) ),
+// i18n( "Find &Next" ), this, SLOT( menuFunct(int) ), Key_F3, MENU_FIND_NEXT );
+// menuView->insertSeparator();
+ menuView->insertSeparator();
+ menuView->insertItem( QIconSet( Rsrc->LoadIcon( QString("viewmag+"), KIcon::Small ) ),
+ i18n( "Zoom &In" ), this, SLOT( menuFunct(int) ), 0, MENU_ZOOM_IN );
+ menuView->insertItem( QIconSet( Rsrc->LoadIcon( QString("viewmag-"), KIcon::Small ) ),
+ i18n( "Zoom &Out" ), this, SLOT( menuFunct(int) ), 0, MENU_ZOOM_OUT );
+
+ /* disconnect the linkClicked signal so we can replace it with our own */
+ disconnect(this, SIGNAL(linkClicked(const QString&)),this ,0);
+ /* connect the linkClicked signal to displayLink slot */
+ connect(this, SIGNAL(linkClicked(const QString&)), this, SLOT(displayLink(const QString&)));
+
+ show();
+}
+
+KnightsTextView::~KnightsTextView()
+{
+ delete menuView;
+}
+
+///////////////////////////////////////
+//
+// KnightsTextView::viewportMousePressEvent
+//
+///////////////////////////////////////
+void KnightsTextView::viewportMousePressEvent( QMouseEvent *e )
+{
+ if( e->button() == RightButton )
+ {
+ emit rightButtonClicked( e->globalPos() );
+ display_menuView( e->globalPos() );
+ }
+ QTextEdit::viewportMousePressEvent( e );
+}
+///////////////////////////////////////
+//
+// KnightsTextView::display_menuView
+//
+///////////////////////////////////////
+void KnightsTextView::display_menuView( const QPoint &Pos )
+{
+ if( hasSelectedText() )
+ {
+ menuView->setItemEnabled( MENU_COPY, TRUE );
+ }
+ else
+ {
+ menuView->setItemEnabled( MENU_COPY, FALSE );
+ }
+ menuView->popup( Pos );
+}
+///////////////////////////////////////
+//
+// KnightsTextView::menuFunct
+//
+///////////////////////////////////////
+void KnightsTextView::menuFunct( int funct )
+{
+ switch( funct )
+ {
+ case MENU_COPY:
+ copy();
+ break;
+ case MENU_SELECT_ALL:
+ selectAll();
+ break;
+ case MENU_ZOOM_IN:
+ zoomIn();
+ break;
+ case MENU_ZOOM_OUT:
+ zoomOut();
+ break;
+ case MENU_PRINT:
+ print();
+ break;
+ default:
+ break;
+ }
+}
+///////////////////////////////////////
+//
+// KnightsTextView::pageMove
+//
+///////////////////////////////////////
+void KnightsTextView::pageMove( Qt::Key key )
+{
+ int NewY;
+ if( key == Key_PageUp )
+ {
+ NewY = contentsY() - visibleHeight();
+ if( NewY < 0 )
+ NewY = 0;
+ }
+ else
+ {
+ NewY = contentsY() + visibleHeight();
+ if( NewY > ( contentsHeight() - visibleHeight() ) )
+ NewY = contentsHeight() - visibleHeight();
+ }
+ setContentsPos( 0, NewY );
+ updateContents( 0, NewY, visibleWidth(), visibleHeight() );
+}
+
+///////////////////////////////////////
+//
+// KnightsTextView::displayLink(QString url)
+//
+///////////////////////////////////////
+void KnightsTextView::displayLink(const QString& urlString)
+{
+ KURL url(urlString);
+ new KRun(url);
+}
+
+///////////////////////////////////////
+//
+// KnightsTextView::print
+//
+///////////////////////////////////////
+void KnightsTextView::print( void )
+{
+ KPrinter printer( true, QPrinter::ScreenResolution );
+ viewport()->setCursor( waitCursor );
+
+ /* Make sure we want to print */
+ if( printer.setup() )
+ {
+ QPainter paint( &printer );
+ QPaintDeviceMetrics pageMetrics( paint.device() );
+
+ /* Setup sizes */
+ int dpix = pageMetrics.logicalDpiX();
+ int dpiy = pageMetrics.logicalDpiY();
+ const int margin = 36; // pt
+ QRect body( margin * dpix / 72, margin * dpiy / 72,
+ pageMetrics.width() - margin * dpix / 72 * 2,
+ pageMetrics.height() - margin * dpiy / 72 * 2 );
+ QRect view( body );
+
+ printer.setFullPage( true );
+ printer.setCreator( "Knights" );
+ QSimpleRichText simpText( this->text(), this->font() );
+ simpText.setWidth( view.width() );
+
+ /* Count Pages */
+ int currentPage = 1;
+ int totalPages = simpText.height() / view.height();
+ if( view.height() * totalPages < simpText.height() )
+ {
+ totalPages++;
+ }
+
+ /* Print */
+ while( 1 )
+ {
+ /* Print the Contents */
+ paint.setClipRect( body );
+ simpText.draw( &paint, body.left(), body.top(), view, colorGroup() );
+ paint.setClipping( false );
+ view.moveBy( 0, body.height() );
+ paint.translate( 0, -body.height() );
+
+ /* Print the Page Number */
+ paint.setFont( myResource->FONT_Standard );
+ paint.setPen( myResource->COLOR_Black );
+ QString pageCount = i18n( "Page %1 of %2" ).arg( currentPage ).arg( totalPages );
+ paint.drawText( view.width() - paint.fontMetrics().width( pageCount ),
+ view.bottom() + paint.fontMetrics().ascent() + 5, pageCount );
+ if( view.top() >= simpText.height() )
+ {
+ break;
+ }
+ printer.newPage();
+ currentPage++;
+ }
+ }
+
+ /* Restore Playground */
+ viewport()->unsetCursor();
+}
+
+void QTextBrowser::setSource(const QString&)
+{
+ /* overwrote this to stop clicked links from clearing the
+ console */
+}
diff --git a/knights/knightstextview.h b/knights/knightstextview.h
new file mode 100644
index 0000000..f76db25
--- /dev/null
+++ b/knights/knightstextview.h
@@ -0,0 +1,54 @@
+/***************************************************************************
+ knightstextview.h - description
+ -------------------
+ begin : Sun Dec 16 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef KNIGHTSTEXTVIEW_H
+#define KNIGHTSTEXTVIEW_H
+
+#include <qwidget.h>
+#include <qtextbrowser.h>
+
+/**
+ *@author Troy Corbin Jr./Alexander Wels
+ */
+
+class KPopupMenu;
+class resource;
+
+class KnightsTextView : public QTextBrowser
+{
+ Q_OBJECT
+ public:
+ KnightsTextView(QWidget *parent, resource *Rsrc );
+ ~KnightsTextView();
+ void pageMove( Qt::Key key=Key_PageUp );
+
+ public slots:
+ void display_menuView( const QPoint& );
+ void menuFunct( int );
+ void displayLink(const QString& urlString);
+ void print( void );
+
+ signals:
+ void rightButtonClicked( const QPoint& );
+
+ protected:
+ void viewportMousePressEvent( QMouseEvent *e );
+ resource *myResource;
+ KPopupMenu *menuView;
+};
+
+#endif
diff --git a/knights/list_pgn.cpp b/knights/list_pgn.cpp
new file mode 100644
index 0000000..57be536
--- /dev/null
+++ b/knights/list_pgn.cpp
@@ -0,0 +1,145 @@
+/***************************************************************************
+ list_pgn.cpp - description
+ -------------------
+ begin : Thu Dec 13 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "list_pgn.moc"
+#include <klistview.h>
+#include <kstatusbar.h>
+#include <kprogress.h>
+#include <qhbox.h>
+#include "resource.h"
+#include "match_param.h"
+
+list_pgn::list_pgn(QWidget *parent, const char *name) : QVBox(parent,name)
+{
+ listView = new KListView( this, "listView" );
+ listView->addColumn( i18n( "Result" ) );
+ listView->addColumn( i18n( "White" ) );
+ listView->addColumn( i18n( "Black" ) );
+ listView->addColumn( i18n( "Round" ) );
+ listView->addColumn( i18n( "Site" ) );
+ listView->addColumn( i18n( "Date" ) );
+ listView->setSorting( 1 );
+ listView->setAllColumnsShowFocus( TRUE );
+ listView->setMultiSelection( FALSE );
+ listView->setShowSortIndicator( TRUE );
+ listView->restoreLayout( kapp->config(), "PGN_ListView" );
+ listView->show();
+ connect( listView, SIGNAL( executed( QListViewItem* ) ), this, SLOT( slot_selected( QListViewItem* ) ) );
+
+ /*
+ Showing listView while scanning can mean the difference between
+ a 12 second load time and a 40 second load time. dummyView is
+ just a placeholder for listView while scanning.
+ */
+ dummyView = new KListView( this, "dummyView" );
+ dummyView->addColumn( i18n( "Result" ) );
+ dummyView->addColumn( i18n( "White" ) );
+ dummyView->addColumn( i18n( "Black" ) );
+ dummyView->addColumn( i18n( "Round" ) );
+ dummyView->addColumn( i18n( "Site" ) );
+ dummyView->addColumn( i18n( "Date" ) );
+ dummyView->restoreLayout( kapp->config(), "PGN_ListView" );
+ dummyView->hide();
+
+ statusBox = new QHBox( this, "statusBox" );
+ status = new KStatusBar( statusBox, "status" );
+
+ progress = new KProgress( statusBox, "progress" );
+ progress->setValue( 0 );
+
+ show();
+}
+list_pgn::~list_pgn()
+{
+ listView->saveLayout( kapp->config(), "PGN_ListView" );
+}
+///////////////////////////////////////
+//
+// list_pgn::setURL
+//
+///////////////////////////////////////
+void list_pgn::setURL( QString URL )
+{
+ myURL = URL;
+ listView->clear();
+ setCaption( URL );
+
+ if( tmpPGN.open( URL ) == FALSE )
+ {
+ status->message( i18n( "Can not open %1" ).arg( URL ) );
+ return;
+ }
+ listView->hide();
+ dummyView->show();
+ startTimer( 0 );
+}
+///////////////////////////////////////
+//
+// list_pgn::setProgress
+//
+///////////////////////////////////////
+void list_pgn::setProgress( const int num )
+{
+ progress->setValue( num );
+ if( num == 100 )
+ progress->setEnabled( FALSE );
+ else
+ progress->setEnabled( TRUE );
+}
+///////////////////////////////////////
+//
+// list_pgn::slot_selected
+//
+///////////////////////////////////////
+void list_pgn::slot_selected( QListViewItem *item )
+{
+ emit selected( myURL, item->text(6).toInt() );
+}
+///////////////////////////////////////
+//
+// list_pgn::timerEvent
+//
+///////////////////////////////////////
+void list_pgn::timerEvent( QTimerEvent* )
+{
+ int fileProgress;
+
+ fileProgress = tmpPGN.scan();
+ setProgress( fileProgress );
+ if( tmpPGN.TAG_White.isEmpty() )
+ {
+ if( listView->childCount() == 1 )
+ {
+ emit selected( myURL, 0 );
+ }
+ killTimers();
+ listView->show();
+ dummyView->hide();
+ }
+ else
+ {
+ (void) new KListViewItem( listView,
+ tmpPGN.TAG_Result,
+ tmpPGN.TAG_White,
+ tmpPGN.TAG_Black,
+ tmpPGN.TAG_Round,
+ tmpPGN.TAG_Site,
+ tmpPGN.TAG_Date,
+ QString::number(tmpPGN.File_Position) );
+ status->message( i18n( QString( "%1 matches found." ).arg( listView->childCount() ) ) );
+ }
+}
diff --git a/knights/list_pgn.h b/knights/list_pgn.h
new file mode 100644
index 0000000..f8712b5
--- /dev/null
+++ b/knights/list_pgn.h
@@ -0,0 +1,66 @@
+/***************************************************************************
+ list_pgn.h - description
+ -------------------
+ begin : Thu Dec 13 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef LIST_PGN_H
+#define LIST_PGN_H
+
+#include <qvbox.h>
+#include <qstring.h>
+#include "pgn.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class match_param;
+class KStatusBar;
+class KProgress;
+class KListView;
+class QHBox;
+
+class list_pgn : public QVBox
+{
+ Q_OBJECT
+ public:
+ list_pgn(QWidget *parent=0, const char *name=0);
+ void setURL( QString URL );
+ void setProgress( const int );
+ QString URL( void )
+ { return myURL; }
+ ~list_pgn();
+
+
+ signals:
+ void selected( const QString&, const int& );
+
+ protected slots:
+ void slot_selected( QListViewItem *item );
+
+ protected:
+ void timerEvent( QTimerEvent * );
+
+ private:
+ QString myURL;
+ QHBox *statusBox;
+ KListView *listView;
+ KListView *dummyView;
+ KStatusBar *status;
+ KProgress *progress;
+ pgn tmpPGN;
+};
+
+#endif
diff --git a/knights/logic.cpp b/knights/logic.cpp
new file mode 100644
index 0000000..9d889d4
--- /dev/null
+++ b/knights/logic.cpp
@@ -0,0 +1,1495 @@
+/***************************************************************************
+ logic.cpp - description
+ -------------------
+ begin : Sat Sep 29 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "logic.h"
+#include "dlg_promote.h"
+#include "command.h"
+#include <stdlib.h>
+
+///////////////////////////////////////
+//
+// logic::logic
+//
+///////////////////////////////////////
+logic::logic( resource *Rsrc, match_param *param )
+{
+ Resource = Rsrc;
+ Param = param;
+ int tmp;
+
+ GameType = Type_Standard;
+ for( tmp = 0; tmp < 64; tmp++ )
+ {
+ current[tmp].File = ( tmp % 8 );
+ current[tmp].Rank = ( tmp >> 3 );
+ }
+ clearBoard();
+}
+///////////////////////////////////////
+//
+// logic::~logic
+//
+///////////////////////////////////////
+logic::~logic()
+{
+}
+///////////////////////////////////////
+//
+// logic::Pointer
+//
+///////////////////////////////////////
+int logic::Pointer( const char File, const char Rank )
+{
+ if( ( File < 0 ) || ( File > 7 ) ) return Null;
+ if( ( Rank < 0 ) || ( Rank > 7 ) ) return Null;
+ return ( ( Rank << 3 ) + File );
+}
+///////////////////////////////////////
+//
+// logic::CalcPointer
+//
+///////////////////////////////////////
+int logic::CalcPointer( const char File, const char Rank )
+{
+ char tmpFile, tmpRank;
+
+ tmpFile = chessman[ManPtr].File + File;
+ tmpRank = chessman[ManPtr].Rank + Rank;
+ return Pointer( tmpFile, tmpRank );
+}
+///////////////////////////////////////
+//
+// logic::isChessman
+//
+///////////////////////////////////////
+bool logic::isChessman( const char ChessmanPtr )
+{
+ char BoardPtr = Pointer( chessman[ChessmanPtr].File, chessman[ChessmanPtr].Rank );
+ if( ( BoardPtr < 0 ) || ( BoardPtr > 63 ) ) return FALSE;
+ if( current[BoardPtr].ManPtr != ChessmanPtr ) return FALSE;
+ return TRUE;
+}
+///////////////////////////////////////
+//
+// logic::clearBoard
+//
+///////////////////////////////////////
+void logic::clearBoard( void )
+{
+ for( register int tmp = 0; tmp < 64; tmp++ )
+ {
+ chessman[tmp].Type = Null;
+ current[tmp].ManPtr = Null;
+ current[tmp].Note = NOTE_NONE;
+ }
+}
+///////////////////////////////////////
+//
+// logic::Init
+//
+///////////////////////////////////////
+void logic::Init( const int Var )
+{
+ GameType = Var;
+ switch( GameType )
+ {
+ case Type_Standard: // Fall Through
+ default:
+ Init_Standard();
+ break;
+ }
+}
+///////////////////////////////////////
+//
+// logic::Init_Standard
+//
+///////////////////////////////////////
+void logic::Init_Standard( void )
+{
+ register int tmp;
+
+ clearBoard();
+ for( tmp = 0; tmp < 32; tmp++ )
+ {
+ if( tmp < 16 )
+ {
+ chessman[tmp].Army = WHITE;
+ chessman[tmp].Rank = 0;
+ }
+ else
+ {
+ chessman[tmp].Army = BLACK;
+ chessman[tmp].Rank = 7;
+ }
+ switch( tmp % 16 )
+ {
+ case 0:
+ chessman[tmp].Type = King;
+ chessman[tmp].File = 4;
+ break;
+ case 1:
+ chessman[tmp].Type = Queen;
+ chessman[tmp].File = 3;
+ break;
+ case 2:
+ chessman[tmp].Type = Bishop;
+ chessman[tmp].File = 2;
+ break;
+ case 3:
+ chessman[tmp].Type = Bishop;
+ chessman[tmp].File = 5;
+ break;
+ case 4:
+ chessman[tmp].Type = Knight;
+ chessman[tmp].File = 1;
+ break;
+ case 5:
+ chessman[tmp].Type = Knight;
+ chessman[tmp].File = 6;
+ break;
+ case 6:
+ chessman[tmp].Type = Rook;
+ chessman[tmp].File = 0;
+ break;
+ case 7:
+ chessman[tmp].Type = Rook;
+ chessman[tmp].File = 7;
+ break;
+ default:
+ chessman[tmp].Type = Pawn;
+ chessman[tmp].File = ( tmp % 16 ) - 8;
+ if( chessman[tmp].Army == WHITE ) chessman[tmp].Rank = 1;
+ else chessman[tmp].Rank = 6;
+ break;
+ }
+ current[ Pointer( chessman[tmp].File, chessman[tmp].Rank ) ].ManPtr = tmp;
+ CastleFlag[0] = CF_King + CF_RookQ + CF_RookK;
+ CastleFlag[1] = CF_King + CF_RookQ + CF_RookK;
+ OnMove = WHITE;
+ }
+}
+///////////////////////////////////////
+//
+// logic::parseCAN
+//
+///////////////////////////////////////
+bool logic::parseCAN( const bool Army )
+{
+ if( chessMove.CAN == NULL ) return FALSE;
+ if( ( chessMove.CAN[0] != 'o' ) && ( chessMove.CAN[0] != 'O' ) )
+ {
+ if( ( chessMove.CAN[0] < 'a' ) || ( chessMove.CAN[0] > 'h' ) ) return FALSE;
+ chessMove.fromFile = chessMove.CAN[0] - 97;
+ if( ( chessMove.CAN[1] < '1' ) || ( chessMove.CAN[1] > '8' ) ) return FALSE;
+ chessMove.fromRank = chessMove.CAN[1] - 49;
+ if( ( chessMove.CAN[2] < 'a' ) || ( chessMove.CAN[2] > 'h' ) ) return FALSE;
+ chessMove.toFile = chessMove.CAN[2] - 97;
+ if( ( chessMove.CAN[3] < '1' ) || ( chessMove.CAN[3] > '8' ) ) return FALSE;
+ chessMove.toRank = chessMove.CAN[3] - 49;
+ if( strlen( chessMove.CAN ) == 5 ) chessMove.Promote = chessMove.CAN[4];
+ else chessMove.Promote = Null;
+ }
+ /*
+ For some reason some engines w/ CAN output
+ express castling using SAN, not to name names GNUChess v4
+ */
+ else
+ {
+ chessMove.fromFile = 4;
+ if( QString( chessMove.CAN ).lower() == "o-o" ) chessMove.toFile = 6;
+ else chessMove.toFile = 2;
+ if( Army == WHITE )
+ {
+ chessMove.fromRank = 0;
+ chessMove.toRank = 0;
+ }
+ else
+ {
+ chessMove.fromRank = 7;
+ chessMove.toRank = 7;
+ }
+ }
+ return TRUE;
+}
+///////////////////////////////////////
+//
+// logic::parseSAN
+//
+///////////////////////////////////////
+bool logic::parseSAN( void )
+{
+ bool Army(OnMove);
+ char Type(Pawn);
+ char SANPtr(0), tmp(0);
+
+ chessMove.fromFile = Null;
+ chessMove.fromRank = Null;
+ chessMove.toFile = Null;
+ chessMove.toRank = Null;
+ chessMove.Promote = Null;
+ chessMove.ManTaken = Null;
+ chessMove.NAG = 0;
+ while( SANPtr < (signed)QString( chessMove.SAN ).length() )
+ {
+ /* Parse a character */
+ switch( chessMove.SAN[SANPtr] )
+ {
+ case 'K':
+ if( SANPtr == 0 )
+ Type = King;
+ else
+ chessMove.Promote = 'k';
+ break;
+ case 'Q':
+ if( SANPtr == 0 )
+ Type = Queen;
+ else
+ chessMove.Promote = 'q';
+ break;
+ case 'B':
+ if( SANPtr == 0 )
+ Type = Bishop;
+ else
+ chessMove.Promote = 'b';
+ break;
+ case 'N':
+ if( SANPtr == 0 )
+ Type = Knight;
+ else
+ chessMove.Promote = 'n';
+ break;
+ case 'R':
+ if( SANPtr == 0 )
+ Type = Rook;
+ else
+ chessMove.Promote = 'r';
+ break;
+ /* Parse castle */
+ case 'o':
+ case 'O':
+ if( SANPtr != 0 )
+ break;
+ Type = King;
+ if( Army == WHITE )
+ chessMove.toRank = 0;
+ else
+ chessMove.toRank = 7;
+ if( QString( chessMove.SAN ).lower() == "o-o-o" )
+ chessMove.toFile = 2;
+ if( QString( chessMove.SAN ).lower() == "o-o" )
+ chessMove.toFile = 6;
+ break;
+ /* Ignore some symbols... these fall through */
+ case 'x':
+ case '=':
+ case '#':
+ case '+':
+ case '-':
+ case 'P':
+ break;
+ /* Handle annotations */
+ case '!':
+ chessMove.NAG = 1;
+ if( chessMove.SAN[SANPtr - 1] == '!' )
+ chessMove.NAG = 3;
+ if( chessMove.SAN[SANPtr - 1] == '?' )
+ chessMove.NAG = 6;
+ break;
+ case '?':
+ chessMove.NAG = 2;
+ if( chessMove.SAN[SANPtr - 1] == '!' )
+ chessMove.NAG = 5;
+ if( chessMove.SAN[SANPtr - 1] == '?' )
+ chessMove.NAG = 4;
+ break;
+ default:
+ if( ( chessMove.SAN[SANPtr] >= '1' ) && ( chessMove.SAN[SANPtr] <= '8' ) )
+ {
+ if( chessMove.toRank != Null )
+ chessMove.fromRank = chessMove.toRank;
+ chessMove.toRank = chessMove.SAN[SANPtr] - 49;
+ break;
+ }
+ if( ( chessMove.SAN[SANPtr] >= 'a' ) && ( chessMove.SAN[SANPtr] <= 'h' ) )
+ {
+ if( chessMove.toFile != Null )
+ chessMove.fromFile = chessMove.toFile;
+ chessMove.toFile = chessMove.SAN[SANPtr] - 97;
+ break;
+ }
+ /* Unknown symbol... Can not process this chessMove */
+// kdDebug() << "logic::ParseSAN: Unknown Symbol: " << chessMove.SAN[SANPtr] << "\n";
+ return FALSE;
+ break;
+ }
+ SANPtr++;
+ }
+ for( tmp = 0; tmp < 64; tmp++ )
+ {
+ if( chessman[tmp].Type != Type )
+ continue;
+ if( chessman[tmp].Army != Army )
+ continue;
+ if( ( chessMove.fromFile != Null ) && ( chessman[tmp].File != chessMove.fromFile ) )
+ continue;
+ if( ( chessMove.fromRank != Null ) && ( chessman[tmp].Rank != chessMove.fromRank ) )
+ continue;
+ if( !isChessman( tmp ) )
+ continue;
+ HashLegal( tmp );
+ if( current[ ( chessMove.toRank << 3 ) + chessMove.toFile ].Note < NOTE_MOVE )
+ continue;
+ chessMove.fromFile = chessman[tmp].File;
+ chessMove.fromRank = chessman[tmp].Rank;
+ break;
+ }
+ if( tmp == 64 )
+ {
+// kdWarning() << "logic::ParseSAN could not make a legal chessMove out of " << QString( chessMove.SAN ) << endl;
+// kdWarning() << (int)Army << " " << (int)Type << " " << (int)chessMove.fromFile << " " << (int)chessMove.fromRank
+// << " " << (int)chessMove.toFile << " " << (int)chessMove.toRank << endl;
+ return FALSE;
+ }
+ return TRUE;
+}
+///////////////////////////////////////
+//
+// logic::writeCAN
+//
+///////////////////////////////////////
+void logic::writeCAN( void )
+{
+ chessMove.CAN[0] = chessMove.fromFile + 97;
+ chessMove.CAN[1] = chessMove.fromRank + 49;
+ chessMove.CAN[2] = chessMove.toFile + 97;
+ chessMove.CAN[3] = chessMove.toRank + 49;
+ if( chessMove.Promote == Null ) chessMove.CAN[4] = 0;
+ else
+ {
+ chessMove.CAN[4] = chessMove.Promote;
+ chessMove.CAN[5] = 0;
+ }
+}
+///////////////////////////////////////
+//
+// logic::writeSAN
+//
+///////////////////////////////////////
+void logic::writeSAN( void )
+{
+ Position backup[64];
+ bool SANambig(FALSE);
+ bool SANambig2(FALSE);
+ register char tmp, manPtr, toPtr, fromPtr;
+ QString SAN;
+
+ /*
+ writeSAN calls HashLegal(), which writes on current[],
+ which we need intact for Move()... so we need a backup
+ copy of current[]. Removing this breaks en passant moves
+ */
+ copyPositions( current, backup );
+ fromPtr = ( chessMove.fromRank << 3 ) + chessMove.fromFile;
+ toPtr = ( chessMove.toRank << 3 ) + chessMove.toFile;
+ if( ( fromPtr > 63 ) || ( toPtr > 63 ) ) return;
+ if( ( fromPtr < 0 ) || ( toPtr < 0 ) ) return;
+ manPtr = current[fromPtr].ManPtr;
+ if( manPtr == Null ) return;
+
+ /* Check ambiguity for SAN notation */
+ for( tmp = 0; tmp < 64; tmp++ )
+ {
+ if( tmp == manPtr ) continue;
+ if( !isChessman( tmp ) ) continue;
+ if( chessman[tmp].Army == chessman[manPtr].Army )
+ {
+ if( chessman[tmp].Type == chessman[manPtr].Type )
+ {
+ HashLegal( tmp );
+ if( current[toPtr].Note >= NOTE_MOVE )
+ {
+ SANambig = TRUE;
+ if( chessman[tmp].File == chessman[manPtr].File )
+ SANambig2 = TRUE;
+ }
+ }
+ /*
+ This IF was added to fix an ambiguity that occurs when a pawn
+ on B file and a Bishop can attack the same spot
+ */
+ else
+ if( ( ( chessman[manPtr].Type == Bishop ) && ( chessman[tmp].Type == Pawn ) ) ||
+ ( ( chessman[manPtr].Type == Pawn ) && ( chessman[tmp].Type == Bishop ) ) )
+ {
+ if( ( chessman[manPtr].File == 1 ) || ( chessman[tmp].File == 1 ) )
+ {
+ HashLegal( tmp );
+ if( current[toPtr].Note >= NOTE_MOVE )
+ {
+ SANambig = TRUE;
+ SANambig2 = TRUE;
+ }
+ }
+ }
+ }
+ }
+ /* Go ahead and restore the backup. */
+ copyPositions( backup, current );
+ if( ( ( current[toPtr].Note == NOTE_ATTACK ) ||
+ ( current[toPtr].Note == NOTE_ENPASSANT ) ) &&
+ ( chessman[manPtr].Type == Pawn ) )
+ {
+ SANambig = TRUE;
+ }
+ /* Write SAN Notation */
+ if( current[toPtr].Note == NOTE_CASTLE )
+ {
+ if( chessMove.toFile == 6 ) SAN = "O-O";
+ if( chessMove.toFile == 2 ) SAN = "O-O-O";
+ }
+ else
+ {
+ switch( chessman[manPtr].Type )
+ {
+ case King:
+ SAN += 'K';
+ break;
+ case Queen:
+ SAN += 'Q';
+ break;
+ case Bishop:
+ SAN += 'B';
+ break;
+ case Knight:
+ SAN += 'N';
+ break;
+ case Rook:
+ SAN += 'R';
+ break;
+ case Pawn:
+// if( SANambig2 ) SAN += 'P';
+ break;
+ default:
+ break;
+ }
+ if( SANambig == TRUE )
+ {
+ SAN += char( chessMove.fromFile + 97 );
+ if( SANambig2 ) SAN += char( chessMove.fromRank + 49 );
+ }
+ if( ( current[toPtr].Note == NOTE_ATTACK ) ||
+ ( current[toPtr].Note == NOTE_ENPASSANT ) )
+ SAN += 'x';
+ SAN += char( chessMove.toFile + 97 );
+ SAN += char( chessMove.toRank + 49 );
+ switch( chessMove.Promote )
+ {
+ case 'q':
+ chessman[manPtr].Type = Queen;
+ SAN += "=Q";
+ break;
+ case 'b':
+ chessman[manPtr].Type = Bishop;
+ SAN += "=B";
+ break;
+ case 'n':
+ chessman[manPtr].Type = Knight;
+ SAN += "=N";
+ break;
+ case 'r':
+ chessman[manPtr].Type = Rook;
+ SAN += "=R";
+ break;
+ default:
+ break;
+ }
+ }
+ strcpy( chessMove.SAN, SAN.latin1() );
+}
+///////////////////////////////////////
+//
+// logic::board
+//
+///////////////////////////////////////
+QString logic::board( void )
+{
+ QString output;
+ register int tmp(0), tmpMan(0), cR(7), cF(0);
+
+ while( tmp != 64 )
+ {
+ tmpMan = current[ Pointer( cF, cR ) ].ManPtr;
+ if( tmpMan == Null )
+ output += '-';
+ else
+ {
+ switch( chessman[ tmpMan ].Type )
+ {
+ case King:
+ if( chessman[ tmpMan ].Army == WHITE )
+ output += 'K';
+ else
+ output += 'k';
+ break;
+ case Queen:
+ if( chessman[ tmpMan ].Army == WHITE )
+ output += 'Q';
+ else
+ output += 'q';
+ break;
+ case Bishop:
+ if( chessman[ tmpMan ].Army == WHITE )
+ output += 'B';
+ else
+ output += 'b';
+ break;
+ case Knight:
+ if( chessman[ tmpMan ].Army == WHITE )
+ output += 'N';
+ else
+ output += 'n';
+ break;
+ case Rook:
+ if( chessman[ tmpMan ].Army == WHITE )
+ output += 'R';
+ else
+ output += 'r';
+ break;
+ case Pawn: // Fall through
+ default:
+ if( chessman[ tmpMan ].Army == WHITE )
+ output += 'P';
+ else
+ output += 'p';
+ break;
+ }
+ }
+ cF++;
+ tmp++;
+ if( cF == 8 )
+ {
+ cF = 0;
+ cR--;
+ }
+ }
+
+ if( CastleFlag[WHITE] & ( CF_King | CF_RookK ) )
+ output += '1';
+ else
+ output += '0';
+ if( CastleFlag[WHITE] & ( CF_King | CF_RookQ ) )
+ output += '1';
+ else
+ output += '0';
+ if( CastleFlag[BLACK] & ( CF_King | CF_RookK ) )
+ output += '1';
+ else
+ output += '0';
+ if( CastleFlag[BLACK] & ( CF_King | CF_RookQ ) )
+ output += '1';
+ else
+ output += '0';
+
+ return output;
+}
+///////////////////////////////////////
+//
+// logic::setBoard
+//
+///////////////////////////////////////
+void logic::setBoard( const QString &board, const short ppf )
+{
+ QChar piece;
+ int tmp(0), tmp2(0), cR(7), cF(0);
+
+ clearBoard();
+ if( board.length() < 64 )
+ {
+ kdWarning() << "logic::setBoard: Was passed a string that is less than 64 bytes long." << endl;
+ return;
+ }
+ while( tmp != 64 )
+ {
+ piece = board.at(tmp++);
+ switch( piece.lower() )
+ {
+ case 'k':
+ if( piece == 'K' ) chessman[tmp2].Army = WHITE;
+ else chessman[tmp2].Army = BLACK;
+ chessman[tmp2].Type = King;
+ break;
+ case 'q':
+ if( piece == 'Q' ) chessman[tmp2].Army = WHITE;
+ else chessman[tmp2].Army = BLACK;
+ chessman[tmp2].Type = Queen;
+ break;
+ case 'b':
+ if( piece == 'B' ) chessman[tmp2].Army = WHITE;
+ else chessman[tmp2].Army = BLACK;
+ chessman[tmp2].Type = Bishop;
+ break;
+ case 'n':
+ if( piece == 'N' ) chessman[tmp2].Army = WHITE;
+ else chessman[tmp2].Army = BLACK;
+ chessman[tmp2].Type = Knight;
+ break;
+ case 'r':
+ if( piece == 'R' ) chessman[tmp2].Army = WHITE;
+ else chessman[tmp2].Army = BLACK;
+ chessman[tmp2].Type = Rook;
+ break;
+ case 'p':
+ if( piece == 'P' ) chessman[tmp2].Army = WHITE;
+ else chessman[tmp2].Army = BLACK;
+ chessman[tmp2].Type = Pawn;
+ break;
+ default:
+ break;
+ }
+ if( piece != '-' )
+ {
+ chessman[tmp2].Rank = cR;
+ chessman[tmp2].File = cF;
+ current[ Pointer( cF, cR ) ].ManPtr = tmp2;
+ tmp2++;
+ }
+ cF++;
+ if( cF == 8 )
+ {
+ cF = 0;
+ cR--;
+ }
+ }
+ CastleFlag[WHITE] = 0;
+ CastleFlag[BLACK] = 0;
+ if( board.at(64) == '1' ) CastleFlag[WHITE] += CF_RookK;
+ if( board.at(65) == '1' ) CastleFlag[WHITE] += CF_RookQ;
+ if( board.at(66) == '1' ) CastleFlag[BLACK] += CF_RookK;
+ if( board.at(67) == '1' ) CastleFlag[BLACK] += CF_RookQ;
+ if( CastleFlag[WHITE] ) CastleFlag[WHITE] += CF_King;
+ if( CastleFlag[BLACK] ) CastleFlag[BLACK] += CF_King;
+ /* Update enpassant record */
+ if( ppf != -2 )
+ {
+ enPassant[ !OnMove ] = Null;
+ if( ppf != -1 )
+ enPassant[ OnMove ] = ppf + 24 + ( ( OnMove == BLACK ) << 3 );
+ }
+}
+///////////////////////////////////////
+//
+// logic::getKing
+//
+///////////////////////////////////////
+int logic::getKing( const bool Army )
+{
+ register int tmp;
+ for( tmp = 0; tmp < 64; tmp++ )
+ {
+ if( ( chessman[tmp].Army == Army ) && ( chessman[tmp].Type == King ) )
+ if( isChessman( tmp ) )
+ {
+ return Pointer( chessman[tmp].File, chessman[tmp].Rank );
+ }
+ }
+ return Null;
+}
+///////////////////////////////////////
+//
+// logic::isCheck
+//
+///////////////////////////////////////
+bool logic::isCheck( const bool Army )
+{
+ register char tmp(0), currentKing( getKing(Army) );
+
+ for( tmp = 0; tmp < 64; tmp++ )
+ {
+ if( chessman[tmp].Army != Army )
+ if( isChessman( tmp ) )
+ {
+ HashLegal( tmp );
+ if( current[ currentKing ].Note == NOTE_ATTACK ) return TRUE;
+ }
+ }
+ return FALSE;
+}
+///////////////////////////////////////
+//
+// logic::isLegal
+//
+///////////////////////////////////////
+bool logic::isLegal( const bool Army )
+{
+ register int tmp(0), tmp2(0), count(0);
+
+ for( tmp2 = 0; tmp2 < 64; tmp2++ )
+ {
+ if( chessman[tmp2].Army == Army )
+ if( isChessman( tmp2 ) )
+ {
+ ManPtr = tmp2;
+ _HashLegal();
+ count = 0;
+ tmp = 0;
+ while( tmp < 64 ) count += ( current[tmp++].Note >= NOTE_MOVE );
+ if( count ) return TRUE;
+ }
+ }
+ return FALSE;
+}
+///////////////////////////////////////
+//
+// logic::isDraw
+//
+///////////////////////////////////////
+bool logic::isDraw( const bool Army )
+{
+ bool haveBishop(FALSE);
+ bool haveBishopDiag(FALSE);
+ bool haveKnight(FALSE);
+ bool EnemyBishop(FALSE);
+ bool EnemyBishopDiag(TRUE);
+ bool EnemyKnight(FALSE);
+ int tmp(0);
+
+ if( !isLegal( Army ) ) return TRUE;
+ for( tmp = 0; tmp < 64; tmp++ )
+ {
+ if( !isChessman( tmp ) ) continue;
+ if( chessman[tmp].Type == Queen ) return FALSE;
+ if( chessman[tmp].Type == Pawn ) return FALSE;
+ if( chessman[tmp].Type == Rook ) return FALSE;
+ /* Enemy guys */
+ if( chessman[tmp].Army != Army )
+ {
+ if( chessman[tmp].Type == Bishop )
+ {
+ if( EnemyBishop == TRUE ) return FALSE;
+ EnemyBishopDiag = abs( ( current[tmp].Rank % 2 ) - ( current[tmp].File % 2 ) );
+ EnemyBishop = TRUE;
+ }
+ if( chessman[tmp].Type == Knight )
+ {
+ if( EnemyKnight == TRUE ) return FALSE;
+ EnemyKnight = TRUE;
+ }
+ continue;
+ }
+ /* Our guys */
+ if( chessman[tmp].Type == Bishop )
+ {
+ if( haveBishop == TRUE ) return FALSE;
+ haveBishopDiag = abs( ( current[tmp].Rank % 2 ) - ( current[tmp].File % 2 ) );
+ haveBishop = TRUE;
+ }
+ if( chessman[tmp].Type == Knight )
+ {
+ if( haveKnight == TRUE ) return FALSE;
+ haveKnight = TRUE;
+ }
+ }
+ if( haveKnight && EnemyKnight ) return FALSE;
+ if( haveBishop && EnemyKnight ) return FALSE;
+ if( haveKnight && EnemyBishop ) return FALSE;
+ if( haveKnight && haveBishop ) return FALSE;
+ if( EnemyKnight && EnemyBishop ) return FALSE;
+ if( ( haveBishop && EnemyBishop ) && ( haveBishopDiag != EnemyBishopDiag ) ) return FALSE;
+ return TRUE;
+}
+///////////////////////////////////////
+//
+// logic::setBoardFromFen
+//
+///////////////////////////////////////
+void logic::setBoardFromFen(const QString &fen)
+{
+ clearBoard();
+ int j = 0; //position in string
+ int r = 7; //rank
+ int f = 0; //file
+ int p = 63; //chessman number
+ QChar c; //current letter
+
+ for (j=0;j<120 && p>=0 ;j++) {
+ c = fen[j];
+
+ if (c.isLetter()) {
+ //describing a piece
+ if (c == 'r') {
+ chessman[p].Army = BLACK;
+ chessman[p].Type = Rook;
+
+ }
+ if (c=='q') {
+ chessman[p].Army = BLACK;
+ chessman[p].Type = Queen;
+ }
+ if (c=='k') {
+ chessman[p].Army = BLACK;
+ chessman[p].Type = King;
+ }
+ if (c=='p') {
+ chessman[p].Army = BLACK;
+ chessman[p].Type = Pawn;
+ }
+ if (c=='n') {
+ chessman[p].Army = BLACK;
+ chessman[p].Type = Knight;
+ }
+ if (c=='b') {
+ chessman[p].Army = BLACK;
+ chessman[p].Type = Bishop;
+ }
+ //black pieces
+ if (c == 'R') {
+ chessman[p].Army = WHITE;
+ chessman[p].Type = Rook;
+
+ }
+ if (c=='Q') {
+ chessman[p].Army = WHITE;
+ chessman[p].Type = Queen;
+ }
+ if (c=='K') {
+ chessman[p].Army = WHITE;
+ chessman[p].Type = King;
+ }
+ if (c=='P') {
+ chessman[p].Army = WHITE;
+ chessman[p].Type = Pawn;
+ }
+ if (c=='N') {
+ chessman[p].Army = WHITE;
+ chessman[p].Type = Knight;
+ }
+ if (c=='B') {
+ chessman[p].Army = WHITE;
+ chessman[p].Type = Bishop;
+ }
+ chessman[p].Rank = r;
+ chessman[p].File = f;
+ current[ Pointer( chessman[p].File, chessman[p].Rank ) ].ManPtr = p;
+ p--;
+ f++;
+ }
+ if (c.isNumber()) {
+ //describing blank squares
+
+ p = p - c.digitValue();
+ f = f + c.digitValue();
+ }
+
+ if (c == '/') {
+ //describing new rank
+ r--;
+ f=0;
+ }
+
+ }
+
+ do {
+ j++;
+ c = fen[j];
+ } while (c == '/' || c == ' ');
+ if (c=='w')
+ OnMove = WHITE;
+ if (c=='b')
+ OnMove = BLACK;
+
+}
+///////////////////////////////////////
+//
+// logic::Move
+//
+///////////////////////////////////////
+bool logic::Move( void )
+{
+ dlg_promote *ProDlg;
+ int tmp;
+ int fromPtr, toPtr, manPtr;
+
+ fromPtr = Pointer( chessMove.fromFile, chessMove.fromRank );
+ toPtr = Pointer( chessMove.toFile, chessMove.toRank );
+ if( ( fromPtr == Null ) || ( toPtr == Null ) )
+ return FALSE;
+ manPtr = current[fromPtr].ManPtr;
+ if( manPtr == Null )
+ return FALSE;
+
+ HashLegal( manPtr );
+ /* Only proceed if this is a move */
+ if( current[toPtr].Note < NOTE_MOVE )
+ return FALSE; // This depends on all moves being higher value than NOTE_MOVE,
+ // while all non-moves are less.
+
+ /* Take care of moving the rook in a caste */
+ if( current[toPtr].Note == NOTE_CASTLE )
+ {
+ if( chessMove.toFile == 6 )
+ {
+ for( tmp = 0; tmp < 64; tmp++ )
+ {
+ if( ( chessman[tmp].Army == chessman[manPtr].Army ) &&
+ ( chessman[tmp].Type == Rook ) &&
+ ( chessman[tmp].File == 7 ) )
+ {
+ chessman[tmp].File = 5;
+ current[ Pointer( 7, ( 7 * ( chessman[tmp].Army == BLACK ) ) ) ].ManPtr = Null;
+ current[ Pointer( 5, ( 7 * ( chessman[tmp].Army == BLACK ) ) ) ].ManPtr = tmp;
+ break;
+ }
+ }
+ }
+ if( chessMove.toFile == 2 )
+ {
+ for( tmp = 0; tmp < 64; tmp++ )
+ {
+ if( ( chessman[tmp].Army == chessman[manPtr].Army ) &&
+ ( chessman[tmp].Type == Rook ) &&
+ ( chessman[tmp].File == 0 ) )
+ {
+ chessman[tmp].File = 3;
+ current[ Pointer( 0, ( 7 * ( chessman[tmp].Army == BLACK ) ) ) ].ManPtr = Null;
+ current[ Pointer( 3, ( 7 * ( chessman[tmp].Army == BLACK ) ) ) ].ManPtr = tmp;
+ break;
+ }
+ }
+ }
+ }
+ /* Handle the 50 Move Rule */
+ MoveCounter++;
+ if( chessman[manPtr].Type == Pawn ) MoveCounter = 0;
+ if( current[ toPtr ].ManPtr != Null )
+ {
+ MoveCounter = 0;
+ chessMove.ManTaken = current[ toPtr ].ManPtr;
+ }
+ /* Check for Pawn Promotion */
+ if( ( chessMove.toRank == ( 7 * ( chessman[manPtr].Army == WHITE ) ) ) &&
+ ( chessman[manPtr].Type == Pawn ) )
+ {
+ if( ( ( OnMove == WHITE ) && ( Param->type(WHITE) == PLAYERLOCAL ) ) ||
+ ( ( OnMove == BLACK ) && ( Param->type(BLACK) == PLAYERLOCAL ) ) )
+ {
+ if( Resource->OPTION_Auto_Queen == TRUE ) chessMove.Promote = 'q';
+ else
+ {
+ /* Prompt user for promotion */
+ ProDlg = new dlg_promote( 0, "promotedialog", Resource );
+ ProDlg->Init( OnMove );
+ chessMove.Promote = ProDlg->exec();
+ delete ProDlg;
+ /* Default to Queen if the user quit the dialog without choosing */
+ if( ( chessMove.Promote != 'q' ) &&
+ ( chessMove.Promote != 'b' ) &&
+ ( chessMove.Promote != 'n' ) &&
+ ( chessMove.Promote != 'r' ) ) chessMove.Promote = 'q';
+ }
+ }
+ }
+ /* Write CAN & SAN Notation for this move */
+ writeCAN();
+ writeSAN();
+ /* Make the move */
+ chessman[manPtr].File = chessMove.toFile;
+ chessman[manPtr].Rank = chessMove.toRank;
+ current[fromPtr].ManPtr = Null;
+ current[toPtr].ManPtr = manPtr;
+ /* Remove pawns taken en passant */
+ if( current[toPtr].Note == NOTE_ENPASSANT )
+ {
+ MoveCounter = 0;
+ chessMove.ManTaken = current[ enPassant[ 1 - chessman[manPtr].Army ] ].ManPtr;
+ current[ enPassant[ 1 - chessman[manPtr].Army ] ].ManPtr = Null;
+ }
+ /* Take care of en passant data */
+ if( current[toPtr].Note == NOTE_PAWN_DOUBLE )
+ enPassant[ chessman[manPtr].Army ] = toPtr;
+ enPassant[ 1 - chessman[manPtr].Army ] = Null;
+ /* Handle castle flags */
+ if( chessman[manPtr].Type == King )
+ CastleFlag[ chessman[manPtr].Army ] = 0;
+ if( ( chessman[manPtr].Type == Rook ) && ( chessMove.fromFile == 0 ) )
+ CastleFlag[ chessman[manPtr].Army ] -= CF_RookQ;
+ if( ( chessman[manPtr].Type == Rook ) && ( chessMove.fromFile == 7 ) )
+ CastleFlag[ chessman[manPtr].Army ] -= CF_RookK;
+ return TRUE;
+}
+///////////////////////////////////////
+//
+// logic::HashLegal
+//
+///////////////////////////////////////
+void logic::HashLegal( const char Man, const bool Recursion )
+{
+ char tmp;
+ tmp = ManPtr;
+ ManPtr = Man;
+ _HashLegal( Recursion );
+ ManPtr = tmp;
+}
+void logic::_HashLegal( const bool Recursion )
+{
+ /* Used for loops and positions */
+ register int Ptr(0), tmp(0), tmp2(0);
+
+ /* Used to calculate a position relative to a given position */
+ int dirF(0), dirR(0);
+
+ /* Used to monitor the King inside the Monster */
+ int currentKing(0), _castleFlag(0);
+
+ if( !isChessman(ManPtr) )
+ return;
+
+ copyPositions( current, hash );
+
+ while( tmp < 64 )
+ hash[tmp++].Note = NOTE_NONE;
+
+ switch( chessman[ManPtr].Type )
+ {
+ /* ROOK & QUEEN */
+ case Rook:
+ case Queen:
+ /* Positive Rank Movement */
+ for( tmp = 1; tmp < 8; tmp++ )
+ {
+ Ptr = CalcPointer( 0, tmp );
+ if( Ptr == Null ) break;
+ if( hash[Ptr].ManPtr == Null )
+ {
+ hash[Ptr].Note = NOTE_MOVE;
+ continue;
+ }
+ if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army )
+ {
+ hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ /* Negitive Rank Movement */
+ for( tmp = -1; tmp > -8; tmp-- )
+ {
+ Ptr = CalcPointer( 0, tmp );
+ if( Ptr == Null ) break;
+ if( hash[Ptr].ManPtr == Null )
+ {
+ hash[Ptr].Note = NOTE_MOVE;
+ continue;
+ }
+ if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army )
+ {
+ hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ /* Positive File Movement */
+ for( tmp = 1; tmp < 8; tmp++ )
+ {
+ Ptr = CalcPointer( tmp, 0 );
+ if( Ptr == Null ) break;
+ if( hash[Ptr].ManPtr == Null )
+ {
+ hash[Ptr].Note = NOTE_MOVE;
+ continue;
+ }
+ if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army )
+ {
+ hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ /* Negative File Movement */
+ for( tmp = -1; tmp > -8; tmp-- )
+ {
+ Ptr = CalcPointer( tmp, 0 );
+ if( Ptr == Null ) break;
+ if( hash[Ptr].ManPtr == Null )
+ {
+ hash[Ptr].Note = NOTE_MOVE;
+ continue;
+ }
+ if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army )
+ {
+ hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ if( chessman[ManPtr].Type == Rook ) break;
+ /* Bishop & Queen */
+ case Bishop:
+ /* NE Movement */
+ for( tmp = 1; tmp < 8; tmp++ )
+ {
+ Ptr = CalcPointer( tmp, tmp );
+ if( Ptr == Null ) break;
+ if( hash[Ptr].ManPtr == Null )
+ {
+ hash[Ptr].Note = NOTE_MOVE;
+ continue;
+ }
+ if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army )
+ {
+ hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ /* NW Movement */
+ for( tmp = -1; tmp > -8; tmp-- )
+ {
+ Ptr = CalcPointer( tmp, abs(tmp) );
+ if( Ptr == Null ) break;
+ if( hash[Ptr].ManPtr == Null )
+ {
+ hash[Ptr].Note = NOTE_MOVE;
+ continue;
+ }
+ if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army )
+ {
+ hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ /* SW Movement */
+ for( tmp = -1; tmp > -8; tmp-- )
+ {
+ Ptr = CalcPointer( tmp, tmp );
+ if( Ptr == Null ) break;
+ if( hash[Ptr].ManPtr == Null )
+ {
+ hash[Ptr].Note = NOTE_MOVE;
+ continue;
+ }
+ if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army )
+ {
+ hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ /* SE Movement */
+ for( tmp = -1; tmp > -8; tmp-- )
+ {
+ Ptr = CalcPointer( abs(tmp), tmp );
+ if( Ptr == Null ) break;
+ if( hash[Ptr].ManPtr == Null )
+ {
+ hash[Ptr].Note = NOTE_MOVE;
+ continue;
+ }
+ if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army )
+ {
+ hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
+ break;
+ }
+ break;
+ /* Knight */
+ case Knight:
+ for( tmp = 0; tmp < 8; tmp++ )
+ {
+ switch( tmp )
+ {
+ case 0:
+ Ptr = CalcPointer( -1, 2 );
+ break;
+ case 1:
+ Ptr = CalcPointer( 1, 2 );
+ break;
+ case 2:
+ Ptr = CalcPointer( 2, 1 );
+ break;
+ case 3:
+ Ptr = CalcPointer( 2, -1 );
+ break;
+ case 4:
+ Ptr = CalcPointer( 1, -2 );
+ break;
+ case 5:
+ Ptr = CalcPointer( -1, -2 );
+ break;
+ case 6:
+ Ptr = CalcPointer( -2, -1 );
+ break;
+ case 7:
+ Ptr = CalcPointer( -2, 1 );
+ break;
+ default:
+ break;
+ }
+ if( Ptr != Null )
+ {
+ if( hash[Ptr].ManPtr == Null )
+ hash[Ptr].Note = NOTE_MOVE;
+ else
+ {
+ if( Recursion == TRUE )
+ hash[Ptr].Note = NOTE_ATTACK;
+ if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army )
+ hash[Ptr].Note = NOTE_ATTACK;
+ }
+ }
+ }
+ break;
+ /* King */
+ case King:
+ dirF = -1;
+ dirR = 1;
+ while(1)
+ {
+ Ptr = CalcPointer( dirF, dirR );
+ if( Ptr != Null )
+ {
+ if( hash[Ptr].ManPtr == Null ) hash[Ptr].Note = NOTE_MOVE;
+ else
+ {
+ if( Recursion == TRUE ) hash[Ptr].Note = NOTE_ATTACK;
+ if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army ) hash[Ptr].Note = NOTE_ATTACK;
+ }
+ }
+ dirF++;
+ if( dirF == 2 )
+ {
+ dirF = -1;
+ dirR--;
+ }
+ if( dirR == -2 ) break;
+ if( ( dirR == 0 ) && ( dirF == 0 ) ) dirF++;
+ }
+ /* Check for castles */
+ if( Recursion == FALSE )
+ {
+ /* Can the King castle at all? */
+ if( CastleFlag[ chessman[ ManPtr ].Army ] & CF_King )
+ {
+ dirR = 0;
+ /* How about with the Queen's Rook? */
+ if( CastleFlag[ chessman[ ManPtr ].Army ] & CF_RookQ )
+ {
+ if( hash[ CalcPointer( -1, dirR ) ].ManPtr == Null )
+ {
+ if( hash[ CalcPointer( -2, dirR ) ].ManPtr == Null )
+ {
+ if( hash[ CalcPointer( -3, dirR ) ].ManPtr == Null )
+ {
+ hash[ CalcPointer( -2, dirR ) ].Note = NOTE_CASTLE;
+ _castleFlag |= CF_RookQ;
+ }
+ }
+ }
+ }
+ /* King's Rook? */
+ if( CastleFlag[ chessman[ ManPtr ].Army ] & CF_RookK )
+ {
+ if( hash[ CalcPointer( 1, dirR ) ].ManPtr == Null )
+ {
+ if( hash[ CalcPointer( 2, dirR ) ].ManPtr == Null )
+ {
+ hash[ CalcPointer( 2, dirR ) ].Note = NOTE_CASTLE;
+ _castleFlag |= CF_RookK;
+ }
+ }
+ }
+ }
+ }
+ break;
+ /* PAWN */
+ default:
+ /* Get direction of movement */
+ if( chessman[ManPtr].Army == WHITE ) dirR = 1;
+ else dirR = -1;
+ if( Recursion == FALSE )
+ {
+ /* Forward 1 square */
+ Ptr = CalcPointer( 0, dirR );
+ if( ( Ptr != Null ) && ( hash[Ptr].ManPtr == Null ) )
+ {
+ hash[Ptr].Note = NOTE_MOVE;
+ tmp = 1 + ( 5 * ( chessman[ManPtr].Army == BLACK ) );
+ if( chessman[ManPtr].Rank == tmp )
+ {
+ /* Forward 2 squares */
+ dirR = dirR << 1;
+ Ptr = CalcPointer( 0, dirR );
+ if( ( Ptr != Null ) && ( hash[Ptr].ManPtr == Null ) ) hash[Ptr].Note = NOTE_PAWN_DOUBLE;
+ dirR = dirR >> 1;
+ }
+ }
+ }
+ if( Recursion == TRUE )
+ {
+ /* Attack Left */
+ Ptr = CalcPointer( -1, dirR );
+ if( Ptr != Null ) hash[Ptr].Note = NOTE_ATTACK;
+ /* Attack Right */
+ Ptr = CalcPointer( 1, dirR );
+ if( Ptr != Null ) hash[Ptr].Note = NOTE_ATTACK;
+ }
+ else
+ {
+ /* Attack Left */
+ Ptr = CalcPointer( -1, dirR );
+ if( ( Ptr != Null ) && ( hash[Ptr].ManPtr != Null ) )
+ {
+ if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army ) hash[Ptr].Note = NOTE_ATTACK;
+ }
+ /* Attack Right */
+ Ptr = CalcPointer( 1, dirR );
+ if( ( Ptr != Null ) && ( hash[Ptr].ManPtr != Null ) )
+ {
+ if( chessman[hash[Ptr].ManPtr].Army != chessman[ManPtr].Army ) hash[Ptr].Note = NOTE_ATTACK;
+ }
+ /* Attack en Passant Left */
+ Ptr = CalcPointer( -1, 0 );
+ if( ( Ptr != Null ) && ( enPassant[ 1 - chessman[ManPtr].Army ] == Ptr ) )
+ {
+ Ptr = CalcPointer( -1, dirR );
+ hash[Ptr].Note = NOTE_ENPASSANT;
+ }
+ /* Attack en Passant Right */
+ Ptr = CalcPointer( 1, 0 );
+ if( ( Ptr != Null ) && ( enPassant[ 1 - chessman[ManPtr].Army ] == Ptr ) )
+ {
+ Ptr = CalcPointer( 1, dirR );
+ hash[Ptr].Note = NOTE_ENPASSANT;
+ }
+ }
+ break;
+ }
+ /* THE MONSTER */
+ /* Remove all possible moves that would either put your */
+ /* king into check or wouldn't stop a check in progress */
+ if( Recursion == FALSE )
+ {
+ /* Make Backups */
+ copyPositions( hash, hashBackup );
+ copyChessmen( chessman, chessmanBackup );
+
+ /* Find the King's Position */
+ currentKing = getKing( chessman[ManPtr].Army );
+
+ /* Remove castles under specific conditions */
+ if( _castleFlag )
+ {
+ for( tmp = 0; tmp < 64; tmp++ )
+ {
+ if( !isChessman( tmp ) ) continue;
+ if( ( chessman[tmp].Army != chessman[ManPtr].Army ) && ( chessman[tmp].Type != Null ) )
+ {
+ HashLegal( tmp, TRUE );
+ /* Is a check in progress? */
+ if( hash[ currentKing ].Note == NOTE_ATTACK )
+ {
+ for( tmp2 = 0; tmp2 < 64; tmp2++ )
+ if( hashBackup[tmp2].Note == NOTE_CASTLE ) hashBackup[tmp2].Note = NOTE_NONE;
+ break;
+ }
+ else
+ {
+ /* Store ManPtr in dirF so we can use ManPtr */
+ dirF = ManPtr;
+ ManPtr = hashBackup[ currentKing ].ManPtr;
+ /* Is the path to Queenside in check? */
+ if( _castleFlag & CF_RookQ )
+ {
+ if( ( hash[ CalcPointer( -1, 0 ) ].Note == NOTE_MOVE ) ||
+ ( hash[ CalcPointer( -2, 0 ) ].Note == NOTE_MOVE ) )
+ {
+ hashBackup[ CalcPointer( -2, 0 ) ].Note = NOTE_NONE;
+ _castleFlag -= CF_RookQ;
+ }
+ }
+ /* Is the path to Kingside in check? */
+ if( _castleFlag & CF_RookK )
+ {
+ if( ( hash[ CalcPointer( 1, 0 ) ].Note == NOTE_MOVE ) ||
+ ( hash[ CalcPointer( 2, 0 ) ].Note == NOTE_MOVE ) )
+ {
+ hashBackup[ CalcPointer( 2, 0 ) ].Note = NOTE_NONE;
+ _castleFlag -= CF_RookK;
+ }
+ }
+ /* Restore ManPtr */
+ ManPtr = dirF;
+ }
+ }
+ }
+ } // <- End Castle Checks
+
+ /* Check all possible moves */
+ for( tmp = 0; tmp < 64; tmp++ )
+ {
+ /* Only proceed if this is a move */
+ if( hashBackup[tmp].Note < NOTE_MOVE )
+ continue; // This depends on all moves being higher value than NOTE_MOVE,
+ // while all non-moves are less.
+
+ /* Pretend we moved here... what would happen? */
+ current[ Pointer( chessman[ManPtr].File, chessman[ManPtr].Rank ) ].ManPtr = Null;
+ chessman[ManPtr].File = hashBackup[tmp].File;
+ chessman[ManPtr].Rank = hashBackup[tmp].Rank;
+ current[tmp].ManPtr = ManPtr;
+ if( current[tmp].Note == NOTE_ENPASSANT )
+ {
+ current[ enPassant[ 1 - chessman[ManPtr].Army ] ].ManPtr = Null;
+ }
+
+ /* Recalc King pos, as we may have just moved him */
+ currentKing = getKing( chessman[ManPtr].Army );
+
+ /* Rehash in new position. If King is now under check, then */
+ /* we can't use this move and it's removed from contention */
+ for( tmp2 = 0; tmp2 < 64; tmp2++ )
+ {
+ if( chessman[tmp2].Army != chessman[ManPtr].Army )
+ if( isChessman( tmp2 ) )
+ {
+ HashLegal( tmp2, TRUE );
+ if( hash[ currentKing ].Note == NOTE_ATTACK )
+ {
+ hashBackup[tmp].Note = NOTE_NONE;
+ }
+ }
+ }
+
+ /* Restore the playground */
+ copyPositions( hashBackup, current );
+ copyChessmen( chessmanBackup, chessman );
+ } // <- End of 'Check All Moves' loop
+
+ copyPositions( hashBackup, current );
+ copyPositions( hashBackup, hash );
+ copyChessmen( chessmanBackup, chessman );
+ }
+}
diff --git a/knights/logic.h b/knights/logic.h
new file mode 100644
index 0000000..d57a553
--- /dev/null
+++ b/knights/logic.h
@@ -0,0 +1,88 @@
+/***************************************************************************
+ logic.h - description
+ -------------------
+ begin : Sat Sep 29 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef LOGIC_H
+#define LOGIC_H
+
+#include <qstring.h>
+#include "definitions.h"
+#include "resource.h"
+#include "match_param.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+const char CF_King = 0x01;
+const char CF_RookQ = 0x02;
+const char CF_RookK = 0x04;
+
+class logic
+{
+
+ public:
+ char OnMove;
+ Position current[64];
+ Chessman chessman[64];
+ ChessMove chessMove;
+
+ /* This is used for the 50 move rule */
+ char MoveCounter;
+
+ logic( resource *Rsrc=0, match_param *param=0 );
+ ~logic();
+ void Init( const int Var=Type_Standard );
+ void setBoard( const QString &board=QString::null, const short ppf=-2 );
+ void setBoardFromFen( const QString &fen );
+ QString board( void );
+ bool isChessman( const char ChessmanPtr );
+ bool isCheck( const bool Army );
+ bool isLegal( const bool Army );
+ bool isDraw( const bool Army );
+ bool Move( void );
+ void HashLegal( const char Man, const bool Recursion=FALSE );
+ int Pointer( const char File, const char Rank );
+
+ bool parseCAN( const bool Army );
+ bool parseSAN( void );
+ void writeCAN( void );
+ void writeSAN( void );
+
+ protected:
+ int CalcPointer( const char File, const char Rank );
+ void _HashLegal( const bool Recursion=FALSE );
+ void clearBoard( void );
+ int getKing( const bool Army );
+ void Init_Standard( void );
+ inline void copyPositions( Position *Src, Position *Dst )
+ { memcpy( Dst, Src, sizeof(Position) << 6 ); }
+ inline void copyChessmen( Chessman *Src, Chessman *Dst )
+ { memcpy( Dst, Src, sizeof(Chessman) << 6 ); }
+
+ private:
+ resource *Resource;
+ match_param *Param;
+ int GameType;
+ Position hash[64];
+ Position hashBackup[64];
+ Chessman chessmanBackup[64];
+ char CastleFlag[2];
+ char enPassant[2];
+ char ManPtr;
+};
+
+#endif
diff --git a/knights/main.cpp b/knights/main.cpp
new file mode 100644
index 0000000..f5f508e
--- /dev/null
+++ b/knights/main.cpp
@@ -0,0 +1,85 @@
+/***************************************************************************
+ main.cpp - description
+ -------------------
+ begin : Thu Mar 1 10:43:51 CST 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <kcmdlineargs.h>
+#include <kaboutdata.h>
+#include <klocale.h>
+
+#include "knights.h"
+
+static KCmdLineOptions options[] =
+{
+ { "d <path>", I18N_NOOP("Specify the location of your Knights data directory."), 0 },
+ { "+[filename]", I18N_NOOP("A .pgn file to be loaded."), 0 },
+ { 0, 0, 0 }
+};
+
+int main(int argc, char *argv[])
+{
+ KAboutData aboutData( "knights",
+ I18N_NOOP("Knights"),
+ _VERSION_,
+ I18N_NOOP("The Knights Chess Interface\n\nKnights is a chess interface\nfor the K Desktop Environment."),
+ KAboutData::License_GPL_V2,
+ "(c) 2003, Troy Corbin Jr.",
+ 0,
+ "http://knights-chess.com",
+ "troy@knights-chess.com");
+
+ aboutData.addAuthor("Troy Corbin Jr.",
+ I18N_NOOP("Project Manager and Programmer"),
+ "tcorbin@users.sourceforge.net",
+ "http://knights.sourceforge.net");
+ aboutData.addAuthor("Alexander Wels",
+ I18N_NOOP("Communications Programmer"),
+ "agpwels@adelphia.net",
+ "");
+ aboutData.addCredit("Mark Westcott",
+ I18N_NOOP("Qtopia port and patches"),
+ "mark@houseoffish.org",
+ "");
+ aboutData.addCredit("Kunnar Klauks",
+ I18N_NOOP("Patches and suggestions"),
+ "kunnk@yahoo.com",
+ "");
+ aboutData.addCredit("Harald Fernengel",
+ I18N_NOOP("KDE3 Compatability Patch"),
+ "harry@kdevelop.org",
+ "");
+ aboutData.addCredit("Tim Mann",
+ I18N_NOOP("XBoard protocol"),
+ "tim.mann@compaq.com",
+ "http://www.tim-mann.org/chess.html");
+ aboutData.setTranslator(I18N_NOOP("_: NAME OF TRANSLATORS\nYour names"),
+ I18N_NOOP("_: EMAIL OF TRANSLATORS\nYour emails"));
+
+ KCmdLineArgs::init( argc, argv, &aboutData );
+ KCmdLineArgs::addCmdLineOptions( options );
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+
+ KApplication a;
+ Knights *knights = new Knights(args);
+ a.setMainWidget(knights);
+ if( !knights->init() ) // Did we init ok?
+ {
+ return 0;
+ }
+ /* Without this connection, the destructors are not called, and some
+ housecleaning ( like destroying child processes ) isn't done */
+ a.connect( &a, SIGNAL( shutDown () ), knights, SLOT( KillAll() ) );
+ return a.exec();
+}
diff --git a/knights/match.cpp b/knights/match.cpp
new file mode 100644
index 0000000..21957e4
--- /dev/null
+++ b/knights/match.cpp
@@ -0,0 +1,1120 @@
+/***************************************************************************
+ match.cpp - description
+ -------------------
+ begin : Mon Jul 2 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <qregexp.h>
+#include <kmessagebox.h>
+#include "match.moc"
+#include "board_base.h"
+#include "board_2d.h"
+#include "audio.h"
+
+#define WHITE_INPUT Record->Param->type(WHITE)
+#define BLACK_INPUT Record->Param->type(BLACK)
+
+///////////////////////////////////////
+//
+// match::match
+//
+///////////////////////////////////////
+match::match( QWidget *parent, match_param *param, resource *Rsrc ) : QWidget(parent)
+{
+ Resource = Rsrc;
+
+ /* Init Children */
+ Record = new pgn( Resource, param );
+ Logic = new logic( Resource, param );
+ Board = new board_2d( parent, "Board", Resource, Logic );
+ Board->show();
+ connect( Board, SIGNAL( leftClick(int) ), this, SLOT( slot_Select(int) ) );
+ connect( Board, SIGNAL( rightClick(int) ), this, SLOT( slot_Preview(int) ) );
+ Clock = new chessclock( this, "Clock", Resource );
+ Record->init();
+ Logic->Init();
+ Clock->Reset();
+ clearSelections();
+
+ /* Init Variables */
+ Draw_Offered[WHITE] = FALSE;
+ Draw_Offered[BLACK] = FALSE;
+ Modified = FALSE;
+ Loading = FALSE;
+ Paused = FALSE;
+ JustMoved = FALSE;
+ preMoved = FALSE;
+ Current = FALSE;
+ loadTimer = 0;
+ StatusCode = READY;
+ StatusMessage = QString::null;
+ ICSGameMode = Null;
+ parseMatchParam();
+
+ /* Connect Signals and Slots */
+ connect( param, SIGNAL( valuesChanged() ), this, SLOT( parseMatchParam() ) );
+ connect( Record, SIGNAL( processMove(ChessMove) ), this, SLOT( move(ChessMove) ) );
+ connect( Record, SIGNAL( processSpecial() ), this, SLOT( loadSpecial() ) );
+ connect( Clock, SIGNAL( flagFell(const bool) ), this, SLOT( slot_flagFell(const bool) ) );
+ connect( this, SIGNAL( setStatusBar( const int&, const QString& ) ), this, SLOT( saveStatusBar( const int&, const QString& ) ) );
+
+}
+///////////////////////////////////////
+//
+// match::~match
+//
+///////////////////////////////////////
+match::~match()
+{
+ delete Clock;
+ if( Board != NULL ) delete Board;
+ delete Record;
+ delete Logic;
+}
+///////////////////////////////////////
+//
+// match::setVisibility
+//
+///////////////////////////////////////
+void match::setVisibility( const bool vis )
+{
+ if( vis == TRUE )
+ {
+ show();
+ Board->show();
+ setEnabled( TRUE );
+ }
+ else
+ {
+ hide();
+ Board->hide();
+ setEnabled( FALSE );
+ }
+}
+///////////////////////////////////////
+//
+// match::parseMatchParam
+//
+///////////////////////////////////////
+void match::parseMatchParam( void )
+{
+ switch( BLACK_INPUT )
+ {
+ case PLAYERLOCAL:
+ Board->setLocalArmy( BLACK );
+ break;
+ }
+ switch( WHITE_INPUT )
+ {
+ case PLAYERLOCAL:
+ Board->setLocalArmy( WHITE );
+ break;
+ }
+}
+///////////////////////////////////////
+//
+// match::tick
+//
+///////////////////////////////////////
+void match::tick(void)
+{
+ Clock->Tick();
+ emit setClocks();
+ if( Loading )
+ {
+ if( loadTimer )
+ loadTimer--;
+ else
+ {
+ /*
+ All this is for a match we just finished loading
+ */
+ if( !Record->loadNext() )
+ {
+ Loading = FALSE;
+ emit sendCMD( Command( myID, CMD_Play ) );
+ if( Record->TAG_Result == "*" )
+ {
+ /* Unfinished Game */
+ Clock->Set( Record->whiteTime, Record->blackTime, onMove() );
+ }
+ else
+ {
+ /* Finished Match */
+ Clock->Pause();
+ if( Record->TAG_Result == "1/2-1/2" )
+ emit setStatusBar( GAME_DRAW );
+ if( Record->TAG_Result == "1-0" )
+ emit setStatusBar( WHITE_WIN );
+ if( Record->TAG_Result == "0-1" )
+ emit setStatusBar( BLACK_WIN );
+ }
+ }
+ }
+ }
+}
+///////////////////////////////////////
+//
+// match::clearSelections
+//
+///////////////////////////////////////
+void match::clearSelections( void )
+{
+ bool commitFlag( FALSE );
+ register char tmp;
+
+ if( ICSGameMode == Null )
+ {
+ for( tmp = 0; tmp < 64; tmp++ )
+ {
+ if( Logic->current[tmp].Note != NOTE_NONE )
+ {
+ Logic->current[tmp].Note = NOTE_NONE;
+ Board->drawPosition( tmp );
+ commitFlag = TRUE;
+ }
+ }
+ }
+ else
+ {
+ for( tmp = 0; tmp < 64; tmp++ )
+ {
+ Logic->current[tmp].Note = NOTE_NONE;
+ Board->drawPosition( tmp );
+ commitFlag = TRUE;
+ }
+ }
+ if( commitFlag )
+ {
+ Board->commit();
+ }
+}
+///////////////////////////////////////
+//
+// match::flip
+//
+///////////////////////////////////////
+void match::flip(void)
+{
+ Board->flipBoard();
+}
+///////////////////////////////////////
+//
+// match::resize
+//
+///////////////////////////////////////
+void match::resize(void)
+{
+ Board->resizeBoard();
+ setFixedSize( Board->width(), Board->height() );
+}
+///////////////////////////////////////
+//
+// match::redraw
+//
+///////////////////////////////////////
+void match::redraw(void)
+{
+ Board->redrawAll();
+}
+///////////////////////////////////////
+//
+// match::slot_flagFell
+//
+///////////////////////////////////////
+void match::slot_flagFell( const bool Army )
+{
+ if( Army == WHITE )
+ {
+ emit setStatusBar( WHITE_FLAG );
+ if( ( Resource->OPTION_Auto_Call_Flag ) && ( WHITE_INPUT != PLAYERLOCAL ) && ( BLACK_INPUT == PLAYERLOCAL ) )
+ {
+ emit sendCMD( Command( myID, CMD_Black_Called_Flag ) );
+ recvCMD( Command( myID, CMD_Black_Called_Flag ) );
+ }
+ }
+ else
+ {
+ emit setStatusBar( BLACK_FLAG );
+ if( ( Resource->OPTION_Auto_Call_Flag ) && ( BLACK_INPUT != PLAYERLOCAL ) && ( WHITE_INPUT == PLAYERLOCAL ) )
+ {
+ emit sendCMD( Command( myID, CMD_White_Called_Flag ) );
+ recvCMD( Command( myID, CMD_White_Called_Flag ) );
+ }
+ }
+}
+///////////////////////////////////////
+//
+// match::setPaused
+//
+///////////////////////////////////////
+void match::setPaused( const bool State )
+{
+ Paused = State;
+ Board->setPaused( State );
+ if( Paused )
+ {
+ Clock->Pause();
+ emit setStatusBar( PAUSED );
+ }
+ else
+ {
+ Clock->Resume();
+ if( onMove() == WHITE ) emit setStatusBar( WHITE_TURN );
+ else emit setStatusBar( BLACK_TURN );
+ }
+}
+///////////////////////////////////////
+//
+// match::inputOnMove
+//
+///////////////////////////////////////
+char match::inputOnMove( bool reverse )
+{
+ if( reverse )
+ {
+ if( Logic->OnMove == BLACK )
+ return WHITE_INPUT;
+ if( Logic->OnMove == WHITE )
+ return BLACK_INPUT;
+ }
+ else
+ {
+ if( Logic->OnMove == WHITE )
+ return WHITE_INPUT;
+ if( Logic->OnMove == BLACK )
+ return BLACK_INPUT;
+ }
+ return Null;
+}
+///////////////////////////////////////
+//
+// match::input
+//
+///////////////////////////////////////
+char match::input( char army )
+{
+ return Record->Param->type(army);
+}
+///////////////////////////////////////
+//
+// match::save
+//
+///////////////////////////////////////
+bool match::save( QString URL )
+{
+ Record->whiteTime = Clock->getCentiseconds(WHITE);
+ Record->blackTime = Clock->getCentiseconds(BLACK);
+ return Record->save( URL );
+}
+///////////////////////////////////////
+//
+// match::load
+//
+///////////////////////////////////////
+bool match::load( const QString URL, const int pos )
+{
+ bool Result;
+ Loading = TRUE;
+ loadTimer = 20;
+ if( !Record->open( URL ) )
+ {
+ return FALSE;
+ }
+ Result = Record->load( pos );
+ if( !Record->TAG_FEN.isEmpty() )
+ {
+ // We must set up the FEN position
+ Logic->setBoardFromFen( Record->TAG_FEN );
+ sendCMD( Command( myID, CMD_Set_Board, Record->TAG_FEN ) );
+ }
+ return Result;
+}
+///////////////////////////////////////
+//
+// match::loadSpecial
+//
+///////////////////////////////////////
+void match::loadSpecial( void )
+{
+ /*
+ As pointless as this function may seem ( in light of these variables and more
+ being setup in tick(), it is required to initialize a Chess Engine and feed it
+ the moves from a saved game so you can play it again later.
+ */
+ emit sendCMD( Command( myID, CMD_New_Players ) );
+}
+///////////////////////////////////////
+//
+// match::url
+//
+///////////////////////////////////////
+QString match::url( void )
+{
+ if( !Record->CurrentURL.isEmpty() )
+ return Record->CurrentURL;
+ if( Resource->OPTION_Reuse_PGN )
+ return Resource->PGN_Filename;
+ return QString::null;
+}
+///////////////////////////////////////
+//
+// match::clock
+//
+///////////////////////////////////////
+QString match::clock( const bool Army )
+{
+ if( Army == WHITE ) return Clock->whiteClock;
+ return Clock->blackClock;
+}
+///////////////////////////////////////
+//
+// match::slot_Select
+//
+///////////////////////////////////////
+void match::slot_Select( int position )
+{
+ bool preMoving(FALSE);
+ register char tmp, army, selected(Null);
+
+ if( Paused ) return;
+ /* Clear all non-SELECT notes */
+ for( tmp = 0;tmp < 64;tmp++ )
+ {
+ if( Logic->current[tmp].Note != NOTE_NONE )
+ {
+ if( Logic->current[tmp].Note != NOTE_SELECT )
+ {
+ Logic->current[tmp].Note = NOTE_NONE;
+ Board->drawPosition( tmp );
+ }
+ else
+ {
+ selected = tmp;
+ }
+ }
+ }
+ Board->commit();
+
+ /* Check to make sure it's our turn to select. */
+ if( !( inputOnMove() & PLAYERLOCAL ) )
+ {
+ if( ( inputOnMove(TRUE) == PLAYERLOCAL ) && ( Resource->OPTION_Premove ) )
+ {
+ preMoving = TRUE;
+ }
+ else
+ {
+ return;
+ }
+ }
+ /* If you left click on a selected square, it becomes unselected. */
+ if( Logic->current[position].Note == NOTE_SELECT )
+ {
+ Logic->current[position].Note = NOTE_NONE;
+ drawPosition( position );
+ playSound( SND_SELECT );
+ return;
+ }
+ if( preMoved )
+ {
+ preMoved = FALSE;
+ playSound( SND_SELECT );
+ Board->setPremovePositions( Null, Null );
+ Board->drawPosition( Logic->Pointer( preMove.fromFile, preMove.fromRank ) );
+ Board->drawPosition( Logic->Pointer( preMove.toFile, preMove.toRank ) );
+ Board->commit();
+ }
+ /* Check to see if there is already a selected square. */
+ if( selected != Null )
+ {
+ /*
+ If there is already a selected square, and you just clicked on another of your men,
+ we'll change your selection.
+ */
+ if( Logic->current[position].ManPtr != Null )
+ {
+ if( Logic->chessman[ Logic->current[selected].ManPtr ].Army == Logic->chessman[ Logic->current[position].ManPtr ].Army )
+ {
+ Logic->current[selected].Note = NOTE_NONE;
+ Logic->current[position].Note = NOTE_SELECT;
+ Board->drawPosition( selected );
+ drawPosition( position );
+ if( Resource->OPTION_Auto_Preview == TRUE )
+ slot_Preview( position );
+ else
+ playSound( SND_SELECT );
+ return;
+ }
+ }
+ /*
+ If there is already a selected square, but this one you just clicked
+ isn't one of your chessmen, you must want to move a piece.
+ */
+ if( ( Record->currentIndex != ( Record->Positions.count() - 1 ) ) && ( Record->currentIndex ) )
+ {
+ emit setStatusBar( NO_MOVE_WHILE_REVIEW );
+ return;
+ }
+ if( preMoving )
+ {
+ Command::clearMove( &preMove );
+ preMove.fromRank = Logic->current[selected].Rank;
+ preMove.fromFile = Logic->current[selected].File;
+ preMove.toRank = Logic->current[position].Rank;
+ preMove.toFile = Logic->current[position].File;
+ preMoved = TRUE;
+ playSound( SND_SELECT );
+ Board->setPremovePositions( selected, position );
+ }
+ else
+ {
+ Command::clearMove( &chessMove );
+ chessMove.fromRank = Logic->current[selected].Rank;
+ chessMove.fromFile = Logic->current[selected].File;
+ chessMove.toRank = Logic->current[position].Rank;
+ chessMove.toFile = Logic->current[position].File;
+ JustMoved = TRUE;
+ if( move() == FALSE )
+ {
+ Logic->current[selected].Note = NOTE_SELECT;
+ drawPosition( selected );
+ }
+ }
+ return;
+ }
+ tmp = Logic->current[position].ManPtr;
+
+ /* You can't select an empty square. */
+ if( tmp == Null )
+ {
+ return;
+ }
+ army = Logic->chessman[ tmp ].Army;
+
+ /* You can't select your enemy */
+ if( ( army != onMove() ) && ( preMoving == FALSE ) )
+ {
+ return;
+ }
+
+ /* If your clicking on one of your chessmen, you can select it. */
+ clearSelections();
+ if( ( army == WHITE ) && ( WHITE_INPUT & PLAYERLOCAL ) )
+ {
+ Logic->current[position].Note = NOTE_SELECT;
+ }
+ if( ( army == BLACK ) && ( BLACK_INPUT & PLAYERLOCAL ) )
+ {
+ Logic->current[position].Note = NOTE_SELECT;
+ }
+ drawPosition( position );
+ if( Resource->OPTION_Auto_Preview == TRUE )
+ {
+ slot_Preview( position );
+ }
+ else
+ {
+ /* Play the select sound if you selected a square & you didn't preview */
+ if( Logic->current[position].Note == NOTE_SELECT )
+ {
+ playSound( SND_SELECT );
+ }
+ }
+}
+///////////////////////////////////////
+//
+// match::slot_Preview
+//
+///////////////////////////////////////
+void match::slot_Preview( int position )
+{
+ char tmp;
+
+ if( Paused )
+ {
+ return;
+ }
+ clearSelections();
+ tmp = Logic->current[position].ManPtr;
+ if( tmp == Null ) return;
+
+ Logic->HashLegal( tmp );
+
+ /* If your clicking on one of your chessmen, you can select it. */
+ if( ( Logic->chessman[tmp].Army == Logic->OnMove ) && ( Record->Param->type( Logic->OnMove ) & PLAYERLOCAL ) )
+ Logic->current[position].Note = NOTE_SELECT;
+ for( tmp = 0;tmp < 64;tmp++ )
+ {
+ if( Logic->current[tmp].Note != NOTE_NONE )
+ {
+ Board->drawPosition( tmp );
+ }
+ }
+ drawPosition( 0 );
+ playSound( SND_SELECT );
+}
+///////////////////////////////////////
+//
+// match::recvCMD
+//
+///////////////////////////////////////
+void match::recvCMD( const Command &constCommand )
+{
+ Command cmd( constCommand );
+
+ if( cmd.getID() != myID )
+ return;
+ ChessMove newMove = cmd.getMove();
+
+ switch( cmd.getCommand() )
+ {
+ /* CMD_Move */
+ case CMD_Move:
+ if( newMove.ICS_Mode == Null )
+ {
+ /* Not an ICS Move */
+ move( newMove );
+ }
+ else
+ {
+ /* Do NOT accept a setBoard on a concluded match */
+ if( ( Logic->OnMove == -1 ) && ( newMove.ICS_Mode < ICS_Examine ) )
+ return;
+ ICSGameMode = newMove.ICS_Mode;
+ Logic->OnMove = newMove.ICS_OnMove;
+
+ if( ICSGameMode == ICS_Movelist )
+ {
+ /* Recieving Movelist */
+ Logic->chessMove = newMove;
+ Logic->parseSAN();
+ JustMoved = FALSE;
+ }
+ else
+ {
+ /* Recieving Standard Move */
+ Logic->setBoard( cmd.getData(), newMove.ICS_PawnPushFile );
+ Logic->MoveCounter = newMove.ICS_MoveCounter;
+ Logic->chessMove = newMove;
+ Logic->parseCAN( Logic->OnMove );
+ }
+ chessMove = Logic->chessMove;
+ /* Run through the Move function */
+ if( !JustMoved )
+ move();
+ else
+ {
+ JustMoved = FALSE;
+ Logic->OnMove = !Logic->OnMove;
+ }
+
+ Clock->Set( cmd.getWhiteTime(), cmd.getBlackTime(), !newMove.ICS_OnMove );
+ if( newMove.ICS_ClockTicking )
+ {
+ Clock->Resume();
+ }
+ else
+ {
+ Clock->Pause();
+ }
+ }
+ break;
+
+ /* CMD_Offer_Draw */
+ case CMD_Offer_Draw:
+ if( cmd.getData() == "W" )
+ {
+ Draw_Offered[WHITE] = 2;
+ emit setStatusBar( WHITE_DRAW_OFFER );
+ }
+ else
+ {
+ Draw_Offered[BLACK] = 2;
+ emit setStatusBar( BLACK_DRAW_OFFER );
+ }
+ break;
+
+ /* CMD_Illegal */
+ case CMD_Illegal:
+ retract();
+ emit setNotation();
+ break;
+
+ /* Lost Contact */
+ case CMD_Lost_Contact:
+ Clock->Pause();
+ Logic->OnMove = -1;
+ emit setStatusBar( LOST_CONTACT );
+ Record->TAG_Result = "*";
+ Record->TAG_Termination = "Lost Contact with Opponent";
+ break;
+
+ /* Result White */
+ case CMD_Result_White:
+ Clock->Pause();
+ Logic->OnMove = -1;
+ emit setStatusBar( WHITE_CHECKMATE );
+ Record->TAG_Result = "1-0";
+ Record->TAG_Termination = "Normal";
+ break;
+
+ /* Result Black */
+ case CMD_Result_Black:
+ Clock->Pause();
+ Logic->OnMove = -1;
+ emit setStatusBar( BLACK_CHECKMATE );
+ Record->TAG_Result = "0-1";
+ Record->TAG_Termination = "Normal";
+ break;
+
+ /* Result Draw */
+ case CMD_Result_Draw:
+ Clock->Pause();
+ Logic->OnMove = -1;
+ if( Logic->MoveCounter == 50 )
+ {
+ emit setStatusBar( GAME_50_MOVES );
+ }
+ else
+ {
+ emit setStatusBar( GAME_DRAW );
+ }
+ Record->TAG_Result = "1/2-1/2";
+ break;
+
+ /* White Resign */
+ case CMD_White_Resign:
+ Clock->Pause();
+ Logic->OnMove = -1;
+ emit setStatusBar( WHITE_RESIGN );
+ Record->TAG_Result = "0-1";
+ Record->TAG_Termination = "White resigned";
+ break;
+
+ /* Black Resign */
+ case CMD_Black_Resign:
+ Clock->Pause();
+ Logic->OnMove = -1;
+ emit setStatusBar( BLACK_RESIGN );
+ Record->TAG_Result = "1-0";
+ Record->TAG_Termination = "Black resigned";
+ break;
+
+ /* White Called Flag */
+ case CMD_White_Called_Flag:
+ Clock->Pause();
+ Logic->OnMove = -1;
+ emit setStatusBar( WHITE_CALL_FLAG );
+ Record->TAG_Result = "1-0";
+ Record->TAG_Termination = "Black's flag was called";
+ break;
+
+ /* Black Called Flag */
+ case CMD_Black_Called_Flag:
+ Clock->Pause();
+ Logic->OnMove = -1;
+ emit setStatusBar( BLACK_CALL_FLAG );
+ Record->TAG_Result = "0-1";
+ Record->TAG_Termination = "White's flag was called";
+ break;
+
+ default:
+ break;
+ }
+}
+///////////////////////////////////////
+//
+// match::move
+//
+///////////////////////////////////////
+bool match::move( ChessMove newMove )
+{
+ /* Clear selections from the board */
+ clearSelections();
+
+ Logic->chessMove = newMove;
+ if( Logic->parseCAN( onMove() ) != TRUE )
+ {
+ if( Logic->parseSAN() != TRUE )
+ {
+ kdDebug() << "#" << myID << ": Recieved bad data: " << newMove.CAN << endl;
+ return FALSE;
+ }
+ }
+ chessMove = Logic->chessMove;
+ JustMoved = TRUE;
+ return move();
+}
+bool match::move( void )
+{
+ int soundType( SND_MOVE );
+ int result(Null);
+ char manPtr(Null);
+ QString SAN;
+
+ /* Bring the display up to the latest move before we proceed */
+ if( ICSGameMode == Null )
+ {
+ if( Record->currentIndex != ( Record->Positions.count() - 1 ) )
+ {
+ review( Record->Moves.count() - 1 );
+ }
+ }
+
+ /* Clear selections from the board */
+ clearSelections();
+
+ /* Build Pointers */
+ char fromPtr = ( chessMove.fromRank << 3 ) + chessMove.fromFile;
+ char toPtr = ( chessMove.toRank << 3 ) + chessMove.toFile;
+
+ /* Skip all this if we're being called due to normal server moves */
+ if( ( JustMoved == TRUE ) || ( ICSGameMode == ICS_Movelist ) )
+ {
+ if( ( fromPtr > 63 ) || ( toPtr > 63 ) )
+ return FALSE;
+ if( ( fromPtr < 0 ) || ( toPtr < 0 ) )
+ return FALSE;
+ manPtr = Logic->current[fromPtr].ManPtr;
+ if( manPtr == Null )
+ return FALSE;
+ /* Make the move */
+ Logic->chessMove = chessMove;
+ if( Logic->Move() == FALSE )
+ return FALSE;
+ chessMove = Logic->chessMove;
+ }
+
+ /* Play sound for Promotion */
+ if( QString( chessMove.SAN ).contains( QChar( '=' ) ) )
+ {
+ soundType = SND_PROMOTE;
+ }
+
+ /* Check to see if the game is ended */
+ /* 50 Move Rule? */
+ if( Logic->MoveCounter == 50 )
+ {
+ result = CMD_Result_Draw;
+ }
+ /*
+ A Draw via 3 move repeat
+
+ if( Record->isThreeMoveDraw() )
+ {
+ result = CMD_Result_Draw;
+ Record->TAG_Result = "1/2-1/2";
+ emit setStatusBar( GAME_DRAW );
+ } */
+ /*
+ A Draw?
+
+ Condition 1 = White Material Draw
+ Condition 2 = Black Material Draw
+ Condition 3 = Both sides agree to a draw
+ */
+ if( ( Logic->OnMove == BLACK && Logic->isDraw( WHITE ) ) ||
+ ( Logic->OnMove == WHITE && Logic->isDraw( BLACK ) ) ||
+ ( Draw_Offered[WHITE] && Draw_Offered[BLACK] ) )
+ {
+ result = CMD_Result_Draw;
+ }
+
+ /* Is White under check? */
+ if( Logic->isCheck( WHITE ) )
+ {
+ if( !Logic->isLegal( WHITE ) )
+ {
+ SAN += '#';
+ result = CMD_Result_Black;
+ }
+ else
+ {
+ SAN += '+';
+ soundType = SND_CHECK;
+ }
+ }
+
+ /* Is Black under check? */
+ if( Logic->isCheck( BLACK ) )
+ {
+ if( !Logic->isLegal( BLACK ) )
+ {
+ SAN += '#';
+ result = CMD_Result_White;
+ }
+ else
+ {
+ SAN += '+';
+ soundType = SND_CHECK;
+ }
+ }
+
+ /* Check to make sure this isn't the starting position in an ICS match */
+ if( QString( chessMove.SAN ) != "none" )
+ {
+ if( !SAN.isEmpty() )
+ {
+ strcat( chessMove.SAN, SAN.latin1() );
+ }
+ Record->Positions << Logic->board();
+ Record->Moves << chessMove;
+ Record->currentIndex = Record->Moves.count() - 1;
+ if( JustMoved == TRUE )
+ {
+ /* Send this move to engines and servers */
+ emit sendCMD( Command( myID, CMD_Move, centiseconds( WHITE ), centiseconds( BLACK ),
+ chessMove, Record->notation(FALSE)->join(QString(" ")) ) );
+ }
+ /* Draw The Move */
+ if( ICSGameMode != ICS_Movelist )
+ Board->drawMove( chessMove );
+ }
+
+ /* Take care of changing turns, status messages, etc. */
+ if( result == Null )
+ {
+ Clock->Moved();
+ if( Paused )
+ Clock->Pause();
+
+ Logic->OnMove = !Logic->OnMove;
+ /* Set Status Bar */
+ if( Logic->OnMove == WHITE )
+ {
+ emit setStatusBar( WHITE_TURN );
+ }
+ if( Logic->OnMove == BLACK )
+ {
+ emit setStatusBar( BLACK_TURN );
+ }
+
+ /* Set Cursor */
+ if( ( inputOnMove(TRUE) == PLAYERLOCAL ) && ( inputOnMove() != PLAYERLOCAL ) )
+ {
+ Board->setCursor( Resource->CURSOR_Thinking );
+ }
+ else
+ {
+ Board->setCursor( Resource->CURSOR_Standard );
+ }
+
+ /* Deprecieate Draw Offers */
+ if( Draw_Offered[WHITE] )
+ {
+ Draw_Offered[WHITE]--;
+ }
+ if( Draw_Offered[BLACK] )
+ {
+ Draw_Offered[BLACK]--;
+ }
+
+ /* Display NAG Anotation */
+ if( chessMove.NAG != 0 )
+ {
+ emit setStatusBar( COMMENT + chessMove.NAG );
+ }
+ }
+ else
+ {
+ /* End of Match */
+ Board->setCursor( Resource->CURSOR_Standard );
+ recvCMD( Command( myID, result ) );
+ emit sendCMD( Command( myID, result ) );
+ soundType = SND_MATCH_OVER;
+ }
+ emit setNotation();
+
+ if( ICSGameMode != ICS_Movelist )
+ {
+ Board->redrawLights();
+ Board->commit();
+ }
+ /* Play the Sound */
+ playSound( soundType );
+
+ /* Handle special cases */
+ if( loading() )
+ {
+ loadTimer = 10; // Loading...
+ }
+ else
+ {
+ Modified = TRUE;
+ }
+ if( preMoved )
+ {
+ preMoved = FALSE;
+ Board->setPremovePositions( Null, Null );
+ chessMove = preMove;
+ JustMoved = TRUE;
+ move();
+ }
+/* if( inputOnMove() == PLAYEREMAIL )
+ {
+ Clock->Pause(); // Email
+ KMessageBox::questionYesNo( this,
+ i18n("Would you like to email this move?"),
+ i18n("Send Email?") );
+ }
+*/
+ return TRUE;
+}
+///////////////////////////////////////
+//
+// match::retract
+//
+///////////////////////////////////////
+void match::retract( void )
+{
+ emit setStatusBar(ILLEGAL_MOVE);
+ review( Record->Moves.count() - 2 );
+ _retract();
+}
+void match::_retract( void )
+{
+ if( Record->Moves.count() )
+ {
+ Record->Moves.remove( Record->Moves.at( Record->Moves.count() - 1 ) );
+ Record->Positions.remove( Record->Positions.at( Record->Positions.count() - 1 ) );
+ Record->currentIndex = Record->Moves.count() - 1;
+ }
+}
+///////////////////////////////////////
+//
+// match::review
+//
+///////////////////////////////////////
+void match::review( const int Index )
+{
+ int tmp(0), step;
+ QString tmpS;
+ if( ICSGameMode == ICS_Examine )
+ {
+ /* Examined Game: Use Examine Semantics */
+ if( Index < (signed)Record->currentIndex )
+ step = -1;
+ else
+ step = 1;
+ if( ( Record->currentIndex == 0 ) && ( Index == 0 ) && ( step == 1 ) )
+ {
+ emit sendCMD( Command( myID, CMD_Examine_Forward ) );
+ }
+ if( step == 1 )
+ {
+ for( tmp = Record->currentIndex; tmp != Index; tmp += step )
+ {
+ emit sendCMD( Command( myID, CMD_Examine_Forward ) );
+ }
+ }
+ else
+ {
+ for( tmp = Record->currentIndex; tmp != Index; tmp += step )
+ {
+ _retract();
+ _retract();
+ emit sendCMD( Command( myID, CMD_Examine_Backward ) );
+ }
+ }
+ }
+ else
+ {
+ /* Regular Game: Use Standard Review Semantics */
+ if( Record->Positions.count() == 0 )
+ return;
+ if( Index < 0 )
+ return;
+ if( Index > ( (signed int)Record->Positions.count() - 1 ) )
+ return;
+
+ /* Review differently depending on our Animation Option */
+ if( Resource->OPTION_Animate_Moves )
+ {
+ if( (unsigned)Index > Record->currentIndex )
+ {
+ /* Forward */
+ Logic->setBoard( Record->Positions[Index - 1] );
+ while( tmp < 64 )
+ Board->drawPosition( tmp++ );
+ Logic->setBoard( Record->Positions[Index] );
+ Board->drawMove( Record->Moves[Index] );
+ }
+ else if( (unsigned)Index < Record->currentIndex )
+ {
+ /* Reverse */
+ Logic->setBoard( Record->Positions[Index + 1] );
+ while( tmp < 64 )
+ Board->drawPosition( tmp++ );
+ Board->drawMove( Record->Moves[Index + 1], TRUE );
+ Logic->setBoard( Record->Positions[Index] );
+ }
+ }
+ else
+ {
+ /* No Animation */
+ Logic->setBoard( Record->Positions[Index] );
+ while( tmp < 64 )
+ Board->drawPosition( tmp++ );
+ Board->drawMove( Record->Moves[Index] );
+ }
+ Board->commit();
+
+ /* Statusbar shows NAG if available, otherwise Army to move */
+ if( Record->Moves[Index].NAG )
+ {
+ tmp = StatusCode;
+ tmpS = StatusMessage;
+ emit setStatusBar( COMMENT + Record->Moves[Index].NAG );
+ StatusCode = tmp;
+ StatusMessage = tmpS;
+ }
+ else
+ emit setStatusBar( StatusCode, StatusMessage );
+ Record->currentIndex = Index;
+ }
+}
+///////////////////////////////////////
+//
+// match::playSound
+//
+///////////////////////////////////////
+void match::playSound( const int snd )
+{
+ if( Resource->OPTION_Audio_Current_Only && !Current )
+ {
+ return;
+ }
+ Resource->play( snd );
+}
+///////////////////////////////////////
+//
+// match::drawPosition
+//
+///////////////////////////////////////
+void match::drawPosition( const int position )
+{
+ Board->drawPosition( position );
+ Board->commit();
+}
+///////////////////////////////////////
+//
+// match::requestHint
+//
+///////////////////////////////////////
+void match::requestHint( void )
+{
+ emit sendCMD( Command( myID, CMD_Hint ) );
+ emit sendCMD( Command( myID, CMD_UCI_Hint, centiseconds( WHITE ), centiseconds( BLACK ), Record->notation(FALSE)->join(QString(" ")) ) );
+}
diff --git a/knights/match.h b/knights/match.h
new file mode 100644
index 0000000..22db6a9
--- /dev/null
+++ b/knights/match.h
@@ -0,0 +1,133 @@
+/***************************************************************************
+ match.h - description
+ -------------------
+ begin : Mon Jul 2 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef MATCH_H
+#define MATCH_H
+
+#include <qwidget.h>
+#include "resource.h"
+#include "match_param.h"
+#include "command.h"
+#include "chessclock.h"
+#include "logic.h"
+#include "pgn.h"
+
+class board_base;
+
+class match : public QWidget
+{
+ Q_OBJECT
+
+ private:
+ resource *Resource;
+ board_base *Board;
+ pgn *Record;
+ logic *Logic;
+ chessclock *Clock;
+ ChessMove chessMove;
+ ChessMove preMove;
+ bool preMoved;
+ bool Modified;
+ bool Paused;
+ bool Loading;
+ bool JustMoved;
+ bool Current;
+ int myID;
+ int StatusCode;
+ int loadTimer;
+ QString StatusMessage;
+ char ICSGameMode;
+ char Draw_Offered[2];
+
+ public:
+ match(QWidget *parent, match_param *param, resource *Rsrc);
+ ~match();
+ char inputOnMove( bool reverse=FALSE );
+ char input( char army );
+ QString url( void );
+ void flip( void );
+ void retract( void );
+ void requestHint( void );
+ void recvCMD( const Command &cmd );
+ void setVisibility( const bool vis );
+ void setPaused( const bool State );
+ /* Inline Function */
+ int getID( void )
+ { return myID; }
+ void setID( const int &ID )
+ { myID = ID; }
+ QString caption( void )
+ { return Record->caption(); }
+ char onMove( void )
+ { return Logic->OnMove; }
+ bool modified( void )
+ { return Modified; }
+ bool paused( void )
+ { return Paused; }
+ bool flag( const bool &Army )
+ { return Clock->Flag[Army]; }
+ void setCurrent( const bool &State )
+ { Current = State; }
+ void print( void )
+ { Record->print(); }
+ bool loading( void )
+ { return Loading; }
+ int centiseconds( const bool &Army )
+ { return Clock->getCentiseconds( Army ); }
+ QStringList* notation( void )
+ { return Record->notation(); }
+ void setModified( const bool &state )
+ { Modified = state; }
+ void resendStatusBar( void )
+ { emit setStatusBar( StatusCode, StatusMessage ); }
+ match_param* getParam( void )
+ { return Record->Param; }
+
+ public slots:
+ void tick( void );
+ void resize( void );
+ void redraw( void );
+ QString clock( bool );
+ bool save( QString );
+ bool load( const QString URL, const int pos=0 );
+ void loadSpecial( void );
+ void slot_Select( int );
+ void slot_Preview( int );
+ void slot_flagFell( const bool );
+ void review( const int );
+ void parseMatchParam( void );
+ void saveStatusBar( const int &ID, const QString &MSG )
+ { StatusCode = ID; StatusMessage = MSG; }
+
+ protected slots:
+ bool move( ChessMove );
+
+ signals:
+ void setNotation( void );
+ void setClocks( void );
+ void setStatusBar( const int &ID, const QString &MSG=QString::null );
+ void sendCMD( const Command& );
+
+ protected:
+ bool move( void );
+ void clearSelections( void );
+ void drawPosition( const int );
+ void playSound( const int );
+ void _retract( void );
+};
+
+#endif
diff --git a/knights/match_param.cpp b/knights/match_param.cpp
new file mode 100644
index 0000000..3b356a4
--- /dev/null
+++ b/knights/match_param.cpp
@@ -0,0 +1,243 @@
+/***************************************************************************
+ match_param.cpp - description
+ -------------------
+ begin : Tue Jun 25 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <kstddirs.h>
+#include <qcstring.h>
+#include <qfile.h>
+#include <qregexp.h>
+#include <string.h>
+#include "match_param.moc"
+
+match_param::match_param(resource *Rsrc) : QObject()
+{
+ myResource = Rsrc;
+ initialize();
+}
+match_param::match_param(resource *Rsrc, const int &whiteType, const int &blackType) : QObject()
+{
+ myResource = Rsrc;
+ initialize();
+
+ myResource->Type[WHITE] = Type[WHITE] = whiteType;
+ myResource->Type[BLACK] = Type[BLACK] = blackType;
+ lookupNames();
+ lookupImages();
+}
+match_param::~match_param()
+{
+}
+///////////////////////////////////////
+//
+// match_param::initialize
+//
+///////////////////////////////////////
+void match_param::initialize( void )
+{
+ PlayerNames << "" << "" << "" << "";
+ PlayerImages << QPixmap() << QPixmap() << QPixmap() << QPixmap();
+ Type[WHITE] = myResource->Type[WHITE];
+ Type[WHITE_HELPER] = myResource->Type[WHITE_HELPER];
+ Type[BLACK] = myResource->Type[BLACK];
+ Type[BLACK_HELPER] = myResource->Type[BLACK_HELPER];
+
+ Strength[WHITE] = myResource->Strength[WHITE];
+ Strength[WHITE_HELPER] = myResource->Strength[WHITE_HELPER];
+ Strength[BLACK] = myResource->Strength[BLACK];
+ Strength[BLACK_HELPER] = myResource->Strength[BLACK_HELPER];
+
+ Variation = myResource->MatchRules;
+
+ lookupTCP();
+ lookupNames();
+ lookupImages();
+}
+///////////////////////////////////////
+//
+// match_param::lookupNames
+//
+///////////////////////////////////////
+void match_param::lookupNames( void )
+{
+ engineList::Iterator IT;
+ char ID = 0;
+ for( int loop=0; loop < 4; loop++)
+ {
+ switch( Type[loop] )
+ {
+ case PLAYERLOCAL:
+ PlayerNames[loop] = myResource->Local_Player;
+ break;
+ case PLAYERPC:
+ /* Convert standard player numbers into engine Reference IDs */
+ switch( loop )
+ {
+ case WHITE:
+ ID = ENGINE_WHITE;
+ break;
+ case BLACK:
+ ID = ENGINE_BLACK;
+ break;
+ case WHITE_HELPER:
+ ID = ENGINE_WHITE_BK;
+ break;
+ case BLACK_HELPER:
+ ID = ENGINE_BLACK_BK;
+ break;
+ }
+ /* Search for Engine. I'm starting to like the idea of maps. =) */
+ for( IT = myResource->engines.begin(); IT != myResource->engines.end(); ++IT )
+ {
+ if( (*IT).CurrentRef & ID ) break;
+ }
+ if( IT == myResource->engines.end() )
+ {
+ PlayerNames[loop] = i18n("Unknown");
+ }
+ else
+ {
+ PlayerNames[loop] = (*IT).Name;
+ }
+ break;
+ case PLAYEREMAIL:
+ PlayerNames[loop] = myResource->Email_Address;
+ break;
+ }
+ }
+}
+///////////////////////////////////////
+//
+// match_param::lookupTCP
+//
+///////////////////////////////////////
+void match_param::lookupTCP( void )
+{
+ Time_White = myResource->TCPWhite;
+ Time_Black = myResource->TCPBlack;
+}
+///////////////////////////////////////
+//
+// match_param::lookupImages
+//
+///////////////////////////////////////
+void match_param::lookupImages( void )
+{
+ for( int loop=0; loop < 4; loop++)
+ {
+ switch( Type[loop] )
+ {
+ case PLAYERLOCAL:
+ PlayerImages[loop] = myResource->loadSCIDImage( PlayerNames[loop] );
+ if( PlayerImages[loop].isNull() )
+ PlayerImages[loop].load( locate("data", "knights/default-portrait.jpg" ) );
+ break;
+ case PLAYERPC:
+ PlayerImages[loop] = myResource->loadSCIDImage( PlayerNames[loop] );
+ if( PlayerImages[loop].isNull() )
+ PlayerImages[loop].load( locate("data", "knights/default-engine-portrait.jpg" ) );
+ break;
+ case PLAYEREMAIL:
+ PlayerImages[loop] = myResource->loadSCIDImage( PlayerNames[loop] );
+ if( PlayerImages[loop].isNull() )
+ PlayerImages[loop].load( locate("data", "knights/default-portrait.jpg" ) );
+ break;
+ }
+ }
+}
+///////////////////////////////////////
+//
+// match_param::time
+//
+///////////////////////////////////////
+TCPList match_param::time( const char &player )
+{
+ if( player == BLACK )
+ return Time_Black;
+ return Time_White;
+}
+
+///////////////////////////////////////
+//
+// match_param::setTime
+//
+///////////////////////////////////////
+void match_param::setTime( const char &player, const TCPList &tcp )
+{
+ if( player == BLACK )
+ myResource->TCPBlack = Time_Black = tcp;
+ else
+ myResource->TCPWhite = Time_White = tcp;
+ setTimer();
+}
+
+///////////////////////////////////////
+//
+// match_param::getVariation
+//
+///////////////////////////////////////
+
+int match_param::getVariation(void)
+{
+ return Variation;
+}
+
+///////////////////////////////////////
+//
+// match_param::setVariation
+//
+///////////////////////////////////////
+void match_param::setVariation(const int variation)
+{
+ Variation = variation;
+ setTimer();
+}
+
+///////////////////////////////////////
+//
+// match_param::setTimer
+//
+///////////////////////////////////////
+void match_param::setTimer( void )
+{
+ if( TimerFlag ) return;
+ QTimer::singleShot( 0, this, SLOT( slot_Timer() ) );
+ TimerFlag = TRUE;
+}
+
+///////////////////////////////////////
+//
+// match_param::slot_Timer
+//
+///////////////////////////////////////
+void match_param::slot_Timer( void )
+{
+ emit valuesChanged();
+ TimerFlag = FALSE;
+}
+
+///////////////////////////////////////
+//
+// match_param::setType
+//
+///////////////////////////////////////
+void match_param::setType( const int &player, const char &type )
+{
+ myResource->Type[player] = Type[player] = type;
+ lookupNames();
+ lookupImages();
+ setTimer();
+}
+
diff --git a/knights/match_param.h b/knights/match_param.h
new file mode 100644
index 0000000..ff48227
--- /dev/null
+++ b/knights/match_param.h
@@ -0,0 +1,100 @@
+/***************************************************************************
+ match_param.h - description
+ -------------------
+ begin : Tue Jun 25 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef MATCH_PARAM_H
+#define MATCH_PARAM_H
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+#include <qobject.h>
+#include <qstringlist.h>
+#include <qpixmap.h>
+#include <qvaluelist.h>
+#include <qtimer.h>
+#include "definitions.h"
+#include "resource.h"
+
+class match_param : public QObject
+{
+ Q_OBJECT
+
+ private:
+ resource *myResource;
+ QStringList PlayerNames;
+ QValueList<QPixmap> PlayerImages;
+
+ /*
+ This is used to keep the signal valuesChanged
+ from triggering multiple times in a row.
+ */
+ bool TimerFlag;
+
+ char Type[4];
+ TCPList Time_White;
+ TCPList Time_Black;
+ char Strength[4];
+ int Variation;
+
+ protected:
+ void initialize( void );
+ void lookupTCP( void );
+ void lookupNames( void );
+ void lookupImages( void );
+ void setTimer( void );
+
+ public:
+ match_param( resource *Rsrc=0 );
+ match_param( resource*, const int &whiteType, const int &blackType );
+ ~match_param();
+
+ char type( const int &player )
+ { return Type[player]; }
+
+ char strength( const int &player )
+ { return Strength[player]; }
+
+ QPixmap image( const char &player )
+ { return PlayerImages[player]; }
+
+ QString name( const char &player )
+ { return PlayerNames[player]; }
+
+ TCPList time( const char &player );
+
+ void setType( const int &player, const char &type );
+
+ void setStrength( const int &player, const char &str )
+ { setTimer(); myResource->Strength[player] = Strength[player] = str; }
+
+ void setTime( const char &player, const TCPList &tcp );
+
+ void setName( const int &player, const QString &name )
+ { PlayerNames[player] = name; }
+
+ void setVariation( const int variation );
+ int getVariation( void );
+
+ public slots:
+ void slot_Timer( void );
+
+ signals:
+ void valuesChanged( void );
+};
+
+#endif
diff --git a/knights/pgn.cpp b/knights/pgn.cpp
new file mode 100644
index 0000000..a4de0a6
--- /dev/null
+++ b/knights/pgn.cpp
@@ -0,0 +1,1464 @@
+/***************************************************************************
+ pgn.cpp - description
+ -------------------
+ begin : Mon Jul 30 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <sys/utsname.h>
+#include <sys/types.h>
+#include <qdatetime.h>
+#include <qregexp.h>
+#include <kprinter.h>
+#include <qfontmetrics.h>
+#include <qpaintdevicemetrics.h>
+#include "pgn.moc"
+#include "tabmanager.h"
+#include "tab_pgnview.h"
+
+pgn::pgn( resource *Rsrc, match_param *param )
+{
+ Resource = Rsrc;
+ Param = param;
+ pgnView = NULL;
+
+ if( Param != NULL )
+ {
+ connect( Param, SIGNAL( valuesChanged() ), this, SLOT( parseMatchParam() ) );
+ }
+}
+pgn::~pgn()
+{
+ if( Param )
+ delete Param;
+ if( pgnView )
+ {
+ if( Resource->tabManager->isTab( pgnView ) )
+ {
+ Resource->tabManager->removeTab( pgnView );
+ }
+ }
+}
+///////////////////////////////////////
+//
+// pgn::parseMatchParam
+//
+///////////////////////////////////////
+void pgn::parseMatchParam( void )
+{
+ if( Param == NULL )
+ return;
+ TAG_White = Param->name( WHITE );
+ TAG_Black = Param->name( BLACK );
+ switch( Param->type( BLACK ) )
+ {
+ case PLAYERLOCAL:
+ TAG_BlackType = "human";
+ break;
+ case PLAYERPC:
+ TAG_BlackType = "program";
+ break;
+ case PLAYERTCP:
+ TAG_BlackType = "unknown";
+ TAG_Mode = "ICS";
+ break;
+ case PLAYEREMAIL:
+ TAG_BlackType = "unknown";
+ TAG_Mode = "EM";
+ break;
+ default:
+ TAG_BlackType = "unknown";
+ break;
+ }
+ switch( Param->type( WHITE ) )
+ {
+ case PLAYERLOCAL:
+ TAG_WhiteType = "human";
+ break;
+ case PLAYERPC:
+ TAG_WhiteType = "program";
+ break;
+ case PLAYERTCP:
+ TAG_WhiteType = "unknown";
+ TAG_Mode = "ICS";
+ break;
+ case PLAYEREMAIL:
+ TAG_WhiteType = "unknown";
+ TAG_Mode = "EM";
+ break;
+ default:
+ TAG_WhiteType = "unknown";
+ break;
+ }
+}
+///////////////////////////////////////
+//
+// pgn::notation
+//
+///////////////////////////////////////
+QStringList* pgn::notation( const int format )
+{
+ QStringList *list;
+ QString notation;
+ MoveList::Iterator IT;
+ Annotation *annon;
+ int tmp(0), Line(0);
+ bool showLineNumber( false );
+
+ list = new QStringList;
+
+ switch( format )
+ {
+ case 0:
+ /* CAN Raw move data ( ie. for UCI engines ) */
+ for( IT = Moves.begin(); IT != Moves.end(); ++IT )
+ {
+ list->append( QString( (*IT).CAN ) );
+ }
+ break;
+
+ case 1:
+ /* SAN For display to the user */
+ for( IT = Moves.begin(); IT != Moves.end(); ++IT )
+ {
+ Line = ( tmp + 2 ) >> 1;
+ if( ( tmp % 2 ) == 0 )
+ {
+ notation = QString( "%1. %2" ).arg( Line ).arg( (*IT).SAN );
+ }
+ else
+ {
+ notation = QString( "%1... %2" ).arg( Line ).arg( (*IT).SAN );
+ }
+ list->append( notation );
+ tmp++;
+ }
+ break;
+
+ case 2:
+ /* SAN For PGN */
+ for( IT = Moves.begin(); IT != Moves.end(); ++IT )
+ {
+ Line = ( tmp + 2 ) >> 1;
+ if( ( tmp % 2 ) == 0 )
+ {
+ notation = QString( "%1. %2" ).arg( Line ).arg( (*IT).SAN );
+ }
+ else
+ {
+ if( showLineNumber )
+ {
+ notation = QString( "%1... %2" ).arg( Line ).arg( (*IT).SAN );
+ }
+ else
+ {
+ notation = QString( (*IT).SAN );
+ }
+ }
+ showLineNumber = false;
+ /* Insert NAGs */
+ if( (*IT).NAG != 0 )
+ {
+ notation += QString( " $%1" ).arg( QString::number( (*IT).NAG ) );
+ }
+ /* Insert RAVs */
+ annon = RAV.find( tmp );
+ if( annon != NULL )
+ {
+ notation += QString( " (%1)" ).arg( annon->text );
+ showLineNumber = true;
+ }
+ /* Insert Annotations */
+ annon = annotations.find( tmp );
+ if( annon != NULL )
+ {
+ notation += QString( " {%1}" ).arg( annon->text );
+ showLineNumber = true;
+ }
+ list->append( notation );
+ tmp++;
+ }
+ break;
+
+ default:
+ break;
+ }
+ return list;
+}
+///////////////////////////////////////
+//
+// pgn::caption
+//
+///////////////////////////////////////
+QString pgn::caption( void )
+{
+ QString caption;
+
+ caption = i18n( "%1 vs. %2").arg( TAG_White ).arg( TAG_Black );
+ return caption;
+}
+///////////////////////////////////////
+//
+// pgn::clear
+//
+///////////////////////////////////////
+void pgn::clear( void )
+{
+ Moves.clear();
+ RAV.clear();
+ annotations.clear();
+ Positions.clear();
+ currentIndex = 0;
+ whiteTCP.clear();
+ blackTCP.clear();
+ whiteTime = 300;
+ blackTime = 300;
+ CurrentURL = "";
+ Move_Data.clear();
+ clearTags();
+}
+///////////////////////////////////////
+//
+// pgn::clearTags
+//
+///////////////////////////////////////
+void pgn::clearTags( void )
+{
+ TAG_Site = "";
+ TAG_Date = "";
+ TAG_Round = "";
+ TAG_Result = "";
+ TAG_White = "";
+ TAG_WhiteTitle = "";
+ TAG_WhiteElo = "";
+ TAG_WhiteUSCF = "";
+ TAG_WhiteNA = "";
+ TAG_WhiteType = "";
+ TAG_Black = "";
+ TAG_BlackTitle = "";
+ TAG_BlackElo = "";
+ TAG_BlackUSCF = "";
+ TAG_BlackNA = "";
+ TAG_BlackType = "";
+ TAG_Time = "";
+ TAG_UTCTime = "";
+ TAG_UTCDate = "";
+ TAG_Event = "";
+ TAG_EventDate = "";
+ TAG_EventSponsor = "";
+ TAG_Section = "";
+ TAG_Stage = "";
+ TAG_Board = "";
+ TAG_Opening = "";
+ TAG_Variation = "";
+ TAG_SubVariation = "";
+ TAG_ECO = "";
+ TAG_NIC = "";
+ TAG_TimeControl = "";
+ TAG_Termination = "";
+ TAG_SetUp = "";
+ TAG_FEN = "";
+ TAG_Annotator = "";
+ TAG_Mode = "";
+ TAG_PlyCount = "";
+}
+///////////////////////////////////////
+//
+// pgn::init
+//
+///////////////////////////////////////
+void pgn::init( void )
+{
+ QString temp;
+ struct utsname unamePtr;
+ QDateTime qdt;
+
+ clear();
+ parseMatchParam();
+ uname( &unamePtr );
+
+ /* Build Date */
+ qdt = QDateTime::currentDateTime();
+ TAG_Date = QString("%1.%2.%3").arg(qdt.date().year(),4).arg(qdt.date().month(),2).arg(qdt.date().day(),2);
+ TAG_Date = TAG_Date.replace( QRegExp("\\s"), QString("0") );
+ TAG_Time = qdt.time().toString();
+
+ TAG_Site = unamePtr.nodename;
+ TAG_Event = "Knights Computer Chess Game";
+ TAG_Round = "-";
+ TAG_Result = "*";
+}
+///////////////////////////////////////
+//
+// pgn::scan
+//
+///////////////////////////////////////
+int pgn::scan( void )
+{
+ register int Section(0);
+ QChar c;
+
+ clearTags();
+ File_Position = File.at();
+
+ /* Toplevel parsing loop */
+ while( 1 )
+ {
+ /* Is this the end of the .pgn file? */
+ if( Input.atEnd() )
+ {
+ close();
+ return 100; // 100% Complete
+ }
+ currentLine = Input.readLine();
+ if( currentLine.isEmpty() )
+ {
+ if( Section == 1 )
+ return (int)( ( (float)File.at() / (float)File.size() ) * 100.0 );
+ }
+ c = getch();
+ while( c != QChar::null )
+ {
+ switch( c )
+ {
+ /* Tag Pair */
+ case '[':
+ parseTag();
+ break;
+ case '%': /* Fall through */
+ case ';':
+ c = QChar::null;
+ continue;
+ break;
+ default:
+ Section = 1;
+ c = QChar::null;
+ continue;
+ break;
+ }
+ c = getch();
+ }
+ }
+ /* We should NEVER reach this point */
+ close();
+ return -1;
+}
+///////////////////////////////////////
+//
+// pgn::load
+//
+///////////////////////////////////////
+bool pgn::load( const int pos )
+{
+ QString Token,
+ Value;
+ QChar c;
+
+ File.at(pos);
+ clear();
+
+ /* Toplevel parsing loop */
+ while( 1 )
+ {
+ if( Input.atEnd() )
+ break;
+ currentLine = Input.readLine();
+ if( currentLine.isEmpty() )
+ {
+ /* Finished with TAGs... now grab the move data for display */
+ File_Position = File.at();
+ while( 1 )
+ {
+ currentLine = Input.readLine();
+ if( ( currentLine.at(0) == '[' ) || Input.atEnd() )
+ break;
+ Move_Data << currentLine;
+ }
+ /* Allocate the Tab_PGNView */
+ pgnView = new tab_pgnView( this, Resource );
+ connect( pgnView, SIGNAL( destroyed() ), this, SLOT( childViewDestroyed() ) );
+ Resource->tabManager->addTab( pgnView, i18n( "%1 vs. %2" ).arg( TAG_White ).arg( TAG_Black ) );
+ pgnView->init();
+ File.at( File_Position );
+ currentLine = "";
+ return TRUE;
+ }
+ c = getch();
+ while( c != QChar::null )
+ {
+ Token = "";
+ Value = "";
+ switch( c )
+ {
+ /* Special break... look for the Knights tag */
+ case '%':
+ Value = getword();
+ if( Value == "KNIGHTS_CMD" ) parseKnightsData();
+ /* Fall through */
+ case ';':
+ c = QChar::null;
+ continue;
+ break;
+ /* Tag Pair */
+ case '[':
+ parseTag();
+ break;
+ default:
+ c = QChar::null;
+ break;
+ }
+ c = getch();
+ }
+ }
+ close();
+ return TRUE;
+}
+///////////////////////////////////////
+//
+// pgn::loadNext
+//
+///////////////////////////////////////
+bool pgn::loadNext( void )
+{
+ QChar c;
+ QString Value;
+ ChessMove Move;
+ bool postMove( FALSE );
+
+ /* Toplevel parsing loop */
+ while( 1 )
+ {
+ if( currentLine.isEmpty() )
+ {
+ if( Input.atEnd() ) break;
+ currentLine = Input.readLine();
+ }
+ c = getch();
+ while( c != QChar::null )
+ {
+ Value = "";
+ switch( c )
+ {
+ /* Special break... look for the Knights tag */
+ case '%':
+ Value = getword();
+ if( Value == "KNIGHTS_CMD" ) parseKnightsData();
+ /* Fall through */
+ case ';':
+ c = QChar::null;
+ continue;
+ /* Tag Pair...next game, so we're done. */
+ case '[':
+ return FALSE;
+ /* Numeric Annotation Glyph */
+ case '$':
+ c = getch();
+ while( ( c >= '0' ) && ( c <= '9' ) )
+ {
+ Value += c;
+ c = getch();
+ }
+ Moves[ Moves.count() - 1 ].NAG = Value.toInt();
+ break;
+ /* Recursive Annotation Variations */
+ case '(':
+ parseRAV();
+ break;
+ /* Textual Annotation */
+ case '{':
+ parseAnnotation();
+ break;
+ /* Reserved for future expansion by the PGN */
+ case '<':
+ while( c != '>' ) c = getch();
+ break;
+ /* Everything from '0' to '*' is null to us and falls through */
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case ' ':
+ case '/':
+ case '-':
+ case '.':
+ case '*':
+ break;
+ default:
+ if( postMove )
+ {
+ currentLine.prepend( c );
+ return TRUE;
+ }
+ /* Catch Standard Algebraic Notation */
+ while( ( c != QChar::null ) &&
+ ( c != ' ' ) &&
+ ( c != ';' ) &&
+ ( c != '%' ) )
+ {
+ Value += c;
+ c = getch();
+ }
+ strcpy( Move.SAN, Value.latin1() );
+ emit processMove( Move );
+ postMove = TRUE;
+ }
+ c = getch();
+ }
+ }
+ return FALSE;
+}
+///////////////////////////////////////
+//
+// pgn::save
+//
+///////////////////////////////////////
+bool pgn::save( QString URL )
+{
+ QFile Save( URL );
+ QTextStream *Output;
+ QString Token,
+ Value;
+
+ close();
+ CurrentURL = URL;
+ if( Resource->OPTION_Reuse_PGN && ( URL == Resource->PGN_Filename ) )
+ {
+ Save.open( IO_WriteOnly | IO_Append );
+ }
+ else
+ {
+ Save.open( IO_WriteOnly );
+ }
+ Output = new QTextStream( &Save );
+ (*Output) << "[Event \"" << TAG_Event << "\"]\n";
+ (*Output) << "[Site \"" << TAG_Site << "\"]\n";
+ (*Output) << "[Date \"" << TAG_Date << "\"]\n";
+ (*Output) << "[Round \"" << TAG_Round << "\"]\n";
+ (*Output) << "[White \"" << TAG_White << "\"]\n";
+ (*Output) << "[Black \"" << TAG_Black << "\"]\n";
+ (*Output) << "[Result \"" << TAG_Result << "\"]\n";
+ if( !TAG_TimeControl.isEmpty() )
+ (*Output) << "[TimeControl \"" << TAG_TimeControl << "\"]\n";
+ if( !TAG_WhiteTitle.isEmpty() )
+ (*Output) << "[WhiteTitle \"" << TAG_WhiteTitle << "\"]\n";
+ if( !TAG_WhiteElo.isEmpty() )
+ (*Output) << "[WhiteElo \"" << TAG_WhiteElo << "\"]\n";
+ if( !TAG_WhiteUSCF.isEmpty() )
+ (*Output) << "[WhiteUSCF \"" << TAG_WhiteUSCF << "\"]\n";
+ if( !TAG_WhiteNA.isEmpty() )
+ (*Output) << "[WhiteNA \"" << TAG_WhiteNA << "\"]\n";
+ if( !TAG_WhiteType.isEmpty() )
+ (*Output) << "[WhiteType \"" << TAG_WhiteType << "\"]\n";
+ if( !TAG_BlackTitle.isEmpty() )
+ (*Output) << "[BlackTitle \"" << TAG_BlackTitle << "\"]\n";
+ if( !TAG_BlackElo.isEmpty() )
+ (*Output) << "[BlackElo \"" << TAG_BlackElo << "\"]\n";
+ if( !TAG_BlackUSCF.isEmpty() )
+ (*Output) << "[BlackUSCF \"" << TAG_BlackUSCF << "\"]\n";
+ if( !TAG_BlackNA.isEmpty() )
+ (*Output) << "[BlackNA \"" << TAG_BlackNA << "\"]\n";
+ if( !TAG_BlackType.isEmpty() )
+ (*Output) << "[BlackType \"" << TAG_BlackType << "\"]\n";
+ if( !TAG_Time.isEmpty() )
+ (*Output) << "[Time \"" << TAG_Time << "\"]\n";
+ if( !TAG_UTCTime.isEmpty() )
+ (*Output) << "[UTCTime \"" << TAG_UTCTime << "\"]\n";
+ if( !TAG_UTCDate.isEmpty() )
+ (*Output) << "[UTCDate \"" << TAG_UTCDate << "\"]\n";
+ if( !TAG_EventDate.isEmpty() )
+ (*Output) << "[EventDate \"" << TAG_EventDate << "\"]\n";
+ if( !TAG_EventSponsor.isEmpty() )
+ (*Output) << "[EventSponsor \"" << TAG_EventSponsor << "\"]\n";
+ if( !TAG_Section.isEmpty() )
+ (*Output) << "[Section \"" << TAG_Section << "\"]\n";
+ if( !TAG_Stage.isEmpty() )
+ (*Output) << "[Stage \"" << TAG_Stage << "\"]\n";
+ if( !TAG_Board.isEmpty() )
+ (*Output) << "[Board \"" << TAG_Board << "\"]\n";
+ if( !TAG_Opening.isEmpty() )
+ (*Output) << "[Opening \"" << TAG_Opening << "\"]\n";
+ if( !TAG_Variation.isEmpty() )
+ (*Output) << "[Variation \"" << TAG_Variation << "\"]\n";
+ if( !TAG_SubVariation.isEmpty() )
+ (*Output) << "[SubVariation \"" << TAG_SubVariation << "\"]\n";
+ if( !TAG_ECO.isEmpty() )
+ (*Output) << "[ECO \"" << TAG_ECO << "\"]\n";
+ if( !TAG_NIC.isEmpty() )
+ (*Output) << "[NIC \"" << TAG_NIC << "\"]\n";
+ if( !TAG_Termination.isEmpty() )
+ (*Output) << "[Termination \"" << TAG_Termination << "\"]\n";
+ if( !TAG_SetUp.isEmpty() )
+ (*Output) << "[SetUp \"" << TAG_SetUp << "\"]\n";
+ if( !TAG_FEN.isEmpty() )
+ (*Output) << "[FEN \"" << TAG_FEN << "\"]\n";
+ if( !TAG_Annotator.isEmpty() )
+ (*Output) << "[Annotator \"" << TAG_Annotator << "\"]\n";
+ if( !TAG_Mode.isEmpty() )
+ (*Output) << "[Mode \"" << TAG_Mode << "\"]\n";
+ TAG_PlyCount = QString().setNum( Moves.count() );
+ (*Output) << "[PlyCount \"" << TAG_PlyCount << "\"]\n";
+
+ /* Save internal data if this game is unfinished */
+ if( TAG_Result == "*" )
+ {
+ (*Output) << "% KNIGHTS_CMD WhiteType ";
+ switch( Param->type(WHITE) )
+ {
+ case PLAYERPC:
+ (*Output) << "PC\n";
+ break;
+ case PLAYERTCP:
+ (*Output) << "TCP\n";
+ break;
+ case PLAYEREMAIL:
+ (*Output) << "Email\n";
+ break;
+ case PLAYERLOCAL:
+ default:
+ (*Output) << "Local\n";
+ break;
+ }
+ (*Output) << "% KNIGHTS_CMD BlackType ";
+ switch( Param->type(BLACK) )
+ {
+ case PLAYERPC:
+ (*Output) << "PC\n";
+ break;
+ case PLAYERTCP:
+ (*Output) << "TCP\n";
+ break;
+ case PLAYEREMAIL:
+ (*Output) << "Email\n";
+ break;
+ case PLAYERLOCAL:
+ default:
+ (*Output) << "Local\n";
+ break;
+ }
+ (*Output) << "% KNIGHTS_CMD WhiteTime " << whiteTime << "\n";
+ (*Output) << "% KNIGHTS_CMD BlackTime " << blackTime << "\n";
+ (*Output) << "% KNIGHTS_CMD DONE\n";
+ }
+ /* End of internal data save */
+
+ (*Output) << "\n";
+ QStringList *list = notation(2);
+ QString SAN = list->join( " " );
+ delete list;
+
+ kdWarning() << SAN.right( 20 ) << endl;
+
+ unsigned int pos = 80;
+ unsigned int lastPos = 0;
+ while( pos < SAN.length() )
+ {
+ while( SAN.at( pos ) != ' ' )
+ pos--;
+ SAN = SAN.replace( pos, 1, QString("\n") );
+ lastPos = pos;
+ pos = lastPos + 80;
+ }
+ kdWarning() << SAN.right( 20 ) << endl;
+
+ (*Output) << SAN << " " << TAG_Result << "\n\n";
+ Save.close();
+ return TRUE;
+}
+///////////////////////////////////////
+//
+// pgn::getch
+//
+///////////////////////////////////////
+QChar pgn::getch( void )
+{
+ QChar c;
+
+ c = currentLine.at(0);
+ currentLine.remove( 0, 1 );
+ return c;
+}
+///////////////////////////////////////
+//
+// pgn::getword
+//
+///////////////////////////////////////
+QString pgn::getword( void )
+{
+ QChar c;
+ QString word;
+
+ do
+ {
+ c = getch();
+ } while( c == ' ' );
+
+ while( ( c != ' ' ) && ( c != QChar::null ) )
+ {
+ word += c;
+ c = getch();
+ }
+ return word;
+}
+///////////////////////////////////////
+//
+// pgn::open
+//
+///////////////////////////////////////
+bool pgn::open( const QString &URL )
+{
+ close();
+ if( !KIO::NetAccess::download( URL, tempFile ) )
+ return FALSE;
+
+ File.setName( tempFile );
+ if( !File.open( IO_ReadOnly ) )
+ {
+ close();
+ return FALSE;
+ }
+ Input.setDevice( &File );
+ CurrentURL = URL;
+ File.at(0);
+ return TRUE;
+}
+///////////////////////////////////////
+//
+// pgn::close
+//
+///////////////////////////////////////
+void pgn::close( void )
+{
+ if( !File.isOpen() )
+ {
+ File.close();
+ }
+ if( !tempFile.isEmpty() )
+ {
+ KIO::NetAccess::removeTempFile( tempFile );
+ tempFile = "";
+ }
+}
+///////////////////////////////////////
+//
+// pgn::parseTag
+//
+///////////////////////////////////////
+void pgn::parseTag( void )
+{
+ QChar c;
+ QString Token;
+ QString Value;
+
+ c = getch();
+ while( c == ' ' ) c = getch();
+ while( c != '\"' )
+ {
+ if( c == ' ' )
+ {
+ c = getch();
+ continue;
+ }
+ Token += c;
+ c = getch();
+ }
+ c = getch();
+ while( c != '\"' )
+ {
+ Value += c;
+ c = getch();
+ }
+ c = getch();
+ while( c != ']' ) c = getch();
+ /* Now Apply the Token/Value that we got */
+ if( Token == "Site" ) TAG_Site = Value;
+ else if( Token == "Date" ) TAG_Date = Value;
+ else if( Token == "Round" ) TAG_Round = Value;
+ else if( Token == "Result" ) TAG_Result = Value;
+
+ else if( Token == "White" ) TAG_White = Value;
+ else if( Token == "WhiteTitle" ) TAG_WhiteTitle = Value;
+ else if( Token == "WhiteElo" ) TAG_WhiteElo = Value;
+ else if( Token == "WhiteUSCF" ) TAG_WhiteUSCF = Value;
+ else if( Token == "WhiteNA" ) TAG_WhiteNA = Value;
+ else if( Token == "WhiteType" ) TAG_WhiteType = Value;
+
+ else if( Token == "Black" ) TAG_Black = Value;
+ else if( Token == "BlackTitle" ) TAG_BlackTitle = Value;
+ else if( Token == "BlackElo" ) TAG_BlackElo = Value;
+ else if( Token == "BlackUSCF" ) TAG_BlackUSCF = Value;
+ else if( Token == "BlackNA" ) TAG_BlackNA = Value;
+ else if( Token == "BlackType" ) TAG_BlackType = Value;
+
+ else if( Token == "Time" ) TAG_Time = Value;
+ else if( Token == "UTCTime" ) TAG_UTCTime = Value;
+ else if( Token == "UTCDate" ) TAG_UTCDate = Value;
+
+ else if( Token == "Event" ) TAG_Event = Value;
+ else if( Token == "EventDate" ) TAG_EventDate = Value;
+ else if( Token == "EventSponsor") TAG_EventSponsor = Value;
+ else if( Token == "Section" ) TAG_Section = Value;
+ else if( Token == "Stage" ) TAG_Stage = Value;
+ else if( Token == "Board" ) TAG_Board = Value;
+
+ else if( Token == "Opening" ) TAG_Opening = Value;
+ else if( Token == "Variation" ) TAG_Variation = Value;
+ else if( Token == "SubVariation" ) TAG_SubVariation = Value;
+ else if( Token == "ECO" ) TAG_ECO = Value;
+ else if( Token == "NIC" ) TAG_NIC = Value;
+
+ else if( Token == "TimeControl" ) TAG_TimeControl = Value;
+ else if( Token == "Termination" ) TAG_Termination = Value;
+ else if( Token == "SetUp" ) TAG_SetUp = Value;
+ else if( Token == "FEN" ) TAG_FEN = Value;
+ else if( Token == "Annotator" ) TAG_Annotator = Value;
+ else if( Token == "Mode" ) TAG_Mode = Value;
+ else if( Token == "PlyCount" ) TAG_PlyCount = Value;
+}
+///////////////////////////////////////
+//
+// pgn::Parse_Annotation
+//
+///////////////////////////////////////
+void pgn::parseAnnotation( const int fromRAVnum )
+{
+ Annotation *annon = new Annotation;
+ QChar c;
+
+ c = getch();
+ while( c != '}' )
+ {
+ if( c == QChar::null )
+ {
+ if( Input.eof() ) break;
+ currentLine = Input.readLine();
+ c = ' ';
+ }
+ annon->text += c;
+ c = getch();
+ }
+ annon->RAV = fromRAVnum;
+ annotations.add( Moves.count() - 1, annon );
+// kdWarning() << "# " << annon.pos << " : " << annon.text << endl;
+}
+///////////////////////////////////////
+//
+// pgn::Parse_RAV
+//
+///////////////////////////////////////
+void pgn::parseRAV( void )
+{
+ int RAVLevel(1);
+ Annotation *annon = new Annotation;
+ QChar c;
+
+ while( RAVLevel )
+ {
+ c = getch();
+ if( c == QChar::null )
+ {
+ if( Input.eof() )
+ break;
+ currentLine = Input.readLine();
+ c = ' ';
+ }
+ if( c == ')' )
+ {
+ RAVLevel--;
+ if( !RAVLevel )
+ break;
+ }
+ if( c == '(' )
+ {
+ RAVLevel++;
+ }
+ annon->text += c;
+ }
+ RAV.add( Moves.count() - 1, annon );
+// kdWarning() << "# " << annon.pos << " : " << annon.text << endl;
+}
+///////////////////////////////////////
+//
+// pgn::parseKnightsData
+//
+///////////////////////////////////////
+void pgn::parseKnightsData( void )
+{
+ QString Key;
+ QString Value;
+
+ Key = getword();
+ if( Key == "DONE" )
+ {
+ emit processSpecial();
+ return;
+ }
+ if( Key == "WhiteType" )
+ {
+ Value = getword();
+ if( Value == "Local" ) Param->setType(WHITE, PLAYERLOCAL);
+ if( Value == "PC" ) Param->setType(WHITE, PLAYERPC);
+ if( Value == "TCP" ) Param->setType(WHITE, PLAYERTCP);
+ if( Value == "Email" ) Param->setType(WHITE, PLAYEREMAIL);
+ return;
+ }
+ if( Key == "BlackType" )
+ {
+ Value = getword();
+ if( Value == "Local" ) Param->setType(BLACK, PLAYERLOCAL);
+ if( Value == "PC" ) Param->setType(BLACK, PLAYERPC);
+ if( Value == "TCP" ) Param->setType(BLACK, PLAYERTCP);
+ if( Value == "Email" ) Param->setType(BLACK, PLAYEREMAIL);
+ return;
+ }
+ if( Key == "WhiteTime" )
+ {
+ Value = getword();
+ whiteTime = Value.toInt();
+ return;
+ }
+ if( Key == "BlackTime" )
+ {
+ Value = getword();
+ blackTime = Value.toInt();
+ return;
+ }
+}
+///////////////////////////////////////
+//
+// pgn::print
+//
+///////////////////////////////////////
+void pgn::print( void )
+{
+ if( !pgnView )
+ {
+ /* Allocate the Tab_PGNView */
+ pgnView = new tab_pgnView( this, Resource );
+ Resource->tabManager->addTab( pgnView, i18n( "%1 vs. %2" ).arg( TAG_White ).arg( TAG_Black ) );
+ connect( pgnView, SIGNAL( destroyed() ), this, SLOT( childViewDestroyed() ) );
+ pgnView->init();
+ }
+ pgnView->print();
+}
+///////////////////////////////////////
+//
+// pgn::childViewDestroyed
+//
+///////////////////////////////////////
+void pgn::childViewDestroyed( void )
+{
+ pgnView = NULL;
+}
+///////////////////////////////////////
+//
+// pgn::getNAG
+//
+///////////////////////////////////////
+QString pgn::getNAG( int num )
+{
+ QString Line;
+
+ switch( num )
+ {
+ case 1:
+ Line = i18n( "Good move" );
+ break;
+ case 2:
+ Line = i18n( "Poor move" );
+ break;
+ case 3:
+ Line = i18n( "Very good move" );
+ break;
+ case 4:
+ Line = i18n( "Very poor move" );
+ break;
+ case 5:
+ Line = i18n( "Speculative move" );
+ break;
+ case 6:
+ Line = i18n( "Questionable move" );
+ break;
+ case 7:
+ Line = i18n( "Forced move" );
+ break;
+ case 8:
+ Line = i18n( "Singular move" );
+ break;
+ case 9:
+ Line = i18n( "Worst move" );
+ break;
+ case 10:
+ Line = i18n( "Drawish position" );
+ break;
+ case 11:
+ Line = i18n( "Equal chances, quiet position" );
+ break;
+ case 12:
+ Line = i18n( "Equal chances, active position" );
+ break;
+ case 13:
+ Line = i18n( "Unclear position" );
+ break;
+ case 14:
+ Line = i18n( "White has a slight advantage" );
+ break;
+ case 15:
+ Line = i18n( "Black has a slight advantage" );
+ break;
+ case 16:
+ Line = i18n( "White has a moderate advantage" );
+ break;
+ case 17:
+ Line = i18n( "Black has a moderate advantage" );
+ break;
+ case 18:
+ Line = i18n( "White has a decisive advantage" );
+ break;
+ case 19:
+ Line = i18n( "Black has a decisive advantage" );
+ break;
+ case 20:
+ Line = i18n( "White has a crushing advantage ( Black should resign )" );
+ break;
+ case 21:
+ Line = i18n( "Black has a crushing advantage ( White should resign )" );
+ break;
+ case 22:
+ Line = i18n( "White is in zugzwang" );
+ break;
+ case 23:
+ Line = i18n( "Black is in zugzwang" );
+ break;
+ case 24:
+ Line = i18n( "White has a slight space advantage" );
+ break;
+ case 25:
+ Line = i18n( "Black has a slight space advantage" );
+ break;
+ case 26:
+ Line = i18n( "White has a moderate space advantage" );
+ break;
+ case 27:
+ Line = i18n( "Black has a moderate space advantage" );
+ break;
+ case 28:
+ Line = i18n( "White has a decisive space advantage" );
+ break;
+ case 29:
+ Line = i18n( "Black has a decisive space advantage" );
+ break;
+ case 30:
+ Line = i18n( "White has a slight time ( development ) advantage" );
+ break;
+ case 31:
+ Line = i18n( "Black has a slight time ( development ) advantage" );
+ break;
+ case 32:
+ Line = i18n( "White has a moderate time ( development ) advantage" );
+ break;
+ case 33:
+ Line = i18n( "Black has a moderate time ( development ) advantage" );
+ break;
+ case 34:
+ Line = i18n( "White has a decisive time ( development ) advantage" );
+ break;
+ case 35:
+ Line = i18n( "Black has a decisive time ( development ) advantage" );
+ break;
+ case 36:
+ Line = i18n( "White has the initiative" );
+ break;
+ case 37:
+ Line = i18n( "Black has the initiative" );
+ break;
+ case 38:
+ Line = i18n( "White has a lasting initiative" );
+ break;
+ case 39:
+ Line = i18n( "Black has a lasting initiative" );
+ break;
+ case 40:
+ Line = i18n( "White has the attack" );
+ break;
+ case 41:
+ Line = i18n( "Black has the attack" );
+ break;
+ case 42:
+ Line = i18n( "White has insufficient compensation for material deficit" );
+ break;
+ case 43:
+ Line = i18n( "Black has insufficient compensation for material deficit" );
+ break;
+ case 44:
+ Line = i18n( "White has sufficient compensation for material deficit" );
+ break;
+ case 45:
+ Line = i18n( "Black has sufficient compensation for material deficit" );
+ break;
+ case 46:
+ Line = i18n( "White has more than adequate compensation for material deficit" );
+ break;
+ case 47:
+ Line = i18n( "Black has more than adequate compensation for material deficit" );
+ break;
+ case 48:
+ Line = i18n( "White has a slight center control advantage" );
+ break;
+ case 49:
+ Line = i18n( "Black has a slight center control advantage" );
+ break;
+ case 50:
+ Line = i18n( "White has a moderate center control advantage" );
+ break;
+ case 51:
+ Line = i18n( "Black has a moderate center control advantage" );
+ break;
+ case 52:
+ Line = i18n( "White has a decisive center control advantage" );
+ break;
+ case 53:
+ Line = i18n( "Black has a decisive center control advantage" );
+ break;
+ case 54:
+ Line = i18n( "White has a slight kingside control advantage" );
+ break;
+ case 55:
+ Line = i18n( "Black has a slight kingside control advantage" );
+ break;
+ case 56:
+ Line = i18n( "White has a moderate kingside control advantage" );
+ break;
+ case 57:
+ Line = i18n( "Black has a moderate kingside control advantage" );
+ break;
+ case 58:
+ Line = i18n( "White has a decisive kingside control advantage" );
+ break;
+ case 59:
+ Line = i18n( "Black has a decisive kingside control advantage" );
+ break;
+ case 60:
+ Line = i18n( "White has a slight queenside control advantage" );
+ break;
+ case 61:
+ Line = i18n( "Black has a slight queenside control advantage" );
+ break;
+ case 62:
+ Line = i18n( "White has a moderate queenside control advantage" );
+ break;
+ case 63:
+ Line = i18n( "Black has a moderate queenside control advantage" );
+ break;
+ case 64:
+ Line = i18n( "White has a decisive queenside control advantage" );
+ break;
+ case 65:
+ Line = i18n( "Black has a decisive queenside control advantage" );
+ break;
+ case 66:
+ Line = i18n( "White has a vulnerable first rank" );
+ break;
+ case 67:
+ Line = i18n( "Black has a vulnerable first rank" );
+ break;
+ case 68:
+ Line = i18n( "White has a well protected first rank" );
+ break;
+ case 69:
+ Line = i18n( "Black has a well protected first rank" );
+ break;
+ case 70:
+ Line = i18n( "White has a poorly protected king" );
+ break;
+ case 71:
+ Line = i18n( "Black has a poorly protected king" );
+ break;
+ case 72:
+ Line = i18n( "White has a well protected king" );
+ break;
+ case 73:
+ Line = i18n( "Black has a well protected king" );
+ break;
+ case 74:
+ Line = i18n( "White has a poorly placed king" );
+ break;
+ case 75:
+ Line = i18n( "Black has a poorly placed king" );
+ break;
+ case 76:
+ Line = i18n( "White has a well placed king" );
+ break;
+ case 77:
+ Line = i18n( "Black has a well placed king" );
+ break;
+ case 78:
+ Line = i18n( "White has a very weak pawn structure" );
+ break;
+ case 79:
+ Line = i18n( "Black has a very weak pawn structure" );
+ break;
+ case 80:
+ Line = i18n( "White has a moderately weak pawn structure" );
+ break;
+ case 81:
+ Line = i18n( "Black has a moderately weak pawn structure" );
+ break;
+ case 82:
+ Line = i18n( "White has a moderately strong pawn structure" );
+ break;
+ case 83:
+ Line = i18n( "Black has a moderately strong pawn structure" );
+ break;
+ case 84:
+ Line = i18n( "White has a very strong pawn structure" );
+ break;
+ case 85:
+ Line = i18n( "Black has a very strong pawn structure" );
+ break;
+ case 86:
+ Line = i18n( "White has poor knight placement" );
+ break;
+ case 87:
+ Line = i18n( "Black has poor knight placement" );
+ break;
+ case 88:
+ Line = i18n( "White has good knight placement" );
+ break;
+ case 89:
+ Line = i18n( "Black has good knight placement" );
+ break;
+ case 90:
+ Line = i18n( "White has poor bishop placement" );
+ break;
+ case 91:
+ Line = i18n( "Black has poor bishop placement" );
+ break;
+ case 92:
+ Line = i18n( "White has good bishop placement" );
+ break;
+ case 93:
+ Line = i18n( "Black has good bishop placement" );
+ break;
+ case 94:
+ Line = i18n( "White has poor rook placement" );
+ break;
+ case 95:
+ Line = i18n( "Black has poor rook placement" );
+ break;
+ case 96:
+ Line = i18n( "White has good rook placement" );
+ break;
+ case 97:
+ Line = i18n( "Black has good rook placement" );
+ break;
+ case 98:
+ Line = i18n( "White has poor queen placement" );
+ break;
+ case 99:
+ Line = i18n( "Black has poor queen placement" );
+ break;
+ case 100:
+ Line = i18n( "White has good queen placement" );
+ break;
+ case 101:
+ Line = i18n( "Black has good queen placement" );
+ break;
+ case 102:
+ Line = i18n( "White has poor piece coordination" );
+ break;
+ case 103:
+ Line = i18n( "Black has poor piece coordination" );
+ break;
+ case 104:
+ Line = i18n( "White has good piece coordination" );
+ break;
+ case 105:
+ Line = i18n( "Black has good piece coordination" );
+ break;
+ case 106:
+ Line = i18n( "White has played the opening very poorly" );
+ break;
+ case 107:
+ Line = i18n( "Black has played the opening very poorly" );
+ break;
+ case 108:
+ Line = i18n( "White has played the opening poorly" );
+ break;
+ case 109:
+ Line = i18n( "Black has played the opening poorly" );
+ break;
+ case 110:
+ Line = i18n( "White has played the opening well" );
+ break;
+ case 111:
+ Line = i18n( "Black has played the opening well" );
+ break;
+ case 112:
+ Line = i18n( "White has played the opening very well" );
+ break;
+ case 113:
+ Line = i18n( "Black has played the opening very well" );
+ break;
+ case 114:
+ Line = i18n( "White has played the middlegame very poorly" );
+ break;
+ case 115:
+ Line = i18n( "Black has played the middlegame very poorly" );
+ break;
+ case 116:
+ Line = i18n( "White has played the middlegame poorly" );
+ break;
+ case 117:
+ Line = i18n( "Black has played the middlegame poorly" );
+ break;
+ case 118:
+ Line = i18n( "White has played the middlegame well" );
+ break;
+ case 119:
+ Line = i18n( "Black has played the middlegame well" );
+ break;
+ case 120:
+ Line = i18n( "White has played the middlegame very well" );
+ break;
+ case 121:
+ Line = i18n( "Black has played the middlegame very well" );
+ break;
+ case 122:
+ Line = i18n( "White has played the ending very poorly" );
+ break;
+ case 123:
+ Line = i18n( "Black has played the ending very poorly" );
+ break;
+ case 124:
+ Line = i18n( "White has played the ending poorly" );
+ break;
+ case 125:
+ Line = i18n( "Black has played the ending poorly" );
+ break;
+ case 126:
+ Line = i18n( "White has played the ending well" );
+ break;
+ case 127:
+ Line = i18n( "Black has played the ending well" );
+ break;
+ case 128:
+ Line = i18n( "White has played the ending very well" );
+ break;
+ case 129:
+ Line = i18n( "Black has played the ending very well" );
+ break;
+ case 130:
+ Line = i18n( "White has slight counterplay" );
+ break;
+ case 131:
+ Line = i18n( "Black has slight counterplay" );
+ break;
+ case 132:
+ Line = i18n( "White has moderate counterplay" );
+ break;
+ case 133:
+ Line = i18n( "Black has moderate counterplay" );
+ break;
+ case 134:
+ Line = i18n( "White has decisive counterplay" );
+ break;
+ case 135:
+ Line = i18n( "Black has decisive counterplay" );
+ break;
+ case 136:
+ Line = i18n( "White has moderate time control pressure" );
+ break;
+ case 137:
+ Line = i18n( "Black has moderate time control pressure" );
+ break;
+ case 138:
+ Line = i18n( "White has severe time control pressure" );
+ break;
+ case 139:
+ Line = i18n( "Black has severe time control pressure" );
+ case 140:
+ Line = i18n( "With the idea..." );
+ break;
+ case 141:
+ Line = i18n( "Aimed against..." );
+ break;
+ case 142:
+ Line = i18n( "Better Move" );
+ break;
+ case 143:
+ Line = i18n( "Worse Move" );
+ break;
+ case 144:
+ Line = i18n( "Equivalent move" );
+ break;
+ case 145:
+ Line = i18n( "Editor's Remark" );
+ break;
+ case 146:
+ Line = i18n( "Novelty" );
+ break;
+ case 147:
+ Line = i18n( "Weak point" );
+ break;
+ case 148:
+ Line = i18n( "Endgame" );
+ break;
+ case 149:
+ Line = i18n( "Line" );
+ break;
+ case 150:
+ Line = i18n( "Diagonal" );
+ break;
+ case 151:
+ Line = i18n( "White has a pair of Bishops" );
+ break;
+ case 152:
+ Line = i18n( "Black has a pair of Bishops" );
+ break;
+ case 153:
+ Line = i18n( "Bishops of opposite color" );
+ break;
+ case 154:
+ Line = i18n( "Bishops of same color" );
+ break;
+ case 190:
+ Line = i18n( "Etc." );
+ break;
+ case 191:
+ Line = i18n( "Doubled pawns" );
+ break;
+ case 192:
+ Line = i18n( "Isolated pawn" );
+ break;
+ case 193:
+ Line = i18n( "Connected pawns" );
+ break;
+ case 194:
+ Line = i18n( "Hanging pawns" );
+ break;
+ case 195:
+ Line = i18n( "Backwards pawn" );
+ break;
+ default:
+ Line = "";
+ break;
+ }
+ return Line;
+}
+
diff --git a/knights/pgn.desktop b/knights/pgn.desktop
new file mode 100644
index 0000000..5ccbce1
--- /dev/null
+++ b/knights/pgn.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=MimeType
+MimeType=application/x-chess-pgn
+Icon=pgn.png
+Comment=Portable Game Notation
+X-KDE-AutoEmbed=false
+Patterns=*.pgn *.PGN
+Name=Chess Match
+
+
+
diff --git a/knights/pgn.h b/knights/pgn.h
new file mode 100644
index 0000000..eeff9d8
--- /dev/null
+++ b/knights/pgn.h
@@ -0,0 +1,153 @@
+/***************************************************************************
+ pgn.h - description
+ -------------------
+ begin : Mon Jul 30 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef PGN_H
+#define PGN_H
+
+#include <klocale.h>
+#include <ktempfile.h>
+#include <kio/netaccess.h>
+#include <qobject.h>
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qvaluelist.h>
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qpainter.h>
+#include "definitions.h"
+#include "resource.h"
+#include "knightsmap.h"
+#include "match_param.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+typedef struct Annotation
+{
+ int RAV;
+ QString text;
+};
+
+typedef QValueList<ChessMove> MoveList;
+typedef KnightsMap<int, Annotation*> Annotations;
+
+class tab_pgnView;
+
+class pgn : public QObject
+{
+ Q_OBJECT
+ public:
+ /* Standard PGN Tags */
+ QString TAG_Event;
+ QString TAG_Site;
+ QString TAG_Date;
+ QString TAG_Round;
+ QString TAG_White;
+ QString TAG_Black;
+ QString TAG_Result;
+ QString TAG_EventDate;
+ QString TAG_EventSponsor;
+ QString TAG_Section;
+ QString TAG_Stage;
+ QString TAG_Board;
+ QString TAG_WhiteTitle;
+ QString TAG_WhiteElo;
+ QString TAG_WhiteUSCF;
+ QString TAG_WhiteNA;
+ QString TAG_WhiteType;
+ QString TAG_BlackTitle;
+ QString TAG_BlackElo;
+ QString TAG_BlackUSCF;
+ QString TAG_BlackNA;
+ QString TAG_BlackType;
+ QString TAG_Opening;
+ QString TAG_Variation;
+ QString TAG_SubVariation;
+ QString TAG_ECO;
+ QString TAG_NIC;
+ QString TAG_Time;
+ QString TAG_UTCTime;
+ QString TAG_UTCDate;
+ QString TAG_TimeControl;
+ QString TAG_SetUp;
+ QString TAG_FEN;
+ QString TAG_Termination;
+ QString TAG_Annotator;
+ QString TAG_Mode;
+ QString TAG_PlyCount;
+
+ int File_Position; // Used to scan PGN file
+ QStringList Move_Data;
+
+ /* The match_param */
+ match_param *Param;
+
+ /* These are used in unfinished save games */
+ int whiteTime;
+ int blackTime;
+ TCPList whiteTCP;
+ TCPList blackTCP;
+
+ QString CurrentURL;
+ MoveList Moves;
+ Annotations RAV;
+ Annotations annotations;
+ QStringList Positions;
+ unsigned int currentIndex;
+
+ pgn( resource *Rsrc=0, match_param *param=NULL );
+ ~pgn();
+ void clear( void );
+ void init( void );
+ int scan( void );
+ bool load( const int pos=0 );
+ bool save( QString URL );
+ bool open( const QString& URL );
+ void print( void );
+ QStringList* notation( const int format=1 );
+ void close( void );
+ static QString getNAG( int num );
+ QString caption( void );
+
+ signals:
+ void processMove( ChessMove );
+ void processSpecial( void );
+
+ public slots:
+ bool loadNext( void );
+ void parseMatchParam( void );
+ void childViewDestroyed( void );
+
+ private:
+ resource *Resource;
+ tab_pgnView *pgnView;
+ QString tempFile;
+ QString currentLine;
+ QFile File;
+ QTextStream Input;
+
+ QChar getch( void );
+ QString getword( void );
+ void clearTags( void );
+ void parseTag( void );
+ void parseAnnotation( const int fromRAVnum=0 );
+ void parseRAV( void );
+ void parseKnightsData( void );
+};
+
+#endif
diff --git a/knights/proto_base.cpp b/knights/proto_base.cpp
new file mode 100644
index 0000000..c7e64fc
--- /dev/null
+++ b/knights/proto_base.cpp
@@ -0,0 +1,34 @@
+/***************************************************************************
+ proto_base.cpp - description
+ -------------------
+ begin : Sat Oct 26 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "proto_base.moc"
+
+proto_base::proto_base( const int ID ) : QObject()
+{
+ myID = ID;
+}
+proto_base::~proto_base()
+{
+}
+void proto_base::setID( const int ID )
+{
+ myID = ID;
+}
+int proto_base::getID()
+{
+ return myID;
+}
diff --git a/knights/proto_base.h b/knights/proto_base.h
new file mode 100644
index 0000000..43113c6
--- /dev/null
+++ b/knights/proto_base.h
@@ -0,0 +1,54 @@
+/***************************************************************************
+ proto_base.h - description
+ -------------------
+ begin : Sat Oct 26 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef PROTO_BASE_H
+#define PROTO_BASE_H
+
+#include <qobject.h>
+#include <qstring.h>
+#include <qvaluelist.h>
+#include "command.h"
+#include "definitions.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+typedef QValueList<Command> CommandList;
+
+class proto_base : public QObject
+{
+ Q_OBJECT
+ public:
+ proto_base( const int ID );
+ virtual ~proto_base();
+ int getID( void );
+ void setID( const int ID );
+
+ public slots:
+ virtual void parse( const Command& ) = 0;
+ virtual void parse( const QString& ) = 0;
+
+ signals:
+ void output( const QString& );
+ void output( const Command& );
+
+ protected:
+ int myID;
+ ChessMove myMove;
+};
+
+#endif
diff --git a/knights/proto_uci.cpp b/knights/proto_uci.cpp
new file mode 100644
index 0000000..d277326
--- /dev/null
+++ b/knights/proto_uci.cpp
@@ -0,0 +1,218 @@
+/***************************************************************************
+ proto_uci.cpp - description
+ -------------------
+ begin : Sat Oct 26 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <qstringlist.h>
+#include <qregexp.h>
+
+#include "proto_uci.moc"
+#include "definitions.h"
+
+proto_uci::proto_uci( const int ID ) : proto_base( ID )
+{
+ hintMode = FALSE;
+ initMode = FALSE;
+ JustMoved = FALSE;
+ myArmy = BLACK;
+ Turn = WHITE;
+ CMDList = new CommandList;
+}
+proto_uci::~proto_uci()
+{
+ delete CMDList;
+}
+///////////////////////////////////////
+//
+// proto_uci::parse( const Command &command )
+//
+///////////////////////////////////////
+void proto_uci::parse( const Command &command )
+{
+ Command cmd = command;
+
+ if( initMode )
+ {
+ CMDList->append( command );
+ return;
+ }
+
+ switch( cmd.getCommand() )
+ {
+ /* Command: Init */
+ case CMD_Init:
+ emit output( "uci" );
+ initMode = TRUE;
+ break;
+
+ /* Command: New Game */
+ case CMD_NewGame:
+ emit output( "isready" );
+ break;
+
+ /* Command: Exit */
+ case CMD_Exit:
+ emit output( "quit" );
+ break;
+
+ /* Command: Move */
+ case CMD_Move:
+ if( JustMoved )
+ {
+ JustMoved = FALSE;
+ break;
+ }
+ if( FEN.isEmpty() )
+ {
+ emit output( QString("position startpos moves %1").arg( cmd.getData() ) );
+ }
+ else
+ {
+ emit output( QString("position fen %1 moves %2").arg( FEN ).arg( cmd.getData() ) );
+ }
+ emit output( QString("go wtime %1 btime %2 depth %3").arg( cmd.getWhiteTime() ).arg( cmd.getBlackTime() ).arg( difficulty ) );
+ break;
+
+ /* Command: Set Difficulty */
+ case CMD_Set_Difficulty:
+ difficulty = cmd.getData();
+ break;
+
+ /* Command: Set Board */
+ case CMD_Set_Board:
+ FEN = cmd.getData();
+ break;
+
+ /* Command: Move Now */
+ case CMD_MoveNow:
+ emit output( "stop" );
+ break;
+
+ /* Command: UCI Hint */
+ case CMD_UCI_Hint:
+ hintMode = TRUE;
+ if( FEN.isEmpty() )
+ {
+ emit output( QString("position startpos moves %1").arg( cmd.getData() ) );
+ }
+ else
+ {
+ emit output( QString("position fen %1 moves %2").arg( FEN ).arg( cmd.getData() ) );
+ }
+ emit output( QString("go wtime %1 btime %2 depth %3").arg( cmd.getWhiteTime() ).arg( cmd.getBlackTime() ).arg( difficulty ) );
+ break;
+
+ /* Command: Play White */
+ case CMD_Play_White:
+ myArmy = WHITE;
+ break;
+
+ /* Command: Play Black */
+ case CMD_Play_Black:
+ myArmy = BLACK;
+ break;
+
+ /* Command: Set Name */
+ case CMD_Set_Name:
+ engineName = cmd.getData();
+ break;
+ }
+}
+///////////////////////////////////////
+//
+// proto_uci::parse( const QString &string )
+//
+///////////////////////////////////////
+void proto_uci::parse( const QString &string )
+{
+ QString strIn = string;
+ QStringList strList( QStringList::split( ' ', strIn ) );
+
+ /* Bestmove */
+ if( strList[0] == "bestmove" )
+ {
+ if( strList.count() < 2 )
+ {
+ kdWarning() << "proto_uci::parse: Incomplete Bestmove command" << endl;
+ return;
+ }
+ Command::clearMove( &myMove );
+ strcpy( myMove.CAN, strList[1].latin1() );
+ if( hintMode )
+ {
+ /* The Engine Gives a Hint */
+ hintMode = FALSE;
+// emit output( Command( myID, CMD_Hint, i18n( "%1 suggests this move:\n%2" ).arg( engineName ).arg( strList[1] ) ) );
+ emit output( Command( myID, CMD_Hint, QString( "%1 suggests this move:\n%2" ).arg( engineName ).arg( strList[1] ) ) );
+ }
+ else
+ {
+ /* The Engine Moves */
+ JustMoved = TRUE;
+ emit output( Command( myID, CMD_Move, 0, 0, myMove ) );
+ }
+ }
+
+ /* UCIOK */
+ if( strList[0] == "uciok" )
+ {
+ initMode = FALSE;
+ releaseBuffer();
+ }
+
+ /* READYOK */
+ if( strList[0] == "readyok" )
+ {
+ initMode = FALSE;
+ releaseBuffer();
+ }
+
+ /* ID */
+ if( strList[0] == "id" )
+ {
+ if( strList[1] == "name" )
+ {
+ engineName = strIn.right( strIn.length() - 8 );
+ }
+ if( strList[1] == "author" )
+ {
+ engineAuthor = strIn.right( strIn.length() - 10 );
+ }
+ }
+
+ /* COPYPROTECTION */
+ if( strList[0] == "copyprotection" )
+ {
+ if( strList[1] == "error" )
+ {
+// emit output( Command( myID, CMD_Tell_User_Error, i18n( "%1 did not pass it's copy protection check." ).arg( engineName ) ) );
+ emit output( Command( myID, CMD_Tell_User_Error, QString( "%1 did not pass it's copy protection check." ).arg( engineName ) ) );
+ }
+ }
+}
+///////////////////////////////////////
+//
+// proto_uci::releaseBuffer
+//
+///////////////////////////////////////
+void proto_uci::releaseBuffer( void )
+{
+ CommandList::Iterator it;
+ for( it = CMDList->begin(); it != CMDList->end(); it++ )
+ {
+ parse( *it );
+ }
+ CMDList->clear();
+}
diff --git a/knights/proto_uci.h b/knights/proto_uci.h
new file mode 100644
index 0000000..23a27b3
--- /dev/null
+++ b/knights/proto_uci.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+ proto_uci.h - description
+ -------------------
+ begin : Sat Oct 26 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef PROTO_UCI_H
+#define PROTO_UCI_H
+
+#include <qvaluelist.h>
+#include "proto_base.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class proto_uci : public proto_base
+{
+ Q_OBJECT
+ public:
+ proto_uci( const int ID );
+ ~proto_uci();
+
+ virtual void parse( const Command& );
+ virtual void parse( const QString& );
+
+ protected slots:
+ void releaseBuffer( void );
+
+ private:
+ QString engineName;
+ QString engineAuthor;
+ QString difficulty;
+ QString FEN;
+
+ CommandList *CMDList;
+ bool hintMode;
+ bool initMode;
+ bool JustMoved;
+ bool myArmy;
+ bool Turn;
+};
+
+#endif
diff --git a/knights/proto_xboard.cpp b/knights/proto_xboard.cpp
new file mode 100644
index 0000000..8b68bb0
--- /dev/null
+++ b/knights/proto_xboard.cpp
@@ -0,0 +1,687 @@
+/***************************************************************************
+ proto_xboard.cpp - description
+ -------------------
+ begin : Sat Oct 26 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <klocale.h>
+#include <qtimer.h>
+#include <qstringlist.h>
+#include <qregexp.h>
+
+#include "proto_xboard.moc"
+#include "definitions.h"
+
+proto_xboard::proto_xboard( const int ID ) : proto_base( ID )
+{
+ FEATURE_Analyze = TRUE;
+ FEATURE_Colors = TRUE;
+ FEATURE_Draw = TRUE;
+ FEATURE_ICS = FALSE;
+ FEATURE_Name = TRUE;
+ FEATURE_Pause = FALSE;
+ FEATURE_Ping = FALSE;
+ FEATURE_PlayOther = FALSE;
+ FEATURE_Reuse = TRUE;
+ FEATURE_SetBoard = FALSE;
+ FEATURE_SAN = FALSE;
+ FEATURE_SIGINT = TRUE;
+ FEATURE_SIGTERM = TRUE;
+ FEATURE_Time = TRUE;
+ FEATURE_UserMove = FALSE;
+ FEATURE_Variants = 0;
+ FEATURE_Level = 1;
+ FEATURE_BookEngine = 0;
+
+ CMDList = new CommandList;
+ InitTimer = new QTimer( this );
+ connect( InitTimer, SIGNAL( timeout() ), this, SLOT( releaseBuffer() ) );
+
+ Check = TRUE;
+ Team = FALSE;
+ JustMoved = FALSE;
+ AcceptIllegal = FALSE;
+ DelayedGo = FALSE;
+ Forced = TRUE;
+ Turn = WHITE;
+}
+proto_xboard::~proto_xboard()
+{
+ delete InitTimer;
+ delete CMDList;
+}
+///////////////////////////////////////
+//
+// proto_xboard::parse( const Command &command )
+//
+///////////////////////////////////////
+void proto_xboard::parse( const Command &command )
+{
+ QString temp;
+ Command cmd = command;
+
+ if( InitTimer->isActive() )
+ {
+ /*
+ Store Command for later use..
+ we're still waiting for the engine to finish
+ */
+ CMDList->append( command );
+ return;
+ }
+
+ switch( cmd.getCommand() )
+ {
+ /* Command: Init */
+ case CMD_Init:
+ emit output( "xboard\nprotover 3" );
+ InitTimer->start( 2000, TRUE );
+ break;
+
+ /* Command: New Game */
+ case CMD_NewGame:
+ emit output( "new\nrandom" );
+ break;
+
+ /* Command: Exit */
+ case CMD_Exit:
+ emit output( "quit" );
+ if( FEATURE_SIGTERM )
+ emit output( Command( myID, CMD_Send_SIGTERM ) );
+ break;
+
+ /* Command: Move Now */
+ case CMD_MoveNow:
+ emit output( "?" );
+ break;
+
+ /* Command: Move */
+ case CMD_Move:
+ if( JustMoved )
+ {
+ JustMoved = FALSE;
+ break;
+ }
+ AcceptIllegal = TRUE;
+ myMove = cmd.getMove();
+ /* Send Time */
+ if( FEATURE_Time )
+ {
+ if( Army == WHITE )
+ {
+ emit output( QString( "time %1" ).arg( cmd.getWhiteTime() ) );
+ emit output( QString( "otim %1" ).arg( cmd.getBlackTime() ) );
+ }
+ else
+ {
+ emit output( QString( "time %1" ).arg( cmd.getBlackTime() ) );
+ emit output( QString( "otim %1" ).arg( cmd.getWhiteTime() ) );
+ }
+ }
+ if( FEATURE_UserMove )
+ temp = "usermove ";
+ if( FEATURE_SAN )
+ temp += myMove.SAN;
+ else
+ temp += myMove.CAN;
+ if( DelayedGo )
+ {
+ DelayedGo = FALSE;
+ temp += "\ngo";
+ Forced = FALSE;
+ }
+ emit output( temp );
+ break;
+
+ /* Command: Pause */
+ case CMD_Pause:
+ if( FEATURE_Pause )
+ emit output( "pause" );
+ else
+ {
+ emit output( "force" );
+ Forced = TRUE;
+ }
+ break;
+
+ /* Command: Resume */
+ case CMD_Resume:
+ if( FEATURE_Pause )
+ emit output( "resume" );
+ else
+ {
+ if( Turn == Army )
+ {
+ emit output( "go" );
+ Forced = FALSE;
+ }
+ else
+ DelayedGo = TRUE;
+ }
+ break;
+
+ /* Command: Play White */
+ case CMD_Play_White:
+ Army = WHITE;
+ if( Turn == BLACK )
+ {
+ if( FEATURE_PlayOther )
+ {
+ emit output( "playother" );
+ }
+ else if( FEATURE_Colors )
+ {
+ emit output( "black" );
+ }
+ else
+ {
+ emit output( "force" );
+ Forced = TRUE;
+ DelayedGo = TRUE;
+ }
+ break;
+ }
+ else
+ {
+ temp = "force";
+ if( FEATURE_Colors )
+ temp += "\nwhite";
+ temp += "\ngo";
+ emit output( temp );
+ break;
+ }
+ break;
+
+ /* Command: Play Black */
+ case CMD_Play_Black:
+ Army = BLACK;
+ if( Turn == WHITE )
+ {
+ if( FEATURE_PlayOther )
+ {
+ emit output( "playother" );
+ }
+ else if( FEATURE_Colors )
+ {
+ emit output( "white" );
+ }
+ else
+ {
+ emit output( "force" );
+ Forced = TRUE;
+ DelayedGo = TRUE;
+ }
+ break;
+ }
+ else
+ {
+ temp = "force";
+ if( FEATURE_Colors )
+ temp += "\nblack";
+ temp += "\ngo";
+ emit output( temp );
+ break;
+ }
+ break;
+
+ /* Command: Result White */
+ case CMD_Result_White:
+ emit output( "result 1-0 {White Mates}" );
+ AcceptIllegal = FALSE;
+// if( Army == WHITE )
+// (*IT).Wins++;
+// else
+// (*IT).Losses++;
+ break;
+
+ /* Command: Result Black */
+ case CMD_Result_Black:
+ emit output( "result 0-1 {Black Mates}" );
+ AcceptIllegal = FALSE;
+// if( Army == BLACK )
+// (*IT).Wins++;
+// else
+// (*IT).Losses++;
+ break;
+
+ /* Command: Result Draw */
+ case CMD_Result_Draw:
+ emit output( "result 1/2-1/2 {Draw Game}" );
+ AcceptIllegal = FALSE;
+// (*IT).Draws++;
+ break;
+
+ /* Command: Your Time */
+ case CMD_Your_Time:
+ if( FEATURE_Time )
+ {
+ if( Army == WHITE )
+ emit output( QString( "time %1" ).arg( cmd.getWhiteTime() ) );
+ else
+ emit output( QString( "time %1" ).arg( cmd.getBlackTime() ) );
+ }
+ break;
+
+ /* Command: Enemy Time */
+ case CMD_Enemy_Time:
+ if( FEATURE_Time )
+ {
+ if( Army == WHITE )
+ emit output( QString( "otim %1" ).arg( cmd.getBlackTime() ) );
+ else
+ emit output( QString( "otim %1" ).arg( cmd.getWhiteTime() ) );
+ }
+ break;
+
+ /* Command: Offer Draw */
+ case CMD_Offer_Draw:
+ if( FEATURE_Draw )
+ emit output( "draw" );
+ break;
+
+ /* Command: Book Mode */
+ case CMD_Book_Mode:
+ if( FEATURE_BookEngine != 0 )
+ emit output( "bookengine" );
+ break;
+
+ /* Command: Check Book */
+ case CMD_Check_Book:
+ emit output( "go" );
+ Forced = FALSE;
+ break;
+
+ /* Command: Ponder */
+ case CMD_Ponder:
+ emit output( "hard" );
+ break;
+
+ /* Command: No Pondering */
+ case CMD_No_Pondering:
+ emit output( "hard\neasy" );
+ break;
+
+ /* Command: Retract Move */
+ case CMD_Retract_Move:
+ emit output( "remove" );
+ break;
+
+ /* Command: Hint */
+ case CMD_Hint:
+ emit output( "hint" );
+ break;
+
+ /* Command: Listen */
+ case CMD_Listen:
+ emit output( "force" );
+ Forced = TRUE;
+ DelayedGo = FALSE;
+ break;
+
+ /* Command: Play */
+ case CMD_Play:
+ if( Army == Turn )
+ {
+ emit output( "go" );
+ Forced = FALSE;
+ }
+ else
+ DelayedGo = TRUE;
+ break;
+
+ /* Command: White Resign */
+ case CMD_White_Resign:
+ parse( Command( 0, CMD_Result_White ) );
+ break;
+
+ /* Command: Black Resign */
+ case CMD_Black_Resign:
+ parse( Command( 0, CMD_Result_Black ) );
+ break;
+
+ /* Command: Set Board */
+ case CMD_Set_Board:
+ if( FEATURE_SetBoard == TRUE )
+ {
+ emit output( QString( "setboard %1" ).arg( cmd.getData() ) );
+ }
+ else
+ {
+ // Convert FEN to edit commands here and feed them to engine
+ }
+ break;
+
+ /* Command: Set Difficulty */
+ case CMD_Set_Difficulty:
+ emit output( "sd " + cmd.getData() );
+ // emit output( "st " + QString::number( cmd.getData().toInt() >> 1 ) );
+ break;
+
+ /* Command: Set Name */
+ case CMD_Set_Name:
+ FEATURE_MyName = cmd.getData();
+ break;
+ default:
+ break;
+ }
+}
+///////////////////////////////////////
+//
+// proto_xboard::parse( const QString &string )
+//
+///////////////////////////////////////
+void proto_xboard::parse( const QString &string )
+{
+ QString strIn = string;
+ QStringList strList( QStringList::split( ' ', strIn ) );
+
+ if( ( FEATURE_SIGINT ) && ( !Forced ) )
+ emit output( Command( myID, CMD_Send_SIGINT ) );
+
+ /* Illegal */
+ if( strList[0].contains( "illegal", FALSE ) )
+ {
+ if( AcceptIllegal )
+ {
+ if( strIn.contains("(no matching move)board") )
+ return;
+ if( strIn.contains("(no matching move)protover") )
+ return;
+ if( strIn.contains("(no matching move)sd") )
+ return;
+ AcceptIllegal = FALSE;
+ emit output( Command( myID, CMD_Illegal ) );
+ }
+ return;
+ }
+
+ /* A Move */
+ if( strList[0] == "move" )
+ {
+ if( strList.count() < 2 )
+ {
+ kdWarning() << "proto_xboard::parse: Incomplete Move command" << endl;
+ return;
+ }
+ Command::clearMove( &myMove );
+ strcpy( myMove.SAN, strList[1].latin1() );
+ strcpy( myMove.CAN, strList[1].latin1() );
+ if( Team )
+ {
+ emit output( "force" );
+ Forced = TRUE;
+ }
+ JustMoved = TRUE;
+ emit output( Command( myID, CMD_Move, 0, 0, myMove ) );
+ return;
+ }
+
+ /* A Move ( Old Variation ) */
+ if( ( strList[0].contains( QRegExp("\\d+\\.") ) ) && ( strList[1] == "..." ) )
+ {
+ Command::clearMove( &myMove );
+ strcpy( myMove.SAN, strList[2].latin1() );
+ strcpy( myMove.CAN, strList[2].latin1() );
+ if( Team )
+ {
+ emit output( "force" );
+ Forced = TRUE;
+ }
+ JustMoved = TRUE;
+ emit output( Command( myID, CMD_Move, 0, 0, myMove ) );
+ return;
+ }
+
+ /* Hint */
+ if( strList[0] == "Hint:" )
+ {
+ emit output( Command( myID, CMD_Hint, i18n( "%1 suggests this move:\n%2" ).arg( FEATURE_MyName ).arg( strList[1] ) ) );
+ return;
+ }
+
+ /* Offer Draw */
+ if( ( strList[0] == "offer" ) && ( strList[1] == "draw" ) )
+ {
+ emit output( Command( myID, CMD_Offer_Draw ) );
+ }
+
+ /* Out of Book */
+ if( strList[0] == "outofbook" )
+ {
+ emit output( "force" );
+ Forced = TRUE;
+ emit output( Command( myID, CMD_Out_Of_Book ) );
+ return;
+ }
+
+ /* Tell User */
+ if( strList[0] == "telluser" )
+ {
+ emit output( Command( myID, CMD_Tell_User, i18n( "%1 tells you:\n%2" ).arg( FEATURE_MyName ).arg( strIn.right( strIn.length() - 9 ) ) ) );
+ return;
+ }
+
+ /* Tell User Error */
+ if( strList[0] == "tellusererror" )
+ {
+ emit output( Command( myID, CMD_Tell_User_Error, i18n( "%1 tells you:\n%2" ).arg( FEATURE_MyName ).arg( strIn.right( strIn.length() - 14 ) ) ) );
+ return;
+ }
+
+ /* Error */
+ if( strList[0] == "Error" )
+ {
+ emit output( Command( myID, CMD_Tell_User_Error, i18n( "%1 tells you:\n%2" ).arg( FEATURE_MyName ).arg( strIn.right( strIn.length() ) ) ) );
+ return;
+ }
+
+ /* Tell Opponent */
+ if( strList[0] == "tellopponent" )
+ {
+ emit output( Command( myID, CMD_Tell_Opponent, QString( "%1" ).arg( strIn.right( strIn.length() - 13 ) ) ) );
+ return;
+ }
+
+ /* Tell Others */
+ if( strList[0] == "tellothers" )
+ {
+ emit output( Command( myID, CMD_Tell_Others, QString( "%1" ).arg( strIn.right( strIn.length() - 11 ) ) ) );
+ return;
+ }
+
+ /* Tell All */
+ if( strList[0] == "tellall" )
+ {
+ emit output( Command( myID, CMD_Tell_All, QString( "%1" ).arg( strIn.right( strIn.length() - 8 ) ) ) );
+ return;
+ }
+
+ /* Tell ICS */
+ if( strList[0] == "tellics" )
+ {
+ emit output( Command( myID, CMD_Tell_ICS, QString( "%1" ).arg( strIn.right( strIn.length() - 8 ) ) ) );
+ return;
+ }
+
+ /* Tell ICS No Alias */
+ if( strList[0] == "tellicsnoalias" )
+ {
+ emit output( Command( myID, CMD_Tell_ICS, QString( "%1" ).arg( strIn.right( strIn.length() - 15 ) ) ) );
+ return;
+ }
+
+ /* Resign */
+ if( strIn.contains( "resign", FALSE ) )
+ {
+ if( Army == WHITE )
+ emit output( Command( myID, CMD_White_Resign ) );
+ else
+ emit output( Command( myID, CMD_Black_Resign ) );
+ return;
+ }
+
+ /*
+ Parse Features
+ */
+ if( !InitTimer->isActive() )
+ return;
+ for( unsigned int loop = 0; loop < strList.count(); loop++ )
+ {
+ if( strList[loop] == "done=1" )
+ {
+ InitTimer->stop();
+ releaseBuffer();
+ continue;
+ }
+ /* This buys you 10 minutes */
+ if( strList[loop] == "done=0" )
+ {
+ InitTimer->changeInterval( 600000 );
+ continue;
+ }
+ if( strList[loop] == "feature" )
+ {
+ continue;
+ }
+ if( strList[loop].left(3) == "ics" )
+ {
+ FEATURE_ICS = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted ics" );
+ continue;
+ }
+ if( strList[loop].left(3) == "san" )
+ {
+ FEATURE_SAN = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted san" );
+ continue;
+ }
+ if( strList[loop].left(4) == "draw" )
+ {
+ FEATURE_Draw = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted draw" );
+ continue;
+ }
+ if( strList[loop].left(4) == "name" )
+ {
+ FEATURE_Name = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted name" );
+ continue;
+ }
+ if( strList[loop].left(4) == "ping" )
+ {
+ FEATURE_Ping = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted ping" );
+ continue;
+ }
+ if( strList[loop].left(4) == "time" )
+ {
+ FEATURE_Time = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted time" );
+ continue;
+ }
+ if( strList[loop].left(5) == "level" )
+ {
+ FEATURE_Level = QString( strList[loop].right( strList[loop].length() - 6 ) ).toInt();
+ emit output( "accepted level" );
+ continue;
+ }
+ if( strList[loop].left(5) == "pause" )
+ {
+ FEATURE_Pause = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted pause" );
+ continue;
+ }
+ if( strList[loop].left(5) == "reuse" )
+ {
+ FEATURE_Reuse = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted reuse" );
+ continue;
+ }
+ if( strList[loop].left(6) == "colors" )
+ {
+ FEATURE_Colors = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted colors" );
+ continue;
+ }
+ if( strList[loop].left(6) == "myname" )
+ {
+ FEATURE_MyName = QString( strList[loop].right( strList[loop].length() - 8 ) );
+ emit output( "accepted myname" );
+ continue;
+ }
+ if( strList[loop].left(6) == "sigint" )
+ {
+ FEATURE_SIGINT = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted sigint" );
+ continue;
+ }
+ if( strList[loop].left(7) == "analyze" )
+ {
+ FEATURE_Analyze = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted analyze" );
+ continue;
+ }
+ if( strList[loop].left(7) == "sigterm" )
+ {
+ FEATURE_SIGTERM = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted sigterm" );
+ continue;
+ }
+ if( strList[loop].left(8) == "setboard" )
+ {
+ FEATURE_SetBoard = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted setboard" );
+ continue;
+ }
+ if( strList[loop].left(8) == "usermove" )
+ {
+ FEATURE_UserMove = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted usermove" );
+ continue;
+ }
+ if( strList[loop].left(8) == "variants" )
+ {
+// FIFO_Tmp = strList[loop].right( strList[loop].length() - 10 );
+ // This must be finished
+ emit output( "accepted variants" );
+ continue;
+ }
+ if( strList[loop].left(9) == "playother" )
+ {
+ FEATURE_PlayOther = QString( strList[loop].right(1) ).toInt();
+ emit output( "accepted playother" );
+ continue;
+ }
+ if( strList[loop].left(10) == "bookengine" )
+ {
+ FEATURE_BookEngine = QString( strList[loop].right( strList[loop].length() - 11 ) ).toInt();
+ emit output( "accepted bookengine" );
+ continue;
+ }
+ }
+}
+///////////////////////////////////////
+//
+// proto_xboard::releaseBuffer
+//
+///////////////////////////////////////
+void proto_xboard::releaseBuffer( void )
+{
+ CommandList::Iterator it;
+ for( it = CMDList->begin(); it != CMDList->end(); it++ )
+ {
+ parse( *it );
+ }
+ CMDList->clear();
+}
diff --git a/knights/proto_xboard.h b/knights/proto_xboard.h
new file mode 100644
index 0000000..0b07109
--- /dev/null
+++ b/knights/proto_xboard.h
@@ -0,0 +1,78 @@
+/***************************************************************************
+ proto_xboard.h - description
+ -------------------
+ begin : Sat Oct 26 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef PROTO_XBOARD_H
+#define PROTO_XBOARD_H
+
+#include "proto_base.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class QTimer;
+
+class proto_xboard : public proto_base
+{
+ Q_OBJECT
+ public:
+ proto_xboard( const int ID );
+ ~proto_xboard();
+
+ virtual void parse( const Command& );
+ virtual void parse( const QString& );
+
+ protected slots:
+ void releaseBuffer( void );
+
+ private:
+
+ /* XBoard protover 2 */
+ bool FEATURE_Analyze;
+ bool FEATURE_Colors;
+ bool FEATURE_Draw;
+ bool FEATURE_ICS;
+ bool FEATURE_Name;
+ bool FEATURE_Pause;
+ bool FEATURE_Ping;
+ bool FEATURE_PlayOther;
+ bool FEATURE_Reuse;
+ bool FEATURE_SetBoard;
+ bool FEATURE_SAN;
+ bool FEATURE_SIGINT;
+ bool FEATURE_SIGTERM;
+ bool FEATURE_Time;
+ bool FEATURE_UserMove;
+ int FEATURE_Variants;
+ QString FEATURE_MyName;
+ /* XBoard protover 3 */
+ int FEATURE_Level;
+ int FEATURE_BookEngine;
+
+ bool Check;
+ bool Turn;
+ bool Team;
+ bool Army;
+ bool JustMoved;
+ bool AcceptIllegal;
+ bool DelayedGo;
+ bool Forced;
+ QTimer *InitTimer;
+ CommandList *CMDList;
+};
+
+#endif
diff --git a/knights/resource.cpp b/knights/resource.cpp
new file mode 100644
index 0000000..ba172b9
--- /dev/null
+++ b/knights/resource.cpp
@@ -0,0 +1,1048 @@
+/***************************************************************************
+ resource.cpp - description
+ -------------------
+ begin : Tue Jul 17 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+/* KDE */
+#include <kstddirs.h>
+#include <kglobalsettings.h>
+#include <ksimpleconfig.h>
+#include <kconfig.h>
+#include <kiconloader.h>
+#include <kmdcodec.h>
+#include <kio/netaccess.h>
+/* Qt */
+#include <qdir.h>
+#include <qimage.h>
+/* Local */
+#include "resource.h"
+#include "audio.h"
+#include "knightspixcache.h"
+#include "tabmanager.h"
+#include "accel.h"
+/* C & C++ */
+#include <unistd.h>
+#include <sys/utsname.h>
+#include <sys/types.h>
+#include <pwd.h>
+#include <time.h>
+
+#define CFG kapp->config()
+///////////////////////////////////////
+//
+// resource::resource
+//
+///////////////////////////////////////
+resource::resource(KCmdLineArgs *args)
+{
+ GlobalDataDir = "";
+ Widget_Height = 20; // prevents max_size error for thinbuttons on init
+ Icons = new KIconLoader( QString( "knights" ) );
+ Audio = new audio();
+
+ /* Define ConsoleStyle, our RichText */
+ ConsoleStyle = new QStyleSheet( 0, "ConsoleStyle" );
+ SSI_Default = new QStyleSheetItem( ConsoleStyle, "K_STD" );
+ SSI_PrivateTell = new QStyleSheetItem( ConsoleStyle, "K_PVT" );
+ SSI_ChannelTell = new QStyleSheetItem( ConsoleStyle, "K_CH" );
+ SSI_Shout = new QStyleSheetItem( ConsoleStyle, "K_SHT" );
+ SSI_Whisper = new QStyleSheetItem( ConsoleStyle, "K_WSP" );
+ SSI_Notification = new QStyleSheetItem( ConsoleStyle, "K_NOT" );
+ QStyleSheet::setDefaultSheet( ConsoleStyle );
+
+ /* Define GlobalDataDir... This is very important! */
+ GlobalDataDir = args->getOption( "d" );
+ if( GlobalDataDir.isEmpty() )
+ GlobalDataDir = KGlobal::dirs()->findResourceDir("data", "knights/splash.png") + "knights/";
+ if( GlobalDataDir.isEmpty() )
+ {
+ kdWarning() << "resource::resource: Can not read GlobalDataDir from environment." << endl;
+ GlobalDataDir = "/usr/local/kde/";
+ }
+ if( GlobalDataDir.right(1) != "/" ) GlobalDataDir += '/';
+
+ /* Allocate Accel */
+ myAccel = new Accel( qApp->mainWidget() );
+
+ /* Allocate TabManager */
+ tabManager = new TabManager( this );
+
+ ConfigRead();
+ pixCache = new KnightsPixCache();
+ pixCache->setCacheLimit( 2048 ); // 2meg
+}
+///////////////////////////////////////
+//
+// resource::~resource
+//
+///////////////////////////////////////
+resource::~resource()
+{
+ ConfigWrite();
+ delete Icons;
+ delete pixCache;
+ delete Audio;
+ delete tabManager;
+ delete myAccel;
+
+ /* Remove temp files that we missed
+ QStringList temps = KGlobal::dirs()->findAllResources("tmp","knights*");
+ for( int a=0; a < temps.count(); a++)
+ {
+ KIO::NetAccess::del( "file://" + temps[a] );
+ } */
+}
+///////////////////////////////////////
+//
+// resource::ConfigRead
+//
+///////////////////////////////////////
+void resource::ConfigRead( void )
+{
+ struct passwd *passwd;
+ QString sysName;
+ QString buffer;
+ QDesktopWidget *desktop = QApplication::desktop();
+
+ /* Get Initial Board Size In Case This Install Is New */
+ int initSize = ( desktop->height() >> 3 ) - 32;
+ if( initSize > IMAGE_MAX )
+ initSize = IMAGE_MAX;
+ if( initSize < IMAGE_MIN )
+ initSize = IMAGE_MIN;
+
+ /* Get user name from environment in case it's needed */
+ passwd = getpwuid( getuid() );
+ sysName = passwd->pw_gecos;
+ if( sysName.isEmpty() )
+ sysName = QStringList::split( ",", QString(passwd->pw_name) ).first();
+
+ /* Cursors */
+ CURSOR_Standard = KCursor::arrowCursor();
+ CURSOR_Thinking = KCursor::waitCursor();
+ CURSOR_Text = KCursor::ibeamCursor();
+
+ /* Themes */
+ readThemeDir();
+ CFG->setGroup( "Themes" );
+ CurrentBoard = CFG->readEntry( "CurrentBoard", "KBDefault.tar.gz" );
+ CurrentChessmen = CFG->readEntry( "CurrentChessmen", "KCDefault.tar.gz" );
+ OPTION_3DBoard = CFG->readBoolEntry( "Use3DBoard", FALSE );
+ ThemeSize = CFG->readNumEntry( "Size", initSize );
+ if( ThemeSize > ( initSize + 16 ) )
+ ThemeSize = initSize;
+
+ /* General */
+ ReadEngines();
+ ReadServers();
+ ReadMatchParam();
+ ReadColors();
+ ReadFonts();
+ buildStyle();
+ CFG->setGroup( "General" );
+ Local_Player = CFG->readEntry( "UserName", sysName );
+ Config_Version = CFG->readNumEntry( "ConfigVersion", 0 );
+ OPTION_On_Init = CFG->readNumEntry( "OnInit", MENU_VS_PC );
+ OPTION_Auto_Queen = CFG->readBoolEntry( "AlwaysQueen", FALSE );
+ OPTION_Ponder = CFG->readBoolEntry( "Ponder", TRUE );
+ OPTION_Book_White = CFG->readBoolEntry( "BookWhite", FALSE );
+ OPTION_Book_Black = CFG->readBoolEntry( "BookBlack", FALSE );
+ OPTION_Pause_On_Minimize = CFG->readBoolEntry( "PauseOnMinimize", TRUE );
+ OPTION_Reuse_PGN = CFG->readBoolEntry( "ReusePGN", FALSE );
+ PGN_Filename = CFG->readEntry( "PGNFilename", QString::null );
+ SCID_Image_Path = CFG->readEntry( "SCIDImages", QString::null );
+ OPTION_Auto_Close_Last_ICS = CFG->readBoolEntry( "AutoCloseLastICS", TRUE );
+ OPTION_Show_Extended_PGN = CFG->readEntry( "ShowExtendedPGN", FALSE );
+ OPTION_Auto_Call_Flag = CFG->readBoolEntry( "AutoCallFlag", TRUE );
+ Email_Command_Line = CFG->readEntry( "EmailCommandLine", QString("kmail -s %s --attach %m %a") );
+ Accepted_License = CFG->readBoolEntry( "Alg2p", FALSE );
+
+ /* Display */
+ OPTION_Show_Splash = CFG->readBoolEntry( "ShowSplash", TRUE );
+ OPTION_Auto_Preview = CFG->readBoolEntry( "AutoPreview", FALSE );
+ OPTION_Show_Last_Move = CFG->readBoolEntry( "ShowLastMove", TRUE );
+ OPTION_Animate_Moves = CFG->readBoolEntry( "AnimateMoves", FALSE );
+ OPTION_Show_Coord = CFG->readBoolEntry( "ShowCoord", FALSE );
+ OPTION_Board_Orientation = CFG->readBoolEntry( "BoardOrientation", 0 );
+
+ /* ICS */
+ CFG->setGroup( "ICS" );
+ OPTION_Premove = CFG->readBoolEntry( "Premove", TRUE );
+ OPTION_Kibitz = CFG->readBoolEntry( "Kibitz", TRUE );
+ OPTION_Private = CFG->readBoolEntry( "Private", FALSE );
+ OPTION_Shout = CFG->readBoolEntry( "Shout", TRUE );
+ OPTION_Tell = CFG->readBoolEntry( "Tell", TRUE );
+ OPTION_Seek = CFG->readBoolEntry( "Seek", TRUE );
+ OPTION_Profanity = CFG->readNumEntry( "Profanity", 1 );
+ Seek_Timer = CFG->readNumEntry( "SeekTimer", 70 );
+
+ /* Audio */
+ CFG->setGroup( "Audio" );
+ OPTION_Audio = CFG->readBoolEntry( "useAudio", TRUE );
+ CurrentAudio = CFG->readEntry( "CurrentAudio", "KSDefault.tar.gz" );
+ OPTION_Audio_Current_Only = CFG->readBoolEntry( "AudioCurrentOnly", FALSE );
+ Audio_Volume = CFG->readNumEntry( "AudioVolume", 0 );
+ Audio->enabled = OPTION_Audio;
+ Audio->volume = Audio_Volume;
+
+ /* Notification Prompts */
+ CFG->setGroup( "Notification Messages" );
+ PromptForSaving = CFG->readEntry( "PromptForSaving", QString::null );
+}
+///////////////////////////////////////
+//
+// resource::ConfigWrite
+//
+///////////////////////////////////////
+void resource::ConfigWrite( void )
+{
+ /* Themes */
+ CFG->setGroup( "Themes" );
+ CFG->writeEntry( "CurrentBoard", CurrentBoard );
+ CFG->writeEntry( "CurrentChessmen", CurrentChessmen );
+ CFG->writeEntry( "Size", ThemeSize );
+ CFG->writeEntry( "Use3DBoard", OPTION_3DBoard );
+
+ /* General */
+ WriteEngines();
+ WriteServers();
+ WriteMatchParam();
+ WriteColors();
+ WriteFonts();
+ CFG->setGroup( "General" );
+ CFG->writeEntry( "UserName", Local_Player );
+ CFG->writeEntry( "ConfigVersion", Config_Version );
+ CFG->writeEntry( "OnInit", OPTION_On_Init );
+ CFG->writeEntry( "ShowSplash", OPTION_Show_Splash );
+ CFG->writeEntry( "AlwaysQueen", OPTION_Auto_Queen );
+ CFG->writeEntry( "AutoPreview", OPTION_Auto_Preview );
+ CFG->writeEntry( "ShowLastMove", OPTION_Show_Last_Move );
+ CFG->writeEntry( "AnimateMoves", OPTION_Animate_Moves );
+ CFG->writeEntry( "ShowCoord", OPTION_Show_Coord );
+ CFG->writeEntry( "Ponder", OPTION_Ponder );
+ CFG->writeEntry( "BookWhite", OPTION_Book_White );
+ CFG->writeEntry( "BookBlack", OPTION_Book_Black );
+ CFG->writeEntry( "BoardOrientation", OPTION_Board_Orientation );
+ CFG->writeEntry( "PauseOnMinimize", OPTION_Pause_On_Minimize );
+ CFG->writeEntry( "ReusePGN", OPTION_Reuse_PGN );
+ CFG->writeEntry( "PGNFilename", PGN_Filename );
+ CFG->writeEntry( "AutoCloseLastICS", OPTION_Auto_Close_Last_ICS );
+ CFG->writeEntry( "ShowExtendedPGN", OPTION_Show_Extended_PGN );
+ CFG->writeEntry( "EmailCommandLine", Email_Command_Line );
+ CFG->writeEntry( "AutoCallFlag", OPTION_Auto_Call_Flag );
+ CFG->writeEntry( "SCIDImages", SCID_Image_Path );
+ CFG->writeEntry( "Alg2p", Accepted_License );
+
+ /* ICS */
+ CFG->setGroup( "ICS" );
+ CFG->writeEntry( "SeekTimer", Seek_Timer );
+ CFG->writeEntry( "Profanity", OPTION_Profanity );
+ CFG->writeEntry( "Premove", OPTION_Premove );
+ CFG->writeEntry( "Shout", OPTION_Shout );
+ CFG->writeEntry( "Kibitz", OPTION_Kibitz );
+ CFG->writeEntry( "Private", OPTION_Private );
+ CFG->writeEntry( "Tell", OPTION_Tell );
+ CFG->writeEntry( "Seek", OPTION_Seek );
+
+ /* Audio */
+ CFG->setGroup( "Audio" );
+ CFG->writeEntry( "useAudio", OPTION_Audio );
+ Audio->enabled = OPTION_Audio;
+ CFG->writeEntry( "CurrentAudio", CurrentAudio );
+ CFG->writeEntry( "AudioCurrentOnly", OPTION_Audio_Current_Only );
+ CFG->writeEntry( "AudioVolume", Audio_Volume );
+ Audio->volume = Audio_Volume;
+
+ /* Notification Prompts */
+ CFG->setGroup( "Notification Messages" );
+ CFG->writeEntry( "PromptForSaving", PromptForSaving );
+ CFG->setReadOnly( FALSE );
+ if( CFG->isReadOnly() )
+ kdWarning() << "resource::ConfigWrite: Configuration is READ ONLY. Can not write changes." << endl;
+ CFG->sync();
+}
+///////////////////////////////////////
+//
+// resource::ReadMatchParam
+//
+///////////////////////////////////////
+void resource::ReadMatchParam( void )
+{
+ QString buffer;
+ QStringList TCPs;
+ QStringList::Iterator QSL_IT;
+ TCP tempTCP;
+
+ TCPWhite.clear();
+ TCPBlack.clear();
+ CFG->setGroup( "Match Paramaters" );
+
+ /* Handle Time Controls */
+ buffer = CFG->readEntry( "WhiteTCP", "40,900,0" );
+ TCPs = QStringList::split( QString(","), buffer, FALSE );
+ for( QSL_IT = TCPs.begin(); QSL_IT != TCPs.end(); ++QSL_IT )
+ {
+ tempTCP.Moves = (*QSL_IT).toInt();
+ ++QSL_IT;
+ tempTCP.Seconds = (*QSL_IT).toInt();
+ ++QSL_IT;
+ tempTCP.Increment = (*QSL_IT).toInt();
+ TCPWhite.append( tempTCP );
+ }
+ TCPs.clear();
+ buffer = CFG->readEntry( "BlackTCP", "40,900,0" );
+ TCPs = QStringList::split( QString(","), buffer, FALSE );
+ for( QSL_IT = TCPs.begin(); QSL_IT != TCPs.end(); ++QSL_IT )
+ {
+ tempTCP.Moves = (*QSL_IT).toInt();
+ ++QSL_IT;
+ tempTCP.Seconds = (*QSL_IT).toInt();
+ ++QSL_IT;
+ tempTCP.Increment = (*QSL_IT).toInt();
+ TCPBlack.append( tempTCP );
+ }
+
+ /* Match Rules */
+ MatchRules = CFG->readNumEntry( "MatchRules", Type_Standard );
+
+ /* Handle Players */
+ Type[WHITE] = CFG->readNumEntry( "WhiteType", PLAYERLOCAL );
+ Type[WHITE_HELPER] = CFG->readNumEntry( "WhiteHelperType", PLAYERPC );
+ Type[BLACK] = CFG->readNumEntry( "BlackType", PLAYERLOCAL );
+ Type[BLACK_HELPER] = CFG->readNumEntry( "BlackHelperType", PLAYERPC );
+
+ Strength[WHITE] = CFG->readNumEntry( "WhiteStr", 18 );
+ Strength[WHITE_HELPER] = CFG->readNumEntry( "WhiteHelperStr", 18 );
+ Strength[BLACK] = CFG->readNumEntry( "BlackStr", 18 );
+ Strength[BLACK_HELPER] = CFG->readNumEntry( "BlackHelperStr", 18 );
+}
+///////////////////////////////////////
+//
+// resource::WriteMatchParam
+//
+///////////////////////////////////////
+void resource::WriteMatchParam( void )
+{
+ QString buffer;
+ TCPList::Iterator TCP_IT;
+
+ CFG->setGroup( "Match Paramaters" );
+ /* Handle Time Controls */
+ for( TCP_IT = TCPWhite.begin(); TCP_IT != TCPWhite.end(); ++TCP_IT )
+ {
+ buffer += QString::number( (*TCP_IT).Moves ) + ",";
+ buffer += QString::number( (*TCP_IT).Seconds ) + ",";
+ buffer += QString::number( (*TCP_IT).Increment ) + ",";
+ }
+ CFG->writeEntry( "WhiteTCP", buffer );
+ buffer = "";
+ for( TCP_IT = TCPBlack.begin(); TCP_IT != TCPBlack.end(); ++TCP_IT )
+ {
+ buffer += QString::number( (*TCP_IT).Moves ) + ",";
+ buffer += QString::number( (*TCP_IT).Seconds ) + ",";
+ buffer += QString::number( (*TCP_IT).Increment ) + ",";
+ }
+ CFG->writeEntry( "BlackTCP", buffer );
+ /* Match Rules */
+ CFG->writeEntry( "MatchRules", MatchRules );
+ /* Handle Players */
+ CFG->writeEntry( "WhiteType", Type[WHITE] );
+ CFG->writeEntry( "WhiteHelperType", Type[WHITE_HELPER] );
+ CFG->writeEntry( "BlackType", Type[BLACK] );
+ CFG->writeEntry( "BlackHelperType", Type[BLACK_HELPER] );
+
+ CFG->writeEntry( "WhiteStr", Strength[WHITE] );
+ CFG->writeEntry( "WhiteHelperStr", Strength[WHITE_HELPER] );
+ CFG->writeEntry( "BlackStr", Strength[BLACK] );
+ CFG->writeEntry( "BlackHelperStr", Strength[BLACK_HELPER] );
+}
+///////////////////////////////////////
+//
+// resource::ReadEngines
+//
+///////////////////////////////////////
+void resource::ReadEngines( void )
+{
+ engineResource temp;
+ QStringList engineList;
+ QStringList::Iterator engineListIT;
+ QString buffer;
+
+ engines.clear();
+ CFG->setGroup( "General" );
+ buffer = CFG->readEntry( "Engines" );
+ if( buffer.isEmpty() ) return;
+
+ engineList = QStringList::split( QString(","), buffer, FALSE );
+ for ( engineListIT = engineList.begin(); engineListIT != engineList.end(); ++engineListIT )
+ {
+ if( !CFG->hasGroup( (*engineListIT) ) ) continue;
+ CFG->setGroup( (*engineListIT) );
+ temp.Name = (*engineListIT);
+ temp.Filename = CFG->readEntry( "Filename" );
+ temp.Arguments = CFG->readEntry( "Arguments" );
+ temp.LogFile = CFG->readEntry( "Log" );
+ temp.Protocol = CFG->readNumEntry( "Protocol" );
+ temp.Wins = CFG->readNumEntry( "Wins" );
+ temp.Losses = CFG->readNumEntry( "Losses" );
+ temp.Draws = CFG->readNumEntry( "Draws" );
+ temp.CurrentRef = CFG->readNumEntry( "CurrentRef" );
+ engines.append( temp );
+ }
+}
+///////////////////////////////////////
+//
+// resource::WriteEngines
+//
+///////////////////////////////////////
+void resource::WriteEngines( void )
+{
+ QString buffer;
+
+ CFG->setGroup( "General" );
+ if( engines.isEmpty() )
+ {
+ CFG->writeEntry( "Engines", QString( "" ) );
+ return;
+ }
+ for ( enginesIT = engines.begin(); enginesIT != engines.end(); ++enginesIT )
+ {
+ buffer += (*enginesIT).Name + ",";
+ CFG->setGroup( (*enginesIT).Name );
+ CFG->writeEntry( "Filename", (*enginesIT).Filename );
+ CFG->writeEntry( "Arguments", (*enginesIT).Arguments );
+ CFG->writeEntry( "Log", (*enginesIT).LogFile );
+ CFG->writeEntry( "Protocol", (*enginesIT).Protocol );
+ CFG->writeEntry( "Wins", (*enginesIT).Wins );
+ CFG->writeEntry( "Losses", (*enginesIT).Losses );
+ CFG->writeEntry( "Draws", (*enginesIT).Draws );
+ CFG->writeEntry( "CurrentRef", (*enginesIT).CurrentRef );
+ }
+ CFG->setGroup( "General" );
+ CFG->writeEntry( "Engines", buffer );
+ CFG->sync();
+}
+///////////////////////////////////////
+//
+// resource::ReadServers
+//
+///////////////////////////////////////
+void resource::ReadServers( void )
+{
+ serverResource temp;
+ QStringList serverList;
+ QStringList::Iterator serverListIT;
+ QString buffer;
+
+ servers.clear();
+ CFG->setGroup( "General" );
+ buffer = CFG->readEntry( "Servers" );
+ if( buffer.isEmpty() ) return;
+
+ serverList = QStringList::split( QString(","), buffer, FALSE );
+ for ( serverListIT = serverList.begin(); serverListIT != serverList.end(); ++serverListIT )
+ {
+ if( !CFG->hasGroup( (*serverListIT) ) ) continue;
+ CFG->setGroup( (*serverListIT) );
+ temp.Name = (*serverListIT);
+ temp.URL = CFG->readEntry( "URL" );
+ temp.UserName = CFG->readEntry( "UserName" );
+ temp.LogFile = CFG->readEntry( "LogFile" );
+ temp.Password = decryptStr( CFG->readEntry( "Password" ) );
+ temp.StorePass = CFG->readBoolEntry( "StorePass" );
+ temp.Port = CFG->readNumEntry( "Port" );
+ temp.CurrentRef = CFG->readNumEntry( "CurrentRef" );
+ temp.Timeseal = CFG->readEntry( "Timeseal" );
+ servers.append( temp );
+ }
+}
+///////////////////////////////////////
+//
+// resource::WriteServers
+//
+///////////////////////////////////////
+void resource::WriteServers( void )
+{
+ QString buffer;
+
+ CFG->setGroup( "General" );
+ if( servers.isEmpty() )
+ {
+ CFG->writeEntry( "Servers", QString( "" ) );
+ return;
+ }
+ for ( serversIT = servers.begin(); serversIT != servers.end(); ++serversIT )
+ {
+ buffer += (*serversIT).Name + ",";
+ CFG->setGroup( (*serversIT).Name );
+ CFG->writeEntry( "URL", (*serversIT).URL );
+ CFG->writeEntry( "UserName", (*serversIT).UserName );
+ CFG->writeEntry( "LogFile", (*serversIT).LogFile );
+ if( (*serversIT).StorePass )
+ CFG->writeEntry( "Password", encryptStr( (*serversIT).Password ) );
+ else
+ CFG->writeEntry( "Password", "" );
+ CFG->writeEntry( "Port", (*serversIT).Port );
+ CFG->writeEntry( "StorePass", (*serversIT).StorePass );
+ CFG->writeEntry( "CurrentRef", (*serversIT).CurrentRef );
+ CFG->writeEntry( "Timeseal", (*serversIT).Timeseal );
+ }
+ CFG->setGroup( "General" );
+ CFG->writeEntry( "Servers", buffer );
+ CFG->sync();
+}
+///////////////////////////////////////
+//
+// resource::themeDir
+//
+///////////////////////////////////////
+QString resource::themeDir( void )
+{
+ return QString( GlobalDataDir + "themes/" );
+}
+///////////////////////////////////////
+//
+// resource::readThemeDir
+//
+///////////////////////////////////////
+void resource::readThemeDir( void )
+{
+ QDir themesDir;
+
+ Boards.clear();
+ Chessmen.clear();
+ Sounds.clear();
+
+ themesDir.setNameFilter( "KB*" );
+ themesDir = GlobalDataDir + "themes/";
+ Boards += themesDir.entryList();
+ themesDir = QDir::homeDirPath() + "/.knights/";
+ if( themesDir.exists() ) Boards += themesDir.entryList();
+ themesDir = "../media/";
+ if( themesDir.exists() ) Boards += themesDir.entryList();
+ Boards.sort();
+
+ themesDir.setNameFilter( "KC*" );
+ themesDir = GlobalDataDir + "themes/";
+ Chessmen += themesDir.entryList();
+ themesDir = QDir::homeDirPath() + "/.knights/";
+ if( themesDir.exists() ) Chessmen += themesDir.entryList();
+ themesDir = "../media/";
+ if( themesDir.exists() ) Chessmen += themesDir.entryList();
+ Chessmen.sort();
+
+ themesDir.setNameFilter( "KS*" );
+ themesDir = GlobalDataDir + "themes/";
+ Sounds += themesDir.entryList();
+ themesDir = QDir::homeDirPath() + "/.knights/";
+ if( themesDir.exists() ) Sounds += themesDir.entryList();
+ themesDir = "../media/";
+ if( themesDir.exists() ) Sounds += themesDir.entryList();
+ Sounds.sort();
+}
+///////////////////////////////////////
+//
+// resource::getBoard
+//
+///////////////////////////////////////
+QString resource::getBoard( int Index )
+{
+ if( Index > (signed)Boards.count() ) return QString::null;
+ if( Index == -1 ) return CurrentBoard;
+ return Boards[Index];
+}
+///////////////////////////////////////
+//
+// resource::getChessmen
+//
+///////////////////////////////////////
+QString resource::getChessmen( int Index )
+{
+ if( Index > (signed)Chessmen.count() ) return QString::null;
+ if( Index == -1 ) return CurrentChessmen;
+ return Chessmen[Index];
+}
+///////////////////////////////////////
+//
+// resource::getSounds
+//
+///////////////////////////////////////
+QString resource::getSounds( int Index )
+{
+ if( Index > (signed)Sounds.count() ) return QString::null;
+ if( Index == -1 ) return CurrentAudio;
+ return Sounds[Index];
+}
+///////////////////////////////////////
+//
+// resource::setAudio
+//
+///////////////////////////////////////
+void resource::setAudio( int AudioIndex )
+{
+ QString audioURL;
+
+ /* Make sure the Indexes are valid */
+ if( AudioIndex > (signed)Sounds.count() )
+ {
+ kdWarning() << "Can not access audio theme[" << AudioIndex << "]... Index out of range." << endl;
+ return;
+ }
+ /* Change the theme */
+ if( AudioIndex != -1 ) CurrentAudio = Sounds[AudioIndex];
+ audioURL = themeURL( CurrentAudio );
+ if( audioURL.isEmpty() )
+ {
+ return;
+ }
+ QApplication::setOverrideCursor( CURSOR_Thinking );
+ Audio->setTheme( audioURL );
+ QApplication::restoreOverrideCursor();
+ return;
+}
+///////////////////////////////////////
+//
+// resource::setTheme
+//
+///////////////////////////////////////
+void resource::setTheme( int BoardIndex, int ChessmenIndex )
+{
+ static bool firstTime( TRUE );
+ QString boardURL;
+ QString chessmenURL;
+ QString boardConf;
+ QString chessmenConf;
+ KSimpleConfig *boardConfig;
+ KSimpleConfig *chessmenConfig;
+
+ /* Make sure the Indexes are valid */
+ if( BoardIndex > (signed)Boards.count() )
+ {
+ kdWarning() << "Can not access board theme[" << BoardIndex << "]... Index out of range." << endl;
+ return;
+ }
+ if( ChessmenIndex > (signed)Chessmen.count() )
+ {
+ kdWarning() << "Can not access chessmen theme[" << ChessmenIndex << "]... Index out of range." << endl;
+ return;
+ }
+
+ /* Set the Cursor */
+ QApplication::setOverrideCursor( CURSOR_Thinking );
+
+ /* Change the theme */
+ if( BoardIndex != -1 )
+ CurrentBoard = Boards[BoardIndex];
+ if( ChessmenIndex != -1 )
+ CurrentChessmen = Chessmen[ChessmenIndex];
+
+ boardURL = themeURL( CurrentBoard );
+ chessmenURL = themeURL( CurrentChessmen );
+
+ if( ( boardURL.isEmpty() ) || ( chessmenURL.isEmpty() ) )
+ {
+ QApplication::restoreOverrideCursor();
+ return;
+ }
+
+ /* load the theme.conf files */
+ if( !KIO::NetAccess::download( boardURL + "theme.conf", boardConf ) )
+ kdWarning() << "Can not read theme.conf from " << boardURL << endl;
+ boardConfig = new KSimpleConfig( boardConf, TRUE );
+
+ if( !KIO::NetAccess::download( chessmenURL + "theme.conf", chessmenConf ) )
+ kdWarning() << "Can not read theme.conf from " << chessmenURL << endl;
+ chessmenConfig = new KSimpleConfig( chessmenConf, TRUE );
+
+ /* Read the headers */
+ boardConfig->setGroup( "General" );
+ boardHeader.name = boardConfig->readEntry( "Name", "Unknown" );
+ boardHeader.version = boardConfig->readEntry( "Version", "Unknown" );
+ boardHeader.author = boardConfig->readEntry( "Author", "Unknown" );
+ boardHeader.authorEmail = boardConfig->readEntry( "AuthorEmail", "Unknown" );
+ boardHeader.authorWWW = boardConfig->readEntry( "AuthorWWW", "Unknown" );
+ boardHeader.notes = boardConfig->readEntry( "Notes", "Unknown" );
+ chessmenConfig->setGroup( "General" );
+ chessmenHeader.name = chessmenConfig->readEntry( "Name", "Unknown" );
+ chessmenHeader.version = chessmenConfig->readEntry( "Version", "Unknown" );
+ chessmenHeader.author = chessmenConfig->readEntry( "Author", "Unknown" );
+ chessmenHeader.authorEmail = chessmenConfig->readEntry( "AuthorEmail", "Unknown" );
+ chessmenHeader.authorWWW = chessmenConfig->readEntry( "AuthorWWW", "Unknown" );
+ chessmenHeader.notes = chessmenConfig->readEntry( "Notes", "Unknown" );
+
+ /* Load the Board */
+ boardConfig->setGroup( "2DBoard" );
+ ThemeBorder = boardConfig->readBoolEntry( "HaveBorder", FALSE );
+ loadThemeItem( boardURL + boardConfig->readEntry("Light", "square.light.png"), pixCache->Orig_SquareLight );
+ loadThemeItem( boardURL + boardConfig->readEntry("Dark", "square.dark.png"), pixCache->Orig_SquareDark );
+ loadThemeItem( boardURL + boardConfig->readEntry("Select", "square.select.png"), pixCache->Orig_HighlightSelect );
+ loadThemeItem( boardURL + boardConfig->readEntry("Motion", "square.motion.png"), pixCache->Orig_HighlightMove );
+ loadThemeItem( boardURL + boardConfig->readEntry("Danger", "square.danger.png"), pixCache->Orig_HighlightAttack );
+ if( ThemeBorder )
+ {
+ loadThemeItem( boardURL + boardConfig->readEntry("Border", "border.png"), pixCache->Orig_Border );
+ loadThemeItem( boardURL + boardConfig->readEntry("BorderLightOn", "light_on.png"), pixCache->Orig_BorderLightOn );
+ loadThemeItem( boardURL + boardConfig->readEntry("BorderLightOff", "light_off.png"), pixCache->Orig_BorderLightOff );
+ }
+ boardConfig->setGroup( "2DBoard" );
+ COLOR_Notation = boardConfig->readColorEntry( "TextColor", &COLOR_White );
+ COLOR_Notation_Shadow = boardConfig->readColorEntry( "ShadowColor", &COLOR_Black );
+
+ /* Load 2D Chessmen */
+ chessmenConfig->setGroup( "2DBlack" );
+ loadThemeItem( chessmenURL + chessmenConfig->readEntry("King", "black.king.png"), pixCache->Orig_BlackKing );
+ loadThemeItem( chessmenURL + chessmenConfig->readEntry("Queen", "black.queen.png"), pixCache->Orig_BlackQueen );
+ loadThemeItem( chessmenURL + chessmenConfig->readEntry("Bishop", "black.bishop.png"), pixCache->Orig_BlackBishop );
+ loadThemeItem( chessmenURL + chessmenConfig->readEntry("Knight", "black.knight.png"), pixCache->Orig_BlackKnight );
+ loadThemeItem( chessmenURL + chessmenConfig->readEntry("Rook", "black.rook.png"), pixCache->Orig_BlackRook );
+ loadThemeItem( chessmenURL + chessmenConfig->readEntry("Pawn", "black.pawn.png"), pixCache->Orig_BlackPawn );
+ chessmenConfig->setGroup( "2DWhite" );
+ loadThemeItem( chessmenURL + chessmenConfig->readEntry("King", "white.king.png"), pixCache->Orig_WhiteKing );
+ loadThemeItem( chessmenURL + chessmenConfig->readEntry("Queen", "white.queen.png"), pixCache->Orig_WhiteQueen );
+ loadThemeItem( chessmenURL + chessmenConfig->readEntry("Bishop", "white.bishop.png"), pixCache->Orig_WhiteBishop );
+ loadThemeItem( chessmenURL + chessmenConfig->readEntry("Knight", "white.knight.png"), pixCache->Orig_WhiteKnight );
+ loadThemeItem( chessmenURL + chessmenConfig->readEntry("Rook", "white.rook.png"), pixCache->Orig_WhiteRook );
+ loadThemeItem( chessmenURL + chessmenConfig->readEntry("Pawn", "white.pawn.png"), pixCache->Orig_WhitePawn );
+
+ /* Remove the theme.conf files */
+ delete boardConfig;
+ delete chessmenConfig;
+ KIO::NetAccess::removeTempFile( boardConf );
+ KIO::NetAccess::removeTempFile( chessmenConf );
+
+ /* Cleanup */
+ pixCache->clear();
+ QApplication::restoreOverrideCursor();
+ pixCache->resize( ThemeSize );
+ firstTime = FALSE;
+ return;
+}
+///////////////////////////////////////
+//
+// resource::loadThemeItem
+//
+///////////////////////////////////////
+void resource::loadThemeItem( const QString &URL, QImage &Image )
+{
+ QString tempFile;
+
+ if( KIO::NetAccess::download( URL, tempFile ) )
+ {
+ if( !Image.load( tempFile ) )
+ kdError() << "resource::LoadThemeItem: Can not load " << tempFile << ", which comes from " << URL << endl;
+ KIO::NetAccess::removeTempFile( tempFile );
+ }
+ else
+ kdError() << "resource::LoadThemeItem: Can not extract " << URL << endl;
+ return;
+}
+///////////////////////////////////////
+//
+// resource::resizeTheme
+//
+///////////////////////////////////////
+void resource::resizeTheme( const int &size )
+{
+ /* Set the Cursor */
+ QApplication::setOverrideCursor( CURSOR_Thinking );
+
+ ThemeSize = size;
+ if( ThemeSize > IMAGE_MAX )
+ ThemeSize = IMAGE_MIN;
+ if( ThemeSize < IMAGE_MIN )
+ ThemeSize = IMAGE_MAX;
+ pixCache->resize( ThemeSize );
+ ConfigWrite();
+
+ QApplication::restoreOverrideCursor();
+}
+///////////////////////////////////////
+//
+// resource::LoadIcon
+//
+///////////////////////////////////////
+QPixmap resource::LoadIcon( QString Name, int Group )
+{
+ return Icons->loadIcon( Name, (KIcon::Group)Group );
+}
+///////////////////////////////////////
+//
+// resource::encryptStr
+//
+///////////////////////////////////////
+// Borrowed from KMail
+QString resource::encryptStr(const QString &aStr) const
+{
+ unsigned int i, val;
+ unsigned int len = aStr.length();
+ QCString result;
+ result.resize(len+1);
+ for (i=0; i<len; i++)
+ {
+ val = aStr[i] - ' ';
+ val = (255-' ') - val;
+ result[i] = (char)(val + ' ');
+ }
+ result[i] = '\0';
+
+ return result;
+}
+///////////////////////////////////////
+//
+// resource::decryptStr
+//
+///////////////////////////////////////
+// Borrowed from KMail
+QString resource::decryptStr(const QString &aStr) const
+{
+ return encryptStr(aStr);
+}
+///////////////////////////////////////
+//
+// resource::play
+//
+///////////////////////////////////////
+void resource::play( const char snd )
+{
+ Audio->play( snd );
+}
+///////////////////////////////////////
+//
+// resource::ReadColors
+//
+///////////////////////////////////////
+void resource::ReadColors( void )
+{
+ QColor tmp;
+
+ COLOR_White = QColor( 255, 255, 255 );
+ COLOR_Black = QColor( 0, 0, 0 );
+ CFG->setGroup( "Colors" );
+ COLOR_Background = CFG->readColorEntry( "BackgroundColor", &COLOR_White );
+ COLOR_GraphBackground = CFG->readColorEntry( "GraphBackground", &COLOR_Background );
+ COLOR_Standard = CFG->readColorEntry( "StandardColor", &COLOR_Black );
+ COLOR_GraphForeground = CFG->readColorEntry( "GraphForeground", &COLOR_Standard );
+ tmp = QColor( 128, 0, 128 ); // Purple
+ COLOR_PrivateTell = CFG->readColorEntry( "PrivateColor", &tmp );
+ tmp = QColor( 0, 0, 160 ); // Blue
+ COLOR_ChannelTell = CFG->readColorEntry( "ChannelColor", &tmp );
+ tmp = QColor( 160, 0, 0 ); // Red
+ COLOR_Shout = CFG->readColorEntry( "ShoutColor", &tmp );
+ tmp = QColor( 0, 160, 0 ); // Green
+ COLOR_Whisper = CFG->readColorEntry( "WhisperColor", &tmp );
+ tmp = QColor( 0, 128, 128 ); // Cyan
+ COLOR_Notification = CFG->readColorEntry( "NotificationColor", &tmp );
+}
+///////////////////////////////////////
+//
+// resource::WriteColors
+//
+///////////////////////////////////////
+void resource::WriteColors( void )
+{
+ CFG->setGroup( "Colors" );
+ CFG->writeEntry( "BackgroundColor", COLOR_Background );
+ CFG->writeEntry( "StandardColor", COLOR_Standard );
+ CFG->writeEntry( "PrivateColor", COLOR_PrivateTell );
+ CFG->writeEntry( "ChannelColor", COLOR_ChannelTell );
+ CFG->writeEntry( "ShoutColor", COLOR_Shout );
+ CFG->writeEntry( "WhisperColor", COLOR_Whisper );
+ CFG->writeEntry( "NotificationColor", COLOR_Notification );
+ CFG->writeEntry( "GraphForeground", COLOR_GraphForeground );
+ CFG->writeEntry( "GraphBackground", COLOR_GraphBackground );
+}
+///////////////////////////////////////
+//
+// resource::ReadFonts
+//
+///////////////////////////////////////
+void resource::ReadFonts( void )
+{
+ QFont Fixed = KGlobalSettings::fixedFont();
+ CFG->setGroup( "Fonts" );
+ FONT_Standard = CFG->readFontEntry( "StandardFont", &Fixed );
+ FONT_PrivateTell = CFG->readFontEntry( "PrivateFont", &Fixed );
+ FONT_ChannelTell = CFG->readFontEntry( "ChannelFont", &Fixed );
+ FONT_Shout = CFG->readFontEntry( "ShoutFont", &Fixed );
+ FONT_Whisper = CFG->readFontEntry( "WhisperFont", &Fixed );
+ FONT_Notification = CFG->readFontEntry( "NotificationFont", &Fixed );
+}
+///////////////////////////////////////
+//
+// resource::WriteFonts
+//
+///////////////////////////////////////
+void resource::WriteFonts( void )
+{
+ CFG->setGroup( "Fonts" );
+ CFG->writeEntry( "StandardFont", FONT_Standard );
+ CFG->writeEntry( "PrivateFont", FONT_PrivateTell );
+ CFG->writeEntry( "ChannelFont", FONT_ChannelTell );
+ CFG->writeEntry( "ShoutFont", FONT_Shout );
+ CFG->writeEntry( "WhisperFont", FONT_Whisper );
+ CFG->writeEntry( "NotificationFont", FONT_Notification );
+}
+///////////////////////////////////////
+//
+// resource::buildStyle
+//
+///////////////////////////////////////
+void resource::buildStyle( void )
+{
+ /* Configure SSI_Default */
+ SSI_Default->setDisplayMode( QStyleSheetItem::DisplayListItem );
+ SSI_Default->setWhiteSpaceMode( QStyleSheetItem::WhiteSpacePre );
+ SSI_Default->setFontFamily( FONT_Standard.family() );
+ SSI_Default->setFontSize( FONT_Standard.pointSize() );
+ SSI_Default->setFontUnderline( FONT_Standard.underline() );
+ SSI_Default->setFontItalic( FONT_Standard.italic() );
+ SSI_Default->setFontWeight( FONT_Standard.weight() );
+ SSI_Default->setColor( COLOR_Standard );
+ /* Configure SSI_PrivateTell */
+ SSI_PrivateTell->setDisplayMode( QStyleSheetItem::DisplayListItem );
+ SSI_PrivateTell->setWhiteSpaceMode( QStyleSheetItem::WhiteSpacePre );
+ SSI_PrivateTell->setFontFamily( FONT_PrivateTell.family() );
+ SSI_PrivateTell->setFontSize( FONT_PrivateTell.pointSize() );
+ SSI_PrivateTell->setFontUnderline( FONT_PrivateTell.underline() );
+ SSI_PrivateTell->setFontItalic( FONT_PrivateTell.italic() );
+ SSI_PrivateTell->setFontWeight( FONT_PrivateTell.weight() );
+ SSI_PrivateTell->setColor( COLOR_PrivateTell );
+ /* Configure SSI_ChannelTell */
+ SSI_ChannelTell->setDisplayMode( QStyleSheetItem::DisplayListItem );
+ SSI_ChannelTell->setWhiteSpaceMode( QStyleSheetItem::WhiteSpacePre );
+ SSI_ChannelTell->setFontFamily( FONT_ChannelTell.family() );
+ SSI_ChannelTell->setFontSize( FONT_ChannelTell.pointSize() );
+ SSI_ChannelTell->setFontUnderline( FONT_ChannelTell.underline() );
+ SSI_ChannelTell->setFontItalic( FONT_ChannelTell.italic() );
+ SSI_ChannelTell->setFontWeight( FONT_ChannelTell.weight() );
+ SSI_ChannelTell->setColor( COLOR_ChannelTell );
+ /* Configure SSI_Shout */
+ SSI_Shout->setDisplayMode( QStyleSheetItem::DisplayListItem );
+ SSI_Shout->setWhiteSpaceMode( QStyleSheetItem::WhiteSpacePre );
+ SSI_Shout->setFontFamily( FONT_Shout.family() );
+ SSI_Shout->setFontSize( FONT_Shout.pointSize() );
+ SSI_Shout->setFontUnderline( FONT_Shout.underline() );
+ SSI_Shout->setFontItalic( FONT_Shout.italic() );
+ SSI_Shout->setFontWeight( FONT_Shout.weight() );
+ SSI_Shout->setColor( COLOR_Shout );
+ /* Configure SSI_Whisper */
+ SSI_Whisper->setDisplayMode( QStyleSheetItem::DisplayListItem );
+ SSI_Whisper->setWhiteSpaceMode( QStyleSheetItem::WhiteSpacePre );
+ SSI_Whisper->setFontFamily( FONT_Whisper.family() );
+ SSI_Whisper->setFontSize( FONT_Whisper.pointSize() );
+ SSI_Whisper->setFontUnderline( FONT_Whisper.underline() );
+ SSI_Whisper->setFontItalic( FONT_Whisper.italic() );
+ SSI_Whisper->setFontWeight( FONT_Whisper.weight() );
+ SSI_Whisper->setColor( COLOR_Whisper );
+ /* Configure SSI_Notification */
+ SSI_Notification->setDisplayMode( QStyleSheetItem::DisplayListItem );
+ SSI_Notification->setWhiteSpaceMode( QStyleSheetItem::WhiteSpacePre );
+ SSI_Notification->setFontFamily( FONT_Notification.family() );
+ SSI_Notification->setFontSize( FONT_Notification.pointSize() );
+ SSI_Notification->setFontUnderline( FONT_Notification.underline() );
+ SSI_Notification->setFontItalic( FONT_Notification.italic() );
+ SSI_Notification->setFontWeight( FONT_Notification.weight() );
+ SSI_Notification->setColor( COLOR_Notification );
+}
+///////////////////////////////////////
+//
+// resource::themeURL
+//
+///////////////////////////////////////
+QString resource::themeURL( const QString theme )
+{
+ QString fullURL;
+ fullURL = "tar:" + GlobalDataDir + "themes/" + theme;
+ if( !KIO::NetAccess::exists( fullURL ) )
+ {
+ fullURL = "tar:" + QDir::currentDirPath() + "../media/" + theme;
+ if( !KIO::NetAccess::exists( fullURL ) )
+ {
+ fullURL = "tar:" + QDir::homeDirPath() + "/.knights/" + theme;
+ if( !KIO::NetAccess::exists( fullURL ) )
+ {
+ kdWarning() << "The theme " << theme << " does not exist in any valid path." << endl;
+ return QString::null;
+ }
+ }
+ }
+ fullURL += "/";
+ return fullURL;
+}
+
+///////////////////////////////////////
+//
+// resource::loadSCIDImage
+//
+///////////////////////////////////////
+QPixmap resource::loadSCIDImage( const QString &name )
+{
+ const int BufferMax = 120;
+ const int ArrayMax = 21600;
+ const int SkipSize = 7200;
+
+ QPixmap newPix;
+ QString searchName = '\"' + name + '\"';
+ QByteArray base64Data( ArrayMax );
+ QByteArray rawData( ArrayMax );
+ char *array = base64Data.data();
+ char buffer[BufferMax];
+ char photo[12];
+ unsigned int index = 0;
+ unsigned int buffSize = 0;
+
+ QString source = locate( "appdata", "players.img" );
+ if( source.isNull() )
+ source = SCID_Image_Path;
+
+ strcpy( photo, "photo" );
+ QFile file( source );
+
+ if( file.open( IO_ReadOnly ) )
+ {
+ while( !file.atEnd() )
+ {
+ file.readLine( buffer, BufferMax );
+ if( strstr( buffer, photo ) != NULL )
+ {
+ if( strstr( buffer, searchName.latin1() ) != NULL )
+ {
+ /* From here on, we're reading the image */
+ index = file.readBlock( array, SkipSize );
+ buffer[0] = 0;
+ while( ( buffer[0] != '}' ) && ( !file.atEnd() ) )
+ {
+ memcpy( array + index, buffer, buffSize );
+ index += buffSize;
+ buffSize = file.readLine( buffer, BufferMax );
+ }
+ base64Data.truncate( index );
+ KCodecs::base64Decode( base64Data, rawData );
+ newPix.loadFromData( rawData );
+ break;
+ }
+ else
+ {
+ file.at( file.at() + SkipSize );
+ }
+ }
+ }
+ file.close();
+ }
+ return newPix;
+}
+
+#undef CFG
+
+
diff --git a/knights/resource.h b/knights/resource.h
new file mode 100644
index 0000000..0892988
--- /dev/null
+++ b/knights/resource.h
@@ -0,0 +1,240 @@
+/***************************************************************************
+ resource.h - description
+ -------------------
+ begin : Tue Jul 17 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef RESOURCE_H
+#define RESOURCE_H
+
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+/* KDE */
+#include <kapp.h>
+#include <klocale.h>
+#include <kcursor.h>
+#include <klistview.h>
+#include <kcmdlineargs.h>
+/* Qt */
+#include <qstylesheet.h>
+#include <qvaluelist.h>
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qpixmap.h>
+#include <qimage.h>
+/* Local */
+#include "definitions.h"
+
+class audio;
+class KnightsPixCache;
+class TabManager;
+class Accel;
+
+typedef struct engineResource
+{
+ QListViewItem *Item;
+ QString Name;
+ QString Filename;
+ QString Arguments;
+ QString LogFile;
+ int Protocol;
+ int Wins;
+ int Losses;
+ int Draws;
+ int CurrentRef;
+};
+
+typedef struct serverResource
+{
+ QListViewItem *Item;
+ QString Name;
+ QString URL;
+ QString UserName;
+ QString Password;
+ QString LogFile;
+ QString Timeseal;
+ bool StorePass;
+ int Port;
+ int CurrentRef;
+};
+
+typedef QValueList<engineResource> engineList;
+typedef QValueList<serverResource> serverList;
+
+class resource
+{
+ public:
+ /* The current Theme */
+ int ThemeSize;
+ bool ThemeBorder;
+ QStyleSheet *ConsoleStyle;
+ QString CurrentBoard;
+ QString CurrentChessmen;
+ QString CurrentAudio;
+ ThemeHeader boardHeader;
+ ThemeHeader chessmenHeader;
+ ThemeHeader audioHeader;
+ KnightsPixCache *pixCache;
+ TabManager *tabManager;
+ Accel *myAccel;
+
+ /* General Settings */
+ QString Local_Player;
+ QString Local_Email_Address;
+ int Config_Version;
+ bool Accepted_License;
+ int OPTION_On_Init;
+ int Audio_Volume;
+ bool OPTION_Audio;
+ bool OPTION_Audio_Current_Only;
+ bool OPTION_Auto_Queen;
+ bool OPTION_Auto_Preview;
+ bool OPTION_Auto_Call_Flag;
+ bool OPTION_Auto_Close_Last_ICS;
+ bool OPTION_Animate_Moves;
+ bool OPTION_Book_White;
+ bool OPTION_Book_Black;
+ bool OPTION_Board_Orientation;
+ bool OPTION_Ponder;
+ bool OPTION_Show_Coord;
+ bool OPTION_Show_Last_Move;
+ bool OPTION_Show_Splash;
+ bool OPTION_Show_Extended_PGN;
+ bool OPTION_Pause_On_Minimize;
+ bool OPTION_Reuse_PGN;
+ bool OPTION_3DBoard;
+ QString PGN_Filename;
+ QString Email_Command_Line;
+ QString Email_Address;
+ QString SCID_Image_Path;
+ int Widget_Height;
+ /* ICS Options */
+ int Seek_Timer;
+ int OPTION_Profanity;
+ bool OPTION_Premove;
+ bool OPTION_Kibitz;
+ bool OPTION_Private;
+ bool OPTION_Shout;
+ bool OPTION_Tell;
+ bool OPTION_Seek;
+ /* Notification Prompts */
+ QString PromptForSaving;
+ /* Colors */
+ QColor COLOR_White;
+ QColor COLOR_Black;
+ QColor COLOR_Background;
+ QColor COLOR_Standard;
+ QColor COLOR_PrivateTell;
+ QColor COLOR_ChannelTell;
+ QColor COLOR_Shout;
+ QColor COLOR_Whisper;
+ QColor COLOR_Notification;
+ QColor COLOR_Notation;
+ QColor COLOR_Notation_Shadow;
+ QColor COLOR_GraphBackground;
+ QColor COLOR_GraphForeground;
+ /* Fonts */
+ QFont FONT_Standard;
+ QFont FONT_PrivateTell;
+ QFont FONT_ChannelTell;
+ QFont FONT_Shout;
+ QFont FONT_Whisper;
+ QFont FONT_Notification;
+ /* Cursors */
+ QCursor CURSOR_Standard;
+ QCursor CURSOR_Thinking;
+ QCursor CURSOR_Text;
+ /* Chess Engines */
+ engineList engines;
+ engineList::Iterator enginesIT;
+ /* Chess Servers */
+ serverList servers;
+ serverList::Iterator serversIT;
+ /* New Match Presets */
+ TCPList TCPWhite;
+ TCPList TCPBlack;
+ char MatchRules;
+ char Type[4];
+ char Strength[4];
+
+ resource( KCmdLineArgs *args );
+ ~resource();
+
+ void ConfigRead( void );
+ void ConfigWrite( void );
+
+ void readThemeDir( void );
+ QString getBoard( int Index=-1 );
+ QString getChessmen( int Index=-1 );
+ QString getSounds( int Index=-1 );
+ QString themeDir( void );
+ void setTheme( int BoardIndex=-1, int ChessmenIndex=-1 );
+ void setAudio( int AudioIndex=-1 );
+ void resizeTheme( const int &size );
+
+ /**
+ Call buildStyle whenever you need to reparse the Resource configuration */
+ void buildStyle( void );
+ QPixmap LoadIcon( QString Name, int Group );
+ QPixmap loadSCIDImage( const QString &name );
+ void play( const char );
+
+ private:
+
+ QStyleSheetItem *SSI_Default;
+ QStyleSheetItem *SSI_PrivateTell;
+ QStyleSheetItem *SSI_ChannelTell;
+ QStyleSheetItem *SSI_Shout;
+ QStyleSheetItem *SSI_Whisper;
+ QStyleSheetItem *SSI_Notification;
+
+ QString GlobalDataDir;
+ QString LocalDataDir;
+
+ QStringList Boards;
+ QStringList Chessmen;
+ QStringList Sounds;
+ KIconLoader *Icons;
+ audio *Audio;
+
+ void ReadEngines( void );
+ void WriteEngines( void );
+
+ void ReadServers( void );
+ void WriteServers( void );
+
+ void ReadMatchParam( void );
+ void WriteMatchParam( void );
+
+ void ReadColors( void );
+ void WriteColors( void );
+
+ void ReadFonts( void );
+ void WriteFonts( void );
+
+ /**
+ Borrowed from KMail
+ Very primitive en/de-cryption so that the password is not
+ readable in the config file. But still very easy breakable.
+ */
+ QString encryptStr( const QString& inStr ) const;
+ QString decryptStr( const QString& inStr ) const;
+ QString themeURL( const QString );
+ void loadThemeItem( const QString& URL, QImage& Image );
+};
+
+#endif
diff --git a/knights/setpageaudio.cpp b/knights/setpageaudio.cpp
new file mode 100644
index 0000000..3c51b12
--- /dev/null
+++ b/knights/setpageaudio.cpp
@@ -0,0 +1,133 @@
+/***************************************************************************
+ setpageaudio.cpp - description
+ -------------------
+ begin : Thu Jan 10 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <qregexp.h>
+#include "setpageaudio.moc"
+
+setPageAudio::setPageAudio(QWidget *parent, resource *Rsrc ) : QVBoxLayout(parent)
+{
+ Parent = parent;
+ Resource = Rsrc;
+ NewSounds = 0;
+ changeTheme = FALSE;
+
+ BUTTON_enableAudio = new QCheckBox( i18n( "Enable Audio" ), parent );
+ BUTTON_enableAudio->setChecked( Resource->OPTION_Audio );
+ addWidget( BUTTON_enableAudio );
+ connect( BUTTON_enableAudio, SIGNAL( toggled(bool) ),
+ this, SLOT( slot_enableAudio(bool) ) );
+
+ GROUP_Theme = new QGroupBox( 1,
+ Qt::Vertical,
+ i18n( "Audio Themes" ),
+ parent );
+ addWidget( GROUP_Theme );
+ Current_Theme = new KComboBox ( GROUP_Theme );
+ buildThemeList();
+ connect( Current_Theme, SIGNAL( activated(int) ),
+ this, SLOT( slot_currentTheme(int) ) );
+
+ BOX_Main = new QHBox( parent );
+ addWidget( BOX_Main );
+
+ GROUP_Volume = new QGroupBox( 3, Qt::Vertical, i18n( "Volume" ), BOX_Main );
+ Vol_Max = new QLabel( i18n( "Maximum" ), GROUP_Volume );
+ Current_Volume = new QSlider ( 0, 100, 10, Resource->Audio_Volume, QSlider::Vertical, GROUP_Volume );
+ connect( Current_Volume, SIGNAL( valueChanged(int) ), this, SLOT( slot_currentVolume(int) ) );
+ Current_Volume->setTickmarks( QSlider::Right );
+ Vol_Min = new QLabel( i18n( "Minimum" ), GROUP_Volume );
+
+ BOX_Options = new QVBox( BOX_Main );
+ BUTTON_AudioCurrentOnly = new QCheckBox( i18n( "For Current Match Only" ), BOX_Options );
+ BUTTON_AudioCurrentOnly->setChecked( Resource->OPTION_Audio_Current_Only );
+ connect( BUTTON_AudioCurrentOnly, SIGNAL( toggled(bool) ),
+ this, SLOT( slot_AudioCurrentOnly(bool) ) );
+}
+setPageAudio::~setPageAudio()
+{
+}
+///////////////////////////////////////
+//
+// setPageAudio::slot_enableAudio
+//
+///////////////////////////////////////
+void setPageAudio::slot_enableAudio( bool state )
+{
+ Resource->OPTION_Audio = state;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageAudio::slot_currentTheme
+//
+///////////////////////////////////////
+void setPageAudio::slot_currentTheme( int Index )
+{
+ NewSounds = Index;
+ changeTheme = TRUE;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageAudio::slot_currentVolume
+//
+///////////////////////////////////////
+void setPageAudio::slot_currentVolume( int Level )
+{
+ Resource->Audio_Volume = Level;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageAudio::slot_AudioCurrentOnly
+//
+///////////////////////////////////////
+void setPageAudio::slot_AudioCurrentOnly( bool state )
+{
+ Resource->OPTION_Audio_Current_Only = state;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageAudio::buildThemeList
+//
+///////////////////////////////////////
+void setPageAudio::buildThemeList( void )
+{
+ QString buffer;
+ int tmp(0);
+
+ Current_Theme->clear();
+ Resource->readThemeDir();
+ while(1)
+ {
+ buffer = Resource->getSounds( tmp );
+ if( buffer.isEmpty() ) break;
+ buffer.remove( 0, 2 );
+ buffer.replace( QRegExp("_"), " " );
+ buffer.replace( QRegExp(".tar"), "" );
+ buffer.replace( QRegExp(".gz"), "" );
+ buffer.replace( QRegExp(".bz2"), "" );
+ Current_Theme->insertItem( buffer, tmp );
+ if( Resource->getSounds() == Resource->getSounds( tmp ) )
+ {
+ Current_Theme->setCurrentItem( tmp );
+ NewSounds = tmp;
+ }
+ tmp++;
+ }
+}
diff --git a/knights/setpageaudio.h b/knights/setpageaudio.h
new file mode 100644
index 0000000..5d9c58b
--- /dev/null
+++ b/knights/setpageaudio.h
@@ -0,0 +1,69 @@
+/***************************************************************************
+ setpageaudio.h - description
+ -------------------
+ begin : Thu Jan 10 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef SETPAGEAUDIO_H
+#define SETPAGEAUDIO_H
+
+#include <kcombobox.h>
+#include <klineedit.h>
+#include <qwidget.h>
+#include <qhbox.h>
+#include <qvbox.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qslider.h>
+#include <qgroupbox.h>
+#include <qcheckbox.h>
+#include "resource.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class setPageAudio : public QVBoxLayout
+{
+ Q_OBJECT
+ public:
+ setPageAudio(QWidget *parent=0, resource *Rsrc=0);
+ ~setPageAudio();
+ void buildThemeList( void );
+ int NewSounds;
+ bool changeTheme;
+ signals:
+ void enableApply( void );
+ public slots:
+ void slot_enableAudio( bool );
+ void slot_currentTheme( int );
+ void slot_currentVolume( int );
+ void slot_AudioCurrentOnly( bool );
+ private:
+ QWidget *Parent;
+ resource *Resource;
+
+ QCheckBox *BUTTON_enableAudio;
+ QGroupBox *GROUP_Theme;
+ KComboBox *Current_Theme;
+ QHBox *BOX_Main;
+ QGroupBox *GROUP_Volume;
+ QLabel *Vol_Min;
+ QSlider *Current_Volume;
+ QLabel *Vol_Max;
+ QVBox *BOX_Options;
+ QCheckBox *BUTTON_AudioCurrentOnly;
+};
+
+#endif
diff --git a/knights/setpagedisplay.cpp b/knights/setpagedisplay.cpp
new file mode 100644
index 0000000..1cf82d9
--- /dev/null
+++ b/knights/setpagedisplay.cpp
@@ -0,0 +1,563 @@
+/***************************************************************************
+ setpagedisplay.cpp - description
+ -------------------
+ begin : Thu Aug 16 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "setpagedisplay.moc"
+#include <kstddirs.h>
+#include <kmessagebox.h>
+#include <kcolordialog.h>
+#include <kfontdialog.h>
+#include <qstyle.h>
+#include <qregexp.h>
+#include <kiconloader.h>
+#include <kfiledialog.h>
+#include <kio/netaccess.h>
+
+setPageDisplay::setPageDisplay(QWidget *parent, resource *Rsrc ) : QVBoxLayout(parent)
+{
+ QStyle& Style = QApplication::style();
+ Resource = Rsrc;
+ margin = Style.defaultFrameWidth();
+ NewBoards = 0;
+ NewChessmen = 0;
+ changeTheme = FALSE;
+ refreshBoard = FALSE;
+ rebuildConsole = FALSE;
+
+ TabParent = new QTabWidget( parent, "setPageDisplay" );
+ initTab1();
+ initTab2();
+ addWidget( TabParent );
+}
+setPageDisplay::~setPageDisplay()
+{
+ delete Show_Splashscreen;
+ delete Board_Orientation;
+ delete GROUP_General_Graphics;
+ delete Size_Max;
+ delete Size_Min;
+ delete Current_Theme_Size;
+ delete Current_Boards;
+ delete Current_Chessmen;
+ delete GROUP_Boards;
+ delete GROUP_Chessmen;
+ delete BOX_Themes;
+ delete Tab1;
+ delete Tab2;
+ delete TabParent;
+}
+///////////////////////////////////////
+//
+// setPageDisplay::initTab1
+//
+///////////////////////////////////////
+void setPageDisplay::initTab1( void )
+{
+ Tab1 = new QVBox( TabParent );
+ Tab1->setMargin( margin );
+ BOX_Themes = new QHBox( Tab1 );
+ GROUP_Boards = new QGroupBox( 1,
+ Qt::Vertical,
+ i18n( "Board Themes" ),
+ BOX_Themes );
+ Current_Boards = new KComboBox ( GROUP_Boards );
+ GROUP_Chessmen = new QGroupBox( 1,
+ Qt::Vertical,
+ i18n( "Chessman Themes" ),
+ BOX_Themes );
+ Current_Chessmen = new KComboBox ( GROUP_Chessmen );
+
+ GROUP_Theme_Size = new QGroupBox( 3,
+ Qt::Horizontal,
+ i18n( "Theme Size" ),
+ Tab1 );
+
+ Size_Min = new QLabel( i18n( "Small" ), GROUP_Theme_Size );
+ Current_Theme_Size = new QSlider ( 0,
+ 14,
+ 2,
+ ( Resource->ThemeSize - IMAGE_MIN ) / 8 ,
+ QSlider::Horizontal,
+ GROUP_Theme_Size );
+ Size_Max = new QLabel( i18n( "Large" ), GROUP_Theme_Size );
+
+ GROUP_SCID_Images = new QGroupBox( 2, Qt::Horizontal, i18n("Player Images File:"), Tab1 );
+ EDIT_SCID_Images = new KLineEdit( GROUP_SCID_Images );
+ EDIT_SCID_Images->setText( Resource->SCID_Image_Path );
+ connect( EDIT_SCID_Images, SIGNAL( textChanged(const QString&) ), this, SLOT( slot_SCID_Images(const QString&) ) );
+ BUTTON_SCID_Images = new QPushButton( GROUP_SCID_Images );
+ BUTTON_SCID_Images->setPixmap( Resource->LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) );
+ connect( BUTTON_SCID_Images, SIGNAL( clicked() ), this, SLOT( slot_SCID_Images_Button() ) );
+
+ GROUP_General_Graphics = new QGroupBox( 4,
+ Qt::Vertical,
+ i18n( "Other Display Options" ),
+ Tab1 );
+
+ Board_Orientation = new QCheckBox( i18n( "Reverse Board Orientation" ), GROUP_General_Graphics );
+ Board_Orientation->setChecked( Resource->OPTION_Board_Orientation );
+ connect( Board_Orientation, SIGNAL( toggled(bool) ),
+ this, SLOT( slotToggle_Board_Orientation(bool) ) );
+
+ Show_Splashscreen = new QCheckBox( i18n( "Display Startup Logo" ), GROUP_General_Graphics );
+ Show_Splashscreen->setChecked( Resource->OPTION_Show_Splash );
+ connect( Show_Splashscreen, SIGNAL( toggled(bool) ),
+ this, SLOT( slotToggle_Splashscreen(bool) ) );
+
+ Auto_Preview = new QCheckBox( i18n( "Automatic Preview" ), GROUP_General_Graphics );
+ Auto_Preview->setChecked( Resource->OPTION_Auto_Preview );
+ connect( Auto_Preview, SIGNAL( toggled(bool) ),
+ this, SLOT( slotToggle_Auto_Preview(bool) ) );
+
+ Show_Last_Move = new QCheckBox( i18n( "Show Last Move" ), GROUP_General_Graphics );
+ Show_Last_Move->setChecked( Resource->OPTION_Show_Last_Move );
+ connect( Show_Last_Move, SIGNAL( toggled(bool) ),
+ this, SLOT( slotToggle_Show_Last_Move(bool) ) );
+
+ Animate_Move = new QCheckBox( i18n( "Animate Moves" ), GROUP_General_Graphics );
+ Animate_Move->setChecked( Resource->OPTION_Animate_Moves );
+ connect( Animate_Move, SIGNAL( toggled(bool) ),
+ this, SLOT( slotToggle_Animate_Move(bool) ) );
+
+ Show_Coord = new QCheckBox( i18n( "Show Coordinates" ), GROUP_General_Graphics );
+ Show_Coord->setChecked( Resource->OPTION_Show_Coord );
+ connect( Show_Coord, SIGNAL( toggled(bool) ),
+ this, SLOT( slotToggle_Show_Coord(bool) ) );
+
+ Current_Theme_Size->setTickmarks( QSlider::Below );
+ Current_Boards->setEditable( FALSE );
+ Current_Chessmen->setEditable( FALSE );
+ buildThemeList();
+ connect( Current_Boards, SIGNAL( activated(int) ),
+ this, SLOT( slotCurrent_Boards(int) ) );
+ connect( Current_Chessmen, SIGNAL( activated(int) ),
+ this, SLOT( slotCurrent_Chessmen(int) ) );
+ connect( Current_Theme_Size, SIGNAL( valueChanged(int) ),
+ this, SLOT( slotCurrent_Theme_Size(int) ) );
+ TabParent->addTab( Tab1, i18n("General") );
+}
+///////////////////////////////////////
+//
+// setPageDisplay::initTab2
+//
+///////////////////////////////////////
+void setPageDisplay::initTab2( void )
+{
+ QPixmap ColorsIcon( Resource->LoadIcon( QString("colorize"), KIcon::Toolbar ) );
+ Tab2 = new QFrame( TabParent );
+ Tab2->setMargin( margin );
+
+ GRID_Style = new QGridLayout( Tab2, 11, 5, margin );
+
+ Console_Sample = new QTextView( Tab2 );
+ Console_Sample->setTextFormat( Qt::RichText );
+ GRID_Style->addMultiCellWidget( Console_Sample, 5, 10, 1, 1 );
+
+ Default_Button = new QPushButton( i18n("Restore Defaults"), Tab2 );
+ connect( Default_Button, SIGNAL( clicked() ), this, SLOT( slot_setDefault() ) );
+ GRID_Style->addWidget( Default_Button, 11, 1 );
+
+ Fonts_Button_Standard = new QPushButton( i18n("Standard Font..."), Tab2 );
+ connect( Fonts_Button_Standard, SIGNAL( clicked() ), this, SLOT( slot_Font_Standard() ) );
+ GRID_Style->addWidget( Fonts_Button_Standard, 5, 3 );
+
+ Colors_Button_Standard = new QPushButton( Tab2 );
+ Colors_Button_Standard->setPixmap( ColorsIcon );
+ connect( Colors_Button_Standard, SIGNAL( clicked() ), this, SLOT( slot_Color_Standard() ) );
+ GRID_Style->addWidget( Colors_Button_Standard, 5, 5 );
+
+ Fonts_Button_PrivateTell = new QPushButton( i18n("Private Font..."), Tab2 );
+ connect( Fonts_Button_PrivateTell, SIGNAL( clicked() ), this, SLOT( slot_Font_PrivateTell() ) );
+ GRID_Style->addWidget( Fonts_Button_PrivateTell, 6, 3 );
+
+ Colors_Button_PrivateTell = new QPushButton( Tab2 );
+ Colors_Button_PrivateTell->setPixmap( ColorsIcon );
+ connect( Colors_Button_PrivateTell, SIGNAL( clicked() ), this, SLOT( slot_Color_PrivateTell() ) );
+ GRID_Style->addWidget( Colors_Button_PrivateTell, 6, 5 );
+
+ Fonts_Button_ChannelTell = new QPushButton( i18n("Channel Font..."), Tab2 );
+ connect( Fonts_Button_ChannelTell, SIGNAL( clicked() ), this, SLOT( slot_Font_ChannelTell() ) );
+ GRID_Style->addWidget( Fonts_Button_ChannelTell, 7, 3 );
+
+ Colors_Button_ChannelTell = new QPushButton( Tab2 );
+ Colors_Button_ChannelTell->setPixmap( ColorsIcon );
+ connect( Colors_Button_ChannelTell, SIGNAL( clicked() ), this, SLOT( slot_Color_ChannelTell() ) );
+ GRID_Style->addWidget( Colors_Button_ChannelTell, 7, 5 );
+
+ Fonts_Button_Shout = new QPushButton( i18n("Shout Font..."), Tab2 );
+ connect( Fonts_Button_Shout, SIGNAL( clicked() ), this, SLOT( slot_Font_Shout() ) );
+ GRID_Style->addWidget( Fonts_Button_Shout, 8, 3 );
+
+ Colors_Button_Shout = new QPushButton( Tab2 );
+ Colors_Button_Shout->setPixmap( ColorsIcon );
+ connect( Colors_Button_Shout, SIGNAL( clicked() ), this, SLOT( slot_Color_Shout() ) );
+ GRID_Style->addWidget( Colors_Button_Shout, 8, 5 );
+
+ Fonts_Button_Whisper = new QPushButton( i18n("Whisper Font..."), Tab2 );
+ connect( Fonts_Button_Whisper, SIGNAL( clicked() ), this, SLOT( slot_Font_Whisper() ) );
+ GRID_Style->addWidget( Fonts_Button_Whisper, 9, 3 );
+
+ Colors_Button_Whisper = new QPushButton( Tab2 );
+ Colors_Button_Whisper->setPixmap( ColorsIcon );
+ connect( Colors_Button_Whisper, SIGNAL( clicked() ), this, SLOT( slot_Color_Whisper() ) );
+ GRID_Style->addWidget( Colors_Button_Whisper, 9, 5 );
+
+ Fonts_Button_Notification = new QPushButton( i18n("Notification Font..."), Tab2 );
+ connect( Fonts_Button_Notification, SIGNAL( clicked() ), this, SLOT( slot_Font_Notification() ) );
+ GRID_Style->addWidget( Fonts_Button_Notification, 10, 3 );
+
+ Colors_Button_Notification = new QPushButton( Tab2 );
+ Colors_Button_Notification->setPixmap( ColorsIcon );
+ connect( Colors_Button_Notification, SIGNAL( clicked() ), this, SLOT( slot_Color_Notification() ) );
+ GRID_Style->addWidget( Colors_Button_Notification, 10, 5 );
+
+ Colors_Button_Background = new QPushButton( Tab2 );
+ Colors_Button_Background->setPixmap( ColorsIcon );
+ connect( Colors_Button_Background, SIGNAL( clicked() ), this, SLOT( slot_Color_Background() ) );
+ GRID_Style->addWidget( Colors_Button_Background, 11, 5 );
+
+ resetSampleConsole();
+ TabParent->addTab( Tab2, i18n("Console") );
+}
+///////////////////////////////////////
+//
+// setPageDisplay::slot_setDefault
+//
+///////////////////////////////////////
+void setPageDisplay::slot_setDefault(void)
+{
+ Resource->FONT_Standard = KGlobalSettings::fixedFont();
+ Resource->FONT_PrivateTell = KGlobalSettings::fixedFont();
+ Resource->FONT_ChannelTell = KGlobalSettings::fixedFont();
+ Resource->FONT_Shout = KGlobalSettings::fixedFont();
+ Resource->FONT_Whisper = KGlobalSettings::fixedFont();
+ Resource->FONT_Notification = KGlobalSettings::fixedFont();
+ Resource->COLOR_Background = Resource->COLOR_White;
+ Resource->COLOR_Standard = Resource->COLOR_Black;
+ Resource->COLOR_PrivateTell = QColor( 128, 0, 128 ); // Purple
+ Resource->COLOR_ChannelTell = QColor( 0, 0, 160 ); // Blue
+ Resource->COLOR_Shout = QColor( 160, 0, 0 ); // Red
+ Resource->COLOR_Whisper = QColor( 0, 160, 0 ); // Green
+ Resource->COLOR_Notification = QColor( 0, 128, 128 ); // Cyan
+ resetSampleConsole();
+ rebuildConsole = TRUE;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageDisplay::slot_Font_?????
+//
+///////////////////////////////////////
+void setPageDisplay::slot_Font_Standard(void)
+{
+ int value = KFontDialog::getFont( Resource->FONT_Standard );
+ if( value != KFontDialog::Accepted ) return;
+ resetSampleConsole();
+ rebuildConsole = TRUE;
+ emit enableApply();
+}
+void setPageDisplay::slot_Font_PrivateTell(void)
+{
+ int value = KFontDialog::getFont( Resource->FONT_PrivateTell );
+ if( value != KFontDialog::Accepted ) return;
+ resetSampleConsole();
+ rebuildConsole = TRUE;
+ emit enableApply();
+}
+void setPageDisplay::slot_Font_ChannelTell(void)
+{
+ int value = KFontDialog::getFont( Resource->FONT_ChannelTell );
+ if( value != KFontDialog::Accepted ) return;
+ resetSampleConsole();
+ rebuildConsole = TRUE;
+ emit enableApply();
+}
+void setPageDisplay::slot_Font_Shout(void)
+{
+ int value = KFontDialog::getFont( Resource->FONT_Shout );
+ if( value != KFontDialog::Accepted ) return;
+ resetSampleConsole();
+ rebuildConsole = TRUE;
+ emit enableApply();
+}
+void setPageDisplay::slot_Font_Whisper(void)
+{
+ int value = KFontDialog::getFont( Resource->FONT_Whisper );
+ if( value != KFontDialog::Accepted ) return;
+ resetSampleConsole();
+ rebuildConsole = TRUE;
+ emit enableApply();
+}
+void setPageDisplay::slot_Font_Notification(void)
+{
+ int value = KFontDialog::getFont( Resource->FONT_Notification );
+ if( value != KFontDialog::Accepted ) return;
+ resetSampleConsole();
+ rebuildConsole = TRUE;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageDisplay::slot_Color_?????
+//
+///////////////////////////////////////
+void setPageDisplay::slot_Color_Background(void)
+{
+ int value = KColorDialog::getColor( Resource->COLOR_Background );
+ if( value != KColorDialog::Accepted ) return;
+ resetSampleConsole();
+ rebuildConsole = TRUE;
+ emit enableApply();
+}
+void setPageDisplay::slot_Color_Standard(void)
+{
+ int value = KColorDialog::getColor( Resource->COLOR_Standard );
+ if( value != KColorDialog::Accepted ) return;
+ resetSampleConsole();
+ rebuildConsole = TRUE;
+ emit enableApply();
+}
+void setPageDisplay::slot_Color_PrivateTell(void)
+{
+ int value = KColorDialog::getColor( Resource->COLOR_PrivateTell );
+ if( value != KColorDialog::Accepted ) return;
+ resetSampleConsole();
+ rebuildConsole = TRUE;
+ emit enableApply();
+}
+void setPageDisplay::slot_Color_ChannelTell(void)
+{
+ int value = KColorDialog::getColor( Resource->COLOR_ChannelTell );
+ if( value != KColorDialog::Accepted ) return;
+ resetSampleConsole();
+ rebuildConsole = TRUE;
+ emit enableApply();
+}
+void setPageDisplay::slot_Color_Shout(void)
+{
+ int value = KColorDialog::getColor( Resource->COLOR_Shout );
+ if( value != KColorDialog::Accepted ) return;
+ resetSampleConsole();
+ rebuildConsole = TRUE;
+ emit enableApply();
+}
+void setPageDisplay::slot_Color_Whisper(void)
+{
+ int value = KColorDialog::getColor( Resource->COLOR_Whisper );
+ if( value != KColorDialog::Accepted ) return;
+ resetSampleConsole();
+ rebuildConsole = TRUE;
+ emit enableApply();
+}
+void setPageDisplay::slot_Color_Notification(void)
+{
+ int value = KColorDialog::getColor( Resource->COLOR_Notification );
+ if( value != KColorDialog::Accepted ) return;
+ resetSampleConsole();
+ rebuildConsole = TRUE;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageDisplay::slotCurrent_Boards
+//
+///////////////////////////////////////
+void setPageDisplay::slotCurrent_Boards( int Index )
+{
+ NewBoards = Index;
+ changeTheme = TRUE;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageDisplay::slotCurrent_Chessmen
+//
+///////////////////////////////////////
+void setPageDisplay::slotCurrent_Chessmen( int Index )
+{
+ NewChessmen = Index;
+ changeTheme = TRUE;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageDisplay::slotCurrent_Theme_Size
+//
+///////////////////////////////////////
+void setPageDisplay::slotCurrent_Theme_Size( int Index )
+{
+ Resource->ThemeSize = 32 + ( Index * 8 );
+ changeTheme = TRUE;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageDisplay::slotToggle_Board_Orientation
+//
+///////////////////////////////////////
+void setPageDisplay::slotToggle_Board_Orientation( bool state )
+{
+ Resource->OPTION_Board_Orientation = state;
+ refreshBoard = TRUE;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageDisplay::slotToggle_Splashscreen
+//
+///////////////////////////////////////
+void setPageDisplay::slotToggle_Splashscreen( bool state )
+{
+ Resource->OPTION_Show_Splash = state;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageDisplay::slotToggle_Auto_Preview
+//
+///////////////////////////////////////
+void setPageDisplay::slotToggle_Auto_Preview( bool state )
+{
+ Resource->OPTION_Auto_Preview = state;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageDisplay::slotToggle_Show_Last_Move
+//
+///////////////////////////////////////
+void setPageDisplay::slotToggle_Show_Last_Move( bool state )
+{
+ Resource->OPTION_Show_Last_Move = state;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageDisplay::slotToggle_Animate_Move
+//
+///////////////////////////////////////
+void setPageDisplay::slotToggle_Animate_Move( bool state )
+{
+ Resource->OPTION_Animate_Moves = state;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageDisplay::slotToggle_Show_Coord
+//
+///////////////////////////////////////
+void setPageDisplay::slotToggle_Show_Coord( bool state )
+{
+ Resource->OPTION_Show_Coord = state;
+ refreshBoard = TRUE;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageDisplay::buildThemeList
+//
+///////////////////////////////////////
+void setPageDisplay::buildThemeList( void )
+{
+ QString buffer;
+ int tmp(0);
+
+ Current_Boards->clear();
+ Current_Chessmen->clear();
+ Resource->readThemeDir();
+ while(1)
+ {
+ buffer = Resource->getBoard( tmp );
+ if( buffer.isEmpty() ) break;
+ buffer.remove( 0, 2 );
+ buffer.replace( QRegExp("_"), " " );
+ buffer.replace( QRegExp(".tar"), "" );
+ buffer.replace( QRegExp(".gz"), "" );
+ buffer.replace( QRegExp(".bz2"), "" );
+ Current_Boards->insertItem( buffer, tmp );
+ if( Resource->getBoard() == Resource->getBoard( tmp ) )
+ {
+ Current_Boards->setCurrentItem( tmp );
+ NewBoards = tmp;
+ }
+ tmp++;
+ }
+ /* ...and for Chessmen */
+ tmp = 0;
+ while(1)
+ {
+ buffer = Resource->getChessmen( tmp );
+ if( buffer.isEmpty() ) break;
+ buffer.remove( 0, 2 );
+ buffer.replace( QRegExp("_"), " " );
+ buffer.replace( QRegExp(".tar"), "" );
+ buffer.replace( QRegExp(".gz"), "" );
+ buffer.replace( QRegExp(".bz2"), "" );
+ Current_Chessmen->insertItem( buffer, tmp );
+ if( Resource->getChessmen() == Resource->getChessmen( tmp ) )
+ {
+ Current_Chessmen->setCurrentItem( tmp );
+ NewChessmen = tmp;
+ }
+ tmp++;
+ }
+}
+///////////////////////////////////////
+//
+// setPageDisplay::resetSampleConsole
+//
+///////////////////////////////////////
+void setPageDisplay::resetSampleConsole( void )
+{
+ Resource->buildStyle();
+ Console_Sample->setPaper( QBrush( Resource->COLOR_Background ) );
+ Console_Sample->setText( QString( "<K_STD>" + i18n( "Standard" ) + "</K_STD>\n" ) );
+ Console_Sample->append( QString( "<K_PVT>" + i18n( "Private Tell" ) + "</K_PVT>\n" ) );
+ Console_Sample->append( QString( "<K_CH>" + i18n( "Channel Tell" ) + "</K_CH>\n" ) );
+ Console_Sample->append( QString( "<K_SHT>" + i18n( "Shout" ) + "</K_SHT>\n" ) );
+ Console_Sample->append( QString( "<K_WSP>" + i18n( "Whisper" ) + "</K_WSP>\n" ) );
+ Console_Sample->append( QString( "<K_NOT>" + i18n( "Notification" ) + "</K_NOT>" ) );
+}
+///////////////////////////////////////
+//
+// setPageDisplay::slot_SCID_Images
+//
+///////////////////////////////////////
+void setPageDisplay::slot_SCID_Images( const QString& string )
+{
+ Resource->SCID_Image_Path = string;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageDisplay::slot_SCID_Images_Button
+//
+///////////////////////////////////////
+void setPageDisplay::slot_SCID_Images_Button( void )
+{
+ QString temp;
+
+ temp = KFileDialog::getOpenFileName( QString::null,
+ QString( "*" ),
+ Tab1,
+ i18n( "Find Player Images File..." ) );
+ if( temp.isEmpty() ) return;
+ EDIT_SCID_Images->setText( temp );
+ Resource->SCID_Image_Path = temp;
+ emit enableApply();
+}
+
+
diff --git a/knights/setpagedisplay.h b/knights/setpagedisplay.h
new file mode 100644
index 0000000..d69fc59
--- /dev/null
+++ b/knights/setpagedisplay.h
@@ -0,0 +1,139 @@
+/***************************************************************************
+ setpagedisplay.h - description
+ -------------------
+ begin : Thu Aug 16 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef SETPAGEDISPLAY_H
+#define SETPAGEDISPLAY_H
+
+#include <klineedit.h>
+#include <kcombobox.h>
+#include <qtextview.h>
+#include <qtabwidget.h>
+#include <qbuttongroup.h>
+#include <qpushbutton.h>
+#include <qslider.h>
+#include <qlabel.h>
+#include <qhbox.h>
+#include <qvbox.h>
+#include <qcheckbox.h>
+#include <qradiobutton.h>
+#include <qlayout.h>
+#include "resource.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class setPageDisplay : public QVBoxLayout
+{
+ Q_OBJECT
+
+ public:
+ setPageDisplay(QWidget *parent=0, resource *Rsrc=0);
+ ~setPageDisplay();
+ void buildThemeList( void );
+ int NewBoards;
+ int NewChessmen;
+ bool changeTheme;
+ bool refreshBoard;
+ bool rebuildConsole;
+
+ public slots:
+ void slotCurrent_Boards( int );
+ void slotCurrent_Chessmen( int );
+ void slotCurrent_Theme_Size( int );
+ void slotToggle_Board_Orientation( bool );
+ void slotToggle_Splashscreen( bool );
+ void slotToggle_Auto_Preview( bool );
+ void slotToggle_Show_Last_Move( bool );
+ void slotToggle_Animate_Move( bool );
+ void slotToggle_Show_Coord( bool );
+ void slot_SCID_Images( const QString& );
+ void slot_SCID_Images_Button( void );
+
+ void slot_setDefault(void);
+
+ void slot_Color_Background(void);
+ void slot_Color_Standard(void);
+ void slot_Color_PrivateTell(void);
+ void slot_Color_ChannelTell(void);
+ void slot_Color_Shout(void);
+ void slot_Color_Whisper(void);
+ void slot_Color_Notification(void);
+ void slot_Font_Standard(void);
+ void slot_Font_PrivateTell(void);
+ void slot_Font_ChannelTell(void);
+ void slot_Font_Shout(void);
+ void slot_Font_Whisper(void);
+ void slot_Font_Notification(void);
+
+ signals:
+ void enableApply( void );
+
+ protected:
+ void initTab1( void );
+ void initTab2( void );
+ void resetSampleConsole( void );
+
+ private:
+ resource *Resource;
+ int margin;
+
+ QTabWidget *TabParent;
+
+ /* Tab 1 : General */
+ QVBox *Tab1;
+ QHBox *BOX_Themes;
+ QGroupBox *GROUP_Boards;
+ KComboBox *Current_Boards;
+ QGroupBox *GROUP_Chessmen;
+ KComboBox *Current_Chessmen;
+ QGroupBox *GROUP_Theme_Size;
+ QLabel *Size_Min;
+ QSlider *Current_Theme_Size;
+ QLabel *Size_Max;
+ QGroupBox *GROUP_SCID_Images;
+ KLineEdit *EDIT_SCID_Images;
+ QPushButton *BUTTON_SCID_Images;
+ QGroupBox *GROUP_General_Graphics;
+ QCheckBox *Board_Orientation;
+ QCheckBox *Show_Splashscreen;
+ QCheckBox *Auto_Preview;
+ QCheckBox *Show_Last_Move;
+ QCheckBox *Animate_Move;
+ QCheckBox *Show_Coord;
+
+ /* Tab 2 : Console */
+ QFrame *Tab2;
+ QGridLayout *GRID_Style;
+ QTextView *Console_Sample;
+ QPushButton *Default_Button;
+ QPushButton *Fonts_Button_Standard;
+ QPushButton *Fonts_Button_PrivateTell;
+ QPushButton *Fonts_Button_ChannelTell;
+ QPushButton *Fonts_Button_Shout;
+ QPushButton *Fonts_Button_Whisper;
+ QPushButton *Fonts_Button_Notification;
+ QPushButton *Colors_Button_Standard;
+ QPushButton *Colors_Button_PrivateTell;
+ QPushButton *Colors_Button_ChannelTell;
+ QPushButton *Colors_Button_Shout;
+ QPushButton *Colors_Button_Whisper;
+ QPushButton *Colors_Button_Notification;
+ QPushButton *Colors_Button_Background;
+};
+
+#endif
diff --git a/knights/setpageengines.cpp b/knights/setpageengines.cpp
new file mode 100644
index 0000000..938d001
--- /dev/null
+++ b/knights/setpageengines.cpp
@@ -0,0 +1,362 @@
+/***************************************************************************
+ setpageengines.cpp - description
+ -------------------
+ begin : Thu Aug 16 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "setpageengines.moc"
+
+setPageEngines::setPageEngines(QWidget *parent, resource *Rsrc ) : QVBoxLayout(parent)
+{
+ Parent = parent;
+ Resource = Rsrc;
+ Engine_Dialog = NULL;
+ Engines_ListView = NULL;
+
+ BOX_Current = new QHBox( parent );
+ addWidget( BOX_Current );
+
+ /* Engines to play White */
+ GROUP_White_Current = new QGroupBox( 3,
+ Qt::Vertical,
+ i18n( "Engines to Play White" ),
+ BOX_Current );
+
+ White_Use_Book = new QCheckBox( i18n( "Enable Book Engine" ), GROUP_White_Current );
+ Engines_White = new KComboBox ( GROUP_White_Current );
+ Engines_White_Book = new KComboBox ( GROUP_White_Current );
+ Engines_White->setEditable( FALSE );
+ Engines_White_Book->setEditable( FALSE );
+
+ /* Engines to play Black */
+ GROUP_Black_Current = new QGroupBox( 3,
+ Qt::Vertical,
+ i18n( "Engines to Play Black" ),
+ BOX_Current );
+
+ Black_Use_Book = new QCheckBox( i18n( "Enable Book Engine" ), GROUP_Black_Current );
+ Engines_Black = new KComboBox ( GROUP_Black_Current );
+ Engines_Black_Book = new KComboBox ( GROUP_Black_Current );
+ Engines_Black->setEditable( FALSE );
+ Engines_Black_Book->setEditable( FALSE );
+
+ /* Chess Engines ListView */
+ GROUP_Engines = new QGroupBox( 2,
+ Qt::Horizontal,
+ i18n( "Chess Engines" ),
+ parent );
+ addWidget( GROUP_Engines );
+
+ Engines_ListView = new KListView( GROUP_Engines );
+ Engines_ListView->addColumn( i18n( "Name" ) );
+ Engines_ListView->addColumn( i18n( "Protocol" ) );
+ Engines_ListView->addColumn( i18n( "Wins" ) );
+ Engines_ListView->addColumn( i18n( "Losses" ) );
+ Engines_ListView->addColumn( i18n( "Draws" ) );
+ Engines_ListView->setAllColumnsShowFocus( TRUE );
+ Engines_ListView->setMultiSelection( FALSE );
+ Engines_ListView->setShowSortIndicator( TRUE );
+ Engines_ListView->restoreLayout( kapp->config(), "Engines_ListView" );
+
+ Engines_ButtonBox = new KButtonBox( GROUP_Engines, Vertical );
+ Engines_Button_Add = Engines_ButtonBox->addButton( i18n( "&Add..." ) );
+ Engines_Button_Change = Engines_ButtonBox->addButton( i18n( "&Modify..." ) );
+ Engines_Button_Delete = Engines_ButtonBox->addButton( i18n( "&Delete..." ) );
+ Engines_ButtonBox->layout();
+
+ BuildEngineData();
+
+ connect( Engines_Button_Add, SIGNAL( clicked() ), this, SLOT( slotEngine_Add() ) );
+ connect( Engines_Button_Change, SIGNAL( clicked() ), this, SLOT( slotEngine_Modify() ) );
+ connect( Engines_Button_Delete, SIGNAL( clicked() ), this, SLOT( slotEngine_Delete() ) );
+ connect( Engines_White, SIGNAL( activated(int) ), this, SLOT( slotCurrent_White(int) ) );
+ connect( Engines_White_Book, SIGNAL( activated(int) ), this, SLOT( slotCurrent_White_Book(int) ) );
+ connect( Engines_Black, SIGNAL( activated(int) ), this, SLOT( slotCurrent_Black(int) ) );
+ connect( Engines_Black_Book, SIGNAL( activated(int) ), this, SLOT( slotCurrent_Black_Book(int) ) );
+ connect( White_Use_Book, SIGNAL( toggled(bool) ), this, SLOT( slotToggle_White_Book(bool) ) );
+ connect( Black_Use_Book, SIGNAL( toggled(bool) ), this, SLOT( slotToggle_Black_Book(bool) ) );
+ connect( Engines_ListView, SIGNAL( selectionChanged() ), this, SLOT( selectionChanged() ) );
+}
+setPageEngines::~setPageEngines()
+{
+ Engines_ListView->saveLayout( kapp->config(), "Engines_ListView" );
+ delete Engines_ButtonBox;
+ delete Engines_ListView;
+ delete GROUP_Engines;
+ delete GROUP_Black_Current;
+ delete GROUP_White_Current;
+}
+///////////////////////////////////////
+//
+// setPageEngines::BuildEngineData
+//
+///////////////////////////////////////
+void setPageEngines::BuildEngineData( void )
+{
+ bool WHITE_FLAG(FALSE),
+ WHITE_BK_FLAG(FALSE),
+ BLACK_FLAG(FALSE),
+ BLACK_BK_FLAG(FALSE);
+ QStringList EngineList;
+ QString proto;
+ int Index(0);
+ engineList::Iterator enginesIT;
+
+ /* Clear Comboboxes */
+ Engines_White->clear();
+ Engines_White_Book->clear();
+ Engines_Black->clear();
+ Engines_Black_Book->clear();
+ Engines_ListView->clear();
+
+ /* Handle status of Book-engine boxes */
+ White_Use_Book->setChecked( Resource->OPTION_Book_White );
+ Black_Use_Book->setChecked( Resource->OPTION_Book_Black );
+ Engines_White_Book->setEnabled( Resource->OPTION_Book_White );
+ Engines_Black_Book->setEnabled( Resource->OPTION_Book_Black );
+
+ /* Read the engine list */
+ if( Resource->engines.isEmpty() ) return;
+ for ( enginesIT = Resource->engines.begin(); enginesIT != Resource->engines.end(); ++enginesIT )
+ {
+ switch( (*enginesIT).Protocol )
+ {
+ case UCI:
+ proto = "UCI";
+ break;
+ case XBoard: // Fall through
+ default:
+ proto = "XBoard";
+ break;
+ }
+ (void) new QListViewItem( Engines_ListView,
+ (*enginesIT).Name,
+ proto,
+ QString( "%1" ).arg( (*enginesIT).Wins ),
+ QString( "%1" ).arg( (*enginesIT).Losses ),
+ QString( "%1" ).arg( (*enginesIT).Draws ) );
+ EngineList.append( (*enginesIT).Name );
+ }
+
+ /* Insert engines into comboboxes */
+ EngineList.sort();
+ Engines_White->insertStringList( EngineList );
+ Engines_Black->insertStringList( EngineList );
+ Engines_White_Book->insertStringList( EngineList );
+ Engines_Black_Book->insertStringList( EngineList );
+
+ /* Now run the list again, setting the current engine for each combobox */
+ for ( enginesIT = Resource->engines.begin(); enginesIT != Resource->engines.end(); ++enginesIT )
+ {
+ if( (*enginesIT).CurrentRef & ENGINE_WHITE_BK )
+ for( Index = 0; Index < Engines_White_Book->count(); Index++ )
+ if( Engines_White_Book->text(Index) == (*enginesIT).Name )
+ {
+ Engines_White_Book->setCurrentItem(Index);
+ WHITE_BK_FLAG = TRUE;
+ }
+ if( (*enginesIT).CurrentRef & ENGINE_BLACK_BK )
+ for( Index = 0; Index < Engines_Black_Book->count(); Index++ )
+ if( Engines_Black_Book->text(Index) == (*enginesIT).Name )
+ {
+ Engines_Black_Book->setCurrentItem(Index);
+ BLACK_BK_FLAG = TRUE;
+ }
+ if( (*enginesIT).CurrentRef & ENGINE_WHITE )
+ for( Index = 0; Index < Engines_White->count(); Index++ )
+ if( Engines_White->text(Index) == (*enginesIT).Name )
+ {
+ Engines_White->setCurrentItem(Index);
+ WHITE_FLAG = TRUE;
+ }
+ if( (*enginesIT).CurrentRef & ENGINE_BLACK )
+ for( Index = 0; Index < Engines_Black->count(); Index++ )
+ if( Engines_Black->text(Index) == (*enginesIT).Name )
+ {
+ Engines_Black->setCurrentItem(Index);
+ BLACK_FLAG = TRUE;
+ }
+ }
+
+ /* This prevents a bug where you had to modify the current_engine_comboboxes
+ before you could get any engines to run. */
+ if( ( !WHITE_FLAG ) && ( Engines_White->count() ) ) slotCurrent_White( Engines_White->currentItem() );
+ if( ( !BLACK_FLAG ) && ( Engines_Black->count() ) ) slotCurrent_Black( Engines_Black->currentItem() );
+ if( ( !WHITE_BK_FLAG ) && ( Engines_White_Book->count() ) ) slotCurrent_White_Book( Engines_White_Book->currentItem() );
+ if( ( !BLACK_BK_FLAG ) && ( Engines_Black_Book->count() ) ) slotCurrent_Black_Book( Engines_Black_Book->currentItem() );
+
+ Engines_Button_Change->setEnabled( FALSE );
+ Engines_Button_Delete->setEnabled( FALSE );
+}
+///////////////////////////////////////
+//
+// setPageEngines::slotEngine_Add
+//
+///////////////////////////////////////
+void setPageEngines::slotEngine_Add( void )
+{
+ Engine_Dialog = new dlg_engine( Parent, "EngineDialog", Resource );
+ connect( Engine_Dialog, SIGNAL( destroyed() ), this, SLOT( BuildEngineData() ) );
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageEngines::slotEngine_Modify
+//
+///////////////////////////////////////
+void setPageEngines::slotEngine_Modify( void )
+{
+ QListViewItem *Item;
+ QList<QListViewItem> Select = Engines_ListView->selectedItems();
+
+ if( Select.isEmpty() ) return;
+ Item = Select.first();
+ Engine_Dialog = new dlg_engine( Parent, "EngineDialog", Resource, Item->text(0) );
+ connect( Engine_Dialog, SIGNAL( destroyed() ), this, SLOT( BuildEngineData() ) );
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageEngines::slotEngine_Delete
+//
+///////////////////////////////////////
+void setPageEngines::slotEngine_Delete( void )
+{
+ engineList::Iterator enginesIT;
+ QListViewItem *Item;
+ QList<QListViewItem> Select = Engines_ListView->selectedItems();
+
+ if( Select.isEmpty() ) return;
+ Item = Select.first();
+
+ for ( enginesIT = Resource->engines.begin(); enginesIT != Resource->engines.end(); ++enginesIT )
+ {
+ if( (*enginesIT).Name == Item->text(0) ) break;
+ }
+ Resource->engines.remove(enginesIT);
+ BuildEngineData();
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageEngines::slotCurrent_White
+//
+///////////////////////////////////////
+void setPageEngines::slotCurrent_White( int Index )
+{
+ QString Name;
+ engineList::Iterator enginesIT;
+
+ Name = Engines_White->text(Index);
+ for ( enginesIT = Resource->engines.begin(); enginesIT != Resource->engines.end(); ++enginesIT )
+ {
+ if( (*enginesIT).CurrentRef & ENGINE_WHITE ) (*enginesIT).CurrentRef -= ENGINE_WHITE;
+ if( (*enginesIT).Name == Name ) (*enginesIT).CurrentRef |= ENGINE_WHITE;
+ }
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageEngines::slotCurrent_White_Book
+//
+///////////////////////////////////////
+void setPageEngines::slotCurrent_White_Book( int Index )
+{
+ QString Name;
+ engineList::Iterator enginesIT;
+
+ Name = Engines_White_Book->text(Index);
+ for ( enginesIT = Resource->engines.begin(); enginesIT != Resource->engines.end(); ++enginesIT )
+ {
+ if( (*enginesIT).CurrentRef & ENGINE_WHITE_BK ) (*enginesIT).CurrentRef -= ENGINE_WHITE_BK;
+ if( (*enginesIT).Name == Name ) (*enginesIT).CurrentRef |= ENGINE_WHITE_BK;
+ }
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageEngines::slotCurrent_Black
+//
+///////////////////////////////////////
+void setPageEngines::slotCurrent_Black( int Index )
+{
+ QString Name;
+ engineList::Iterator enginesIT;
+
+ Name = Engines_Black->text(Index);
+ for ( enginesIT = Resource->engines.begin(); enginesIT != Resource->engines.end(); ++enginesIT )
+ {
+ if( (*enginesIT).CurrentRef & ENGINE_BLACK ) (*enginesIT).CurrentRef -= ENGINE_BLACK;
+ if( (*enginesIT).Name == Name ) (*enginesIT).CurrentRef |= ENGINE_BLACK;
+ }
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageEngines::slotCurrent_Black_Book
+//
+///////////////////////////////////////
+void setPageEngines::slotCurrent_Black_Book( int Index )
+{
+ QString Name;
+ engineList::Iterator enginesIT;
+
+ Name = Engines_Black_Book->text(Index);
+ for ( enginesIT = Resource->engines.begin(); enginesIT != Resource->engines.end(); ++enginesIT )
+ {
+ if( (*enginesIT).CurrentRef & ENGINE_BLACK_BK ) (*enginesIT).CurrentRef -= ENGINE_BLACK_BK;
+ if( (*enginesIT).Name == Name ) (*enginesIT).CurrentRef |= ENGINE_BLACK_BK;
+ }
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageEngines::slotToggle_White_Book
+//
+///////////////////////////////////////
+void setPageEngines::slotToggle_White_Book( bool state )
+{
+ Resource->OPTION_Book_White = state;
+ BuildEngineData();
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageEngines::slotToggle_Black_Book
+//
+///////////////////////////////////////
+void setPageEngines::slotToggle_Black_Book( bool state )
+{
+ Resource->OPTION_Book_Black = state;
+ BuildEngineData();
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageEngines::selectionChanged
+//
+///////////////////////////////////////
+void setPageEngines::selectionChanged( void )
+{
+ if( Engines_ListView->selectedItem() == 0 )
+ {
+ Engines_Button_Change->setEnabled( FALSE );
+ Engines_Button_Delete->setEnabled( FALSE );
+ }
+ else
+ {
+ Engines_Button_Change->setEnabled( TRUE );
+ Engines_Button_Delete->setEnabled( TRUE );
+ }
+}
diff --git a/knights/setpageengines.h b/knights/setpageengines.h
new file mode 100644
index 0000000..130b151
--- /dev/null
+++ b/knights/setpageengines.h
@@ -0,0 +1,90 @@
+/***************************************************************************
+ setpageengines.h - description
+ -------------------
+ begin : Thu Aug 16 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef SETPAGEENGINES_H
+#define SETPAGEENGINES_H
+
+#include <kbuttonbox.h>
+#include <klistview.h>
+#include <kcombobox.h>
+#include <qstringlist.h>
+#include <qcheckbox.h>
+#include <qwidget.h>
+#include <qgroupbox.h>
+#include <qptrlist.h>
+#include <qhbox.h>
+#include <qlayout.h>
+#include "resource.h"
+#include "dlg_engine.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class setPageEngines : public QVBoxLayout
+{
+ Q_OBJECT
+ public:
+ setPageEngines(QWidget *parent=0, resource *Rsrc=0);
+ ~setPageEngines();
+
+ public slots:
+
+ void slotEngine_Add( void );
+ void slotEngine_Modify( void );
+ void slotEngine_Delete( void );
+
+ void slotCurrent_White( int );
+ void slotCurrent_White_Book( int );
+ void slotCurrent_Black( int );
+ void slotCurrent_Black_Book( int );
+
+ void slotToggle_White_Book( bool );
+ void slotToggle_Black_Book( bool );
+
+ signals:
+
+ void enableApply( void );
+
+ protected slots:
+ void BuildEngineData( void );
+ void selectionChanged( void );
+
+ private:
+ QWidget *Parent;
+ resource *Resource;
+
+ QHBox *BOX_Current;
+ QGroupBox *GROUP_White_Current;
+ KComboBox *Engines_White;
+ QCheckBox *White_Use_Book;
+ KComboBox *Engines_White_Book;
+ QGroupBox *GROUP_Black_Current;
+ KComboBox *Engines_Black;
+ QCheckBox *Black_Use_Book;
+ KComboBox *Engines_Black_Book;
+
+ QGroupBox *GROUP_Engines;
+ KListView *Engines_ListView;
+ KButtonBox *Engines_ButtonBox;
+ QPushButton *Engines_Button_Add;
+ QPushButton *Engines_Button_Change;
+ QPushButton *Engines_Button_Delete;
+ dlg_engine *Engine_Dialog;
+};
+
+#endif
diff --git a/knights/setpagegeneral.cpp b/knights/setpagegeneral.cpp
new file mode 100644
index 0000000..d79b8c9
--- /dev/null
+++ b/knights/setpagegeneral.cpp
@@ -0,0 +1,224 @@
+/***************************************************************************
+ setpagegeneral.cpp - description
+ -------------------
+ begin : Fri Nov 23 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <kfiledialog.h>
+#include <kicontheme.h>
+#include "setpagegeneral.moc"
+
+setPageGeneral::setPageGeneral(QWidget *parent, resource *Rsrc ) : QVBoxLayout(parent)
+{
+ Parent = parent;
+ Resource = Rsrc;
+
+ GROUP_UserName = new QGroupBox( 1,
+ Qt::Horizontal,
+ i18n( "Your Name:" ),
+ parent );
+ addWidget( GROUP_UserName );
+ EDIT_UserName = new KLineEdit( GROUP_UserName );
+ EDIT_UserName->setText( Resource->Local_Player );
+ connect( EDIT_UserName, SIGNAL( textChanged(const QString&) ), this, SLOT( slot_UserName(const QString&) ) );
+
+ BOX_SaveInit = new QHBox( parent );
+ addWidget( BOX_SaveInit );
+
+ GROUP_OnInit = new QButtonGroup( 3, Qt::Vertical, i18n("When Knights Begins It Should:"), BOX_SaveInit );
+ BUTTON_Init_Nothing = new QRadioButton( i18n( "Do Nothing" ), GROUP_OnInit );
+ BUTTON_Init_VsPC = new QRadioButton( i18n( "Start a Match vs. PC" ), GROUP_OnInit );
+ BUTTON_Init_Connect = new QRadioButton( i18n( "Connect to ICS" ), GROUP_OnInit );
+ GROUP_OnInit->setExclusive( TRUE );
+ if( Resource->OPTION_On_Init == 0 ) GROUP_OnInit->setButton( 0 );
+ else if( Resource->OPTION_On_Init == MENU_VS_PC ) GROUP_OnInit->setButton( 1 );
+ else GROUP_OnInit->setButton( 2 );
+ connect( GROUP_OnInit, SIGNAL( clicked(int) ),
+ this, SLOT( slot_Init(int) ) );
+
+ GROUP_AutoSave = new QButtonGroup( 3, Qt::Vertical, i18n("Save Match on Close?"), BOX_SaveInit );
+ BUTTON_AutoSave_Yes = new QRadioButton( i18n( "Yes" ), GROUP_AutoSave );
+ BUTTON_AutoSave_No = new QRadioButton( i18n( "No" ), GROUP_AutoSave );
+ BUTTON_AutoSave_Ask = new QRadioButton( i18n( "Ask" ), GROUP_AutoSave );
+ GROUP_AutoSave->setExclusive( TRUE );
+ if( Resource->PromptForSaving == "Yes" ) GROUP_AutoSave->setButton( 0 );
+ else if( Resource->PromptForSaving == "No" ) GROUP_AutoSave->setButton( 1 );
+ else GROUP_AutoSave->setButton( 2 );
+ connect( GROUP_AutoSave, SIGNAL( clicked(int) ),
+ this, SLOT( slot_AutoSave(int) ) );
+
+ GROUP_Reuse_PGN = new QGroupBox( 2,
+ Qt::Vertical,
+ i18n( "Append to Save File:" ),
+ parent );
+ addWidget( GROUP_Reuse_PGN );
+ BUTTON_Reuse_PGN = new QCheckBox( i18n( "Append to Save File" ), GROUP_Reuse_PGN );
+ BUTTON_Reuse_PGN->setChecked( Resource->OPTION_Reuse_PGN );
+ connect( BUTTON_Reuse_PGN, SIGNAL( toggled(bool) ),
+ this, SLOT( slot_Reuse_PGN(bool) ) );
+
+ BOX_Reuse_PGN = new QHBox( GROUP_Reuse_PGN );
+ EDIT_PGN_Filename = new KLineEdit( BOX_Reuse_PGN );
+ EDIT_PGN_Filename->setText( Resource->PGN_Filename );
+ connect( EDIT_PGN_Filename, SIGNAL( textChanged(const QString&) ), this, SLOT( slot_PGN_Filename(const QString&) ) );
+ BUTTON_PGN_Filename = new QPushButton( BOX_Reuse_PGN );
+ BUTTON_PGN_Filename->setPixmap( Resource->LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) );
+ connect( BUTTON_PGN_Filename, SIGNAL( clicked() ), this, SLOT( slot_PGN_Filename_Button() ) );
+ EDIT_PGN_Filename->setEnabled( Resource->OPTION_Reuse_PGN );
+ BUTTON_PGN_Filename->setEnabled( Resource->OPTION_Reuse_PGN );
+
+ BUTTON_Pause_On_Minimize = new QCheckBox( i18n( "Pause on Minimize" ), parent );
+ BUTTON_Pause_On_Minimize->setChecked( Resource->OPTION_Pause_On_Minimize );
+ connect( BUTTON_Pause_On_Minimize, SIGNAL( toggled(bool) ),
+ this, SLOT( slot_Pause_On_Minimize(bool) ) );
+ addWidget( BUTTON_Pause_On_Minimize );
+
+ BUTTON_Auto_Queen = new QCheckBox( i18n( "Always Promote to Queen" ), parent );
+ BUTTON_Auto_Queen->setChecked( Resource->OPTION_Auto_Queen );
+ connect( BUTTON_Auto_Queen, SIGNAL( toggled(bool) ),
+ this, SLOT( slot_Auto_Queen(bool) ) );
+ addWidget( BUTTON_Auto_Queen );
+
+ BUTTON_Auto_Flag = new QCheckBox( i18n( "Call Flag Automatically" ), parent );
+ BUTTON_Auto_Flag->setChecked( Resource->OPTION_Auto_Call_Flag );
+ connect( BUTTON_Auto_Flag, SIGNAL( toggled(bool) ),
+ this, SLOT( slot_Auto_Flag(bool) ) );
+ addWidget( BUTTON_Auto_Flag );
+}
+setPageGeneral::~setPageGeneral()
+{
+}
+///////////////////////////////////////
+//
+// setPageGeneral::slot_AutoSave
+//
+///////////////////////////////////////
+void setPageGeneral::slot_AutoSave( int state )
+{
+ switch( state )
+ {
+ case 0:
+ Resource->PromptForSaving = "Yes";
+ break;
+ case 1:
+ Resource->PromptForSaving = "No";
+ break;
+ case 2:
+ Resource->PromptForSaving = "";
+ break;
+ }
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageGeneral::slot_Init
+//
+///////////////////////////////////////
+void setPageGeneral::slot_Init( int state )
+{
+ switch( state )
+ {
+ case 0:
+ Resource->OPTION_On_Init = 0;
+ break;
+ case 1:
+ Resource->OPTION_On_Init = MENU_VS_PC;
+ break;
+ case 2:
+ Resource->OPTION_On_Init = MENU_CONNECT;
+ break;
+ }
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageGeneral::slot_Pause_On_Minimize
+//
+///////////////////////////////////////
+void setPageGeneral::slot_Pause_On_Minimize( bool state )
+{
+ Resource->OPTION_Pause_On_Minimize = state;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageGeneral::slot_Auto_Queen
+//
+///////////////////////////////////////
+void setPageGeneral::slot_Auto_Queen( bool state )
+{
+ Resource->OPTION_Auto_Queen = state;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageGeneral::slot_Auto_Flag
+//
+///////////////////////////////////////
+void setPageGeneral::slot_Auto_Flag( bool state )
+{
+ Resource->OPTION_Auto_Call_Flag = state;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageGeneral::slot_UserName
+//
+///////////////////////////////////////
+void setPageGeneral::slot_UserName( const QString& string )
+{
+ Resource->Local_Player = string;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageGeneral::slot_Reuse_PGN
+//
+///////////////////////////////////////
+void setPageGeneral::slot_Reuse_PGN( bool state )
+{
+ Resource->OPTION_Reuse_PGN = state;
+ EDIT_PGN_Filename->setEnabled( state );
+ BUTTON_PGN_Filename->setEnabled( state );
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageGeneral::slot_PGN_Filename
+//
+///////////////////////////////////////
+void setPageGeneral::slot_PGN_Filename( const QString& string )
+{
+ Resource->PGN_Filename = string;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageGeneral::slot_PGN_Filename_Button
+//
+///////////////////////////////////////
+void setPageGeneral::slot_PGN_Filename_Button( void )
+{
+ QString temp;
+
+ temp = KFileDialog::getOpenFileName( QString::null,
+ QString( "*" ),
+ BOX_Reuse_PGN,
+ i18n( "Find PGN..." ) );
+ if( temp.isEmpty() ) return;
+ EDIT_PGN_Filename->setText( temp );
+ Resource->PGN_Filename = temp;
+ emit enableApply();
+}
+
diff --git a/knights/setpagegeneral.h b/knights/setpagegeneral.h
new file mode 100644
index 0000000..16ada66
--- /dev/null
+++ b/knights/setpagegeneral.h
@@ -0,0 +1,80 @@
+/***************************************************************************
+ setpagegeneral.h - description
+ -------------------
+ begin : Fri Nov 23 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef SETPAGEGENERAL_H
+#define SETPAGEGENERAL_H
+
+#include <klineedit.h>
+#include <qwidget.h>
+#include <qhbox.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qgroupbox.h>
+#include <qbuttongroup.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qcheckbox.h>
+#include "resource.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class setPageGeneral : public QVBoxLayout
+{
+ Q_OBJECT
+ public:
+ setPageGeneral(QWidget *parent=0, resource *Rsrc=0);
+ ~setPageGeneral();
+ signals:
+ void enableApply( void );
+ public slots:
+ void slot_AutoSave( int state );
+ void slot_Init( int state );
+ void slot_UserName( const QString& );
+ void slot_Pause_On_Minimize( bool state );
+ void slot_Auto_Queen( bool state );
+ void slot_Auto_Flag( bool state );
+ void slot_Reuse_PGN( bool );
+ void slot_PGN_Filename( const QString& );
+ void slot_PGN_Filename_Button( void );
+ private:
+ QWidget *Parent;
+ resource *Resource;
+
+ QGroupBox *GROUP_UserName;
+ KLineEdit *EDIT_UserName;
+ QHBox *BOX_SaveInit;
+ QButtonGroup *GROUP_AutoSave;
+ QRadioButton *BUTTON_AutoSave_Yes;
+ QRadioButton *BUTTON_AutoSave_No;
+ QRadioButton *BUTTON_AutoSave_Ask;
+ QButtonGroup *GROUP_OnInit;
+ QRadioButton *BUTTON_Init_Nothing;
+ QRadioButton *BUTTON_Init_VsPC;
+ QRadioButton *BUTTON_Init_Connect;
+ QGroupBox *GROUP_Reuse_PGN;
+ QCheckBox *BUTTON_Reuse_PGN;
+ QHBox *BOX_Reuse_PGN;
+ KLineEdit *EDIT_PGN_Filename;
+ QPushButton *BUTTON_PGN_Filename;
+ QCheckBox *BUTTON_Pause_On_Minimize;
+ QCheckBox *BUTTON_Auto_Queen;
+ QCheckBox *BUTTON_Auto_Flag;
+};
+
+#endif
diff --git a/knights/setpageservers.cpp b/knights/setpageservers.cpp
new file mode 100644
index 0000000..8d570a1
--- /dev/null
+++ b/knights/setpageservers.cpp
@@ -0,0 +1,379 @@
+/***************************************************************************
+ setpageservers.cpp - description
+ -------------------
+ begin : Thu Aug 16 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "setpageservers.moc"
+#include <qstyle.h>
+#include <kicontheme.h>
+
+setPageServers::setPageServers(QWidget *parent, resource *Rsrc ) : QVBoxLayout(parent)
+{
+ QStyle& Style = QApplication::style();
+ margin = Style.defaultFrameWidth();
+ Resource = Rsrc;
+ Servers_ListView = NULL;
+ resetServer = FALSE;
+
+ TabParent = new QTabWidget( parent, "setPageDisplay" );
+ initTab1();
+ initTab2();
+ addWidget( TabParent );
+}
+setPageServers::~setPageServers()
+{
+ Servers_ListView->saveLayout( kapp->config(), "Servers_ListView" );
+ delete Servers_ButtonBox;
+ delete Servers_ListView;
+ delete GROUP_Servers;
+ delete GROUP_Current;
+}
+///////////////////////////////////////
+//
+// setPageServers::initTab1
+//
+///////////////////////////////////////
+void setPageServers::initTab1( void )
+{
+ Tab1 = new QVBox( TabParent );
+ Tab1->setMargin( margin );
+
+ /* Current Server */
+ GROUP_Current = new QGroupBox( 1,
+ Qt::Vertical,
+ i18n( "Current Server" ),
+ Tab1 );
+
+ Servers = new KComboBox ( GROUP_Current );
+ Servers->setEditable( FALSE );
+
+ /* Chess Servers ListView */
+ GROUP_Servers = new QGroupBox( 2,
+ Qt::Horizontal,
+ i18n( "Chess Servers" ),
+ Tab1 );
+
+ Servers_ListView = new KListView( GROUP_Servers );
+ Servers_ListView->addColumn( i18n( "Name" ) );
+ Servers_ListView->addColumn( i18n( "URL" ) );
+ Servers_ListView->setAllColumnsShowFocus( TRUE );
+ Servers_ListView->setMultiSelection( FALSE );
+ Servers_ListView->setShowSortIndicator( TRUE );
+ Servers_ListView->restoreLayout( kapp->config(), "Servers_ListView" );
+
+ Servers_ButtonBox = new KButtonBox( GROUP_Servers, Vertical );
+ Servers_Button_Add = Servers_ButtonBox->addButton( i18n( "&Add..." ) );
+ Servers_Button_Change = Servers_ButtonBox->addButton( i18n( "&Modify..." ) );
+ Servers_Button_Delete = Servers_ButtonBox->addButton( i18n( "&Delete..." ) );
+ Servers_ButtonBox->layout();
+
+ BuildServerData();
+
+ connect( Servers_Button_Add, SIGNAL( clicked() ), this, SLOT( slotServer_Add() ) );
+ connect( Servers_Button_Change, SIGNAL( clicked() ), this, SLOT( slotServer_Modify() ) );
+ connect( Servers_Button_Delete, SIGNAL( clicked() ), this, SLOT( slotServer_Delete() ) );
+ connect( Servers, SIGNAL( activated(int) ), this, SLOT( slotCurrent(int) ) );
+ connect( Servers_ListView, SIGNAL( selectionChanged() ), this, SLOT( selectionChanged() ) );
+
+ TabParent->addTab( Tab1, i18n("Servers") );
+}
+///////////////////////////////////////
+//
+// setPageServers::initTab2
+//
+///////////////////////////////////////
+void setPageServers::initTab2( void )
+{
+ QStringList FilterLevels;
+ Tab2 = new QVBox( TabParent );
+ Tab2->setMargin( margin );
+
+ /* Current Profanity Filter */
+ BOX_Profanity = new QGroupBox( 1,
+ Qt::Vertical,
+ i18n( "Profanity Filter" ),
+ Tab2 );
+ COMBO_Profanity = new KComboBox ( BOX_Profanity );
+ COMBO_Profanity->setEditable( FALSE );
+ FilterLevels << i18n("Filter Everything") << i18n("Default") << "---" << "---" << "---" << i18n("No Filtering");
+ COMBO_Profanity->insertStringList( FilterLevels );
+ COMBO_Profanity->setCurrentItem( Resource->OPTION_Profanity );
+ connect( COMBO_Profanity, SIGNAL( activated(int) ), this, SLOT( slot_Profanity(int) ) );
+
+ BUTTON_Auto_Close_ICS = new QCheckBox( i18n( "Automatically Close Previous ICS Match" ), Tab2 );
+ BUTTON_Auto_Close_ICS->setChecked( Resource->OPTION_Auto_Close_Last_ICS );
+ connect( BUTTON_Auto_Close_ICS, SIGNAL( toggled(bool) ),
+ this, SLOT( slot_Auto_Close_ICS(bool) ) );
+
+ BUTTON_Private = new QCheckBox( i18n( "Private Matches" ), Tab2 );
+ BUTTON_Private->setChecked( Resource->OPTION_Private );
+ connect( BUTTON_Private, SIGNAL( toggled(bool) ), this, SLOT( slot_Private(bool) ) );
+
+ BUTTON_Premove = new QCheckBox( i18n( "Enable Premove" ), Tab2 );
+ BUTTON_Premove->setChecked( Resource->OPTION_Premove );
+ connect( BUTTON_Premove, SIGNAL( toggled(bool) ), this, SLOT( slot_Premove(bool) ) );
+
+ BUTTON_Kibitz = new QCheckBox( i18n( "Enable Kibitzes" ), Tab2 );
+ BUTTON_Kibitz->setChecked( Resource->OPTION_Kibitz );
+ connect( BUTTON_Kibitz, SIGNAL( toggled(bool) ), this, SLOT( slot_Kibitz(bool) ) );
+
+ BUTTON_Tell = new QCheckBox( i18n( "Enable Unregistered Tells" ), Tab2 );
+ BUTTON_Tell->setChecked( Resource->OPTION_Tell );
+ connect( BUTTON_Tell, SIGNAL( toggled(bool) ), this, SLOT( slot_Tell(bool) ) );
+
+ BUTTON_Shout = new QCheckBox( i18n( "Enable Shouts" ), Tab2 );
+ BUTTON_Shout->setChecked( Resource->OPTION_Shout );
+ connect( BUTTON_Shout, SIGNAL( toggled(bool) ), this, SLOT( slot_Shout(bool) ) );
+
+ BUTTON_Seek = new QCheckBox( i18n( "Enable Seeks" ), Tab2 );
+ BUTTON_Seek->setChecked( Resource->OPTION_Seek );
+ connect( BUTTON_Seek, SIGNAL( toggled(bool) ), this, SLOT( slot_Seek(bool) ) );
+
+ BOX_SeekTimer = new QHBox( Tab2 );
+ BUTTON_SeekTimer = new QSpinBox( 3, 120, 1, BOX_SeekTimer );
+ BUTTON_SeekTimer->setSuffix( i18n(" sec.") );
+ BUTTON_SeekTimer->setValue( Resource->Seek_Timer / 10 );
+ connect( BUTTON_SeekTimer, SIGNAL( valueChanged(int) ),
+ this, SLOT( slot_SeekTimer(int) ) );
+ LABEL_SeekTimer = new QLabel( i18n("Seconds Between Seek Updates"), BOX_SeekTimer );
+
+ TabParent->addTab( Tab2, i18n("Options") );
+}
+///////////////////////////////////////
+//
+// setPageServers::BuildServerData
+//
+///////////////////////////////////////
+void setPageServers::BuildServerData( void )
+{
+ bool SERVER_FLAG(FALSE);
+ QStringList ServerList;
+ int Index(0);
+ serverList::Iterator serversIT;
+
+ /* Clear Comboboxes */
+ Servers->clear();
+ Servers_ListView->clear();
+ /* Read the server list */
+ if( Resource->servers.isEmpty() ) return;
+ for ( serversIT = Resource->servers.begin(); serversIT != Resource->servers.end(); ++serversIT )
+ {
+ (void) new QListViewItem( Servers_ListView,
+ (*serversIT).Name,
+ (*serversIT).URL );
+ ServerList.append( (*serversIT).Name );
+ }
+ /* Insert engines into comboboxes */
+ ServerList.sort();
+ Servers->insertStringList( ServerList );
+ /* Now run the list again, setting the current engine for each combobox */
+ for ( serversIT = Resource->servers.begin(); serversIT != Resource->servers.end(); ++serversIT )
+ {
+ if( (*serversIT).CurrentRef )
+ for( Index = 0; Index < Servers->count(); Index++ )
+ if( Servers->text(Index) == (*serversIT).Name )
+ {
+ Servers->setCurrentItem(Index);
+ SERVER_FLAG = TRUE;
+ }
+ }
+ /* This prevents a bug where you had to modify the current_server_combobox
+ before you could get any servers to run. */
+ if( ( !SERVER_FLAG ) && ( Servers->count() ) ) slotCurrent( Servers->currentItem() );
+
+ Servers_Button_Change->setEnabled( FALSE );
+ Servers_Button_Delete->setEnabled( FALSE );
+}
+///////////////////////////////////////
+//
+// setPageServers::slotServer_Add
+//
+///////////////////////////////////////
+void setPageServers::slotServer_Add( void )
+{
+ Server_Dialog = new dlg_server( TabParent, "ServerDialog", Resource );
+ connect( Server_Dialog, SIGNAL( destroyed() ), this, SLOT( BuildServerData() ) );
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageServers::slotServer_Modify
+//
+///////////////////////////////////////
+void setPageServers::slotServer_Modify( void )
+{
+ QListViewItem *Item;
+ QList<QListViewItem> Select = Servers_ListView->selectedItems();
+
+ if( Select.isEmpty() ) return;
+ Item = Select.first();
+ Server_Dialog = new dlg_server( TabParent, "ServerDialog", Resource, Item->text(0) );
+ connect( Server_Dialog, SIGNAL( destroyed() ), this, SLOT( BuildServerData() ) );
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageServers::slotServer_Delete
+//
+///////////////////////////////////////
+void setPageServers::slotServer_Delete( void )
+{
+ serverList::Iterator serversIT;
+ QListViewItem *Item;
+ QList<QListViewItem> Select = Servers_ListView->selectedItems();
+
+ if( Select.isEmpty() ) return;
+ Item = Select.first();
+
+ for ( serversIT = Resource->servers.begin(); serversIT != Resource->servers.end(); ++serversIT )
+ {
+ if( (*serversIT).Name == Item->text(0) ) break;
+ }
+ Resource->servers.remove(serversIT);
+ BuildServerData();
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageServers::slotCurrent
+//
+///////////////////////////////////////
+void setPageServers::slotCurrent( int Index )
+{
+ QString Name;
+ serverList::Iterator serversIT;
+
+ Name = Servers->text(Index);
+ for ( serversIT = Resource->servers.begin(); serversIT != Resource->servers.end(); ++serversIT )
+ {
+ if( (*serversIT).CurrentRef ) (*serversIT).CurrentRef = FALSE;
+ if( (*serversIT).Name == Name ) (*serversIT).CurrentRef = TRUE;
+ }
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageServers::slot_Profanity
+//
+///////////////////////////////////////
+void setPageServers::slot_Profanity( int Index )
+{
+ Resource->OPTION_Profanity = Index;
+ emit enableApply();
+ resetServer = TRUE;
+}
+///////////////////////////////////////
+//
+// setPageServers::slot_Premove
+//
+///////////////////////////////////////
+void setPageServers::slot_Premove( bool state )
+{
+ Resource->OPTION_Premove = state;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageServers::slot_Shout
+//
+///////////////////////////////////////
+void setPageServers::slot_Shout( bool state )
+{
+ Resource->OPTION_Shout = state;
+ emit enableApply();
+ resetServer = TRUE;
+}
+///////////////////////////////////////
+//
+// setPageServers::slot_Private
+//
+///////////////////////////////////////
+void setPageServers::slot_Private( bool state )
+{
+ Resource->OPTION_Private = state;
+ emit enableApply();
+ resetServer = TRUE;
+}
+///////////////////////////////////////
+//
+// setPageServers::slot_Kibitz
+//
+///////////////////////////////////////
+void setPageServers::slot_Kibitz( bool state )
+{
+ Resource->OPTION_Kibitz = state;
+ emit enableApply();
+ resetServer = TRUE;
+}
+///////////////////////////////////////
+//
+// setPageServers::slot_Tell
+//
+///////////////////////////////////////
+void setPageServers::slot_Tell( bool state )
+{
+ Resource->OPTION_Tell = state;
+ emit enableApply();
+ resetServer = TRUE;
+}
+///////////////////////////////////////
+//
+// setPageServers::slot_Seek
+//
+///////////////////////////////////////
+void setPageServers::slot_Seek( bool state )
+{
+ Resource->OPTION_Seek = state;
+ emit enableApply();
+ resetServer = TRUE;
+}
+///////////////////////////////////////
+//
+// setPageServers::slot_Auto_Close_ICS
+//
+///////////////////////////////////////
+void setPageServers::slot_Auto_Close_ICS( bool state )
+{
+ Resource->OPTION_Auto_Close_Last_ICS = state;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageServers::slot_SeekTimer
+//
+///////////////////////////////////////
+void setPageServers::slot_SeekTimer( int value )
+{
+ Resource->Seek_Timer = value * 10;
+ emit enableApply();
+}
+///////////////////////////////////////
+//
+// setPageServers::selectionChanged
+//
+///////////////////////////////////////
+void setPageServers::selectionChanged( void )
+{
+ if( Servers_ListView->selectedItem() == 0 )
+ {
+ Servers_Button_Change->setEnabled( FALSE );
+ Servers_Button_Delete->setEnabled( FALSE );
+ }
+ else
+ {
+ Servers_Button_Change->setEnabled( TRUE );
+ Servers_Button_Delete->setEnabled( TRUE );
+ }
+}
diff --git a/knights/setpageservers.h b/knights/setpageservers.h
new file mode 100644
index 0000000..4f4c21c
--- /dev/null
+++ b/knights/setpageservers.h
@@ -0,0 +1,112 @@
+/***************************************************************************
+ setpageservers.h - description
+ -------------------
+ begin : Thu Aug 16 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef SETPAGESERVERS_H
+#define SETPAGESERVERS_H
+
+#include <qtabwidget.h>
+#include <kbuttonbox.h>
+#include <klistview.h>
+#include <klineedit.h>
+#include <kcombobox.h>
+#include <qlabel.h>
+#include <qhbox.h>
+#include <qstringlist.h>
+#include <qcheckbox.h>
+#include <qwidget.h>
+#include <qgroupbox.h>
+#include <qpushbutton.h>
+#include <qcheckbox.h>
+#include <qspinbox.h>
+#include <qptrlist.h>
+#include <qlayout.h>
+#include "resource.h"
+#include "dlg_server.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class setPageServers : public QVBoxLayout
+{
+ Q_OBJECT
+ public:
+ setPageServers(QWidget *parent=0, resource *Rsrc=0);
+ ~setPageServers();
+ bool resetServer;
+
+ public slots:
+ void slotServer_Add( void );
+ void slotServer_Modify( void );
+ void slotServer_Delete( void );
+
+ void slotCurrent( int );
+
+ void slot_Premove( bool );
+ void slot_Private( bool );
+ void slot_Profanity( int );
+ void slot_Kibitz( bool );
+ void slot_Tell( bool );
+ void slot_Shout( bool );
+ void slot_Seek( bool );
+ void slot_SeekTimer( int value );
+ void slot_Auto_Close_ICS( bool state );
+
+ signals:
+ void enableApply( void );
+
+ protected slots:
+ void BuildServerData( void );
+ void selectionChanged( void );
+
+ protected:
+ void initTab1( void );
+ void initTab2( void );
+
+ private:
+ resource *Resource;
+ int margin;
+ QTabWidget *TabParent;
+
+ /* Tab 1 : Servers */
+ QVBox *Tab1;
+ QGroupBox *GROUP_Current;
+ QGroupBox *GROUP_Servers;
+ KComboBox *Servers;
+ KListView *Servers_ListView;
+ KButtonBox *Servers_ButtonBox;
+ QPushButton *Servers_Button_Add;
+ QPushButton *Servers_Button_Change;
+ QPushButton *Servers_Button_Delete;
+ dlg_server *Server_Dialog;
+ /* Tab 2 : Options */
+ QVBox *Tab2;
+ QGroupBox *BOX_Profanity;
+ KComboBox *COMBO_Profanity;
+ QCheckBox *BUTTON_Premove;
+ QCheckBox *BUTTON_Private;
+ QCheckBox *BUTTON_Kibitz;
+ QCheckBox *BUTTON_Tell;
+ QCheckBox *BUTTON_Shout;
+ QCheckBox *BUTTON_Seek;
+ QCheckBox *BUTTON_Auto_Close_ICS;
+ QHBox *BOX_SeekTimer;
+ QSpinBox *BUTTON_SeekTimer;
+ QLabel *LABEL_SeekTimer;
+};
+
+#endif
diff --git a/knights/splash.cpp b/knights/splash.cpp
new file mode 100644
index 0000000..cfccb62
--- /dev/null
+++ b/knights/splash.cpp
@@ -0,0 +1,40 @@
+/***************************************************************************
+ splash.cpp - description
+ -------------------
+ begin : Tue Jul 17 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "splash.moc"
+#include <qpixmap.h>
+#include <kstddirs.h>
+#include <kwin.h>
+#include <qapplication.h>
+
+splash::splash() :
+ QWidget( 0, "splash", Qt::WStyle_Customize | Qt::WStyle_NoBorder )
+{
+ QPixmap SplashImage( locate("data", "knights/splash.png" ) );
+ setPaletteBackgroundPixmap( SplashImage );
+
+ QSize Hint = SplashImage.size();
+ setFixedSize( Hint );
+
+ move( ( QApplication::desktop()->width() - Hint.width() ) / 2,
+ ( QApplication::desktop()->height() - Hint.height() ) / 2 );
+ show();
+ repaint( FALSE );
+}
+splash::~splash()
+{
+}
diff --git a/knights/splash.h b/knights/splash.h
new file mode 100644
index 0000000..93cdc6c
--- /dev/null
+++ b/knights/splash.h
@@ -0,0 +1,35 @@
+/***************************************************************************
+ splash.h - description
+ -------------------
+ begin : Tue Jul 17 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef SPLASH_H
+#define SPLASH_H
+
+#include <qwidget.h>
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class splash : public QWidget
+{
+ Q_OBJECT
+ public:
+ splash();
+ ~splash();
+};
+
+#endif
diff --git a/knights/tab_pgnview.cpp b/knights/tab_pgnview.cpp
new file mode 100644
index 0000000..4164f31
--- /dev/null
+++ b/knights/tab_pgnview.cpp
@@ -0,0 +1,160 @@
+/***************************************************************************
+ tab_pgnview.cpp - description
+ -------------------
+ begin : Sat Jan 25 2003
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "tab_pgnview.moc"
+#include "tabmanager.h"
+#include "resource.h"
+#include "pgn.h"
+#include <qfile.h>
+#include <qregexp.h>
+#include <qtextstream.h>
+#include <kstddirs.h>
+#include <ktempfile.h>
+
+tab_pgnView::tab_pgnView(pgn *parent, resource *Rsrc ) : KnightsTextView(0,Rsrc)
+{
+ myParent = parent;
+ whiteImage = NULL;
+ blackImage = NULL;
+
+ QString source = locate( "appdata", "pgn_template.kml" );
+ QFile file( source );
+ if( file.open( IO_ReadOnly ) )
+ {
+ QTextStream stream( &file );
+ document = stream.read();
+ file.close();
+ }
+ else
+ {
+ kdWarning() << "tab_pgnView::tab_pgnView: Can not find PGN Template" << endl;
+ }
+}
+
+tab_pgnView::~tab_pgnView()
+{
+ if( whiteImage )
+ delete whiteImage;
+ if( blackImage )
+ delete blackImage;
+}
+///////////////////////////////////////
+//
+// tab_pgnView::init
+//
+///////////////////////////////////////
+void tab_pgnView::init( void )
+{
+ /* Replace macros with data */
+ document.replace( QRegExp( "%site%" ), myParent->TAG_Site );
+ document.replace( QRegExp( "%date%" ), myParent->TAG_Date );
+ document.replace( QRegExp( "%round%" ), myParent->TAG_Round );
+ document.replace( QRegExp( "%result%" ), myParent->TAG_Result );
+ document.replace( QRegExp( "%white%" ), myParent->TAG_White );
+ document.replace( QRegExp( "%whitetitle%" ), myParent->TAG_WhiteTitle );
+ document.replace( QRegExp( "%whiteelo%" ), myParent->TAG_WhiteElo );
+ document.replace( QRegExp( "%whiteuscf%" ), myParent->TAG_WhiteUSCF );
+ document.replace( QRegExp( "%whitena%" ), myParent->TAG_WhiteNA );
+ document.replace( QRegExp( "%whitetype%" ), myParent->TAG_WhiteType );
+ document.replace( QRegExp( "%black%" ), myParent->TAG_Black );
+ document.replace( QRegExp( "%blacktitle%" ), myParent->TAG_BlackTitle );
+ document.replace( QRegExp( "%blackelo%" ), myParent->TAG_BlackElo );
+ document.replace( QRegExp( "%blackuscf%" ), myParent->TAG_BlackUSCF );
+ document.replace( QRegExp( "%blackna%" ), myParent->TAG_BlackNA );
+ document.replace( QRegExp( "%blacktype%" ), myParent->TAG_BlackType );
+ document.replace( QRegExp( "%time%" ), myParent->TAG_Time );
+ document.replace( QRegExp( "%utctime%" ), myParent->TAG_UTCTime );
+ document.replace( QRegExp( "%utcdate%" ), myParent->TAG_UTCDate );
+ document.replace( QRegExp( "%event%" ), myParent->TAG_Event );
+ document.replace( QRegExp( "%eventdate%" ), myParent->TAG_EventDate );
+ document.replace( QRegExp( "%eventsponsor"), myParent->TAG_EventSponsor );
+ document.replace( QRegExp( "%section%" ), myParent->TAG_Section );
+ document.replace( QRegExp( "%stage%" ), myParent->TAG_Stage );
+ document.replace( QRegExp( "%board%" ), myParent->TAG_Board );
+ document.replace( QRegExp( "%opening%" ), myParent->TAG_Opening );
+ document.replace( QRegExp( "%variation%" ), myParent->TAG_Variation );
+ document.replace( QRegExp( "%subvariation%" ), myParent->TAG_SubVariation );
+ document.replace( QRegExp( "%eco%" ), myParent->TAG_ECO );
+ document.replace( QRegExp( "%nic%" ), myParent->TAG_NIC );
+ document.replace( QRegExp( "%timecontrol%" ), myParent->TAG_TimeControl );
+ document.replace( QRegExp( "%termination%" ), myParent->TAG_Termination );
+ document.replace( QRegExp( "%setup%" ), myParent->TAG_SetUp );
+ document.replace( QRegExp( "%fen%" ), myParent->TAG_FEN );
+ document.replace( QRegExp( "%annotator%" ), myParent->TAG_Annotator );
+ document.replace( QRegExp( "%mode%" ), myParent->TAG_Mode );
+ document.replace( QRegExp( "%plycount%" ), myParent->TAG_PlyCount );
+
+ /* Get the White Player's Image */
+ QPixmap wi = myResource->loadSCIDImage( myParent->TAG_White );
+ if( wi.isNull() )
+ {
+ if( myParent->TAG_WhiteType == "program" )
+ wi.load( locate("data", "knights/default-engine-portrait.jpg" ) );
+ else
+ wi.load( locate("data", "knights/default-portrait.jpg" ) );
+ }
+ whiteImage = new KTempFile();
+ whiteImage->setAutoDelete( TRUE );
+ wi.save( whiteImage->name(), "PNG" );
+ document.replace( QRegExp( "%whiteimage%" ), whiteImage->name() );
+
+ /* Get the Black Player's Image */
+ QPixmap bi = myResource->loadSCIDImage( myParent->TAG_Black );
+ if( bi.isNull() )
+ {
+ if( myParent->TAG_BlackType == "program" )
+ bi.load( locate("data", "knights/default-engine-portrait.jpg" ) );
+ else
+ bi.load( locate("data", "knights/default-portrait.jpg" ) );
+ }
+ blackImage = new KTempFile();
+ blackImage->setAutoDelete( TRUE );
+ bi.save( blackImage->name(), "PNG" );
+ document.replace( QRegExp( "%blackimage%" ), blackImage->name() );
+
+ /* Obtain the move data */
+ QString moves;
+ QStringList *list;
+ if( myParent->Move_Data.isEmpty() )
+ {
+ list = myParent->notation(2);
+ }
+ else
+ {
+ list = new QStringList( myParent->Move_Data );
+ }
+
+ /* Do some formatting and then merge the strings */
+ for( QStringList::Iterator i = list->begin(); i != list->end(); i++ )
+ {
+ (*i).replace( QRegExp( "[^\\0040-\\0176]" ), "" );
+ (*i).replace( QRegExp( "\\(" ), "<i>(" );
+ (*i).replace( QRegExp( "\\)" ), ")</i>" );
+ (*i).replace( QRegExp( "\\{" ), "<b>{" );
+ (*i).replace( QRegExp( "\\}" ), "}</b>" );
+ }
+ moves = list->join( " " );
+ delete list;
+
+ int pos = document.find( "%moves%" );
+ if( pos != -1 )
+ {
+ document.remove( (unsigned int)pos, 7 );
+ document.insert( (unsigned int)pos, moves );
+ }
+ setText( document );
+}
diff --git a/knights/tab_pgnview.h b/knights/tab_pgnview.h
new file mode 100644
index 0000000..d5a9a4b
--- /dev/null
+++ b/knights/tab_pgnview.h
@@ -0,0 +1,47 @@
+/***************************************************************************
+ tab_pgnview.h - description
+ -------------------
+ begin : Sat Jan 25 2003
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef TAB_PGNVIEW_H
+#define TAB_PGNVIEW_H
+
+#include "knightstextview.h"
+#include <qstring.h>
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class resource;
+class pgn;
+class KTempFile;
+
+class tab_pgnView : public KnightsTextView
+{
+ Q_OBJECT
+ public:
+ tab_pgnView(pgn *parent, resource *Rsrc );
+ ~tab_pgnView();
+ void init( void );
+
+ protected:
+ pgn *myParent;
+ QString document;
+ KTempFile *whiteImage;
+ KTempFile *blackImage;
+};
+
+#endif
diff --git a/knights/tab_seeklist.cpp b/knights/tab_seeklist.cpp
new file mode 100644
index 0000000..d7554a3
--- /dev/null
+++ b/knights/tab_seeklist.cpp
@@ -0,0 +1,209 @@
+/***************************************************************************
+ tab_seeklist.cpp - description
+ -------------------
+ begin : Sat Sep 14 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "tab_seeklist.moc"
+#include "resource.h"
+#include <kiconloader.h>
+#include <qregexp.h>
+
+tab_SeekList::tab_SeekList(QWidget *parent, const char *name, resource *Rsrc ) : KListView(parent,name)
+{
+ myResource = Rsrc;
+ seek = FALSE;
+ addColumn( i18n( "Name" ) );
+ addColumn( i18n( "Rating" ) );
+ addColumn( i18n( "Match Type" ) );
+ addColumn( i18n( "Is Rated?" ) );
+ addColumn( i18n( "Base Time" ) );
+ addColumn( i18n( "Increment" ) );
+ setShowSortIndicator( TRUE );
+ setAllColumnsShowFocus( TRUE );
+ setMultiSelection( FALSE );
+ restoreLayout( kapp->config(), "Sought_ListView" );
+
+ menuSeek = new KPopupMenu( this );
+ menuSeek->setCheckable( TRUE );
+ menuSeek->insertItem( i18n("Seek Matches"), this, SLOT( menuFunct(int) ), 0, MENU_SEEK );
+ menuSeek->insertSeparator();
+ menuSeek->insertItem( i18n("Accept This Match"), this, SLOT( menuFunct(int) ), 0, MENU_ACCEPT_MATCH );
+ menuSeek->insertItem( i18n("Tell..."), this, SLOT( menuFunct(int) ), 0, MENU_TELL );
+ menuSeek->insertItem( i18n("Assess..."), this, SLOT( menuFunct(int) ), 0, MENU_ASSESS );
+ menuSeek->insertItem( i18n("Player Info"), this, SLOT( menuFunct(int) ), 0, MENU_FINGER );
+ menuSeek->insertItem( QIconSet( myResource->LoadIcon( QString("history"), KIcon::Small ) ),
+ i18n("Player History"), this, SLOT( menuFunct(int) ), 0, MENU_HISTORY );
+ menuSeek->insertSeparator();
+ menuSeek->insertItem( i18n("Add to Friends"), this, SLOT( menuFunct(int) ), 0, MENU_NOTIFY );
+ menuSeek->insertItem( i18n("Ignore This Player"), this, SLOT( menuFunct(int) ), 0, MENU_CENSOR );
+ menuSeek->setItemChecked( MENU_SEEK, FALSE );
+
+ connect( this, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint&, int ) ),
+ this, SLOT( display_menuSeek( QListViewItem*, const QPoint&, int ) ) );
+ connect( this, SIGNAL( executed( QListViewItem* ) ),
+ this, SLOT( selectMatch( QListViewItem* ) ) );
+}
+tab_SeekList::~tab_SeekList()
+{
+}
+///////////////////////////////////////
+//
+// tab_SeekList::recvCMD
+//
+///////////////////////////////////////
+void tab_SeekList::recvCMD( const Command& command )
+{
+ switch(((Command)command).getCommand())
+ {
+ case CMD_Add_Sought_Match:
+ addSoughtItem( ((Command)command).getData() );
+ break;
+ case CMD_Show_Sought_List:
+ updateSoughtList();
+ break;
+ case CMD_Hide_Sought_List:
+ clear();
+ seek = FALSE;
+ break;
+ default:
+ break;
+ }
+}
+///////////////////////////////////////
+//
+// tab_SeekList::updateSoughtList
+//
+///////////////////////////////////////
+void tab_SeekList::updateSoughtList( void )
+{
+ unsigned int loop;
+
+ clear();
+ for( loop = 0; loop < SF_01.count(); loop++ )
+ {
+ (void) new KListViewItem( this,
+ SF_01[loop],
+ SF_02[loop],
+ SF_03[loop],
+ SF_04[loop],
+ SF_05[loop] + i18n(" min."),
+ SF_06[loop] + i18n(" sec."),
+ SF_07[loop] );
+ }
+ SF_01.clear();
+ SF_02.clear();
+ SF_03.clear();
+ SF_04.clear();
+ SF_05.clear();
+ SF_06.clear();
+ SF_07.clear();
+ seek = TRUE;
+}
+///////////////////////////////////////
+//
+// tab_SeekList::addSoughtItem
+//
+///////////////////////////////////////
+void tab_SeekList::addSoughtItem( const QString &src )
+{
+ QStringList fields = QStringList::split( QChar(' '), src, FALSE );
+ SF_01 << fields[2]; // Name
+ SF_02 << fields[1]; // Rating
+ SF_03 << fields[6]; // Match Type
+ SF_04 << fields[5]; // Is Rated?
+ SF_05 << fields[3]; // Base Time
+ SF_06 << fields[4]; // Increment
+ SF_07 << fields[0]; // ID#
+}
+///////////////////////////////////////
+//
+// tab_SeekList::display_menuSeek
+//
+///////////////////////////////////////
+void tab_SeekList::display_menuSeek( QListViewItem *Item, const QPoint &Pos, int )
+{
+ bool enable;
+ if( Item != NULL )
+ {
+ setSelected( Item, TRUE );
+ selectedPlayerName = Item->text(0).replace( QRegExp("\\(.+\\)"), QString("") );
+ selectedMatchID = Item->text(6).toInt();
+ enable = TRUE;
+ }
+ else
+ {
+ enable = FALSE;
+ }
+ menuSeek->setItemChecked( MENU_SEEK, seek );
+ menuSeek->setItemEnabled( MENU_FINGER, enable );
+ menuSeek->setItemEnabled( MENU_TELL, enable );
+ menuSeek->setItemEnabled( MENU_NOTIFY, enable );
+ menuSeek->setItemEnabled( MENU_CENSOR, enable );
+ menuSeek->setItemEnabled( MENU_HISTORY, enable );
+ menuSeek->setItemEnabled( MENU_ACCEPT_MATCH, enable );
+ menuSeek->setItemEnabled( MENU_ASSESS, enable );
+ menuSeek->popup( Pos );
+}
+///////////////////////////////////////
+//
+// tab_SeekList::selectMatch
+//
+///////////////////////////////////////
+void tab_SeekList::selectMatch( int matchID )
+{
+ if( matchID )
+ emit sendCMD( Command( 0, CMD_Start_Match, QString::number( matchID ) ) );
+}
+void tab_SeekList::selectMatch( QListViewItem *Item )
+{
+ selectMatch( Item->text(6).toInt() );
+}
+///////////////////////////////////////
+//
+// tab_SeekList::menuFunct
+//
+///////////////////////////////////////
+void tab_SeekList::menuFunct( int funct )
+{
+ switch( funct )
+ {
+ case MENU_SEEK:
+ emit sendCMD( Command( 0, CMD_Toggle_Seek ) );
+ break;
+ case MENU_FINGER:
+ emit sendCMD( Command( 0, CMD_Player_Finger, selectedPlayerName ) );
+ break;
+ case MENU_TELL:
+ emit sendCMD( Command( 0, CMD_Set_Input, QString( "tell %1 " ).arg( selectedPlayerName ) ) );
+ break;
+ case MENU_NOTIFY:
+ emit sendCMD( Command( 0, CMD_Add_Friend, selectedPlayerName ) );
+ break;
+ case MENU_CENSOR:
+ emit sendCMD( Command( 0, CMD_Ignore_Player, selectedPlayerName ) );
+ break;
+ case MENU_HISTORY:
+ emit sendCMD( Command( 0, CMD_Player_History, selectedPlayerName ) );
+ break;
+ case MENU_ACCEPT_MATCH:
+ emit sendCMD( Command( 0, CMD_Start_Match, QString::number( selectedMatchID ) ) );
+ break;
+ case MENU_ASSESS:
+ emit sendCMD( Command( 0, CMD_Assess, selectedPlayerName ) );
+ break;
+ default:
+ break;
+ }
+}
diff --git a/knights/tab_seeklist.h b/knights/tab_seeklist.h
new file mode 100644
index 0000000..9796130
--- /dev/null
+++ b/knights/tab_seeklist.h
@@ -0,0 +1,75 @@
+/***************************************************************************
+ tab_seeklist.h - description
+ -------------------
+ begin : Sat Sep 14 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef TAB_SEEKLIST_H
+#define TAB_SEEKLIST_H
+
+#include <kpopupmenu.h>
+#include <klistview.h>
+#include <qwidget.h>
+#include <qstringlist.h>
+#include "command.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class resource;
+
+class tab_SeekList : public KListView
+{
+ Q_OBJECT
+
+ private:
+ resource *myResource;
+ KPopupMenu *menuSeek;
+ bool seek;
+ int selectedMatchID;
+ QString selectedPlayerName;
+ /*
+ These StringLists temporarily store Sought Game data
+ until all ads have been displayed.
+ */
+ QStringList SF_01;
+ QStringList SF_02;
+ QStringList SF_03;
+ QStringList SF_04;
+ QStringList SF_05;
+ QStringList SF_06;
+ QStringList SF_07;
+
+ public:
+ tab_SeekList(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ ~tab_SeekList();
+
+ public slots:
+ void recvCMD( const Command& );
+ void display_menuSeek( QListViewItem*, const QPoint&, int );
+ void selectMatch( QListViewItem *Item );
+ void selectMatch( int );
+ void menuFunct( int );
+
+ signals:
+ void sendCMD( const Command& );
+
+ protected:
+ void addSoughtItem( const QString& );
+ void updateSoughtList( void );
+
+};
+
+#endif
diff --git a/knights/tabbox.cpp b/knights/tabbox.cpp
new file mode 100644
index 0000000..bc8baed
--- /dev/null
+++ b/knights/tabbox.cpp
@@ -0,0 +1,208 @@
+/***************************************************************************
+ tabbox.cpp - description
+ -------------------
+ begin : Fri Sep 13 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "tabbox.moc"
+#include "tabpage.h"
+#include "resource.h"
+#include "accel.h"
+#include <klocale.h>
+#include <qstyle.h>
+#include <qtabwidget.h>
+
+TabBox::TabBox( resource *rsrc ) : QVBox(0,"TabBox",Qt::WDestructiveClose)
+{
+ myResource = rsrc;
+ setMargin( QApplication::style().defaultFrameWidth() );
+
+ myTabs = new QTabWidget( this, "myTabs" );
+ myTabs->setTabShape( QTabWidget::Rounded );
+ myTabs->setTabPosition( QTabWidget::Top );
+
+ myAccel = new Accel( this, myResource->myAccel );
+
+ connect( myTabs, SIGNAL( currentChanged( QWidget* ) ), this, SLOT( changeMyCaption( QWidget* ) ) );
+ connect( this, SIGNAL( focus( const QChar& ) ), myResource->myAccel, SIGNAL( focus( const QChar& ) ) );
+}
+TabBox::~TabBox()
+{
+ while( myTabs->count() )
+ {
+ removeTab( myTabs->page(0), TRUE );
+ }
+ delete myAccel;
+}
+///////////////////////////////////////
+//
+// TabBox::keyPressEvent
+//
+///////////////////////////////////////
+void TabBox::keyPressEvent( QKeyEvent *e )
+{
+ QChar input;
+
+ if( ( e->state() | Qt::ShiftButton ) == Qt::ShiftButton )
+ {
+ input = e->text().at(0);
+ if( input.isLetterOrNumber() )
+ {
+ emit focus( input );
+ e->accept();
+ return;
+ }
+ }
+ e->ignore();
+}
+///////////////////////////////////////
+//
+// TabBox::addTab
+//
+///////////////////////////////////////
+void TabBox::addTab( QWidget *child, const QString &caption )
+{
+ if( QString( child->className() ) == "TabPage" )
+ {
+ myTabs->addTab( child, caption );
+ myTabs->showPage( child );
+ changeMyCaption( child );
+ connect( child, SIGNAL( newParent( TabBox* ) ), this, SIGNAL( newTabBox( TabBox* ) ) );
+ connect( child, SIGNAL( requestDestruction() ), this, SLOT( destroyChild() ) );
+ }
+ else
+ {
+ TabPage *newPage = new TabPage( (QWidget*)this, child, myResource );
+ newPage->setCaption( caption );
+
+ myTabs->addTab( newPage, caption );
+ myTabs->showPage( newPage );
+ changeMyCaption( newPage );
+ connect( newPage, SIGNAL( newParent( TabBox* ) ), this, SIGNAL( newTabBox( TabBox* ) ) );
+ connect( newPage, SIGNAL( requestDestruction() ), this, SLOT( destroyChild() ) );
+ }
+}
+///////////////////////////////////////
+//
+// TabBox::removeTab
+//
+///////////////////////////////////////
+void TabBox::removeTab( QWidget *child, bool deleteChild )
+{
+ if( QString( child->className() ) == "TabPage" )
+ {
+ emit saveTabGeometry( QString( ((TabPage*)child)->getChild()->className() ), size() );
+ myTabs->removePage( child );
+ }
+ else
+ {
+ emit saveTabGeometry( QString( child->className() ), size() );
+ myTabs->removePage( child->parentWidget() );
+ }
+
+ /* Delete it if requested */
+ if( deleteChild )
+ {
+ delete child;
+ }
+}
+///////////////////////////////////////
+//
+// TabBox::showTab
+//
+///////////////////////////////////////
+void TabBox::showTab( QWidget *child )
+{
+ if( isChild( child ) )
+ myTabs->showPage( child->parentWidget() );
+}
+///////////////////////////////////////
+//
+// TabBox::destroyChild
+//
+///////////////////////////////////////
+void TabBox::destroyChild( void )
+{
+ QObject *child = ((QObject*)sender());
+
+ /* Be careful... make sure we have a valid child calling us */
+ if( child == NULL )
+ return;
+ if( !child->isWidgetType() )
+ return;
+ if( !isChild( ((QWidget*)child) ) )
+ return;
+
+ /* Nuke it */
+ removeTab( ((QWidget*)child), TRUE );
+
+ if( count() == 0 )
+ {
+ /* TabManager will be notified of the delete via QObject::destroyed(QObject*) */
+ delete this;
+ }
+}
+///////////////////////////////////////
+//
+// TabBox::changeMyCaption
+//
+///////////////////////////////////////
+void TabBox::changeMyCaption( QWidget *child )
+{
+ setCaption( i18n("%1 - Knights").arg( myTabs->tabLabel( child ) ) );
+}
+///////////////////////////////////////
+//
+// TabBox::count
+//
+///////////////////////////////////////
+int TabBox::count( void )
+{
+ return myTabs->count();
+}
+///////////////////////////////////////
+//
+// TabBox::isChild
+//
+///////////////////////////////////////
+bool TabBox::isChild( QWidget *child )
+{
+ for( int tmp=0; tmp < myTabs->count(); tmp++ )
+ {
+ if( myTabs->page(tmp) == child )
+ return TRUE;
+ if( ((TabPage*)myTabs->page(tmp))->getChild() == child )
+ return TRUE;
+ }
+ return FALSE;
+}
+///////////////////////////////////////
+//
+// TabBox::changeCaption
+//
+///////////////////////////////////////
+void TabBox::changeCaption( QWidget *child, const QString &caption )
+{
+ if( QString( child->className() ) == "TabPage" )
+ {
+ ((TabPage*)child)->setCaption( caption );
+ myTabs->setTabLabel( child, caption );
+ }
+ else if( isChild( child ) )
+ {
+ ((TabPage*)child->parentWidget())->setCaption( caption );
+ myTabs->setTabLabel( child->parentWidget(), caption );
+ }
+ changeMyCaption( myTabs->currentPage() );
+}
diff --git a/knights/tabbox.h b/knights/tabbox.h
new file mode 100644
index 0000000..0f3cffb
--- /dev/null
+++ b/knights/tabbox.h
@@ -0,0 +1,65 @@
+/***************************************************************************
+ tabbox.h - description
+ -------------------
+ begin : Fri Sep 13 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef TABBOX_H
+#define TABBOX_H
+
+#include <qvbox.h>
+#include "accel.h"
+
+class QTabWidget;
+class resource;
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class TabBox : public QVBox
+{
+ Q_OBJECT
+ public:
+ TabBox( resource *rsrc=0 );
+ virtual ~TabBox();
+ void keyPressEvent( QKeyEvent* );
+ void addTab( QWidget *child, const QString &caption );
+ void removeTab( QWidget *child, bool deleteChild=FALSE );
+ bool isChild( QWidget *child );
+ void showTab( QWidget *child );
+ void changeCaption( QWidget *child, const QString &caption );
+ int count( void );
+
+ signals:
+ void newTabBox( TabBox* );
+ void saveTabGeometry( const QString&, const QSize& );
+ void focus( const QChar& );
+
+ protected slots:
+ void changeMyCaption( QWidget *child );
+
+ /**
+ This removes and deletes a Tab if it's a child of this widget.
+ Never call this directly; Only with a Signal!
+ */
+ void destroyChild( void );
+
+ private:
+ QTabWidget *myTabs;
+ Accel *myAccel;
+ resource *myResource;
+};
+
+#endif
diff --git a/knights/tabgrip.cpp b/knights/tabgrip.cpp
new file mode 100644
index 0000000..563dd8f
--- /dev/null
+++ b/knights/tabgrip.cpp
@@ -0,0 +1,109 @@
+/***************************************************************************
+ tabgrip.cpp - description
+ -------------------
+ begin : Fri Sep 13 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "tabgrip.moc"
+#include "resource.h"
+#include <qpainter.h>
+
+TabGrip::TabGrip(QWidget *parent, const char *name ) : QWidget(parent,name)
+{
+ setMaximumSize( 3200, 12 );
+ setMinimumSize( 32, 12 );
+
+ isDragging = FALSE;
+ couldDrag = FALSE;
+
+ setCursor( Qt::SizeAllCursor );
+
+ show();
+}
+TabGrip::~TabGrip()
+{
+}
+///////////////////////////////////////
+//
+// TabGrip::paintEvent
+//
+///////////////////////////////////////
+void TabGrip::paintEvent( QPaintEvent* )
+{
+ QPainter paint( this );
+ QColorGroup group( colorGroup() );
+ paint.setPen( group.light() );
+ paint.drawLine( 2, 2, width() - 3, 2 );
+ paint.drawLine( 2, 5, width() - 3, 5 );
+ paint.drawLine( 2, 8, width() - 3, 8 );
+ paint.setPen( group.dark() );
+ paint.drawLine( 2, 3, width() - 3, 3 );
+ paint.drawLine( 2, 6, width() - 3, 6 );
+ paint.drawLine( 2, 9, width() - 3, 9 );
+}
+///////////////////////////////////////
+//
+// TabGrip::mousePressEvent
+//
+///////////////////////////////////////
+void TabGrip::mousePressEvent( QMouseEvent *event )
+{
+ event->accept();
+ if(event->button() == Qt::LeftButton)
+ {
+ couldDrag = TRUE;
+ offset = mapToGlobal( event->pos() );
+ offset.setX( topLevelWidget()->x() - offset.x() );
+ offset.setY( topLevelWidget()->y() - offset.y() );
+ }
+}
+///////////////////////////////////////
+//
+// TabGrip::mouseMoveEvent
+//
+///////////////////////////////////////
+void TabGrip::mouseMoveEvent( QMouseEvent *event )
+{
+ /*
+ By default, MouseMoveEvent is never called unless the user has
+ a button held down, so this should only be called if we're dragging.
+ */
+ event->accept();
+ if( couldDrag == TRUE )
+ {
+ /* Dragging Page */
+ isDragging = TRUE;
+ couldDrag = FALSE;
+ QApplication::setOverrideCursor( Qt::SizeAllCursor );
+ }
+}
+///////////////////////////////////////
+//
+// TabGrip::mouseReleaseEvent
+//
+///////////////////////////////////////
+void TabGrip::mouseReleaseEvent( QMouseEvent *event )
+{
+ event->accept();
+ if(event->button() == Qt::LeftButton)
+ {
+ couldDrag = FALSE;
+ if( isDragging )
+ {
+ QApplication::restoreOverrideCursor();
+ isDragging = FALSE;
+ emit wasDragged( event->globalPos(), offset );
+ }
+ }
+}
diff --git a/knights/tabgrip.h b/knights/tabgrip.h
new file mode 100644
index 0000000..a568a2e
--- /dev/null
+++ b/knights/tabgrip.h
@@ -0,0 +1,47 @@
+/***************************************************************************
+ tabgrip.h - description
+ -------------------
+ begin : Fri Sep 13 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef TABGRIP_H
+#define TABGRIP_H
+
+#include <qwidget.h>
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class TabGrip : public QWidget
+{
+ Q_OBJECT
+ public:
+ TabGrip(QWidget *parent=0, const char *name=0);
+ ~TabGrip();
+ void paintEvent( QPaintEvent* );
+ void mouseMoveEvent( QMouseEvent *event );
+ void mousePressEvent( QMouseEvent *event );
+ void mouseReleaseEvent( QMouseEvent *event );
+
+ signals:
+ void wasDragged( const QPoint&, const QPoint& );
+
+ private:
+ bool isDragging;
+ bool couldDrag;
+ QPoint offset;
+};
+
+#endif
diff --git a/knights/tabmanager.cpp b/knights/tabmanager.cpp
new file mode 100644
index 0000000..f2d72fc
--- /dev/null
+++ b/knights/tabmanager.cpp
@@ -0,0 +1,202 @@
+/***************************************************************************
+ tabmanager.cpp - description
+ -------------------
+ begin : Sat Sep 14 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "tabmanager.moc"
+#include "resource.h"
+#include <kdebug.h>
+
+static QString myConfigGroup( "TabManager" );
+
+TabManager::TabManager( resource *rsrc ) : QObject()
+{
+ myResource = rsrc;
+ appConfig = kapp->config();
+}
+
+TabManager::~TabManager()
+{
+}
+
+///////////////////////////////////////
+//
+// TabManager::addTab
+//
+///////////////////////////////////////
+void TabManager::addTab( QWidget *child, const QString &caption )
+{
+ TabBox *boxPtr;
+
+ if( myList.count() == 0 )
+ {
+ /* First Tab always generates a new TabBox */
+ boxPtr = new TabBox( myResource );
+ manageNewBox( boxPtr );
+ boxPtr->addTab( child, caption );
+
+ /* Get Geometry from Saved Config */
+ appConfig->setGroup( myConfigGroup );
+ QSize defaultSize( 420, 360 );
+ QSize newSize = appConfig->readSizeEntry( QString( child->className() ), &defaultSize );
+ boxPtr->resize( newSize );
+ boxPtr->show();
+ }
+ else
+ {
+ boxPtr = myList.at(0);
+ boxPtr->addTab( child, caption );
+ }
+}
+///////////////////////////////////////
+//
+// TabManager::changeCaption
+//
+///////////////////////////////////////
+void TabManager::changeCaption( QWidget *child, const QString &caption )
+{
+ TabBox *boxPtr = getParentBox( child );
+
+ if( boxPtr != NULL )
+ {
+ boxPtr->changeCaption( child, caption );
+ }
+}
+///////////////////////////////////////
+//
+// TabManager::removeTab
+//
+///////////////////////////////////////
+void TabManager::removeTab( QObject *child )
+{
+ /* Make sure this is a QWidget we can manipulate */
+ if( !child->isWidgetType() )
+ {
+ kdError() << "TabManager::removeTab: Can not remove non-widget class " << child->className() << endl;
+ return;
+ }
+
+ if( myList.find( ((TabBox*)child) ) != -1 )
+ {
+ /* Remove Child Directly */
+ myList.remove( ((TabBox*)child) );
+ return;
+ }
+
+ QString childName( ((QWidget*)child)->className() );
+ TabBox *boxPtr = getParentBox( ((QWidget*)child) );
+
+ /* Remove this Child's Parent, the TabPage */
+ if( boxPtr != NULL )
+ {
+ kdDebug() << "Removing child: " << childName << endl;
+ boxPtr->removeTab( ((QWidget*)child), TRUE );
+ if( boxPtr->count() == 0 )
+ {
+ myList.remove( boxPtr );
+ delete boxPtr;
+ }
+ return;
+ }
+ kdWarning() << "Could not find child: " << childName << endl;
+}
+///////////////////////////////////////
+//
+// TabManager::showTab
+//
+///////////////////////////////////////
+void TabManager::showTab( QWidget *child )
+{
+ TabBox *boxPtr = getParentBox( child );
+ if( boxPtr != NULL )
+ {
+ boxPtr->showTab( child );
+ }
+}
+///////////////////////////////////////
+//
+// TabManager::isTab
+//
+///////////////////////////////////////
+bool TabManager::isTab( QWidget *child )
+{
+ if( getParentBox( child ) == NULL )
+ {
+ return FALSE;
+ }
+ return TRUE;
+}
+///////////////////////////////////////
+//
+// TabManager::saveTabGeometry
+//
+///////////////////////////////////////
+void TabManager::saveTabGeometry( const QString &childName, const QSize &childSize )
+{
+ /* Save This Widget's Size For Later */
+ appConfig->setGroup( myConfigGroup );
+ appConfig->writeEntry( childName, childSize );
+ appConfig->sync();
+
+ kdDebug() << "Saved geometry for Widget: " << childName << endl;
+}
+///////////////////////////////////////
+//
+// TabManager::childEvent
+//
+///////////////////////////////////////
+void TabManager::childEvent( QChildEvent *event )
+{
+ if( event->inserted() )
+ {
+ /* New Child */
+ if( QString( event->child()->className() ) == "TabBox" )
+ {
+ manageNewBox( ((TabBox*)event->child()) );
+ return;
+ }
+ addTab( ((QWidget*)event->child()), QString( "Untitled" ) );
+ }
+}
+///////////////////////////////////////
+//
+// TabManager::manageNewBox
+//
+///////////////////////////////////////
+void TabManager::manageNewBox( TabBox *newBox )
+{
+ myList.append( newBox );
+ connect( newBox, SIGNAL( destroyed( QObject* ) ), this, SLOT( removeTab( QObject* ) ) );
+ connect( newBox, SIGNAL( saveTabGeometry( const QString&, const QSize& ) ), this, SLOT( saveTabGeometry( const QString&, const QSize& ) ) );
+ connect( newBox, SIGNAL( newTabBox( TabBox* ) ), this, SLOT( manageNewBox( TabBox* ) ) );
+}
+///////////////////////////////////////
+//
+// TabManager::getParentBox
+//
+///////////////////////////////////////
+TabBox* TabManager::getParentBox( QWidget *child )
+{
+ TabBox *boxPtr;
+ for( unsigned int index=0; index < myList.count(); index++ )
+ {
+ boxPtr = myList.at(index);
+ if( boxPtr->isChild( child ) )
+ {
+ return boxPtr;
+ }
+ }
+ return NULL;
+}
diff --git a/knights/tabmanager.h b/knights/tabmanager.h
new file mode 100644
index 0000000..78ae9ac
--- /dev/null
+++ b/knights/tabmanager.h
@@ -0,0 +1,62 @@
+/***************************************************************************
+ tabmanager.h - description
+ -------------------
+ begin : Sat Sep 14 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef TABMANAGER_H
+#define TABMANAGER_H
+
+#include <qobject.h>
+#include <qptrlist.h>
+#include <kapp.h>
+#include <kconfig.h>
+#include "tabbox.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+typedef QPtrList<TabBox> TabBoxList;
+class resource;
+
+class TabManager : public QObject
+{
+ Q_OBJECT
+ public:
+ TabManager( resource *rsrc );
+ ~TabManager();
+ void addTab( QWidget *child, const QString &caption );
+ void childEvent( QChildEvent *event );
+ void changeCaption( QWidget *child, const QString &caption );
+ void showTab( QWidget *child );
+ bool isTab( QWidget *child );
+
+ public slots:
+ void removeTab( QObject *child );
+
+ protected slots:
+ void manageNewBox( TabBox *newBox );
+ void saveTabGeometry( const QString&, const QSize& );
+
+ protected:
+ TabBox* getParentBox( QWidget* );
+
+ private:
+ TabBoxList myList;
+ KConfig *appConfig;
+ resource *myResource;
+};
+
+#endif
diff --git a/knights/tabpage.cpp b/knights/tabpage.cpp
new file mode 100644
index 0000000..863e34d
--- /dev/null
+++ b/knights/tabpage.cpp
@@ -0,0 +1,164 @@
+/***************************************************************************
+ tabpage.cpp - description
+ -------------------
+ begin : Fri Sep 13 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "tabpage.moc"
+#include "tabmanager.h"
+#include "tabgrip.h"
+#include "resource.h"
+#include <kiconloader.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <qlayout.h>
+#include <qtoolbutton.h>
+
+///////////////////////////////////////
+//
+// TabPage::constructor
+//
+///////////////////////////////////////
+TabPage::TabPage( QWidget *parent, QWidget *child, resource *rsrc ) : QVBox(parent)
+{
+ myResource = rsrc;
+ myChild = child;
+
+ actionBar = new QHBox( this );
+ actionBar->show();
+
+ grip = new TabGrip( actionBar );
+ connect( grip, SIGNAL( wasDragged(const QPoint&, const QPoint&) ), this, SLOT( tabDragged(const QPoint&, const QPoint&) ) );
+
+ KIconLoader icons( QString( "knights" ) );
+ QPixmap map = icons.loadIcon( QString("tab_remove"), KIcon::Small, 0, KIcon::DefaultState, 0, TRUE );
+ if( map.isNull() )
+ {
+ /* Keep for backward compatability with KDE 3.0 */
+ map = icons.loadIcon( QString("fileclose"), KIcon::Small );
+ }
+
+ closeButton = new QToolButton( actionBar, "closeButton" );
+ closeButton->setIconSet( QIconSet( map ) );
+ closeButton->setAutoRaise( TRUE );
+ closeButton->setTextLabel( i18n( "Close This Tab" ), TRUE );
+ closeButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ connect( closeButton, SIGNAL( clicked() ), this, SIGNAL( requestDestruction() ) );
+
+ myChild->reparent( this, QPoint( 0, 0 ), TRUE );
+ myChild->show();
+ show();
+}
+///////////////////////////////////////
+//
+// TabPage::destructor
+//
+///////////////////////////////////////
+TabPage::~TabPage()
+{
+}
+///////////////////////////////////////
+//
+// TabPage::tabDragged
+//
+///////////////////////////////////////
+void TabPage::tabDragged( const QPoint &dest, const QPoint &offset )
+{
+ TabBox *myParent = parentTabBox();
+ if( myParent != NULL )
+ {
+ QWidget *destWidget = QApplication::widgetAt( dest, TRUE );
+ /* Find a TabBox */
+ while(1)
+ {
+ if( destWidget == NULL )
+ {
+ /* Create new TabBox */
+ TabBox *newBox = new TabBox( myResource );
+ newBox->resize( myParent->size() );
+ newBox->move( dest + offset );
+ newBox->show();
+ emit newParent( newBox );
+ myParent->removeTab( this );
+ newBox->addTab( this, myCaption );
+ break;
+ }
+ if( QString( destWidget->className() ) == "TabBox" )
+ {
+ if( myParent != ((TabBox*)destWidget) )
+ {
+ /* We can latch on here */
+ myParent->removeTab( this );
+ ((TabBox*)destWidget)->addTab( this, myCaption );
+ break;
+ }
+ else
+ {
+ break;
+ }
+ }
+ destWidget = destWidget->parentWidget();
+ }
+ if( myParent->count() == 0 )
+ {
+ /* TabManager will be notified of the delete via QObject::destroyed(QObject*) */
+ delete myParent;
+ }
+ }
+ else
+ {
+ kdError() << "TabPage::tabDragged: Can not move without a parent TabBox." << endl;
+ }
+}
+///////////////////////////////////////
+//
+// TabPage::setCaption
+//
+///////////////////////////////////////
+void TabPage::setCaption( const QString &caption )
+{
+ myCaption = caption;
+}
+///////////////////////////////////////
+//
+// TabPage::parentTabBox
+//
+///////////////////////////////////////
+TabBox* TabPage::parentTabBox( void )
+{
+ QWidget *myParent = this->parentWidget();
+ if( QString( myParent->className() ) == "QWidgetStack" )
+ {
+ myParent = myParent->parentWidget();
+ if( QString( myParent->className() ) == "QTabWidget" )
+ {
+ myParent = myParent->parentWidget();
+ if( QString( myParent->className() ) == "TabBox" )
+ {
+ return ((TabBox*)myParent);
+ }
+ }
+ }
+ return NULL;
+}
+///////////////////////////////////////
+//
+// TabPage::getChild
+//
+///////////////////////////////////////
+QWidget* TabPage::getChild( void )
+{
+ return myChild;
+}
+
diff --git a/knights/tabpage.h b/knights/tabpage.h
new file mode 100644
index 0000000..d5aeb28
--- /dev/null
+++ b/knights/tabpage.h
@@ -0,0 +1,64 @@
+/***************************************************************************
+ tabpage.h - description
+ -------------------
+ begin : Fri Sep 13 2002
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sf.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef TABPAGE_H
+#define TABPAGE_H
+
+#include <qframe.h>
+#include <qwidget.h>
+#include <qvbox.h>
+#include <qhbox.h>
+#include <qstring.h>
+#include "tabbox.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+class resource;
+class QToolButton;
+class TabGrip;
+
+class TabPage : public QVBox
+{
+ Q_OBJECT
+ public:
+ TabPage( QWidget *parent, QWidget *child, resource *rsrc );
+ ~TabPage();
+ void setCaption( const QString& );
+ QWidget* getChild( void );
+
+ protected slots:
+ void tabDragged( const QPoint&, const QPoint& );
+
+ signals:
+ void newParent( TabBox* );
+ void requestDestruction( void );
+
+ protected:
+ TabBox* parentTabBox( void );
+
+ private:
+ QString myCaption;
+ QHBox *actionBar;
+ TabGrip *grip;
+ QToolButton *closeButton;
+
+ QWidget *myChild;
+ resource *myResource;
+};
+
+#endif
diff --git a/knights/thinbuttons.cpp b/knights/thinbuttons.cpp
new file mode 100644
index 0000000..ed97ba5
--- /dev/null
+++ b/knights/thinbuttons.cpp
@@ -0,0 +1,262 @@
+/***************************************************************************
+ thinbuttons.cpp - description
+ -------------------
+ begin : Tue Nov 13 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "thinbuttons.moc"
+#include <kicontheme.h>
+#include <qpushbutton.h>
+#include <qstyle.h>
+
+thinbuttons::thinbuttons(QWidget *parent, const char *name, resource *Rsrc ) : QFrame(parent,name)
+{
+ Resource = Rsrc;
+ rightClickID = 0;
+ setFixedSize( 8, 8 );
+
+ /* Build the pop-up menu */
+ matchMenu = new KPopupMenu( this );
+ matchMenu->insertItem( QIconSet( Resource->LoadIcon( QString("filesave"), KIcon::Small ) ),
+ i18n("&Save Match"), MENU_SAVE );
+ matchMenu->insertItem( QIconSet( Resource->LoadIcon( QString("filesave"), KIcon::Small ) ),
+ i18n("Save Match &As..."), MENU_SAVEAS );
+ matchMenu->insertSeparator();
+ matchMenu->insertItem( QIconSet( Resource->LoadIcon( QString("fileprint"), KIcon::Small ) ),
+ i18n("&Print Notation..."), MENU_PRINT );
+ matchMenu->insertSeparator();
+ matchMenu->insertItem( QIconSet( Resource->LoadIcon( QString("fileclose"), KIcon::Small ) ),
+ i18n("&Close Match"), MENU_CLOSE );
+ connect( matchMenu, SIGNAL( activated(int) ), this, SLOT( menuClicked(int) ) );
+}
+thinbuttons::~thinbuttons()
+{
+}
+///////////////////////////////////////
+//
+// thinbuttons::childEvent
+//
+///////////////////////////////////////
+void thinbuttons::childEvent( QChildEvent * cev )
+{
+ /* Make sure this method only effects child buttons */
+ if( QString( cev->child()->name() ) != QString( "MatchSelector" ) )
+ return;
+ if( cev->removed() )
+ remove( (QButton*)cev->child() );
+}
+///////////////////////////////////////
+//
+// thinbuttons::create
+//
+///////////////////////////////////////
+QButton* thinbuttons::create( int id )
+{
+ Buttons *newBut;
+ QPushButton *newButton;
+
+ newButton = new QPushButton( this, "MatchSelector" );
+
+ newBut = new Buttons;
+ newBut->button = newButton;
+ newBut->ID = id;
+ buttons.append( newBut );
+
+ newButton->setToggleButton( TRUE );
+ newButton->setText( QString("Match") );
+ newButton->show();
+
+ connect( newButton, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) );
+ return newButton;
+}
+///////////////////////////////////////
+//
+// thinbuttons::setButton
+//
+///////////////////////////////////////
+void thinbuttons::setButton( int id )
+{
+ Buttons *currentBut;
+ unsigned int Index;
+
+ for( Index = 0; Index < buttons.count(); Index++ )
+ {
+ currentBut = buttons.at( Index );
+ if( currentBut->ID == id )
+ {
+ currentBut->button->setDown( TRUE );
+ if( currentBut->button->isToggleButton() )
+ if( currentBut->button->state() != QButton::On )
+ currentBut->button->toggle();
+ }
+ else
+ {
+ currentBut->button->setDown( FALSE );
+ if( currentBut->button->isToggleButton() )
+ if( currentBut->button->state() == QButton::On )
+ currentBut->button->toggle();
+ }
+ }
+}
+///////////////////////////////////////
+//
+// thinbuttons::find
+//
+///////////////////////////////////////
+QButton* thinbuttons::find( int id )
+{
+ unsigned int tmp;
+
+ for( tmp = 0; tmp < buttons.count(); tmp++ )
+ if( buttons.at( tmp )->ID == id )
+ return buttons.at( tmp )->button;
+ return NULL;
+}
+///////////////////////////////////////
+//
+// thinbuttons::id
+//
+///////////////////////////////////////
+int thinbuttons::id( QButton* button )
+{
+ unsigned int tmp;
+
+ for( tmp = 0; tmp < buttons.count(); tmp++ )
+ if( buttons.at( tmp )->button == button )
+ return buttons.at( tmp )->ID;
+ return -1;
+}
+///////////////////////////////////////
+//
+// thinbuttons::remove
+//
+///////////////////////////////////////
+void thinbuttons::remove( QButton* button )
+{
+ unsigned int tmp;
+
+ for( tmp = 0; tmp < buttons.count(); tmp++ )
+ if( buttons.at( tmp )->button == button )
+ {
+ disconnect( buttons.at( tmp )->button, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) );
+ buttons.remove( tmp );
+ }
+}
+void thinbuttons::remove( const int &id )
+{
+ QButton *butt;
+
+ butt = find(id);
+ if( butt != NULL )
+ {
+ remove( butt );
+ delete butt;
+ }
+}
+///////////////////////////////////////
+//
+// thinbuttons::buttonClicked
+//
+///////////////////////////////////////
+void thinbuttons::buttonClicked( void )
+{
+ const QObject *incomming;
+ int Clicked;
+ unsigned int tmp;
+
+ incomming = sender();
+ for( tmp = 0; tmp < buttons.count(); tmp++ )
+ if( buttons.at( tmp )->button == ( const QButton* )incomming )
+ {
+ Clicked = buttons.at( tmp )->ID;
+ if( Clicked == Null ) return;
+ setButton( Clicked );
+ emit leftClick( Clicked );
+ }
+}
+///////////////////////////////////////
+//
+// thinbuttons::resize
+//
+///////////////////////////////////////
+void thinbuttons::resize( const int Width )
+{
+ Buttons *button;
+ QStyle& Style = QApplication::style();
+ int margin;
+ unsigned int Index;
+
+ margin = Style.defaultFrameWidth();
+ if( buttons.count() != 0 ) buttWidth = ( Width / buttons.count() ) - ( margin * 2 );
+ else buttWidth = 0;
+ setFixedSize( Width, Resource->Widget_Height + margin );
+ for( Index = 0; Index < buttons.count(); Index++ )
+ {
+ button = buttons.at( Index );
+ button->button->setFixedSize( buttWidth, Resource->Widget_Height );
+ button->button->move( ( Index * ( buttWidth + ( margin * 2 ) ) ) + margin , margin );
+ }
+}
+///////////////////////////////////////
+//
+// thinbuttons::mousePressEvent
+//
+///////////////////////////////////////
+void thinbuttons::mousePressEvent( QMouseEvent *event )
+{
+ QStyle& Style = QApplication::style();
+ int margin, xpos(0), index(0);
+
+ /* We only want RightClick */
+ if(event->button() != Qt::RightButton)
+ {
+ return;
+ }
+ event->accept();
+ margin = Style.defaultFrameWidth();
+ /* No Buttons, No Menu */
+ if( !buttons.count() )
+ {
+ return;
+ }
+ /* Figure out which button was pressed */
+ xpos += margin;
+ while( xpos < event->x() )
+ {
+ if( ( event->x() >= xpos ) && ( event->x() <= ( xpos + buttWidth ) ) )
+ {
+ break;
+ }
+ xpos += ( margin << 1 ) + buttWidth;
+ index++;
+ }
+ /* Clicked the right margin */
+ if( xpos >= event->x() )
+ {
+ return;
+ }
+ /* Clicked a button, let's dance */
+ matchMenu->popup( event->globalPos() );
+ rightClickID = buttons.at(index)->ID;
+ emit rightClick( rightClickID );
+}
+///////////////////////////////////////
+//
+// thinbuttons::menuClicked
+//
+///////////////////////////////////////
+void thinbuttons::menuClicked( int item )
+{
+ emit menuItemSelected( rightClickID, item );
+}
diff --git a/knights/thinbuttons.h b/knights/thinbuttons.h
new file mode 100644
index 0000000..3171189
--- /dev/null
+++ b/knights/thinbuttons.h
@@ -0,0 +1,71 @@
+/***************************************************************************
+ thinbuttons.h - description
+ -------------------
+ begin : Tue Nov 13 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef THINBUTTONS_H
+#define THINBUTTONS_H
+
+#include <kpopupmenu.h>
+#include <qframe.h>
+#include <qbutton.h>
+#include "definitions.h"
+#include "resource.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+struct Buttons
+{
+ QButton *button;
+ int ID;
+};
+
+class thinbuttons : public QFrame
+{
+ Q_OBJECT
+ public:
+ thinbuttons(QWidget *parent=0, const char *name=0, resource *Rsrc=0);
+ ~thinbuttons();
+ void mousePressEvent( QMouseEvent *event );
+ void setButton( int id );
+ QButton* find( int id );
+ QButton* create( int id );
+ void remove( QButton* button );
+ void remove( const int &id );
+ void resize( const int Width );
+ int id( QButton * );
+
+ signals:
+ void leftClick( int id );
+ void rightClick( int id );
+ void menuItemSelected( int id, int item );
+
+ protected slots:
+ void buttonClicked(void);
+ void menuClicked( int item );
+
+ protected:
+ void childEvent( QChildEvent * );
+
+ private:
+ resource *Resource;
+ KPopupMenu *matchMenu;
+ QList<Buttons> buttons;
+ int buttWidth;
+ int rightClickID;
+};
+
+#endif
diff --git a/knights/wiz_setup.cpp b/knights/wiz_setup.cpp
new file mode 100644
index 0000000..e584de3
--- /dev/null
+++ b/knights/wiz_setup.cpp
@@ -0,0 +1,360 @@
+/***************************************************************************
+ wiz_setup.cpp - description
+ -------------------
+ begin : Wed Nov 21 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <kglobalsettings.h>
+#include <kprocess.h>
+#include <kstddirs.h>
+#include <qstringlist.h>
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qregexp.h>
+#include "wiz_setup.moc"
+
+wiz_setup::wiz_setup(QWidget *parent, const char *name, resource *Rsrc ) : KWizard(parent,name,TRUE)
+{
+ myResource = Rsrc;
+ steps = 0;
+ setMaximumSize( 800, 600 );
+
+ /*
+ Call Order Of Pages:
+
+ Page 1 - Introduction
+ Page 6 - Accept License
+ Page 3 - Setup Engines
+ Page 4 - Setup Servers
+ Page 5 - Finished
+ */
+ initPage1();
+// initPage6();
+ if( myResource->Config_Version < 1 )
+ {
+// initPage2();
+ initPage3();
+ initPage4();
+ }
+ initPage5();
+ setCaption( i18n( "Knights Setup Wizard" ) );
+
+ connect( this, SIGNAL( selected(const QString&) ), this, SLOT( slot_Work(const QString&) ) );
+}
+wiz_setup::~wiz_setup()
+{
+}
+///////////////////////////////////////
+//
+// wiz_setup::initPage1
+//
+///////////////////////////////////////
+void wiz_setup::initPage1( void )
+{
+ Page1 = new QFrame( this );
+ P1B1 = new QGridLayout( Page1, 1, 4, 8 );
+
+ SideImage1 = new QLabel( Page1 );
+ SideImage1->setPixmap( locate("data", "knights/wizard.png" ) );
+ P1B1->addWidget( SideImage1, 1, 1 );
+
+ WelcomeMessage = new QLabel( Page1 );
+ WelcomeMessage->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ WelcomeMessage->setText( i18n( "Thank you for installing Knights, the graphical chess interface for KDE. To help you get started quickly, there are a few things Knights will need to setup. You should click 'Next' to see what they are." ) );
+ P1B1->addWidget( WelcomeMessage, 1, 3 );
+
+ addPage( Page1, i18n("Welcome to Knights v%1!").arg(_VERSION_) );
+ setNextEnabled( Page1, TRUE );
+ setHelpEnabled( Page1, FALSE );
+}
+///////////////////////////////////////
+//
+// wiz_setup::initPage2
+//
+///////////////////////////////////////
+void wiz_setup::initPage2( void )
+{
+ Page2 = new QFrame( this );
+ P2B1 = new QGridLayout( Page2, 2, 4, 8 );
+
+ SideImage2 = new QLabel( Page2 );
+ SideImage2->setPixmap( locate("data", "knights/wizard.png" ) );
+ P2B1->addMultiCellWidget( SideImage2, 1, 2, 1, 1 );
+
+ pgnExplain = new QLabel( Page2 );
+ pgnExplain->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ pgnExplain->setText( i18n( "When Knights saves a match to disk, it uses Portable Game Notation (PGN) to store the match. Several other computer chess games use PGN too. If you like, Knights can be the default PGN viewer on this system." ) );
+ P2B1->addWidget( pgnExplain, 1, 3 );
+
+ pgnButtons = new QButtonGroup( 2, Qt::Vertical, i18n( "Let Knights handle PGN files?" ), Page2 );
+ pgnYes = new QRadioButton( i18n( "Yes" ), pgnButtons );
+ pgnNo = new QRadioButton( i18n( "No" ), pgnButtons );
+ pgnButtons->setButton( 0 );
+ P2B1->addWidget( pgnButtons, 2, 3 );
+
+ addPage( Page2, i18n("Let Knights handle your .pgn files?") );
+ setHelpEnabled( Page2, FALSE );
+}
+///////////////////////////////////////
+//
+// wiz_setup::initPage3
+//
+///////////////////////////////////////
+void wiz_setup::initPage3( void )
+{
+ Page3 = new QFrame( this );
+ P3B1 = new QGridLayout( Page3, 2, 4, 8 );
+
+ SideImage3 = new QLabel( Page3 );
+ SideImage3->setPixmap( locate("data", "knights/wizard.png" ) );
+ P3B1->addMultiCellWidget( SideImage3, 1, 2, 1, 1 );
+
+ engineExplain = new QLabel( Page3 );
+ engineExplain->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ engineExplain->setText( i18n( "Knights can not play a chess match against you without help. Known as Chess Engines, these helpers can be found on the Internet and are often included with your distribution. Knights can look for Chess Engines that you may already have. If found, Knights will configure itself to use them." ) );
+ P3B1->addWidget( engineExplain, 1, 3 );
+
+ engineButtons = new QButtonGroup( 2, Qt::Vertical, i18n( "Let Knights search for chess engines?" ), Page3 );
+ engineYes = new QRadioButton( i18n( "Yes" ), engineButtons );
+ engineNo = new QRadioButton( i18n( "No" ), engineButtons );
+ engineButtons->setButton( 0 );
+ P3B1->addWidget( engineButtons, 2, 3 );
+
+ addPage( Page3, i18n("Let Knights search for chess engines?") );
+ setHelpEnabled( Page3, FALSE );
+}
+///////////////////////////////////////
+//
+// wiz_setup::initPage4
+//
+///////////////////////////////////////
+void wiz_setup::initPage4( void )
+{
+ Page4 = new QFrame( this );
+ P4B1 = new QGridLayout( Page4, 2, 4, 8 );
+
+ SideImage4 = new QLabel( Page4 );
+ SideImage4->setPixmap( locate("data", "knights/wizard.png" ) );
+ P4B1->addMultiCellWidget( SideImage4, 1, 2, 1, 1 );
+
+ serverExplain = new QLabel( Page4 );
+ serverExplain->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ serverExplain->setText( i18n( "In order for you to play chess online, Knights will have to connect to a chess server. Knights has a list of several of these servers. If you like, this list can be used to automatically configure Knights." ) );
+ P4B1->addWidget( serverExplain, 1, 3 );
+
+ serverButtons = new QButtonGroup( 2, Qt::Vertical, i18n( "Let Knights configure chess servers?" ), Page4 );
+ serverYes = new QRadioButton( i18n( "Yes" ), serverButtons );
+ serverNo = new QRadioButton( i18n( "No" ), serverButtons );
+ serverButtons->setButton( 0 );
+ P4B1->addWidget( serverButtons, 2, 3 );
+
+ addPage( Page4, i18n("Let Knights configure chess servers?") );
+ setHelpEnabled( Page4, FALSE );
+}
+///////////////////////////////////////
+//
+// wiz_setup::initPage5
+//
+///////////////////////////////////////
+void wiz_setup::initPage5( void )
+{
+ Page5 = new QFrame( this );
+ P5B1 = new QGridLayout( Page5, 2, 4, 8 );
+
+ SideImage5 = new QLabel( Page5 );
+ SideImage5->setPixmap( locate("data", "knights/wizard.png" ) );
+ P5B1->addMultiCellWidget( SideImage5, 1, 2, 1, 1 );
+
+ FinishExplain = new QLabel( Page5 );
+ FinishExplain->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
+ FinishExplain->setText( i18n( "Knights has now configured itself according to your choices. We strongly recommend that you read the documentation to make full use of all that Knights has to offer. You can access it by pressing F1." ) );
+ P5B1->addWidget( FinishExplain, 1, 3 );
+
+ addPage( Page5, i18n("Setup Complete") );
+ setFinish( Page5, TRUE );
+ setHelpEnabled( Page5, FALSE );
+}
+///////////////////////////////////////
+//
+// wiz_setup::initPage6
+//
+///////////////////////////////////////
+void wiz_setup::initPage6( void )
+{
+ QString f( locate("data", "LICENSES/GPL_V2") );
+ QString licenseText("<K_STD>");
+ Page6 = new QVBox( this );
+
+ /* Setup License View */
+ licenseView = new KnightsTextView( Page6, myResource );
+ if (!f.isEmpty())
+ {
+ QFile file(f);
+ if (file.open(IO_ReadOnly))
+ {
+ QTextStream str(&file);
+ licenseText += str.read();
+ }
+ }
+ licenseText.append( "</K_STD>" );
+ licenseView->setText( licenseText );
+
+ licenseButtons = new QButtonGroup( 2, Qt::Horizontal, i18n( "Do you accept the terms of our license?" ), Page6 );
+ licenseYes = new QRadioButton( i18n( "Yes" ), licenseButtons );
+ licenseNo = new QRadioButton( i18n( "No" ), licenseButtons );
+ licenseButtons->setButton( 1 );
+
+ addPage( Page6, i18n("Please read and accept our license:") );
+ setHelpEnabled( Page6, FALSE );
+ connect( licenseButtons, SIGNAL( clicked(int) ), this, SLOT( slot_License(int) ) );
+}
+///////////////////////////////////////
+//
+// wiz_setup::slot_Work
+//
+///////////////////////////////////////
+void wiz_setup::slot_Work( const QString& pageTitle )
+{
+ /* Don't let 'em past the license */
+ if( pageTitle == title( Page6 ) )
+ {
+ setNextEnabled( Page6, FALSE );
+ }
+
+ /* Don't proceed unless we're ready to work */
+ if( pageTitle != title( Page5 ) ) return;
+ setBackEnabled( Page5, FALSE );
+ if( myResource->Config_Version < 1 )
+ {
+// if( pgnButtons->selected() == pgnYes )
+// setupPGN();
+ if( engineButtons->selected() == engineYes )
+ findEngines();
+ if( serverButtons->selected() == serverYes )
+ setupServers();
+ }
+ myResource->ConfigWrite();
+ setFinishEnabled( Page5, TRUE );
+}
+///////////////////////////////////////
+//
+// wiz_setup::setupPGN
+//
+///////////////////////////////////////
+void wiz_setup::setupPGN( void )
+{
+}
+///////////////////////////////////////
+//
+// wiz_setup::setupServers
+//
+///////////////////////////////////////
+void wiz_setup::setupServers( void )
+{
+ serverResource *newServer;
+ QStringList names, urls, ports;
+ unsigned int loop;
+
+ names << i18n("Free Internet Chess Server") << i18n("Internet Chess Club") << i18n("Global Chess Server") << i18n("Chess.Net");
+ names << i18n("Chess-Square.Com") << i18n("Australian FICS") << i18n("Brazilian FICS") << i18n("Chilean FICS");
+ names << i18n("Croatian FICS") << i18n("Dutch FICS") << i18n("French FICS") << i18n("German FICS") << i18n("Swedish FICS");
+ urls << "freechess.org" << "chessclub.com" << "global.chessparlor.com" << "chess.net";
+ urls << "chess-square.com" << "zics.org" << "jogo.cex.org.br" << "ajedrez.cec.uchile.cl";
+ urls << "fly.cc.fer.hr" << "freechess.nl" << "jeu.echecs.com" << "chess.unix-ag.uni-kl.de" << "chess.mds.mdh.se";
+ ports << "5000" << "5000" << "6000" << "5000" << "5000" << "5000" << "5000" << "5000";
+ ports << "7890" << "5000" << "5000" << "5000" << "5000";
+
+ for( loop = 0; loop < names.count(); loop++ )
+ {
+ kdDebug() << "adding " << names[loop] << endl;
+ newServer = new serverResource;
+ newServer->Name = names[loop];
+ newServer->URL = urls[loop];
+ newServer->Port = ports[loop].toInt();
+ newServer->LogFile = QString::null;
+ newServer->UserName = QString::null;
+ newServer->Password = QString::null;
+ newServer->StorePass = FALSE;
+ if( !loop ) newServer->CurrentRef = TRUE;
+ else newServer->CurrentRef = FALSE;
+ myResource->servers.append( *newServer );
+ delete newServer;
+ }
+}
+///////////////////////////////////////
+//
+// wiz_setup::findEngines
+//
+///////////////////////////////////////
+void wiz_setup::findEngines( void )
+{
+ engineResource *newEngine;
+ QStringList names, filenames;
+ KProcess *Shell;
+ bool foundOne( FALSE );
+ unsigned int loop;
+
+ names << "GNUChess" << "Crafty" << "Sjeng" << "KnightCap" << "BabyChess" << "Phalanx-XXII";
+ names << "Bowron Abernethy Chess Engine" << "Cilian" << "Faile" << "OliThink" << "Pepito";
+ names << "Yace";
+ filenames << "gnuchessx" << "crafty" << "sjeng" << "KnightCap" << "babychess-xboard-engine";
+ filenames << "phalanx" << "BACE" << "linuxCilian.exe" << "faile" << "olithink" << "pepito";
+ filenames << "yace";
+
+ for( loop = 0; loop < filenames.count(); loop++ )
+ {
+ Shell = new KProcess();
+ (*Shell) << filenames[loop];
+ if( Shell->start() )
+ {
+ kdWarning() << "Adding " << names[loop] << " to knightsrc" << endl;
+ newEngine = new engineResource;
+ newEngine->Name = names[loop];
+ newEngine->Filename = filenames[loop];
+ newEngine->Arguments = QString::null;
+ newEngine->LogFile = QString::null;
+ newEngine->Protocol = XBoard;
+ newEngine->Wins = 0;
+ newEngine->Losses = 0;
+ newEngine->Draws = 0;
+ if( foundOne )
+ newEngine->CurrentRef = 0;
+ else
+ newEngine->CurrentRef = ENGINE_WHITE | ENGINE_BLACK | ENGINE_WHITE_BK | ENGINE_BLACK_BK;
+ myResource->engines.append( *newEngine );
+ delete newEngine;
+ foundOne = TRUE;
+ }
+ Shell->kill();
+ delete Shell;
+ }
+}
+///////////////////////////////////////
+//
+// wiz_setup::slot_License
+//
+///////////////////////////////////////
+void wiz_setup::slot_License( int index )
+{
+ if( index == 0 )
+ {
+ setNextEnabled( Page6, TRUE );
+ myResource->Accepted_License = TRUE;
+ }
+ else
+ {
+ setNextEnabled( Page6, FALSE );
+ myResource->Accepted_License = FALSE;
+ }
+}
diff --git a/knights/wiz_setup.h b/knights/wiz_setup.h
new file mode 100644
index 0000000..edd5f9e
--- /dev/null
+++ b/knights/wiz_setup.h
@@ -0,0 +1,96 @@
+/***************************************************************************
+ wiz_setup.h - description
+ -------------------
+ begin : Wed Nov 21 2001
+ copyright : (C) 2003 by Troy Corbin Jr.
+ email : tcorbin@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef WIZ_SETUP_H
+#define WIZ_SETUP_H
+
+#include <kwizard.h>
+#include <qhbox.h>
+#include <qvbox.h>
+#include <qlayout.h>
+#include <qpushbutton.h>
+#include <qbuttongroup.h>
+#include <qradiobutton.h>
+#include <qlabel.h>
+#include "resource.h"
+#include "definitions.h"
+#include "knightstextview.h"
+
+/**
+ *@author Troy Corbin Jr.
+ */
+
+class wiz_setup : public KWizard
+{
+ Q_OBJECT
+ public:
+ wiz_setup( QWidget *parent=0, const char *name=0, resource *Rsrc=0 );
+ ~wiz_setup();
+ protected slots:
+ void slot_Work( const QString& pageTitle );
+ void slot_License( int );
+ protected:
+ void initPage1( void );
+ void initPage2( void );
+ void initPage3( void );
+ void initPage4( void );
+ void initPage5( void );
+ void initPage6( void );
+ void findEngines( void );
+ void setupServers( void );
+ void setupPGN( void );
+ private:
+ resource *myResource;
+ int steps;
+
+ QFrame *Page1;
+ QGridLayout *P1B1;
+ QLabel *SideImage1;
+ QLabel *WelcomeMessage;
+ QFrame *Page2;
+ QGridLayout *P2B1;
+ QLabel *SideImage2;
+ QLabel *pgnExplain;
+ QButtonGroup *pgnButtons;
+ QRadioButton *pgnYes;
+ QRadioButton *pgnNo;
+ QFrame *Page3;
+ QGridLayout *P3B1;
+ QLabel *SideImage3;
+ QLabel *engineExplain;
+ QButtonGroup *engineButtons;
+ QRadioButton *engineYes;
+ QRadioButton *engineNo;
+ QFrame *Page4;
+ QGridLayout *P4B1;
+ QLabel *SideImage4;
+ QLabel *serverExplain;
+ QButtonGroup *serverButtons;
+ QRadioButton *serverYes;
+ QRadioButton *serverNo;
+ QFrame *Page5;
+ QGridLayout *P5B1;
+ QLabel *SideImage5;
+ QLabel *FinishExplain;
+ QVBox *Page6;
+ KnightsTextView *licenseView;
+ QButtonGroup *licenseButtons;
+ QRadioButton *licenseYes;
+ QRadioButton *licenseNo;
+};
+
+#endif
diff --git a/media/KBDefault.tar.gz b/media/KBDefault.tar.gz
new file mode 100644
index 0000000..299b378
--- /dev/null
+++ b/media/KBDefault.tar.gz
Binary files differ
diff --git a/media/KCDefault.tar.gz b/media/KCDefault.tar.gz
new file mode 100644
index 0000000..667bba9
--- /dev/null
+++ b/media/KCDefault.tar.gz
Binary files differ
diff --git a/media/KSDefault.tar.gz b/media/KSDefault.tar.gz
new file mode 100644
index 0000000..27db3ee
--- /dev/null
+++ b/media/KSDefault.tar.gz
Binary files differ
diff --git a/media/Makefile.am b/media/Makefile.am
new file mode 100644
index 0000000..1458b76
--- /dev/null
+++ b/media/Makefile.am
@@ -0,0 +1,65 @@
+####### kdevelop will overwrite this part!!! (begin)##########
+
+
+EXTRA_DIST = hi48-mime-pgn.png hi16-mime-pgn.png KSDefault.tar.gz default-portrait.jpg hi64-app-knights.png pgn_template.kml hi64-mime-pgn.png hi32-mime-pgn.png icon-general.png hi32-app-knights.png default-engine-portrait.jpg KBDefault.tar.gz wizard.png hi48-app-knights.png KCDefault.tar.gz hi16-app-knights.png icon-display.png Makefile.am
+
+install-data-local:
+ $(mkinstalldirs) $(kde_icondir)/hicolor/48x48/mimetypes/
+ $(INSTALL_DATA) $(srcdir)/hi48-mime-pgn.png $(kde_icondir)/hicolor/48x48/mimetypes/pgn.png
+ $(mkinstalldirs) $(kde_icondir)/hicolor/16x16/mimetypes/
+ $(INSTALL_DATA) $(srcdir)/hi16-mime-pgn.png $(kde_icondir)/hicolor/16x16/mimetypes/pgn.png
+ $(mkinstalldirs) $(kde_datadir)/knights/themes/
+ $(INSTALL_DATA) $(srcdir)/KSDefault.tar.gz $(kde_datadir)/knights/themes/KSDefault.tar.gz
+ $(mkinstalldirs) $(kde_datadir)/knights/
+ $(INSTALL_DATA) $(srcdir)/default-portrait.jpg $(kde_datadir)/knights/default-portrait.jpg
+ $(mkinstalldirs) $(kde_icondir)/hicolor/64x64/apps/
+ $(INSTALL_DATA) $(srcdir)/hi64-app-knights.png $(kde_icondir)/hicolor/64x64/apps/knights.png
+ $(mkinstalldirs) $(kde_datadir)/knights/
+ $(INSTALL_DATA) $(srcdir)/splash.png $(kde_datadir)/knights/splash.png
+ $(mkinstalldirs) $(kde_datadir)/knights/
+ $(INSTALL_DATA) $(srcdir)/pgn_template.kml $(kde_datadir)/knights/pgn_template.kml
+ $(mkinstalldirs) $(kde_icondir)/hicolor/64x64/mimetypes/
+ $(INSTALL_DATA) $(srcdir)/hi64-mime-pgn.png $(kde_icondir)/hicolor/64x64/mimetypes/pgn.png
+ $(mkinstalldirs) $(kde_icondir)/hicolor/32x32/mimetypes/
+ $(INSTALL_DATA) $(srcdir)/hi32-mime-pgn.png $(kde_icondir)/hicolor/32x32/mimetypes/pgn.png
+ $(mkinstalldirs) $(kde_datadir)/knights/
+ $(INSTALL_DATA) $(srcdir)/icon-general.png $(kde_datadir)/knights/icon-general.png
+ $(mkinstalldirs) $(kde_icondir)/hicolor/32x32/apps/
+ $(INSTALL_DATA) $(srcdir)/hi32-app-knights.png $(kde_icondir)/hicolor/32x32/apps/knights.png
+ $(mkinstalldirs) $(kde_datadir)/knights/
+ $(INSTALL_DATA) $(srcdir)/default-engine-portrait.jpg $(kde_datadir)/knights/default-engine-portrait.jpg
+ $(mkinstalldirs) $(kde_datadir)/knights/themes/
+ $(INSTALL_DATA) $(srcdir)/KBDefault.tar.gz $(kde_datadir)/knights/themes/KBDefault.tar.gz
+ $(mkinstalldirs) $(kde_datadir)/knights/
+ $(INSTALL_DATA) $(srcdir)/wizard.png $(kde_datadir)/knights/wizard.png
+ $(mkinstalldirs) $(kde_icondir)/hicolor/48x48/apps/
+ $(INSTALL_DATA) $(srcdir)/hi48-app-knights.png $(kde_icondir)/hicolor/48x48/apps/knights.png
+ $(mkinstalldirs) $(kde_datadir)/knights/themes/
+ $(INSTALL_DATA) $(srcdir)/KCDefault.tar.gz $(kde_datadir)/knights/themes/KCDefault.tar.gz
+ $(mkinstalldirs) $(kde_icondir)/hicolor/16x16/apps/
+ $(INSTALL_DATA) $(srcdir)/hi16-app-knights.png $(kde_icondir)/hicolor/16x16/apps/knights.png
+ $(mkinstalldirs) $(kde_datadir)/knights/
+ $(INSTALL_DATA) $(srcdir)/icon-display.png $(kde_datadir)/knights/icon-display.png
+
+uninstall-local:
+ -rm -f $(kde_icondir)/hicolor/48x48/mimetypes/pgn.png
+ -rm -f $(kde_icondir)/hicolor/16x16/mimetypes/pgn.png
+ -rm -f $(kde_datadir)/knights/themes/KSDefault.tar.gz
+ -rm -f $(kde_datadir)/knights/default-portrait.jpg
+ -rm -f $(kde_icondir)/hicolor/64x64/apps/knights.png
+ -rm -f $(kde_datadir)/knights/splash.png
+ -rm -f $(kde_datadir)/knights/pgn_template.kml
+ -rm -f $(kde_icondir)/hicolor/64x64/mimetypes/pgn.png
+ -rm -f $(kde_icondir)/hicolor/32x32/mimetypes/pgn.png
+ -rm -f $(kde_datadir)/knights/icon-general.png
+ -rm -f $(kde_icondir)/hicolor/32x32/apps/knights.png
+ -rm -f $(kde_datadir)/knights/default-engine-portrait.jpg
+ -rm -f $(kde_datadir)/knights/themes/KBDefault.tar.gz
+ -rm -f $(kde_datadir)/knights/wizard.png
+ -rm -f $(kde_icondir)/hicolor/48x48/apps/knights.png
+ -rm -f $(kde_datadir)/knights/themes/KCDefault.tar.gz
+ -rm -f $(kde_icondir)/hicolor/16x16/apps/knights.png
+ -rm -f $(kde_datadir)/knights/icon-display.png
+
+####### kdevelop will overwrite this part!!! (end)############
+
diff --git a/media/default-engine-portrait.jpg b/media/default-engine-portrait.jpg
new file mode 100644
index 0000000..a15adeb
--- /dev/null
+++ b/media/default-engine-portrait.jpg
Binary files differ
diff --git a/media/default-portrait.jpg b/media/default-portrait.jpg
new file mode 100644
index 0000000..9abc737
--- /dev/null
+++ b/media/default-portrait.jpg
Binary files differ
diff --git a/media/hi16-app-knights.png b/media/hi16-app-knights.png
new file mode 100644
index 0000000..106d1eb
--- /dev/null
+++ b/media/hi16-app-knights.png
Binary files differ
diff --git a/media/hi16-mime-pgn.png b/media/hi16-mime-pgn.png
new file mode 100644
index 0000000..8ce42c1
--- /dev/null
+++ b/media/hi16-mime-pgn.png
Binary files differ
diff --git a/media/hi32-app-knights.png b/media/hi32-app-knights.png
new file mode 100644
index 0000000..8f82b32
--- /dev/null
+++ b/media/hi32-app-knights.png
Binary files differ
diff --git a/media/hi32-mime-pgn.png b/media/hi32-mime-pgn.png
new file mode 100644
index 0000000..37c5411
--- /dev/null
+++ b/media/hi32-mime-pgn.png
Binary files differ
diff --git a/media/hi48-app-knights.png b/media/hi48-app-knights.png
new file mode 100644
index 0000000..9716c13
--- /dev/null
+++ b/media/hi48-app-knights.png
Binary files differ
diff --git a/media/hi48-mime-pgn.png b/media/hi48-mime-pgn.png
new file mode 100644
index 0000000..04489dc
--- /dev/null
+++ b/media/hi48-mime-pgn.png
Binary files differ
diff --git a/media/hi64-app-knights.png b/media/hi64-app-knights.png
new file mode 100644
index 0000000..53c8b94
--- /dev/null
+++ b/media/hi64-app-knights.png
Binary files differ
diff --git a/media/hi64-mime-pgn.png b/media/hi64-mime-pgn.png
new file mode 100644
index 0000000..224f369
--- /dev/null
+++ b/media/hi64-mime-pgn.png
Binary files differ
diff --git a/media/icon-display.png b/media/icon-display.png
new file mode 100644
index 0000000..528d779
--- /dev/null
+++ b/media/icon-display.png
Binary files differ
diff --git a/media/icon-general.png b/media/icon-general.png
new file mode 100644
index 0000000..8f82b32
--- /dev/null
+++ b/media/icon-general.png
Binary files differ
diff --git a/media/pgn_template.kml b/media/pgn_template.kml
new file mode 100644
index 0000000..c77908e
--- /dev/null
+++ b/media/pgn_template.kml
@@ -0,0 +1,17 @@
+<p align=center>
+<table width="95%">
+<tr><td align=center>
+<img src="%whiteimage%" align=left width=80 height=100>
+<img src="%blackimage%" align=right width=80 height=100>
+<h2>%white% vs. %black%</h2>
+<b>%event%</b><br>
+<b>Round: %round%</b><br>
+<b>%site%</b><br>
+<b>%date% %time%</b><br>
+</td></tr>
+<tr><td align=left>
+%moves%
+<hr>
+</td></tr>
+</table>
+</p>
diff --git a/media/splash.png b/media/splash.png
new file mode 100644
index 0000000..1b44017
--- /dev/null
+++ b/media/splash.png
Binary files differ
diff --git a/media/wizard.png b/media/wizard.png
new file mode 100644
index 0000000..44c7805
--- /dev/null
+++ b/media/wizard.png
Binary files differ
diff --git a/patch-stamp b/patch-stamp
new file mode 100644
index 0000000..37def0c
--- /dev/null
+++ b/patch-stamp
@@ -0,0 +1,17 @@
+Patches applied in the Debian version of :
+
+debian/patches/01_gcc-4.0-fix.dpatch (Tommaso Moroni <moronito@debian.org>):
+ No description.
+
+debian/patches/02_de.po.dpatch (Tommaso Moroni <moronito@debian.org>):
+ No description.
+
+debian/patches/03_noGPLonload.dpatch (Claudio Moratti <maxer@knio.it>):
+ No description.
+
+debian/patches/04_qt3_headers.dpatch (<bdefreese@debian2.bddebian.com>):
+ No description.
+
+debian/patches/kubuntu_01_fix_castle.dpatch (Martin Meredith <mez@ubuntu.com>):
+ Fixes crash on castling
+
diff --git a/po/Makefile.am b/po/Makefile.am
new file mode 100644
index 0000000..5e620c8
--- /dev/null
+++ b/po/Makefile.am
@@ -0,0 +1,7 @@
+####### kdevelop will overwrite this part!!! (begin)##########
+POFILES = AUTO
+
+
+EXTRA_DIST = de.gmo es.gmo fi.gmo et.gmo fr.gmo it.gmo
+
+####### kdevelop will overwrite this part!!! (end)############
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..9eff6df
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,2290 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2003-01-21 04:30-0600\n"
+"PO-Revision-Date: 2002-06-19 19:41+0200\n"
+"Last-Translator: Sascha Müller <dev@saschamueller.com>\n"
+"Language-Team: Deutsch <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 0.9.6\n"
+
+#: accel.cpp:23
+msgid "Previous Move"
+msgstr "Vorheriger Zug"
+
+#: accel.cpp:24
+msgid "Next Move"
+msgstr "Nächster Zug"
+
+#: accel.cpp:25
+msgid "Enter Text"
+msgstr "Texteingabe"
+
+#: accel.cpp:26
+msgid "Page Up"
+msgstr "Seite zurück"
+
+#: accel.cpp:27
+msgid "Page Down"
+msgstr "Seite vor"
+
+#: accel.cpp:28
+msgid "Increase Board Size"
+msgstr "Spielbrettgröße erhöhen"
+
+#: accel.cpp:29
+msgid "Decrease Board Size"
+msgstr "Spielbrettgröße verringern"
+
+#: accel.cpp:30
+msgid "Last History Item"
+msgstr "Vorheriger"
+
+#: accel.cpp:31
+msgid "Next History Item"
+msgstr "Nächster"
+
+#: accel.cpp:32
+msgid "Reply to the Last Tell"
+msgstr "Letzte Nachricht beantworten"
+
+#: accel.cpp:33
+msgid "Reply to the Channel"
+msgstr "Antwort an den Raum"
+
+#: accel.cpp:34
+msgid "Kibitz"
+msgstr "Kiebitzen"
+
+#: accel.cpp:35 setpagedisplay.cpp:523
+msgid "Whisper"
+msgstr "Flüstern"
+
+#: challenge_graph.cpp:75 tab_seeklist.cpp:40
+msgid "Seek Matches"
+msgstr "Partien suchen"
+
+#: challenge_graph.cpp:77 tab_seeklist.cpp:42
+msgid "Accept This Match"
+msgstr "Diese Partie annehmen"
+
+#: challenge_graph.cpp:78 tab_seeklist.cpp:43
+msgid "Tell..."
+msgstr "Nachricht..."
+
+#: challenge_graph.cpp:79 tab_seeklist.cpp:44
+msgid "Assess..."
+msgstr "Bewerten..."
+
+#: challenge_graph.cpp:80 tab_seeklist.cpp:45
+msgid "Player Info"
+msgstr "Spielerinformation"
+
+#: challenge_graph.cpp:82 tab_seeklist.cpp:47
+msgid "Player History"
+msgstr "Spieler History"
+
+#: challenge_graph.cpp:84 tab_seeklist.cpp:49
+msgid "Add to Friends"
+msgstr "Zu Freunden hinzufügen"
+
+#: challenge_graph.cpp:85 tab_seeklist.cpp:50
+msgid "Ignore This Player"
+msgstr "Diesen Spieler ignorieren"
+
+#: challenge_graph.cpp:304 tab_seeklist.cpp:28
+msgid "Rating"
+msgstr "Bewertung"
+
+#: challenge_graph.cpp:311
+#, fuzzy
+msgid "Time"
+msgstr "Titel"
+
+#: challenge_graph_view.cpp:105
+msgid " Name: %1 Rating: %2 Match Type: %3 %4 Base Time: %5 Increment: %6"
+msgstr ""
+
+#: core.cpp:385
+#, fuzzy
+msgid "Hint"
+msgstr "Vorschlag:"
+
+#: core.cpp:388
+msgid "Tell User"
+msgstr ""
+
+#: core.cpp:391
+msgid "Tell User Error"
+msgstr ""
+
+#: core.cpp:397
+#, fuzzy
+msgid "Tell Opponent"
+msgstr "Computergegner"
+
+#: core.cpp:411
+#, fuzzy
+msgid "Tell All"
+msgstr "&Alles auswählen"
+
+#: core.cpp:646
+#, fuzzy
+msgid "Load PGN..."
+msgstr "Spiel laden..."
+
+#: core.cpp:690
+#, fuzzy
+msgid "Would you like to save this match?"
+msgstr "Möchten Sie dieses Spiel speichern?"
+
+#: core.cpp:691
+#, fuzzy
+msgid "Save Match?"
+msgstr "&Partie"
+
+#: core.cpp:710
+#, fuzzy
+msgid "Save Match..."
+msgstr "Spiel speichern &als..."
+
+#: dlg_challenge.cpp:25
+msgid "You've Been Challenged:"
+msgstr "Sie wurden herausgefordert:"
+
+#: dlg_challenge.cpp:29
+msgid "Accept"
+msgstr "Annehmen"
+
+#: dlg_challenge.cpp:30
+msgid "Decline"
+msgstr "Ablehnen"
+
+#: dlg_challenge.cpp:49
+msgid "Time Odds Match"
+msgstr "Partie mit unterschiedlicher Zeit"
+
+#: dlg_challenge.cpp:53
+msgid "Unrated"
+msgstr "Nicht bewerted"
+
+#: dlg_challenge.cpp:54
+msgid "Rated"
+msgstr "Bewerted"
+
+#: dlg_challenge.cpp:60 dlg_challenge.cpp:69 dlg_newmatch.cpp:87
+#: dlg_newmatch.cpp:104 tab_seeklist.cpp:101
+msgid " min."
+msgstr " Min."
+
+#: dlg_challenge.cpp:61 dlg_challenge.cpp:70 dlg_newmatch.cpp:97
+#: dlg_newmatch.cpp:114 setpageservers.cpp:146 tab_seeklist.cpp:102
+msgid " sec."
+msgstr " Sek."
+
+#: dlg_challenge.cpp:62 dlg_challenge.cpp:71 tab_seeklist.cpp:31
+msgid "Base Time"
+msgstr "Basiszeit"
+
+#: dlg_challenge.cpp:63 dlg_challenge.cpp:72 tab_seeklist.cpp:32
+msgid "Increment"
+msgstr "Erhöhen"
+
+#: dlg_challenge.cpp:109
+msgid ""
+"%1 %2 vs. %3 %4\n"
+"in a %5 match."
+msgstr ""
+"%1 %2 vs. %3 %4\n"
+"in einer %5 Partie."
+
+#: dlg_challenge.cpp:124 dlg_challenge.cpp:125
+msgid "Time Controls"
+msgstr "Zeiteinstellungen"
+
+#: dlg_challenge.cpp:154
+msgid "Counter Offer"
+msgstr "Gegenangebot"
+
+#: dlg_engine.cpp:26
+msgid "Configure Engine"
+msgstr "Engine konfigurieren"
+
+#: dlg_engine.cpp:38
+msgid "Engine Name"
+msgstr "Name der Engine"
+
+#: dlg_engine.cpp:43 setpageengines.cpp:63
+msgid "Protocol"
+msgstr "Protokoll"
+
+#: dlg_engine.cpp:48
+msgid "Engine Filename"
+msgstr "Dateiname der Engine"
+
+#: dlg_engine.cpp:54
+msgid "Command Line Arguments"
+msgstr "Kommandozeilenparameter"
+
+#: dlg_engine.cpp:59 dlg_server.cpp:88
+msgid "Log File"
+msgstr "Log-Datei"
+
+#: dlg_login.cpp:21
+msgid "Login Prompt"
+msgstr "Login"
+
+#: dlg_login.cpp:31
+msgid "Login:"
+msgstr "Login:"
+
+#: dlg_login.cpp:32
+msgid "Password:"
+msgstr "Passwort:"
+
+#: dlg_login.cpp:38
+msgid "Log in as guest"
+msgstr ""
+
+#: dlg_login.cpp:54
+msgid "Login"
+msgstr "Login"
+
+#: dlg_login.cpp:54
+msgid "Log in to the chess server using this name and password."
+msgstr "Mit diesem Benutzer und Passwort beim Schachserver einwählen."
+
+#: dlg_newmatch.cpp:38
+#, fuzzy
+msgid "Start a New Match"
+msgstr "Eine Partie gegen den PC beginnen"
+
+#: dlg_newmatch.cpp:45
+#, fuzzy
+msgid "White"
+msgstr "Seite"
+
+#: dlg_newmatch.cpp:46
+#, fuzzy
+msgid "Black"
+msgstr "&Schwarz spielen"
+
+#: dlg_newmatch.cpp:59 dlg_newmatch.cpp:66
+msgid "Human"
+msgstr ""
+
+#: dlg_newmatch.cpp:60 dlg_newmatch.cpp:67
+#, fuzzy
+msgid "Computer"
+msgstr "vs. Com&puter"
+
+#: dlg_newmatch.cpp:61 dlg_newmatch.cpp:68
+#, fuzzy
+msgid "Email"
+msgstr "vs. &Email"
+
+#: dlg_newmatch.cpp:85 dlg_newmatch.cpp:102
+#, fuzzy
+msgid "Base Time:"
+msgstr "Basiszeit"
+
+#: dlg_newmatch.cpp:90 dlg_newmatch.cpp:107
+#, fuzzy
+msgid "Moves Per Base Time"
+msgstr "Basiszeit"
+
+# German NAG values taken from:
+# http://scid.sourceforge.net/dhelp/NAGs.html
+#: dlg_newmatch.cpp:92 dlg_newmatch.cpp:109
+#, fuzzy
+msgid " moves"
+msgstr " Guter Zug"
+
+#: dlg_newmatch.cpp:95 dlg_newmatch.cpp:112
+#, fuzzy
+msgid "Increment Per Move"
+msgstr "Erhöhen"
+
+#: dlg_promote.cpp:94
+msgid "Promote your pawn to..."
+msgstr "Bauer umwandeln in..."
+
+#: dlg_promote.cpp:101
+msgid "Pawn Promotion"
+msgstr "Bauernumwandlung"
+
+#: dlg_selectemail.cpp:27
+msgid "Select Email Address"
+msgstr ""
+
+#: dlg_selectengine.cpp:30
+msgid "Select Computer Player"
+msgstr ""
+
+#: dlg_selectengine.cpp:41
+#, fuzzy
+msgid "Computer Players"
+msgstr "vs. Com&puter"
+
+#: dlg_selectengine.cpp:61
+#, fuzzy
+msgid "Player Strength"
+msgstr "Spieler History"
+
+#: dlg_selectengine.cpp:63
+msgid "Weak"
+msgstr ""
+
+#: dlg_selectengine.cpp:70
+msgid "Strong"
+msgstr ""
+
+#: dlg_server.cpp:25
+msgid "Configure Server"
+msgstr "Server konfigurieren"
+
+#: dlg_server.cpp:37
+msgid "Server Name"
+msgstr "Servername"
+
+#: dlg_server.cpp:44
+msgid "Server URL"
+msgstr "Server URL"
+
+#: dlg_server.cpp:49
+msgid "Server Port"
+msgstr "Server Port"
+
+#: dlg_server.cpp:56
+msgid "Username"
+msgstr "Benutzername"
+
+#: dlg_server.cpp:59
+msgid "Remember My Password"
+msgstr "Passwort speichern"
+
+#: dlg_server.cpp:64
+msgid "Password"
+msgstr "Passwort"
+
+#: dlg_server.cpp:71
+msgid "Confirm Password"
+msgstr "Passwort wiederholen"
+
+#: dlg_server.cpp:79
+msgid "Timeseal"
+msgstr "Timeseal"
+
+#: dlg_settings.cpp:48 setpagedisplay.cpp:142
+msgid "General"
+msgstr "Allgemein"
+
+#: dlg_settings.cpp:49
+msgid "Various aspects of Knights get configured here."
+msgstr "Hier können verschiedene Einstellungen zu Knights vorgenommen werden."
+
+#: dlg_settings.cpp:55
+msgid "Display"
+msgstr "Anzeige"
+
+#: dlg_settings.cpp:56
+msgid "These settings determine how Knights displays itself to you."
+msgstr "Hier können Sie das Erscheinungsbild von Knights einstellen."
+
+#: dlg_settings.cpp:62
+msgid "Audio"
+msgstr "Klänge"
+
+#: dlg_settings.cpp:63
+msgid "These settings determine what Knights sounds like."
+msgstr "Hier können Sie die Klänge für Knights einrichten."
+
+#: dlg_settings.cpp:69
+msgid "Computer Opponents"
+msgstr "Computergegner"
+
+#: dlg_settings.cpp:70
+msgid "Configure your chess engines here."
+msgstr "Hier können Sie Ihre Schach-Engines einstellen."
+
+#: dlg_settings.cpp:76 setpageservers.cpp:65
+msgid "Chess Servers"
+msgstr "Schach-Server"
+
+#: dlg_settings.cpp:77
+msgid "Configure your internet chess servers here."
+msgstr "Hier können Sie Internet-Schach-Server konfigurieren."
+
+#: io_internet.cpp:80
+#, fuzzy
+msgid ""
+"There are no servers configured.\n"
+"Please make sure you have at least one server configured."
+msgstr ""
+"Knights konnte Timeseal nicht starten.\n"
+"Stellen Sie sicher, dass der angegebene Dateiname korrekt ist."
+
+#: io_internet.cpp:80
+#, fuzzy
+msgid "Cannot find a server."
+msgstr "Server nicht gefunden."
+
+#: io_internet.cpp:99
+msgid ""
+"Knights can not start Timeseal.\n"
+"Please make sure you have the correct path and filename configured."
+msgstr ""
+"Knights konnte Timeseal nicht starten.\n"
+"Stellen Sie sicher, dass der angegebene Dateiname korrekt ist."
+
+#: io_internet.cpp:99
+#, fuzzy
+msgid "Cannot find Timeseal."
+msgstr "Timeseal nicht gefunden."
+
+#: io_internet.cpp:109 io_internet.cpp:121
+#, fuzzy
+msgid ""
+"Knights is unable to connect to the server.\n"
+" Please make sure your internet connection is working and try again."
+msgstr ""
+"Knights konnte keine Verbindung mit diesem Server herstellen. Bitte "
+"überprüfen Sie Benutzernamen und Passwort."
+
+#: io_internet.cpp:109 io_internet.cpp:121
+#, fuzzy
+msgid "Cannot connect to server."
+msgstr "Mit Server verbinden"
+
+#: io_internet.cpp:144
+#, fuzzy
+msgid "%1 Console"
+msgstr "Konsole"
+
+#: io_internet.cpp:149
+msgid "Sought Matches List"
+msgstr ""
+
+#: io_internet.cpp:154
+msgid "Sought Matches Graph"
+msgstr ""
+
+#: knights.cpp:70 main.cpp:34
+msgid "Knights"
+msgstr "Knights"
+
+#: knights.cpp:250
+msgid "&Draw"
+msgstr "&Remis"
+
+#: knights.cpp:254
+msgid "&Retract Move"
+msgstr "Zug &zurücknehmen"
+
+#: knights.cpp:256
+msgid "Select this to retract your last move."
+msgstr "Zurücknehmen Ihres letzten Zuges."
+
+#: knights.cpp:258
+msgid "Resign"
+msgstr "Aufgeben"
+
+#: knights.cpp:260
+msgid "Use this to concede the match to your opponent."
+msgstr "Dem Gegner das Spiel schenken."
+
+#: knights.cpp:262
+msgid "&Call Flag"
+msgstr "Für &beendet erklären"
+
+#: knights.cpp:264
+#, fuzzy
+msgid ""
+"Use this to declare the match over, due to your opponent being out of time."
+msgstr ""
+"Das Spiel für beendet erklären. Dies funktioniert nur, wenn die Zeit des "
+"Gegners abgelaufen ist."
+
+#: knights.cpp:266
+msgid "&Hint"
+msgstr "&Vorschlag"
+
+#: knights.cpp:268
+msgid "This will ask your opponent for a hint."
+msgstr "Ihren Gegner um einen Vorschlag bitten."
+
+#: knights.cpp:270
+msgid "Move &Now"
+msgstr "&Jetzt ziehen"
+
+#: knights.cpp:272
+msgid "Clicking this option will force your opponent to move immediately."
+msgstr "Ihren Gegner zwingen, sofort einen Zug zu machen."
+
+#: knights.cpp:274
+msgid "&Flip View"
+msgstr "Ansicht &umdrehen"
+
+#: knights.cpp:276
+msgid "This will reverse the chessboard's orientation by 180 degrees."
+msgstr "Dreht das Schachbrett um 180 Grad."
+
+#: knights.cpp:278
+msgid "&Ponder"
+msgstr "Nach&denken"
+
+#: knights.cpp:281
+msgid "This toggles your opponent's ability to think while it's your turn."
+msgstr "Die Fähigkeit des Gegners, während Ihres Zugs zu denken."
+
+#: knights.cpp:285 knights.cpp:949
+msgid "Pause"
+msgstr "Pause"
+
+#: knights.cpp:287
+msgid "Select this to pause the clock for this match."
+msgstr "Die Uhr für diese Partie anhalten."
+
+#: knights.cpp:292
+msgid "&Offer Draw"
+msgstr "Remis &anbieten"
+
+#: knights.cpp:293
+#, fuzzy
+msgid ""
+"Clicking this will inform your opponent that you are willing draw the match."
+msgstr ""
+"Ihren Gegner darüber informieren, dass Sie bereit sind, dieses Spiel mit "
+"einem Remis zu beenden."
+
+#: knights.cpp:295
+msgid "&Accept Draw"
+msgstr "Remis a&nnehmen"
+
+#: knights.cpp:296
+msgid "Clicking this will accept a draw offered by your opponent."
+msgstr "Ein Remis-Angebot Ihres Gegners annehmen."
+
+#: knights.cpp:298
+msgid "&Reject Draw"
+msgstr "Remis a&blehnen"
+
+#: knights.cpp:299
+msgid "Clicking this will reject a draw offered by your opponent."
+msgstr "Ein Remis-Angebot Ihres Gegners ablehnen."
+
+#: knights.cpp:301
+msgid "&Ignore Draw"
+msgstr "Remis &ignorieren"
+
+#: knights.cpp:302
+msgid "Clicking this will ignore future draw offers from your opponent."
+msgstr "Alle weiteren Remis-Angebote Ihres Gegners ignorieren."
+
+#: knights.cpp:308
+#, fuzzy
+msgid "&New Match..."
+msgstr "&Partie"
+
+#: knights.cpp:309
+msgid "This allows you to begin a new match."
+msgstr "Ein neues Spiel beginnen."
+
+#: knights.cpp:312
+#, fuzzy
+msgid "&Load Match..."
+msgstr "Spiel &laden..."
+
+#: knights.cpp:313
+#, fuzzy
+msgid ""
+"The Load command will allow you to select a previously saved match and play "
+"it again."
+msgstr "Ein vorher gespeichertes Spiel laden und weiterspielen."
+
+#: knights.cpp:316 thinbuttons.cpp:40
+#, fuzzy
+msgid "&Close Match"
+msgstr "Spiel s&chliessen"
+
+#: knights.cpp:318
+msgid "This command removes the current match."
+msgstr "Die aktuelle Partie entfernen."
+
+#: knights.cpp:320
+msgid "Close All"
+msgstr "Alle schließen"
+
+#: knights.cpp:322
+msgid "This command will remove all matches that are currently loaded."
+msgstr "Alle Partien, die zur Zeit geladen sind, entfernen."
+
+#: knights.cpp:326 thinbuttons.cpp:32
+#, fuzzy
+msgid "&Save Match"
+msgstr "&Partie"
+
+#: knights.cpp:328 knights.cpp:333
+#, fuzzy
+msgid ""
+"The Save command will allow you to store a copy of your current match for "
+"later use."
+msgstr "Das aktuelle Spiel speichern."
+
+#: knights.cpp:331 thinbuttons.cpp:34
+#, fuzzy
+msgid "Save Match &As..."
+msgstr "Spiel speichern &als..."
+
+#: knights.cpp:337 knights.cpp:859
+msgid "Connect to Server"
+msgstr "Mit Server verbinden"
+
+#: knights.cpp:338
+msgid "Clicking this will connect Knights with an internet chess server."
+msgstr "Knights mit einem Internet-Schach-Server verbinden."
+
+#: knights.cpp:342 thinbuttons.cpp:37
+msgid "&Print Notation..."
+msgstr "Aus&drucken..."
+
+#: knights.cpp:344
+#, fuzzy
+msgid ""
+"The Print command will allow you to print this game's notation on your "
+"printer."
+msgstr ""
+"Dieses Kommando ermöglicht es Ihnen, ein Protokoll dieser Partie "
+"auszudrucken."
+
+#: knights.cpp:349
+#, fuzzy
+msgid "The Quit command will stop all matches and exit Knights."
+msgstr "Das aktuelle Spiel anhalten und Knights beenden."
+
+#: knights.cpp:355
+msgid "Play &White"
+msgstr "&Weiß spielen"
+
+#: knights.cpp:358
+msgid ""
+"If checked, this option tells Knights that you will play as the White army "
+"when you play vs. the computer."
+msgstr ""
+"Wenn diese Option ausgewählt ist, werden Sie bei einem Spiel gegen den "
+"Computer weiß spielen."
+
+#: knights.cpp:360
+msgid "Play &Black"
+msgstr "&Schwarz spielen"
+
+#: knights.cpp:363
+msgid ""
+"If checked, this option tells Knights that you will play as the Black army "
+"when you play vs. the computer."
+msgstr ""
+"Wenn diese Option ausgewählt ist, werden Sie bei einem Spiel gegen den "
+"Computer schwarz spielen."
+
+#: knights.cpp:366
+#, fuzzy
+msgid "&Install Themes"
+msgstr "Neue Themes installieren"
+
+#: knights.cpp:367
+msgid "This lets you install downloaded themes into Knights."
+msgstr ""
+
+#: knights.cpp:371
+msgid ""
+"Click this if you want to change the keyboard shortcuts that Knights uses."
+msgstr "Hier können Sie die Tastaturkürzel, die Knights verwendet, verändern."
+
+#: knights.cpp:374
+msgid "&Configure Knights..."
+msgstr "Knights &konfigurieren..."
+
+#: knights.cpp:375
+msgid ""
+"This opens a new window which allows you to customize Knights to your "
+"particular tastes."
+msgstr ""
+"Ein neues Fenster öffnen, in dem Einstellungen zu Knights vorgenommen werden "
+"können."
+
+#: knights.cpp:381
+msgid "Begin a Tutorial"
+msgstr "Einführung beginnen"
+
+#: knights.cpp:387
+msgid "&Match"
+msgstr "&Partie"
+
+#: knights.cpp:576
+#, fuzzy
+msgid "Error with white engine"
+msgstr "Fehler bei weißer Engine"
+
+#: knights.cpp:578
+msgid ""
+"You selected %1 to play white,\n"
+"but it can only be used as a book engine.\n"
+"Please select another engine to play white."
+msgstr ""
+"Sie haben ausgewählt, dass %1\n"
+"weiß spielen soll. Es handelt sich jedoch\n"
+"um eine Book-Engine. Bitte wählen Sie eine\n"
+"andere Engine aus."
+
+#: knights.cpp:579
+msgid "White Engine Problem"
+msgstr "Problem mit weißer Engine"
+
+#: knights.cpp:582
+#, fuzzy
+msgid "Error with white book engine"
+msgstr " Fehler in Book Engine"
+
+#: knights.cpp:584
+msgid ""
+"You selected %1 to play white's book,\n"
+"but it can only be used as a regular engine.\n"
+"Please select another engine to play white's book."
+msgstr ""
+"Sie haben %1 als Book Engine für weiß\n"
+"ausgewählt. Es handelt sich jedoch um eine\n"
+"normale Engine. Bitte wählen Sie eine andere\n"
+"Engine aus."
+
+#: knights.cpp:585
+msgid "White Book Engine Problem"
+msgstr "Problem mit weißer Book-Engine"
+
+#: knights.cpp:588
+#, fuzzy
+msgid "Error with black engine"
+msgstr " Problem mit schwarzer Engine"
+
+#: knights.cpp:590
+msgid ""
+"You selected %1 to play black,\n"
+"but it can only be used as a book engine.\n"
+"Please select another engine to play black."
+msgstr ""
+"Sie haben ausgewählt, dass %1\n"
+"schwarz spielen soll. Es handelt sich jedoch\n"
+"um eine Book-Engine. Bitte wählen Sie eine\n"
+"andere Engine aus."
+
+#: knights.cpp:591
+msgid "Black Engine Problem"
+msgstr "Problem mit schwarzer Engine"
+
+#: knights.cpp:594
+#, fuzzy
+msgid "Error with black book engine"
+msgstr " Problem mit schwarzer Book-Engine"
+
+#: knights.cpp:596
+msgid ""
+"You selected %1 to play black's book,\n"
+"but it can only be used as a regular engine.\n"
+"Please select another engine to play black's book."
+msgstr ""
+"Sie haben %1 als Book Engine für schwarz\n"
+"ausgewählt. Es handelt sich jedoch um eine\n"
+"normale Engine. Bitte wählen Sie eine andere\n"
+"Engine aus."
+
+#: knights.cpp:597
+msgid "Black Book Engine Problem"
+msgstr "Problem mit schwarzer Book-Engine"
+
+#: knights.cpp:600
+#, fuzzy
+msgid "The computer opponent assigned to play %1 has crashed"
+msgstr " Der Computergegner, der %1 spielen sollte, ist abgestürzt"
+
+#: knights.cpp:603
+#, fuzzy
+msgid "There was an error while loading the file"
+msgstr " Beim Laden der Datei ist ein Fehler aufgetreten"
+
+#: knights.cpp:606
+#, fuzzy
+msgid "There was an error while saving the file"
+msgstr " Beim Speichern der Datei ist ein Fehler aufgetreten"
+
+#: knights.cpp:610
+#, fuzzy
+msgid "Loading complete"
+msgstr " Laden erfolgreich"
+
+#: knights.cpp:613
+#, fuzzy
+msgid "Saving complete"
+msgstr " Speichern erfolgreich"
+
+#: knights.cpp:616
+#, fuzzy
+msgid "Reading File"
+msgstr " Lese Datei"
+
+#: knights.cpp:619
+#, fuzzy
+msgid "Can not move a chessman while reviewing the match"
+msgstr ""
+" Während der Wiederholung des Spiels können keine Figuren bewegt werden"
+
+#: knights.cpp:622
+#, fuzzy
+msgid "Illegal Move"
+msgstr " Ungültiger Zug"
+
+#: knights.cpp:625
+#, fuzzy
+msgid "White's turn"
+msgstr " Weiß am Zug"
+
+#: knights.cpp:628
+#, fuzzy
+msgid "Black's turn"
+msgstr " Schwarz am Zug"
+
+#: knights.cpp:631
+#, fuzzy
+msgid "White wins"
+msgstr " Weiß gewinnt"
+
+#: knights.cpp:634
+#, fuzzy
+msgid "Black wins"
+msgstr " Schwarz gewinnt"
+
+#: knights.cpp:637
+#, fuzzy
+msgid "Checkmate, White wins"
+msgstr " Schachmatt, Weiß gewinnt"
+
+#: knights.cpp:640
+#, fuzzy
+msgid "Checkmate, Black wins"
+msgstr " Schachmatt, schwarz gewinnt"
+
+#: knights.cpp:643
+#, fuzzy
+msgid "White resigns"
+msgstr " Weiß gibt auf"
+
+#: knights.cpp:646
+#, fuzzy
+msgid "Black resigns"
+msgstr " Schwarz gibt auf"
+
+#: knights.cpp:649
+#, fuzzy
+msgid "White's flag fell"
+msgstr " Zeit von Weiß abgelaufen"
+
+#: knights.cpp:652
+#, fuzzy
+msgid "Black's flag fell"
+msgstr " Zeit von Schwarz abgelaufen"
+
+#: knights.cpp:655
+#, fuzzy
+msgid "Black's flag was called, White wins"
+msgstr "Weiß gewinnt wegen Zeitüberschreitung"
+
+#: knights.cpp:658
+#, fuzzy
+msgid "White's flag was called, Black wins"
+msgstr "Schwarz gewinnt wegen Zeitüberschreitung"
+
+#: knights.cpp:661
+#, fuzzy
+msgid "Draw match"
+msgstr " Remis"
+
+#: knights.cpp:664
+#, fuzzy
+msgid "50 moves rule, draw match"
+msgstr " 50-Zug-Regel, Remis"
+
+#: knights.cpp:667
+#, fuzzy
+msgid "Starting computer players, please wait"
+msgstr " Starte Computerspieler, bitte warten"
+
+#: knights.cpp:670
+#, fuzzy
+msgid "Match paused"
+msgstr "Art der Partie"
+
+#: knights.cpp:673
+#, fuzzy
+msgid "White has offered a draw"
+msgstr " Weiß hat ein Remis angeboten"
+
+#: knights.cpp:676
+#, fuzzy
+msgid "Black has offered a draw"
+msgstr " Schwarz hat ein Remis angeboten"
+
+#: knights.cpp:679
+#, fuzzy
+msgid "Lost contact with opponent"
+msgstr " Verbindung mit Gegner abgebrochen"
+
+#: knights.cpp:682
+#, fuzzy
+msgid "Ready"
+msgstr " Bereit"
+
+#: knights.cpp:866
+msgid "Disconnect from Server"
+msgstr "Verbindung mit Server trennen"
+
+#: knights.cpp:955
+msgid "Resume"
+msgstr "Fortsetzen"
+
+#: knights.cpp:1014
+#, fuzzy
+msgid "Knights Themes"
+msgstr "Knights"
+
+#: knights.cpp:1015
+#, fuzzy
+msgid "Install Theme..."
+msgstr "Neue Themes installieren"
+
+#: knights.cpp:1045
+msgid ""
+"You do not have permission to install this theme systemwide, so Knights "
+"installed it locally."
+msgstr ""
+"Sie haben keine ausreichenden Rechte, um das Theme systemweit zu "
+"installieren. Daher wurde es von Knights lokal installiert."
+
+#: knights.cpp:1046
+msgid "Installed theme locally"
+msgstr "Theme lokal installiert"
+
+#: knights.cpp:1051
+#, c-format
+msgid ""
+"The theme could not be installed:\n"
+"%1"
+msgstr ""
+"Das Theme konnte nicht im folgenden Verzeichnis installiert werden:\n"
+"%1"
+
+#: knights.cpp:1052
+msgid "Can not install theme"
+msgstr "Kann Theme nicht installieren"
+
+#: knightstextview.cpp:35
+msgid "Select &All"
+msgstr "&Alles auswählen"
+
+#: knightstextview.cpp:44
+msgid "Zoom &In"
+msgstr ""
+
+#: knightstextview.cpp:46
+msgid "Zoom &Out"
+msgstr ""
+
+#: list_pgn.cpp:29 list_pgn.cpp:48
+msgid "Result"
+msgstr "Ergebnis"
+
+#: list_pgn.cpp:30 list_pgn.cpp:49
+msgid "Title"
+msgstr "Titel"
+
+#: list_pgn.cpp:31 list_pgn.cpp:50
+msgid "Round"
+msgstr "Runde"
+
+#: list_pgn.cpp:32 list_pgn.cpp:51
+#, fuzzy
+msgid "Site"
+msgstr "Seite"
+
+#: list_pgn.cpp:33 list_pgn.cpp:52
+msgid "Date"
+msgstr "Datum"
+
+#: list_pgn.cpp:81
+#, c-format
+msgid "Can not open %1"
+msgstr "%1 konnte nicht geöffnet werden"
+
+#: list_pgn.cpp:140
+msgid "%1 matches found."
+msgstr "%1 Partien gefunden"
+
+#: main.cpp:26
+msgid "Specify the location of your Knights data directory."
+msgstr "Wählen Sie Ihr Knights Datenverzeichnis aus"
+
+#: main.cpp:27
+msgid "A .pgn file to be loaded."
+msgstr "Zu ladende .pgn-Datei."
+
+#: main.cpp:36
+#, fuzzy
+msgid ""
+"The Knights Chess Interface\n"
+"\n"
+"Knights is a chess interface\n"
+"for the K Desktop Environment."
+msgstr ""
+"Knight - Die grafische Schach-Oberfläche\n"
+"\n"
+"Knights ist eine Schach-Oberfläche\n"
+"für das K Desktop Environment (KDE)."
+
+#: main.cpp:44
+#, fuzzy
+msgid "Project Manager and Programmer"
+msgstr "Projektleider and Programmierer"
+
+#: main.cpp:48
+msgid "Communications Programmer"
+msgstr ""
+
+#: main.cpp:52
+msgid "Qtopia port and patches"
+msgstr ""
+
+#: main.cpp:56
+msgid "Patches and suggestions"
+msgstr "Patches und Verbesserungsvorschläge"
+
+#: main.cpp:60
+msgid "KDE3 Compatability Patch"
+msgstr "KDE3 Kompatibilitäts-Patch"
+
+#: main.cpp:64
+msgid "XBoard protocol"
+msgstr "XBoard-Protokoll"
+
+#: _translatorinfo.cpp:1 main.cpp:67
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Sascha Müller"
+
+#: _translatorinfo.cpp:3 main.cpp:68
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "dev@saschamueller.com"
+
+#: match_param.cpp:107
+msgid "Unknown"
+msgstr ""
+
+#: pgn.cpp:145
+msgid "%1 vs. %2"
+msgstr "%1 vs. %2"
+
+#: pgn.cpp:943
+#, c-format
+msgid "Page %1"
+msgstr "Seite %1"
+
+# German NAG values taken from:
+# http://scid.sourceforge.net/dhelp/NAGs.html
+#: pgn.cpp:975
+msgid " Good move"
+msgstr " Guter Zug"
+
+#: pgn.cpp:978
+msgid " Poor move"
+msgstr " Schwacher Zug"
+
+#: pgn.cpp:981
+msgid " Very good move"
+msgstr " Ausgezeichneter Zug"
+
+#: pgn.cpp:984
+msgid " Very poor move"
+msgstr " Patzer / Grober Fehler"
+
+#: pgn.cpp:987
+msgid " Speculative move"
+msgstr " Interessanter Zug"
+
+#: pgn.cpp:990
+msgid " Questionable move"
+msgstr " Zweifelhafter Zug"
+
+#: pgn.cpp:993
+msgid " Forced move"
+msgstr " Erzwungener Zug"
+
+#: pgn.cpp:996
+msgid " Singular move"
+msgstr " Der einzige Zug; keine vernünftige Alternative"
+
+#: pgn.cpp:999
+msgid " Worst move"
+msgstr " Schlechtester Zug"
+
+#: pgn.cpp:1002
+msgid " Drawish position"
+msgstr " Ausgeglichene Position"
+
+#: pgn.cpp:1005
+msgid " Equal chances, quiet position"
+msgstr " Gleiche Chancen, ruhige Stellung "
+
+#: pgn.cpp:1008
+msgid " Equal chances, active position"
+msgstr " Gleiche Chancen, aktive Stellung"
+
+#: pgn.cpp:1011
+msgid " Unclear position"
+msgstr " Unklare Position"
+
+#: pgn.cpp:1014
+msgid " White has a slight advantage"
+msgstr " Weiß hat leichten Vorteil, steht etwas besser"
+
+#: pgn.cpp:1017
+msgid " Black has a slight advantage"
+msgstr " Schwarz hat leichten Vorteil, steht etwas besser"
+
+#: pgn.cpp:1020
+msgid " White has a moderate advantage"
+msgstr " Weiß hat Vorteil, steht besser"
+
+#: pgn.cpp:1023
+msgid " Black has a moderate advantage"
+msgstr " Schwarz hat Vorteil, steht besser"
+
+#: pgn.cpp:1026
+msgid " White has a decisive advantage"
+msgstr " Weiß hat entscheidenden Vorteil"
+
+#: pgn.cpp:1029
+msgid " Black has a decisive advantage"
+msgstr " Schwarz hat entscheidenden Vorteil"
+
+#: pgn.cpp:1032
+msgid " White has a crushing advantage ( Black should resign )"
+msgstr " Weiß hat überwältigenden Vorteil"
+
+#: pgn.cpp:1035
+msgid " Black has a crushing advantage ( White should resign )"
+msgstr " Schwarz hat überwältigenden Vorteil"
+
+#: pgn.cpp:1038
+msgid " White is in zugzwang"
+msgstr " Weiß ist in Zugzwang"
+
+#: pgn.cpp:1041
+msgid " Black is in zugzwang"
+msgstr " Schwarz ist in Zugzwang"
+
+#: pgn.cpp:1044
+msgid " White has a slight space advantage"
+msgstr " Weiß hat leichten Raumvorteil"
+
+#: pgn.cpp:1047
+msgid " Black has a slight space advantage"
+msgstr " Schwarz hat leichten Raumvorteil"
+
+#: pgn.cpp:1050
+msgid " White has a moderate space advantage"
+msgstr " Weiß hat Raumvorteil"
+
+#: pgn.cpp:1053
+msgid " Black has a moderate space advantage"
+msgstr " Schwarz hat Raumvorteil"
+
+#: pgn.cpp:1056
+msgid " White has a decisive space advantage"
+msgstr " Weiß hat entscheidenden Raumvorteil"
+
+#: pgn.cpp:1059
+msgid " Black has a decisive space advantage"
+msgstr " Schwarz hat entscheidenden Raumvorteil"
+
+#: pgn.cpp:1062
+msgid " White has a slight time ( development ) advantage"
+msgstr " Weiß hat leichten Zeit-(Entwickllungs)vorsprung"
+
+#: pgn.cpp:1065
+msgid " Black has a slight time ( development ) advantage"
+msgstr " Schwarz hat leichten Zeit-(Entwickllungs)vorsprung"
+
+#: pgn.cpp:1068
+msgid " White has a moderate time ( development ) advantage"
+msgstr " Weiß hat Zeit-(Entwickllungs)vorsprung"
+
+#: pgn.cpp:1071
+msgid " Black has a moderate time ( development ) advantage"
+msgstr " Schwarz hat Zeit-(Entwickllungs)vorsprung"
+
+#: pgn.cpp:1074
+msgid " White has a decisive time ( development ) advantage"
+msgstr " Weiß hat entscheidenden Zeit-(Entwickllungs)vorsprung"
+
+#: pgn.cpp:1077
+msgid " Black has a decisive time ( development ) advantage"
+msgstr " Schwarz hat entscheidenden Zeit-(Entwickllungs)vorsprung"
+
+#: pgn.cpp:1080
+msgid " White has the initiative"
+msgstr " Weiß hat die Initiative"
+
+#: pgn.cpp:1083
+msgid " Black has the initiative"
+msgstr " Schwarz hat die Initiative"
+
+#: pgn.cpp:1086
+msgid " White has a lasting initiative"
+msgstr " Weiß hat andauernde Initiative"
+
+#: pgn.cpp:1089
+msgid " Black has a lasting initiative"
+msgstr " Schwarz hat andauernde Initiative"
+
+#: pgn.cpp:1092
+msgid " White has the attack"
+msgstr " Weiß hat Angriff"
+
+#: pgn.cpp:1095
+msgid " Black has the attack"
+msgstr " Schwarz hat Angriff"
+
+#: pgn.cpp:1098
+msgid " White has insufficient compensation for material deficit"
+msgstr " Weiß hat keine ausreichende Kompensation für das Material"
+
+#: pgn.cpp:1101
+msgid " Black has insufficient compensation for material deficit"
+msgstr " Schwarz hat keine ausreichende Kompensation für das Material"
+
+#: pgn.cpp:1104
+msgid " White has sufficient compensation for material deficit"
+msgstr " Weiß hat ausreichende Kompensation für das Material"
+
+#: pgn.cpp:1107
+msgid " Black has sufficient compensation for material deficit"
+msgstr " Schwarz hat ausreichende Kompensation für das Material"
+
+#: pgn.cpp:1110
+msgid " White has more than adequate compensation for material deficit"
+msgstr " Weiß hat mehr als ausreichende Kompensation für das Material"
+
+#: pgn.cpp:1113
+msgid " Black has more than adequate compensation for material deficit"
+msgstr " Schwarz hat mehr als ausreichende Kompensation für das Material"
+
+#: pgn.cpp:1116
+msgid " White has a slight center control advantage"
+msgstr " Weiß hat leichtes Übergewicht im Zentrum"
+
+#: pgn.cpp:1119
+msgid " Black has a slight center control advantage"
+msgstr " Schwarz hat leichtes Ãœbergewicht im Zentrum"
+
+#: pgn.cpp:1122
+msgid " White has a moderate center control advantage"
+msgstr " Weiß hat Übergewicht im Zentrum"
+
+#: pgn.cpp:1125
+msgid " Black has a moderate center control advantage"
+msgstr " Schwarz hat Ãœbergewicht im Zentrum"
+
+#: pgn.cpp:1128
+msgid " White has a decisive center control advantage"
+msgstr " Weiß hat entscheidendes Übergewicht im Zentrum"
+
+#: pgn.cpp:1131
+msgid " Black has a decisive center control advantage"
+msgstr " Schwarz hat entscheidendes Ãœbergewicht im Zentrum"
+
+#: pgn.cpp:1134
+msgid " White has a slight kingside control advantage"
+msgstr " Weiß hat leichtes Übergewicht am Königsflügel"
+
+#: pgn.cpp:1137
+msgid " Black has a slight kingside control advantage"
+msgstr " Schwarz hat leichtes Übergewicht am Königsflügel"
+
+#: pgn.cpp:1140
+msgid " White has a moderate kingside control advantage"
+msgstr " Weiß hat Übergewicht am Königsflügel"
+
+#: pgn.cpp:1143
+msgid " Black has a moderate kingside control advantage"
+msgstr " Schwarz hat Übergewicht am Königsflügel"
+
+#: pgn.cpp:1146
+msgid " White has a decisive kingside control advantage"
+msgstr " Weiß hat entscheidendes Übergewicht am Königsflügel"
+
+#: pgn.cpp:1149
+msgid " Black has a decisive kingside control advantage"
+msgstr " Schwarz hat entscheidendes Übergewicht am Königsflügel"
+
+#: pgn.cpp:1152
+msgid " White has a slight queenside control advantage"
+msgstr " Weiß hat leichtes Übergewicht am Damenflügel"
+
+#: pgn.cpp:1155
+msgid " Black has a slight queenside control advantage"
+msgstr " Schwarz hat leichtes Übergewicht am Damenflügel"
+
+#: pgn.cpp:1158
+msgid " White has a moderate queenside control advantage"
+msgstr " Weiß hat Übergewicht am Damenflügel"
+
+#: pgn.cpp:1161
+msgid " Black has a moderate queenside control advantage"
+msgstr " Schwarz hat Übergewicht am Damenflügel"
+
+#: pgn.cpp:1164
+msgid " White has a decisive queenside control advantage"
+msgstr " Weiß hat entscheidendes Übergewicht am Damenflügel"
+
+#: pgn.cpp:1167
+msgid " Black has a decisive queenside control advantage"
+msgstr " Schwarz hat entscheidendes Übergewicht am Damenflügel"
+
+#: pgn.cpp:1170
+msgid " White has a vulnerable first rank"
+msgstr " Weiß hat eine schwache Grundreihe"
+
+#: pgn.cpp:1173
+msgid " Black has a vulnerable first rank"
+msgstr " Schwarz hat eine schwache Grundreihe"
+
+#: pgn.cpp:1176
+msgid " White has a well protected first rank"
+msgstr " Weiß hat eine gut gesicherte Grundreihe"
+
+#: pgn.cpp:1179
+msgid " Black has a well protected first rank"
+msgstr " Schwarz hat eine gut gesicherte Grundreihe"
+
+#: pgn.cpp:1182
+msgid " White has a poorly protected king"
+msgstr " Weiß hat einen schlecht gesicherten König"
+
+#: pgn.cpp:1185
+msgid " Black has a poorly protected king"
+msgstr " Schwarz hat einen schlecht gesicherten König"
+
+#: pgn.cpp:1188
+msgid " White has a well protected king"
+msgstr " Weiß hat einen gut gesicherten König"
+
+#: pgn.cpp:1191
+msgid " Black has a well protected king"
+msgstr " Schwarz hat einen gut gesicherten König"
+
+#: pgn.cpp:1194
+msgid " White has a poorly placed king"
+msgstr " Der weiße König steht schlecht"
+
+#: pgn.cpp:1197
+msgid " Black has a poorly placed king"
+msgstr " Der schwarze König steht schlecht"
+
+#: pgn.cpp:1200
+msgid " White has a well placed king"
+msgstr " Der weiße König steht gut"
+
+#: pgn.cpp:1203
+msgid " Black has a well placed king"
+msgstr " Der weiße König steht schlecht"
+
+#: pgn.cpp:1206
+msgid " White has a very weak pawn structure"
+msgstr " Weiß hat eine sehr schwache Bauernstruktur"
+
+#: pgn.cpp:1209
+msgid " Black has a very weak pawn structure"
+msgstr " Schwarz hat eine sehr schwache Bauernstruktur"
+
+#: pgn.cpp:1212
+msgid " White has a moderately weak pawn structure"
+msgstr " Weiß hat eine schwache Bauernstruktur"
+
+#: pgn.cpp:1215
+msgid " Black has a moderately weak pawn structure"
+msgstr " Schwarz hat eine schwache Bauernstruktur"
+
+#: pgn.cpp:1218
+msgid " White has a moderately strong pawn structure"
+msgstr " Weiß hat eine starke Bauernstruktur"
+
+#: pgn.cpp:1221
+msgid " Black has a moderately strong pawn structure"
+msgstr " Schwarz hat eine starke Bauernstruktur"
+
+#: pgn.cpp:1224
+msgid " White has a very strong pawn structure"
+msgstr " Weiß hat eine sehr starke Bauernstruktur"
+
+#: pgn.cpp:1227
+msgid " Black has a very strong pawn structure"
+msgstr " Schwarz hat eine sehr starke Bauernstruktur"
+
+#: pgn.cpp:1230
+msgid " White has poor knight placement"
+msgstr " Der weiße Springer steht schlecht"
+
+#: pgn.cpp:1233
+msgid " Black has poor knight placement"
+msgstr " Der schwarze Springer steht schlecht"
+
+#: pgn.cpp:1236
+msgid " White has good knight placement"
+msgstr " Der weiße König steht gut"
+
+#: pgn.cpp:1239
+msgid " Black has good knight placement"
+msgstr " Der schwarze König steht gut"
+
+#: pgn.cpp:1242
+msgid " White has poor bishop placement"
+msgstr " Der weiße Läufer steht schlecht"
+
+#: pgn.cpp:1245
+msgid " Black has poor bishop placement"
+msgstr " Der schwarze Läufer steht schlecht"
+
+#: pgn.cpp:1248
+msgid " White has good bishop placement"
+msgstr " Der weiße Läufer steht gut"
+
+#: pgn.cpp:1251
+msgid " Black has good bishop placement"
+msgstr " Der schwarze Läufer steht gut"
+
+#: pgn.cpp:1254
+msgid " White has poor rook placement"
+msgstr " Der weiße Turm steht schlecht"
+
+#: pgn.cpp:1257
+msgid " Black has poor rook placement"
+msgstr " Der schwarze Turm steht schlecht"
+
+#: pgn.cpp:1260
+msgid " White has good rook placement"
+msgstr " Der weiße Turm steht gut"
+
+#: pgn.cpp:1263
+msgid " Black has good rook placement"
+msgstr " Der schwarze Turm steht gut"
+
+#: pgn.cpp:1266
+msgid " White has poor queen placement"
+msgstr " Die weiße Dame steht schlecht"
+
+#: pgn.cpp:1269
+msgid " Black has poor queen placement"
+msgstr " Die schwarze Dame steht schlecht"
+
+#: pgn.cpp:1272
+msgid " White has good queen placement"
+msgstr " Die weiße Dame steht gut"
+
+#: pgn.cpp:1275
+msgid " Black has good queen placement"
+msgstr " Die schwarze Dame steht gut"
+
+#: pgn.cpp:1278
+msgid " White has poor piece coordination"
+msgstr " Die weißen Figuren sind schlecht koordiniert"
+
+#: pgn.cpp:1281
+msgid " Black has poor piece coordination"
+msgstr " Die schwarzen Figuren sind schlecht koordiniert"
+
+#: pgn.cpp:1284
+msgid " White has good piece coordination"
+msgstr " Die weißen Figuren sind gut koordiniert"
+
+#: pgn.cpp:1287
+msgid " Black has good piece coordination"
+msgstr " Die schwarzen Figuren sind gut koordiniert"
+
+#: pgn.cpp:1290
+msgid " White has played the opening very poorly"
+msgstr " Weiß hat die Eröffnung sehr schwach behandelt"
+
+#: pgn.cpp:1293
+msgid " Black has played the opening very poorly"
+msgstr " Schwarz hat die Eröffnung sehr schwach behandelt"
+
+#: pgn.cpp:1296
+msgid " White has played the opening poorly"
+msgstr " Weiß hat die Eröffnung schwach behandelt"
+
+#: pgn.cpp:1299
+msgid " Black has played the opening poorly"
+msgstr " Schwarz hat die Eröffnung schwach behandelt"
+
+#: pgn.cpp:1302
+msgid " White has played the opening well"
+msgstr " Weiß hat die Eröffnung gut behandelt"
+
+#: pgn.cpp:1305
+msgid " Black has played the opening well"
+msgstr " Schwarz hat die Eröffnung gut behandelt"
+
+#: pgn.cpp:1308
+msgid " White has played the opening very well"
+msgstr " Weiß hat die Eröffnung sehr gut behandelt"
+
+#: pgn.cpp:1311
+msgid " Black has played the opening very well"
+msgstr " Schwarz hat die Eröffnung sehr gut behandelt"
+
+#: pgn.cpp:1314
+msgid " White has played the middlegame very poorly"
+msgstr " Weiß hat das Mittelspiel sehr schwach behandelt"
+
+#: pgn.cpp:1317
+msgid " Black has played the middlegame very poorly"
+msgstr " Schwarz hat das Mittelspiel sehr schwach behandelt"
+
+#: pgn.cpp:1320
+msgid " White has played the middlegame poorly"
+msgstr " Weiß hat das Mittelspiel schwach behandelt"
+
+#: pgn.cpp:1323
+msgid " Black has played the middlegame poorly"
+msgstr " Schwarz hat das Mittelspiel schwach behandelt"
+
+#: pgn.cpp:1326
+msgid " White has played the middlegame well"
+msgstr " Weiß hat das Mittelspiel gut behandelt"
+
+#: pgn.cpp:1329
+msgid " Black has played the middlegame well"
+msgstr " Schwarz hat das Mittelspiel gut behandelt"
+
+#: pgn.cpp:1332
+msgid " White has played the middlegame very well"
+msgstr " Weiß hat das Mittelspiel sehr gut behandelt"
+
+#: pgn.cpp:1335
+msgid " Black has played the middlegame very well"
+msgstr " Schwarz hat das Mittelspiel sehr gut behandelt"
+
+#: pgn.cpp:1338
+msgid " White has played the ending very poorly"
+msgstr " Weiß hat das Endspiel sehr schwach behandelt"
+
+#: pgn.cpp:1341
+msgid " Black has played the ending very poorly"
+msgstr " Schwarz hat das Endspiel sehr schwach behandelt"
+
+#: pgn.cpp:1344
+msgid " White has played the ending poorly"
+msgstr " Weiß hat das Endspiel schwach behandelt"
+
+#: pgn.cpp:1347
+msgid " Black has played the ending poorly"
+msgstr " Schwarz hat das Endspiel schwach behandelt"
+
+#: pgn.cpp:1350
+msgid " White has played the ending well"
+msgstr " Weiß hat das Endspiel gut behandelt"
+
+#: pgn.cpp:1353
+msgid " Black has played the ending well"
+msgstr " Schwarz hat das Endspiel gut behandelt"
+
+#: pgn.cpp:1356
+msgid " White has played the ending very well"
+msgstr " Weiß hat das Endspiel sehr gut behandelt"
+
+#: pgn.cpp:1359
+msgid " Black has played the ending very well"
+msgstr " Schwarz hat das Endspiel sehr gut behandelt"
+
+#: pgn.cpp:1362
+msgid " White has slight counterplay"
+msgstr " Weiß hat etwas Gegenspiel"
+
+#: pgn.cpp:1365
+msgid " Black has slight counterplay"
+msgstr " Schwarz hat etwas Gegenspiel"
+
+#: pgn.cpp:1368
+msgid " White has moderate counterplay"
+msgstr " Weiß hat Gegenspiel"
+
+#: pgn.cpp:1371
+msgid " Black has moderate counterplay"
+msgstr " Schwarz hat Gegenspiel"
+
+#: pgn.cpp:1374
+msgid " White has decisive counterplay"
+msgstr " Weiß hat entscheidendes Gegenspiel"
+
+#: pgn.cpp:1377
+msgid " Black has decisive counterplay"
+msgstr " Schwarz hat entscheidendes Gegenspiel"
+
+#: pgn.cpp:1380
+msgid " White has moderate time control pressure"
+msgstr " Weiß ist in leichter Zeitnot"
+
+#: pgn.cpp:1383
+msgid " Black has moderate time control pressure"
+msgstr " Schwarz ist in leichter Zeitnot"
+
+#: pgn.cpp:1386
+msgid " White has severe time control pressure"
+msgstr " Weiß ist in erheblicher Zeitnot"
+
+#: pgn.cpp:1389
+msgid " Black has severe time control pressure"
+msgstr " Schwarz ist in erheblicher Zeitnot"
+
+#: pgn.cpp:1391
+msgid " With the idea..."
+msgstr " Mit der Idee..."
+
+#: pgn.cpp:1394
+msgid " Aimed against..."
+msgstr " Gerichtet gegen..."
+
+#: pgn.cpp:1397
+msgid " Better Move"
+msgstr " Besser ist"
+
+#: pgn.cpp:1400
+msgid " Worse Move"
+msgstr " Schlechter ist"
+
+#: pgn.cpp:1403
+msgid " Equivalent move"
+msgstr " Gleichwertig ist"
+
+#: pgn.cpp:1406
+msgid " Editor's Remark"
+msgstr " Anmerkung des Herausgebers"
+
+#: pgn.cpp:1409
+msgid " Novelty"
+msgstr " Neuerung"
+
+#: pgn.cpp:1412
+msgid " Weak point"
+msgstr " Schwacher Punkt"
+
+#: pgn.cpp:1415
+msgid " Endgame"
+msgstr " Endspiel"
+
+#: pgn.cpp:1418
+msgid " Line"
+msgstr " Linie"
+
+#: pgn.cpp:1421
+msgid " Diagonal"
+msgstr " Diagonale"
+
+#: pgn.cpp:1424
+msgid " White has a pair of Bishops"
+msgstr " Weiß hat das Läuferpaar"
+
+#: pgn.cpp:1427
+msgid " Black has a pair of Bishops"
+msgstr " Schwarz hat das Läuferpaar"
+
+#: pgn.cpp:1430
+msgid " Bishops of opposite color"
+msgstr " Verschiedenfarbige Läufer"
+
+#: pgn.cpp:1433
+msgid " Bishops of same color"
+msgstr " Gleichfarbige Läufer"
+
+#: pgn.cpp:1436
+msgid " Etc."
+msgstr " Etc."
+
+#: pgn.cpp:1439
+msgid " Doubled pawns"
+msgstr " Doppelbauern"
+
+#: pgn.cpp:1442
+msgid " Isolated pawn"
+msgstr " Isolierte Bauern"
+
+#: pgn.cpp:1445
+msgid " Connected pawns"
+msgstr " Verbundene Bauern"
+
+#: pgn.cpp:1448
+msgid " Hanging pawns"
+msgstr " Hängende Bauern"
+
+#: pgn.cpp:1451
+msgid " Backwards pawn"
+msgstr " Rückständiger Bauer"
+
+#: setpageaudio.cpp:28
+msgid "enable Audio"
+msgstr "Klänge aktivieren"
+
+#: setpageaudio.cpp:36
+msgid "Audio Themes"
+msgstr "Klang Themes"
+
+#: setpageaudio.cpp:47
+msgid "Volume"
+msgstr "Lautstärke"
+
+#: setpageaudio.cpp:48
+msgid "Maximum"
+msgstr "Maximum"
+
+#: setpageaudio.cpp:52
+msgid "Minimum"
+msgstr "Minimum"
+
+#: setpageaudio.cpp:55
+msgid "For Current Match Only"
+msgstr "Nur für aktuelle Partie"
+
+#: setpagedisplay.cpp:74
+msgid "Board Themes"
+msgstr "Brett-Themes"
+
+#: setpagedisplay.cpp:79
+msgid "Chessman Themes"
+msgstr "Figuren-Themes"
+
+#: setpagedisplay.cpp:85
+msgid "Theme Size"
+msgstr "Theme-Größe"
+
+#: setpagedisplay.cpp:88
+msgid "Small"
+msgstr "Klein"
+
+#: setpagedisplay.cpp:95
+msgid "Large"
+msgstr "Groß"
+
+#: setpagedisplay.cpp:99
+msgid "Other Display Options"
+msgstr "Andere Anzeige-Optionen"
+
+#: setpagedisplay.cpp:102
+msgid "Reverse Board Orientation"
+msgstr "Board umdrehen"
+
+#: setpagedisplay.cpp:107
+msgid "Display Startup Logo"
+msgstr "Beim Start Logo anzeigen"
+
+#: setpagedisplay.cpp:112
+msgid "Automatic Preview"
+msgstr "Automatische Vorschau"
+
+#: setpagedisplay.cpp:117
+msgid "Show Last Move"
+msgstr "Letzten Zug anzeigen"
+
+#: setpagedisplay.cpp:122
+msgid "Animate Moves"
+msgstr ""
+
+#: setpagedisplay.cpp:127
+msgid "Show Coordinates"
+msgstr "Koordinaten anzeigen"
+
+#: setpagedisplay.cpp:161
+msgid "Restore Defaults"
+msgstr "Zurücksetzen"
+
+#: setpagedisplay.cpp:165
+msgid "Standard Font..."
+msgstr "Standard..."
+
+#: setpagedisplay.cpp:174
+msgid "Private Font..."
+msgstr "Privat..."
+
+#: setpagedisplay.cpp:183
+msgid "Channel Font..."
+msgstr "Kanal..."
+
+#: setpagedisplay.cpp:192
+msgid "Shout Font..."
+msgstr "Schreien..."
+
+#: setpagedisplay.cpp:201
+msgid "Whisper Font..."
+msgstr "Flüstern..."
+
+#: setpagedisplay.cpp:210
+msgid "Notification Font..."
+msgstr "Mitteilung..."
+
+#: setpagedisplay.cpp:225
+msgid "Console"
+msgstr "Konsole"
+
+#: setpagedisplay.cpp:519
+msgid "Standard"
+msgstr "Standard"
+
+#: setpagedisplay.cpp:520
+msgid "Private Tell"
+msgstr "Private Nachricht"
+
+#: setpagedisplay.cpp:521
+msgid "Channel Tell"
+msgstr "Nachricht an den Raum"
+
+#: setpagedisplay.cpp:522
+msgid "Shout"
+msgstr "Schreien"
+
+#: setpagedisplay.cpp:524
+msgid "Notification"
+msgstr "Mitteilung"
+
+#: setpageengines.cpp:33
+msgid "Engines to Play White"
+msgstr "Engines für weiß"
+
+#: setpageengines.cpp:36 setpageengines.cpp:48
+msgid "enable Book Engine"
+msgstr "Book-Engine aktivieren"
+
+#: setpageengines.cpp:45
+msgid "Engines to Play Black"
+msgstr "Engines für Schwarz"
+
+#: setpageengines.cpp:57
+msgid "Chess Engines"
+msgstr "Schach-Engines"
+
+#: setpageengines.cpp:62 setpageservers.cpp:69 tab_seeklist.cpp:27
+msgid "Name"
+msgstr "Name "
+
+#: setpageengines.cpp:64
+msgid "Wins"
+msgstr "Gewonnen"
+
+#: setpageengines.cpp:65
+msgid "Losses"
+msgstr "Verloren"
+
+#: setpageengines.cpp:66
+msgid "Draws"
+msgstr "Remis"
+
+#: setpageengines.cpp:73 setpageservers.cpp:77
+msgid "&Add..."
+msgstr "&Hinzufügen..."
+
+#: setpageengines.cpp:74 setpageservers.cpp:78
+msgid "&Modify..."
+msgstr "&Bearbeiten..."
+
+#: setpageengines.cpp:75 setpageservers.cpp:79
+msgid "&Delete..."
+msgstr "&Löschen..."
+
+#: setpagegeneral.cpp:29
+msgid "Your Name:"
+msgstr "Ihr Name:"
+
+#: setpagegeneral.cpp:36
+msgid "When Knights Begins It Should:"
+msgstr "Wenn Knights gestartet wird:"
+
+#: setpagegeneral.cpp:38
+msgid "Do Nothing"
+msgstr "Nichts tun"
+
+#: setpagegeneral.cpp:39
+msgid "Start a Match vs. PC"
+msgstr "Eine Partie gegen den PC beginnen"
+
+#: setpagegeneral.cpp:40
+msgid "Connect to ICS"
+msgstr "Mit ICS verbinden"
+
+#: setpagegeneral.cpp:48
+msgid "Save Match on Close?"
+msgstr "Partie beim Beenden speichern?"
+
+#: setpagegeneral.cpp:52
+msgid "Ask"
+msgstr "Nachfragen"
+
+#: setpagegeneral.cpp:62
+msgid "Append to Save File:"
+msgstr "An Abspeicherung anhängen:"
+
+#: setpagegeneral.cpp:65
+msgid "Append to Save File"
+msgstr "An Abspeicherung anhängen:"
+
+#: setpagegeneral.cpp:79
+msgid "Pause on Minimize"
+msgstr "Pause, wenn minimiert"
+
+#: setpagegeneral.cpp:85
+msgid "Always Promote to Queen"
+msgstr "Bauer immer in Dame umwandeln"
+
+#: setpagegeneral.cpp:91
+msgid "Call Flag Automatically"
+msgstr "Partie bei Zeitüberschreitung automatisch beenden"
+
+#: setpageservers.cpp:56
+msgid "Current Server"
+msgstr "Aktueller Server"
+
+#: setpageservers.cpp:70
+msgid "URL"
+msgstr "URL"
+
+#: setpageservers.cpp:90
+msgid "Servers"
+msgstr "Server"
+
+# Profanity: Weltlichkeit, Fluch, Ruchlosigkeit ... ?
+# Hm, what is the usual translation for this
+#: setpageservers.cpp:106
+#, fuzzy
+msgid "Profanity Filter"
+msgstr "Profanitätsfilter"
+
+#: setpageservers.cpp:110
+msgid "Filter Everything"
+msgstr "Alles ausfiltern"
+
+#: setpageservers.cpp:110
+msgid "No Filtering"
+msgstr "Kein Filtern"
+
+#: setpageservers.cpp:115
+msgid "Automatically Close Previous ICS Match"
+msgstr "Automatisch letzte ICS-Partie schließen"
+
+#: setpageservers.cpp:120
+msgid "Private Matches"
+msgstr "Privat-Partien"
+
+#: setpageservers.cpp:124
+msgid "enable Premove"
+msgstr "Im Hintergrund ziehen erlauben"
+
+#: setpageservers.cpp:128
+msgid "enable Kibitzes"
+msgstr "Kibitzen erlauben"
+
+#: setpageservers.cpp:132
+msgid "enable Unregistered Tells"
+msgstr "Nachrichten ohne Registrierung erlauben"
+
+#: setpageservers.cpp:136
+msgid "enable Shouts"
+msgstr "Schreien erlauben"
+
+#: setpageservers.cpp:140
+msgid "enable Seeks"
+msgstr "Suchen erlauben"
+
+#: setpageservers.cpp:150
+msgid "Seconds Between Seek Updates"
+msgstr "Sekunden zwischen Such-Updates"
+
+#: tab_seeklist.cpp:29
+msgid "Match Type"
+msgstr "Art der Partie"
+
+#: tab_seeklist.cpp:30
+msgid "Is Rated?"
+msgstr "Bewertet?"
+
+#: tabbox.cpp:163
+#, fuzzy
+msgid "%1 - Knights"
+msgstr "Knights"
+
+#: wiz_setup.cpp:51
+msgid "Knights Setup Wizard"
+msgstr "Knights Installations-Wizard"
+
+#: wiz_setup.cpp:74
+#, fuzzy
+msgid ""
+"Thank you for installing Knights, the graphical chess interface for KDE. To "
+"help you get started quickly, there are a few things Knights will need to "
+"setup. You should click 'Next' to see what they are."
+msgstr ""
+"Vielen Dank, dass Sie Knights installiert haben. Um den Einstieg besonders "
+"leicht zu gestalten, kann Knights einige Einstellungen selbst vornehmen. "
+"Klicken Sie auf 'Weiter', um fortzufahren, oder auf 'Abbrechen', wenn Sie "
+"alles selbst einstellen möchten."
+
+#: wiz_setup.cpp:77
+msgid "Welcome to Knights v%1!"
+msgstr "Willkommen bei Knights v%1!"
+
+#: wiz_setup.cpp:97
+#, fuzzy
+msgid ""
+"When Knights saves a match to disk, it uses Portable Game Notation (PGN) to "
+"store the match. Several other computer chess games use PGN too. If you "
+"like, Knights can be the default PGN viewer on this system."
+msgstr ""
+"Knights speichert Partien im weit verbreiteten PGN-Format (Portable Game "
+"Notation). Wenn Sie möchten, kann Knights als das standardmäßige "
+"Anzeigeprogramm für PGN-Dateien konfiguriert werden."
+
+#: wiz_setup.cpp:100
+msgid "Let Knights handle PGN files?"
+msgstr "PGN-Dateien standardmäßig mit Knights öffnen?"
+
+#: wiz_setup.cpp:106
+msgid "Let Knights handle your .pgn files?"
+msgstr "PGN-Dateien standardmäßig mit Knights öffnen?"
+
+#: wiz_setup.cpp:125
+#, fuzzy
+msgid ""
+"Knights can not play a chess match against you without help. Known as Chess "
+"Engines, these helpers can be found on the Internet and are often included "
+"with your distribution. Knights can look for Chess Engines that you may "
+"already have. If found, Knights will configure itself to use them."
+msgstr ""
+"Um gegen Sie Schach spielen zu können, benötigt Knights die Hilfe von "
+"sogenannten Schach-Engines. Diese machen die eigentliche Spielstärke aus, "
+"und sind in großer Zahl frei verfügbar. Knights kann selbständig nach "
+"bereits installierten Schach-Engines suchen, und diese für Sie konfigurieren."
+
+#: wiz_setup.cpp:128 wiz_setup.cpp:134
+msgid "Let Knights search for chess engines?"
+msgstr "Schach-Engines suchen?"
+
+#: wiz_setup.cpp:153
+msgid ""
+"In order for you to play chess online, Knights will have to connect to a "
+"chess server. Knights has a list of several of these servers. If you like, "
+"this list can be used to automatically configure Knights."
+msgstr ""
+"Um online Schach spielen zu können, muss sich Knights mit einem Schach-"
+"Server verbinden. Eine Liste mit vielen solchen Servern ist bereits in "
+"Knights enthalten. Wenn Sie möchten, kann diese Liste benutzt werden, um "
+"Knights zu konfigurieren."
+
+#: wiz_setup.cpp:156 wiz_setup.cpp:162
+msgid "Let Knights configure chess servers?"
+msgstr "Schach-Server konfigurieren?"
+
+#: wiz_setup.cpp:181
+#, fuzzy
+msgid ""
+"Knights has now configured itself according to your choices. We strongly "
+"recommend that you read the documentation to make full use of all that "
+"Knights has to offer. You can access it by pressing F1."
+msgstr ""
+"Knights hat sich nun gemäß Ihrer Auswahl konfiguriert. Sie sollten nun "
+"einen Blick in die Dokumentation werfen, um die Möglichkeiten von Knights "
+"voll ausschöpfen zu können. Auf diese können Sie mit F1 zugreifen."
+
+#: wiz_setup.cpp:184
+msgid "Setup Complete"
+msgstr "Konfiguration komplett"
+
+#: wiz_setup.cpp:213
+msgid "Do you accept the terms of our license?"
+msgstr ""
+
+#: wiz_setup.cpp:218
+msgid "Please read and accept our license:"
+msgstr ""
+
+#: wiz_setup.cpp:269
+msgid "Free Internet Chess Server"
+msgstr "Free Internet Chess Server"
+
+#: wiz_setup.cpp:269
+msgid "Internet Chess Club"
+msgstr "Internet Chess Club"
+
+#: wiz_setup.cpp:269
+msgid "Global Chess Server"
+msgstr "Global Chess Server"
+
+#: wiz_setup.cpp:269
+msgid "Chess.Net"
+msgstr "Chess.Net"
+
+#: wiz_setup.cpp:270
+msgid "Chess-Square.Com"
+msgstr "Chess-Square.Com"
+
+#: wiz_setup.cpp:270
+msgid "Australian FICS"
+msgstr "Australian FICS"
+
+#: wiz_setup.cpp:270
+msgid "Brazilian FICS"
+msgstr "Brazilian FICS"
+
+#: wiz_setup.cpp:270
+msgid "Chilean FICS"
+msgstr "Chilean FICS"
+
+#: wiz_setup.cpp:271
+msgid "Croatian FICS"
+msgstr "Croatian FICS"
+
+#: wiz_setup.cpp:271
+msgid "Dutch FICS"
+msgstr "Dutch FICS"
+
+#: wiz_setup.cpp:271
+msgid "French FICS"
+msgstr "French FICS"
+
+#: wiz_setup.cpp:271
+msgid "German FICS"
+msgstr "German FICS"
+
+#: wiz_setup.cpp:271
+msgid "Swedish FICS"
+msgstr "Swedish FICS"
+
+#: proto_xboard.cpp:443
+msgid ""
+"%1 suggests this move:\n"
+"%2"
+msgstr ""
+"%1 schlägt folgenden Zug vor: \n"
+"%2"
+
+#: proto_xboard.cpp:465 proto_xboard.cpp:472 proto_xboard.cpp:479
+msgid ""
+"%1 tells you:\n"
+"%2"
+msgstr ""
+"Mitteilung von %1:\n"
+"%2"
+
+#~ msgid "Save Game?"
+#~ msgstr "Spiel speichern?"
+
+#~ msgid "Save Game..."
+#~ msgstr "Spiel speichern..."
+
+#~ msgid " Game paused"
+#~ msgstr " Pause"
+
+#, fuzzy
+#~ msgid "Chat"
+#~ msgstr "Crafty"
+
+#, fuzzy
+#~ msgid "&Find"
+#~ msgstr "&Vorschlag"
+
+#~ msgid "Red Hat Binary RPMs"
+#~ msgstr "Red Hat Binary RPMs"
+
+#~ msgid "Early Beta Testing"
+#~ msgstr "Frühe Beta-Tester"
+
+#~ msgid "Would you like to email this move?"
+#~ msgstr "Möchten Sie diesen Zug mailen?"
+
+#~ msgid "Send Email?"
+#~ msgstr "Mailen?"
+
+#~ msgid "Console Orientation"
+#~ msgstr "Anordnung der Konsole"
+
+#, fuzzy
+#~ msgid "engineio"
+#~ msgstr "engineio"
+
+#, fuzzy
+#~ msgid "Knightsio"
+#~ msgstr "Knights"
+
+#~ msgid "pgn"
+#~ msgstr "pgn"
+
+#~ msgid "Server Login Failed"
+#~ msgstr "Verbindung nicht erfolgreich"
+
+#~ msgid "White's Time Controls"
+#~ msgstr "Zeiteinstellungen für Weiß"
+
+#~ msgid "Black's Time Controls"
+#~ msgstr "Zeiteinstellungen für Schwarz"
+
+#~ msgid ""
+#~ "Knights can not find %1.\n"
+#~ "Please make sure the address was entered correctly and that you are "
+#~ "connected to the internet."
+#~ msgstr ""
+#~ "%1 konnte nicht gefunden werden.\n"
+#~ "Bitte stellen Sie sicher, dass die Adresse korrekt eingegeben wurde und "
+#~ "eine Verbindung mit dem Internet besteht."
+
+#~ msgid "&Solitaire Chess"
+#~ msgstr "&Solitaire-Schach"
+
+#~ msgid "&Computer vs. Computer"
+#~ msgstr "&Computer vs. Computer"
+
+#~ msgid "&Save Game"
+#~ msgstr "Spiel &speichern"
+
+#~ msgid "Console - Knights"
+#~ msgstr "Knights Konsole"
+
+#~ msgid "High Quality"
+#~ msgstr "Hohe Qualität"
+
+#~ msgid "GNUChess"
+#~ msgstr "GNUChess"
+
+#~ msgid "Sjeng"
+#~ msgstr "Sjeng"
+
+#~ msgid "KnightCap"
+#~ msgstr "KnightCap"
+
+#~ msgid "BabyChess"
+#~ msgstr "BabyChess"
+
+#~ msgid "Phalanx-XXII"
+#~ msgstr "Phalanx-XXII"
+
+#~ msgid "Bowron Abernethy Chess Engine"
+#~ msgstr "Bowron Abernethy Schach-Engine"
diff --git a/po/es.po b/po/es.po
new file mode 100644
index 0000000..69b9160
--- /dev/null
+++ b/po/es.po
@@ -0,0 +1,2043 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2003-01-21 04:30-0600\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=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: accel.cpp:23
+msgid "Previous Move"
+msgstr ""
+
+#: accel.cpp:24
+msgid "Next Move"
+msgstr ""
+
+#: accel.cpp:25
+msgid "Enter Text"
+msgstr ""
+
+#: accel.cpp:26
+msgid "Page Up"
+msgstr ""
+
+#: accel.cpp:27
+msgid "Page Down"
+msgstr ""
+
+#: accel.cpp:28
+msgid "Increase Board Size"
+msgstr ""
+
+#: accel.cpp:29
+msgid "Decrease Board Size"
+msgstr ""
+
+#: accel.cpp:30
+msgid "Last History Item"
+msgstr ""
+
+#: accel.cpp:31
+msgid "Next History Item"
+msgstr ""
+
+#: accel.cpp:32
+msgid "Reply to the Last Tell"
+msgstr ""
+
+#: accel.cpp:33
+msgid "Reply to the Channel"
+msgstr ""
+
+#: accel.cpp:34
+msgid "Kibitz"
+msgstr ""
+
+#: accel.cpp:35 setpagedisplay.cpp:523
+msgid "Whisper"
+msgstr ""
+
+#: challenge_graph.cpp:75 tab_seeklist.cpp:40
+msgid "Seek Matches"
+msgstr ""
+
+#: challenge_graph.cpp:77 tab_seeklist.cpp:42
+msgid "Accept This Match"
+msgstr ""
+
+#: challenge_graph.cpp:78 tab_seeklist.cpp:43
+msgid "Tell..."
+msgstr ""
+
+#: challenge_graph.cpp:79 tab_seeklist.cpp:44
+msgid "Assess..."
+msgstr ""
+
+#: challenge_graph.cpp:80 tab_seeklist.cpp:45
+msgid "Player Info"
+msgstr ""
+
+#: challenge_graph.cpp:82 tab_seeklist.cpp:47
+msgid "Player History"
+msgstr ""
+
+#: challenge_graph.cpp:84 tab_seeklist.cpp:49
+msgid "Add to Friends"
+msgstr ""
+
+#: challenge_graph.cpp:85 tab_seeklist.cpp:50
+msgid "Ignore This Player"
+msgstr ""
+
+#: challenge_graph.cpp:304 tab_seeklist.cpp:28
+msgid "Rating"
+msgstr ""
+
+#: challenge_graph.cpp:311
+msgid "Time"
+msgstr ""
+
+#: challenge_graph_view.cpp:105
+msgid " Name: %1 Rating: %2 Match Type: %3 %4 Base Time: %5 Increment: %6"
+msgstr ""
+
+#: core.cpp:385
+msgid "Hint"
+msgstr ""
+
+#: core.cpp:388
+msgid "Tell User"
+msgstr ""
+
+#: core.cpp:391
+msgid "Tell User Error"
+msgstr ""
+
+#: core.cpp:397
+msgid "Tell Opponent"
+msgstr ""
+
+#: core.cpp:411
+msgid "Tell All"
+msgstr ""
+
+#: core.cpp:646
+msgid "Load PGN..."
+msgstr ""
+
+#: core.cpp:690
+msgid "Would you like to save this match?"
+msgstr ""
+
+#: core.cpp:691
+msgid "Save Match?"
+msgstr ""
+
+#: core.cpp:710
+msgid "Save Match..."
+msgstr ""
+
+#: dlg_challenge.cpp:25
+msgid "You've Been Challenged:"
+msgstr ""
+
+#: dlg_challenge.cpp:29
+msgid "Accept"
+msgstr ""
+
+#: dlg_challenge.cpp:30
+msgid "Decline"
+msgstr ""
+
+#: dlg_challenge.cpp:49
+msgid "Time Odds Match"
+msgstr ""
+
+#: dlg_challenge.cpp:53
+msgid "Unrated"
+msgstr ""
+
+#: dlg_challenge.cpp:54
+msgid "Rated"
+msgstr ""
+
+#: dlg_challenge.cpp:60 dlg_challenge.cpp:69 dlg_newmatch.cpp:87
+#: dlg_newmatch.cpp:104 tab_seeklist.cpp:101
+msgid " min."
+msgstr ""
+
+#: dlg_challenge.cpp:61 dlg_challenge.cpp:70 dlg_newmatch.cpp:97
+#: dlg_newmatch.cpp:114 setpageservers.cpp:146 tab_seeklist.cpp:102
+msgid " sec."
+msgstr ""
+
+#: dlg_challenge.cpp:62 dlg_challenge.cpp:71 tab_seeklist.cpp:31
+msgid "Base Time"
+msgstr ""
+
+#: dlg_challenge.cpp:63 dlg_challenge.cpp:72 tab_seeklist.cpp:32
+msgid "Increment"
+msgstr ""
+
+#: dlg_challenge.cpp:109
+msgid ""
+"%1 %2 vs. %3 %4\n"
+"in a %5 match."
+msgstr ""
+
+#: dlg_challenge.cpp:124 dlg_challenge.cpp:125
+msgid "Time Controls"
+msgstr ""
+
+#: dlg_challenge.cpp:154
+msgid "Counter Offer"
+msgstr ""
+
+#: dlg_engine.cpp:26
+msgid "Configure Engine"
+msgstr ""
+
+#: dlg_engine.cpp:38
+msgid "Engine Name"
+msgstr ""
+
+#: dlg_engine.cpp:43 setpageengines.cpp:63
+msgid "Protocol"
+msgstr ""
+
+#: dlg_engine.cpp:48
+msgid "Engine Filename"
+msgstr ""
+
+#: dlg_engine.cpp:54
+msgid "Command Line Arguments"
+msgstr ""
+
+#: dlg_engine.cpp:59 dlg_server.cpp:88
+msgid "Log File"
+msgstr ""
+
+#: dlg_login.cpp:21
+msgid "Login Prompt"
+msgstr ""
+
+#: dlg_login.cpp:31
+msgid "Login:"
+msgstr ""
+
+#: dlg_login.cpp:32
+msgid "Password:"
+msgstr ""
+
+#: dlg_login.cpp:38
+msgid "Log in as guest"
+msgstr ""
+
+#: dlg_login.cpp:54
+msgid "Login"
+msgstr ""
+
+#: dlg_login.cpp:54
+msgid "Log in to the chess server using this name and password."
+msgstr ""
+
+#: dlg_newmatch.cpp:38
+msgid "Start a New Match"
+msgstr ""
+
+#: dlg_newmatch.cpp:45
+msgid "White"
+msgstr ""
+
+#: dlg_newmatch.cpp:46
+msgid "Black"
+msgstr ""
+
+#: dlg_newmatch.cpp:59 dlg_newmatch.cpp:66
+msgid "Human"
+msgstr ""
+
+#: dlg_newmatch.cpp:60 dlg_newmatch.cpp:67
+msgid "Computer"
+msgstr ""
+
+#: dlg_newmatch.cpp:61 dlg_newmatch.cpp:68
+msgid "Email"
+msgstr ""
+
+#: dlg_newmatch.cpp:85 dlg_newmatch.cpp:102
+msgid "Base Time:"
+msgstr ""
+
+#: dlg_newmatch.cpp:90 dlg_newmatch.cpp:107
+msgid "Moves Per Base Time"
+msgstr ""
+
+#: dlg_newmatch.cpp:92 dlg_newmatch.cpp:109
+msgid " moves"
+msgstr ""
+
+#: dlg_newmatch.cpp:95 dlg_newmatch.cpp:112
+msgid "Increment Per Move"
+msgstr ""
+
+#: dlg_promote.cpp:94
+msgid "Promote your pawn to..."
+msgstr ""
+
+#: dlg_promote.cpp:101
+msgid "Pawn Promotion"
+msgstr ""
+
+#: dlg_selectemail.cpp:27
+msgid "Select Email Address"
+msgstr ""
+
+#: dlg_selectengine.cpp:30
+msgid "Select Computer Player"
+msgstr ""
+
+#: dlg_selectengine.cpp:41
+msgid "Computer Players"
+msgstr ""
+
+#: dlg_selectengine.cpp:61
+msgid "Player Strength"
+msgstr ""
+
+#: dlg_selectengine.cpp:63
+msgid "Weak"
+msgstr ""
+
+#: dlg_selectengine.cpp:70
+msgid "Strong"
+msgstr ""
+
+#: dlg_server.cpp:25
+msgid "Configure Server"
+msgstr ""
+
+#: dlg_server.cpp:37
+msgid "Server Name"
+msgstr ""
+
+#: dlg_server.cpp:44
+msgid "Server URL"
+msgstr ""
+
+#: dlg_server.cpp:49
+msgid "Server Port"
+msgstr ""
+
+#: dlg_server.cpp:56
+msgid "Username"
+msgstr ""
+
+#: dlg_server.cpp:59
+msgid "Remember My Password"
+msgstr ""
+
+#: dlg_server.cpp:64
+msgid "Password"
+msgstr ""
+
+#: dlg_server.cpp:71
+msgid "Confirm Password"
+msgstr ""
+
+#: dlg_server.cpp:79
+msgid "Timeseal"
+msgstr ""
+
+#: dlg_settings.cpp:48 setpagedisplay.cpp:142
+msgid "General"
+msgstr ""
+
+#: dlg_settings.cpp:49
+msgid "Various aspects of Knights get configured here."
+msgstr ""
+
+#: dlg_settings.cpp:55
+msgid "Display"
+msgstr ""
+
+#: dlg_settings.cpp:56
+msgid "These settings determine how Knights displays itself to you."
+msgstr ""
+
+#: dlg_settings.cpp:62
+msgid "Audio"
+msgstr ""
+
+#: dlg_settings.cpp:63
+msgid "These settings determine what Knights sounds like."
+msgstr ""
+
+#: dlg_settings.cpp:69
+msgid "Computer Opponents"
+msgstr ""
+
+#: dlg_settings.cpp:70
+msgid "Configure your chess engines here."
+msgstr ""
+
+#: dlg_settings.cpp:76 setpageservers.cpp:65
+msgid "Chess Servers"
+msgstr ""
+
+#: dlg_settings.cpp:77
+msgid "Configure your internet chess servers here."
+msgstr ""
+
+#: io_internet.cpp:80
+msgid ""
+"There are no servers configured.\n"
+"Please make sure you have at least one server configured."
+msgstr ""
+
+#: io_internet.cpp:80
+msgid "Cannot find a server."
+msgstr ""
+
+#: io_internet.cpp:99
+msgid ""
+"Knights can not start Timeseal.\n"
+"Please make sure you have the correct path and filename configured."
+msgstr ""
+
+#: io_internet.cpp:99
+msgid "Cannot find Timeseal."
+msgstr ""
+
+#: io_internet.cpp:109 io_internet.cpp:121
+msgid ""
+"Knights is unable to connect to the server.\n"
+" Please make sure your internet connection is working and try again."
+msgstr ""
+
+#: io_internet.cpp:109 io_internet.cpp:121
+msgid "Cannot connect to server."
+msgstr ""
+
+#: io_internet.cpp:144
+msgid "%1 Console"
+msgstr ""
+
+#: io_internet.cpp:149
+msgid "Sought Matches List"
+msgstr ""
+
+#: io_internet.cpp:154
+msgid "Sought Matches Graph"
+msgstr ""
+
+#: knights.cpp:70 main.cpp:34
+msgid "Knights"
+msgstr ""
+
+#: knights.cpp:250
+msgid "&Draw"
+msgstr ""
+
+#: knights.cpp:254
+msgid "&Retract Move"
+msgstr ""
+
+#: knights.cpp:256
+msgid "Select this to retract your last move."
+msgstr ""
+
+#: knights.cpp:258
+msgid "Resign"
+msgstr ""
+
+#: knights.cpp:260
+msgid "Use this to concede the match to your opponent."
+msgstr ""
+
+#: knights.cpp:262
+msgid "&Call Flag"
+msgstr ""
+
+#: knights.cpp:264
+msgid ""
+"Use this to declare the match over, due to your opponent being out of time."
+msgstr ""
+
+#: knights.cpp:266
+msgid "&Hint"
+msgstr ""
+
+#: knights.cpp:268
+msgid "This will ask your opponent for a hint."
+msgstr ""
+
+#: knights.cpp:270
+msgid "Move &Now"
+msgstr ""
+
+#: knights.cpp:272
+msgid "Clicking this option will force your opponent to move immediately."
+msgstr ""
+
+#: knights.cpp:274
+msgid "&Flip View"
+msgstr ""
+
+#: knights.cpp:276
+msgid "This will reverse the chessboard's orientation by 180 degrees."
+msgstr ""
+
+#: knights.cpp:278
+msgid "&Ponder"
+msgstr ""
+
+#: knights.cpp:281
+msgid "This toggles your opponent's ability to think while it's your turn."
+msgstr ""
+
+#: knights.cpp:285 knights.cpp:949
+msgid "Pause"
+msgstr ""
+
+#: knights.cpp:287
+msgid "Select this to pause the clock for this match."
+msgstr ""
+
+#: knights.cpp:292
+msgid "&Offer Draw"
+msgstr ""
+
+#: knights.cpp:293
+msgid ""
+"Clicking this will inform your opponent that you are willing draw the match."
+msgstr ""
+
+#: knights.cpp:295
+msgid "&Accept Draw"
+msgstr ""
+
+#: knights.cpp:296
+msgid "Clicking this will accept a draw offered by your opponent."
+msgstr ""
+
+#: knights.cpp:298
+msgid "&Reject Draw"
+msgstr ""
+
+#: knights.cpp:299
+msgid "Clicking this will reject a draw offered by your opponent."
+msgstr ""
+
+#: knights.cpp:301
+msgid "&Ignore Draw"
+msgstr ""
+
+#: knights.cpp:302
+msgid "Clicking this will ignore future draw offers from your opponent."
+msgstr ""
+
+#: knights.cpp:308
+msgid "&New Match..."
+msgstr ""
+
+#: knights.cpp:309
+msgid "This allows you to begin a new match."
+msgstr ""
+
+#: knights.cpp:312
+msgid "&Load Match..."
+msgstr ""
+
+#: knights.cpp:313
+msgid ""
+"The Load command will allow you to select a previously saved match and play "
+"it again."
+msgstr ""
+
+#: knights.cpp:316 thinbuttons.cpp:40
+msgid "&Close Match"
+msgstr ""
+
+#: knights.cpp:318
+msgid "This command removes the current match."
+msgstr ""
+
+#: knights.cpp:320
+msgid "Close All"
+msgstr ""
+
+#: knights.cpp:322
+msgid "This command will remove all matches that are currently loaded."
+msgstr ""
+
+#: knights.cpp:326 thinbuttons.cpp:32
+msgid "&Save Match"
+msgstr ""
+
+#: knights.cpp:328 knights.cpp:333
+msgid ""
+"The Save command will allow you to store a copy of your current match for "
+"later use."
+msgstr ""
+
+#: knights.cpp:331 thinbuttons.cpp:34
+msgid "Save Match &As..."
+msgstr ""
+
+#: knights.cpp:337 knights.cpp:859
+msgid "Connect to Server"
+msgstr ""
+
+#: knights.cpp:338
+msgid "Clicking this will connect Knights with an internet chess server."
+msgstr ""
+
+#: knights.cpp:342 thinbuttons.cpp:37
+msgid "&Print Notation..."
+msgstr ""
+
+#: knights.cpp:344
+msgid ""
+"The Print command will allow you to print this game's notation on your "
+"printer."
+msgstr ""
+
+#: knights.cpp:349
+msgid "The Quit command will stop all matches and exit Knights."
+msgstr ""
+
+#: knights.cpp:355
+msgid "Play &White"
+msgstr ""
+
+#: knights.cpp:358
+msgid ""
+"If checked, this option tells Knights that you will play as the White army "
+"when you play vs. the computer."
+msgstr ""
+
+#: knights.cpp:360
+msgid "Play &Black"
+msgstr ""
+
+#: knights.cpp:363
+msgid ""
+"If checked, this option tells Knights that you will play as the Black army "
+"when you play vs. the computer."
+msgstr ""
+
+#: knights.cpp:366
+msgid "&Install Themes"
+msgstr ""
+
+#: knights.cpp:367
+msgid "This lets you install downloaded themes into Knights."
+msgstr ""
+
+#: knights.cpp:371
+msgid ""
+"Click this if you want to change the keyboard shortcuts that Knights uses."
+msgstr ""
+
+#: knights.cpp:374
+msgid "&Configure Knights..."
+msgstr ""
+
+#: knights.cpp:375
+msgid ""
+"This opens a new window which allows you to customize Knights to your "
+"particular tastes."
+msgstr ""
+
+#: knights.cpp:381
+msgid "Begin a Tutorial"
+msgstr ""
+
+#: knights.cpp:387
+msgid "&Match"
+msgstr ""
+
+#: knights.cpp:576
+msgid "Error with white engine"
+msgstr ""
+
+#: knights.cpp:578
+msgid ""
+"You selected %1 to play white,\n"
+"but it can only be used as a book engine.\n"
+"Please select another engine to play white."
+msgstr ""
+
+#: knights.cpp:579
+msgid "White Engine Problem"
+msgstr ""
+
+#: knights.cpp:582
+msgid "Error with white book engine"
+msgstr ""
+
+#: knights.cpp:584
+msgid ""
+"You selected %1 to play white's book,\n"
+"but it can only be used as a regular engine.\n"
+"Please select another engine to play white's book."
+msgstr ""
+
+#: knights.cpp:585
+msgid "White Book Engine Problem"
+msgstr ""
+
+#: knights.cpp:588
+msgid "Error with black engine"
+msgstr ""
+
+#: knights.cpp:590
+msgid ""
+"You selected %1 to play black,\n"
+"but it can only be used as a book engine.\n"
+"Please select another engine to play black."
+msgstr ""
+
+#: knights.cpp:591
+msgid "Black Engine Problem"
+msgstr ""
+
+#: knights.cpp:594
+msgid "Error with black book engine"
+msgstr ""
+
+#: knights.cpp:596
+msgid ""
+"You selected %1 to play black's book,\n"
+"but it can only be used as a regular engine.\n"
+"Please select another engine to play black's book."
+msgstr ""
+
+#: knights.cpp:597
+msgid "Black Book Engine Problem"
+msgstr ""
+
+#: knights.cpp:600
+msgid "The computer opponent assigned to play %1 has crashed"
+msgstr ""
+
+#: knights.cpp:603
+msgid "There was an error while loading the file"
+msgstr ""
+
+#: knights.cpp:606
+msgid "There was an error while saving the file"
+msgstr ""
+
+#: knights.cpp:610
+msgid "Loading complete"
+msgstr ""
+
+#: knights.cpp:613
+msgid "Saving complete"
+msgstr ""
+
+#: knights.cpp:616
+msgid "Reading File"
+msgstr ""
+
+#: knights.cpp:619
+msgid "Can not move a chessman while reviewing the match"
+msgstr ""
+
+#: knights.cpp:622
+msgid "Illegal Move"
+msgstr ""
+
+#: knights.cpp:625
+msgid "White's turn"
+msgstr ""
+
+#: knights.cpp:628
+msgid "Black's turn"
+msgstr ""
+
+#: knights.cpp:631
+msgid "White wins"
+msgstr ""
+
+#: knights.cpp:634
+msgid "Black wins"
+msgstr ""
+
+#: knights.cpp:637
+msgid "Checkmate, White wins"
+msgstr ""
+
+#: knights.cpp:640
+msgid "Checkmate, Black wins"
+msgstr ""
+
+#: knights.cpp:643
+msgid "White resigns"
+msgstr ""
+
+#: knights.cpp:646
+msgid "Black resigns"
+msgstr ""
+
+#: knights.cpp:649
+msgid "White's flag fell"
+msgstr ""
+
+#: knights.cpp:652
+msgid "Black's flag fell"
+msgstr ""
+
+#: knights.cpp:655
+msgid "Black's flag was called, White wins"
+msgstr ""
+
+#: knights.cpp:658
+msgid "White's flag was called, Black wins"
+msgstr ""
+
+#: knights.cpp:661
+msgid "Draw match"
+msgstr ""
+
+#: knights.cpp:664
+msgid "50 moves rule, draw match"
+msgstr ""
+
+#: knights.cpp:667
+msgid "Starting computer players, please wait"
+msgstr ""
+
+#: knights.cpp:670
+msgid "Match paused"
+msgstr ""
+
+#: knights.cpp:673
+msgid "White has offered a draw"
+msgstr ""
+
+#: knights.cpp:676
+msgid "Black has offered a draw"
+msgstr ""
+
+#: knights.cpp:679
+msgid "Lost contact with opponent"
+msgstr ""
+
+#: knights.cpp:682
+msgid "Ready"
+msgstr ""
+
+#: knights.cpp:866
+msgid "Disconnect from Server"
+msgstr ""
+
+#: knights.cpp:955
+msgid "Resume"
+msgstr ""
+
+#: knights.cpp:1014
+msgid "Knights Themes"
+msgstr ""
+
+#: knights.cpp:1015
+msgid "Install Theme..."
+msgstr ""
+
+#: knights.cpp:1045
+msgid ""
+"You do not have permission to install this theme systemwide, so Knights "
+"installed it locally."
+msgstr ""
+
+#: knights.cpp:1046
+msgid "Installed theme locally"
+msgstr ""
+
+#: knights.cpp:1051
+#, c-format
+msgid ""
+"The theme could not be installed:\n"
+"%1"
+msgstr ""
+
+#: knights.cpp:1052
+msgid "Can not install theme"
+msgstr ""
+
+#: knightstextview.cpp:35
+msgid "Select &All"
+msgstr ""
+
+#: knightstextview.cpp:44
+msgid "Zoom &In"
+msgstr ""
+
+#: knightstextview.cpp:46
+msgid "Zoom &Out"
+msgstr ""
+
+#: list_pgn.cpp:29 list_pgn.cpp:48
+msgid "Result"
+msgstr ""
+
+#: list_pgn.cpp:30 list_pgn.cpp:49
+msgid "Title"
+msgstr ""
+
+#: list_pgn.cpp:31 list_pgn.cpp:50
+msgid "Round"
+msgstr ""
+
+#: list_pgn.cpp:32 list_pgn.cpp:51
+msgid "Site"
+msgstr ""
+
+#: list_pgn.cpp:33 list_pgn.cpp:52
+msgid "Date"
+msgstr ""
+
+#: list_pgn.cpp:81
+#, c-format
+msgid "Can not open %1"
+msgstr ""
+
+#: list_pgn.cpp:140
+msgid "%1 matches found."
+msgstr ""
+
+#: main.cpp:26
+msgid "Specify the location of your Knights data directory."
+msgstr ""
+
+#: main.cpp:27
+msgid "A .pgn file to be loaded."
+msgstr ""
+
+#: main.cpp:36
+msgid ""
+"The Knights Chess Interface\n"
+"\n"
+"Knights is a chess interface\n"
+"for the K Desktop Environment."
+msgstr ""
+
+#: main.cpp:44
+msgid "Project Manager and Programmer"
+msgstr ""
+
+#: main.cpp:48
+msgid "Communications Programmer"
+msgstr ""
+
+#: main.cpp:52
+msgid "Qtopia port and patches"
+msgstr ""
+
+#: main.cpp:56
+msgid "Patches and suggestions"
+msgstr ""
+
+#: main.cpp:60
+msgid "KDE3 Compatability Patch"
+msgstr ""
+
+#: main.cpp:64
+msgid "XBoard protocol"
+msgstr ""
+
+#: _translatorinfo.cpp:1 main.cpp:67
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr ""
+
+#: _translatorinfo.cpp:3 main.cpp:68
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr ""
+
+#: match_param.cpp:107
+msgid "Unknown"
+msgstr ""
+
+#: pgn.cpp:145
+msgid "%1 vs. %2"
+msgstr ""
+
+#: pgn.cpp:943
+#, c-format
+msgid "Page %1"
+msgstr ""
+
+#: pgn.cpp:975
+msgid " Good move"
+msgstr ""
+
+#: pgn.cpp:978
+msgid " Poor move"
+msgstr ""
+
+#: pgn.cpp:981
+msgid " Very good move"
+msgstr ""
+
+#: pgn.cpp:984
+msgid " Very poor move"
+msgstr ""
+
+#: pgn.cpp:987
+msgid " Speculative move"
+msgstr ""
+
+#: pgn.cpp:990
+msgid " Questionable move"
+msgstr ""
+
+#: pgn.cpp:993
+msgid " Forced move"
+msgstr ""
+
+#: pgn.cpp:996
+msgid " Singular move"
+msgstr ""
+
+#: pgn.cpp:999
+msgid " Worst move"
+msgstr ""
+
+#: pgn.cpp:1002
+msgid " Drawish position"
+msgstr ""
+
+#: pgn.cpp:1005
+msgid " Equal chances, quiet position"
+msgstr ""
+
+#: pgn.cpp:1008
+msgid " Equal chances, active position"
+msgstr ""
+
+#: pgn.cpp:1011
+msgid " Unclear position"
+msgstr ""
+
+#: pgn.cpp:1014
+msgid " White has a slight advantage"
+msgstr ""
+
+#: pgn.cpp:1017
+msgid " Black has a slight advantage"
+msgstr ""
+
+#: pgn.cpp:1020
+msgid " White has a moderate advantage"
+msgstr ""
+
+#: pgn.cpp:1023
+msgid " Black has a moderate advantage"
+msgstr ""
+
+#: pgn.cpp:1026
+msgid " White has a decisive advantage"
+msgstr ""
+
+#: pgn.cpp:1029
+msgid " Black has a decisive advantage"
+msgstr ""
+
+#: pgn.cpp:1032
+msgid " White has a crushing advantage ( Black should resign )"
+msgstr ""
+
+#: pgn.cpp:1035
+msgid " Black has a crushing advantage ( White should resign )"
+msgstr ""
+
+#: pgn.cpp:1038
+msgid " White is in zugzwang"
+msgstr ""
+
+#: pgn.cpp:1041
+msgid " Black is in zugzwang"
+msgstr ""
+
+#: pgn.cpp:1044
+msgid " White has a slight space advantage"
+msgstr ""
+
+#: pgn.cpp:1047
+msgid " Black has a slight space advantage"
+msgstr ""
+
+#: pgn.cpp:1050
+msgid " White has a moderate space advantage"
+msgstr ""
+
+#: pgn.cpp:1053
+msgid " Black has a moderate space advantage"
+msgstr ""
+
+#: pgn.cpp:1056
+msgid " White has a decisive space advantage"
+msgstr ""
+
+#: pgn.cpp:1059
+msgid " Black has a decisive space advantage"
+msgstr ""
+
+#: pgn.cpp:1062
+msgid " White has a slight time ( development ) advantage"
+msgstr ""
+
+#: pgn.cpp:1065
+msgid " Black has a slight time ( development ) advantage"
+msgstr ""
+
+#: pgn.cpp:1068
+msgid " White has a moderate time ( development ) advantage"
+msgstr ""
+
+#: pgn.cpp:1071
+msgid " Black has a moderate time ( development ) advantage"
+msgstr ""
+
+#: pgn.cpp:1074
+msgid " White has a decisive time ( development ) advantage"
+msgstr ""
+
+#: pgn.cpp:1077
+msgid " Black has a decisive time ( development ) advantage"
+msgstr ""
+
+#: pgn.cpp:1080
+msgid " White has the initiative"
+msgstr ""
+
+#: pgn.cpp:1083
+msgid " Black has the initiative"
+msgstr ""
+
+#: pgn.cpp:1086
+msgid " White has a lasting initiative"
+msgstr ""
+
+#: pgn.cpp:1089
+msgid " Black has a lasting initiative"
+msgstr ""
+
+#: pgn.cpp:1092
+msgid " White has the attack"
+msgstr ""
+
+#: pgn.cpp:1095
+msgid " Black has the attack"
+msgstr ""
+
+#: pgn.cpp:1098
+msgid " White has insufficient compensation for material deficit"
+msgstr ""
+
+#: pgn.cpp:1101
+msgid " Black has insufficient compensation for material deficit"
+msgstr ""
+
+#: pgn.cpp:1104
+msgid " White has sufficient compensation for material deficit"
+msgstr ""
+
+#: pgn.cpp:1107
+msgid " Black has sufficient compensation for material deficit"
+msgstr ""
+
+#: pgn.cpp:1110
+msgid " White has more than adequate compensation for material deficit"
+msgstr ""
+
+#: pgn.cpp:1113
+msgid " Black has more than adequate compensation for material deficit"
+msgstr ""
+
+#: pgn.cpp:1116
+msgid " White has a slight center control advantage"
+msgstr ""
+
+#: pgn.cpp:1119
+msgid " Black has a slight center control advantage"
+msgstr ""
+
+#: pgn.cpp:1122
+msgid " White has a moderate center control advantage"
+msgstr ""
+
+#: pgn.cpp:1125
+msgid " Black has a moderate center control advantage"
+msgstr ""
+
+#: pgn.cpp:1128
+msgid " White has a decisive center control advantage"
+msgstr ""
+
+#: pgn.cpp:1131
+msgid " Black has a decisive center control advantage"
+msgstr ""
+
+#: pgn.cpp:1134
+msgid " White has a slight kingside control advantage"
+msgstr ""
+
+#: pgn.cpp:1137
+msgid " Black has a slight kingside control advantage"
+msgstr ""
+
+#: pgn.cpp:1140
+msgid " White has a moderate kingside control advantage"
+msgstr ""
+
+#: pgn.cpp:1143
+msgid " Black has a moderate kingside control advantage"
+msgstr ""
+
+#: pgn.cpp:1146
+msgid " White has a decisive kingside control advantage"
+msgstr ""
+
+#: pgn.cpp:1149
+msgid " Black has a decisive kingside control advantage"
+msgstr ""
+
+#: pgn.cpp:1152
+msgid " White has a slight queenside control advantage"
+msgstr ""
+
+#: pgn.cpp:1155
+msgid " Black has a slight queenside control advantage"
+msgstr ""
+
+#: pgn.cpp:1158
+msgid " White has a moderate queenside control advantage"
+msgstr ""
+
+#: pgn.cpp:1161
+msgid " Black has a moderate queenside control advantage"
+msgstr ""
+
+#: pgn.cpp:1164
+msgid " White has a decisive queenside control advantage"
+msgstr ""
+
+#: pgn.cpp:1167
+msgid " Black has a decisive queenside control advantage"
+msgstr ""
+
+#: pgn.cpp:1170
+msgid " White has a vulnerable first rank"
+msgstr ""
+
+#: pgn.cpp:1173
+msgid " Black has a vulnerable first rank"
+msgstr ""
+
+#: pgn.cpp:1176
+msgid " White has a well protected first rank"
+msgstr ""
+
+#: pgn.cpp:1179
+msgid " Black has a well protected first rank"
+msgstr ""
+
+#: pgn.cpp:1182
+msgid " White has a poorly protected king"
+msgstr ""
+
+#: pgn.cpp:1185
+msgid " Black has a poorly protected king"
+msgstr ""
+
+#: pgn.cpp:1188
+msgid " White has a well protected king"
+msgstr ""
+
+#: pgn.cpp:1191
+msgid " Black has a well protected king"
+msgstr ""
+
+#: pgn.cpp:1194
+msgid " White has a poorly placed king"
+msgstr ""
+
+#: pgn.cpp:1197
+msgid " Black has a poorly placed king"
+msgstr ""
+
+#: pgn.cpp:1200
+msgid " White has a well placed king"
+msgstr ""
+
+#: pgn.cpp:1203
+msgid " Black has a well placed king"
+msgstr ""
+
+#: pgn.cpp:1206
+msgid " White has a very weak pawn structure"
+msgstr ""
+
+#: pgn.cpp:1209
+msgid " Black has a very weak pawn structure"
+msgstr ""
+
+#: pgn.cpp:1212
+msgid " White has a moderately weak pawn structure"
+msgstr ""
+
+#: pgn.cpp:1215
+msgid " Black has a moderately weak pawn structure"
+msgstr ""
+
+#: pgn.cpp:1218
+msgid " White has a moderately strong pawn structure"
+msgstr ""
+
+#: pgn.cpp:1221
+msgid " Black has a moderately strong pawn structure"
+msgstr ""
+
+#: pgn.cpp:1224
+msgid " White has a very strong pawn structure"
+msgstr ""
+
+#: pgn.cpp:1227
+msgid " Black has a very strong pawn structure"
+msgstr ""
+
+#: pgn.cpp:1230
+msgid " White has poor knight placement"
+msgstr ""
+
+#: pgn.cpp:1233
+msgid " Black has poor knight placement"
+msgstr ""
+
+#: pgn.cpp:1236
+msgid " White has good knight placement"
+msgstr ""
+
+#: pgn.cpp:1239
+msgid " Black has good knight placement"
+msgstr ""
+
+#: pgn.cpp:1242
+msgid " White has poor bishop placement"
+msgstr ""
+
+#: pgn.cpp:1245
+msgid " Black has poor bishop placement"
+msgstr ""
+
+#: pgn.cpp:1248
+msgid " White has good bishop placement"
+msgstr ""
+
+#: pgn.cpp:1251
+msgid " Black has good bishop placement"
+msgstr ""
+
+#: pgn.cpp:1254
+msgid " White has poor rook placement"
+msgstr ""
+
+#: pgn.cpp:1257
+msgid " Black has poor rook placement"
+msgstr ""
+
+#: pgn.cpp:1260
+msgid " White has good rook placement"
+msgstr ""
+
+#: pgn.cpp:1263
+msgid " Black has good rook placement"
+msgstr ""
+
+#: pgn.cpp:1266
+msgid " White has poor queen placement"
+msgstr ""
+
+#: pgn.cpp:1269
+msgid " Black has poor queen placement"
+msgstr ""
+
+#: pgn.cpp:1272
+msgid " White has good queen placement"
+msgstr ""
+
+#: pgn.cpp:1275
+msgid " Black has good queen placement"
+msgstr ""
+
+#: pgn.cpp:1278
+msgid " White has poor piece coordination"
+msgstr ""
+
+#: pgn.cpp:1281
+msgid " Black has poor piece coordination"
+msgstr ""
+
+#: pgn.cpp:1284
+msgid " White has good piece coordination"
+msgstr ""
+
+#: pgn.cpp:1287
+msgid " Black has good piece coordination"
+msgstr ""
+
+#: pgn.cpp:1290
+msgid " White has played the opening very poorly"
+msgstr ""
+
+#: pgn.cpp:1293
+msgid " Black has played the opening very poorly"
+msgstr ""
+
+#: pgn.cpp:1296
+msgid " White has played the opening poorly"
+msgstr ""
+
+#: pgn.cpp:1299
+msgid " Black has played the opening poorly"
+msgstr ""
+
+#: pgn.cpp:1302
+msgid " White has played the opening well"
+msgstr ""
+
+#: pgn.cpp:1305
+msgid " Black has played the opening well"
+msgstr ""
+
+#: pgn.cpp:1308
+msgid " White has played the opening very well"
+msgstr ""
+
+#: pgn.cpp:1311
+msgid " Black has played the opening very well"
+msgstr ""
+
+#: pgn.cpp:1314
+msgid " White has played the middlegame very poorly"
+msgstr ""
+
+#: pgn.cpp:1317
+msgid " Black has played the middlegame very poorly"
+msgstr ""
+
+#: pgn.cpp:1320
+msgid " White has played the middlegame poorly"
+msgstr ""
+
+#: pgn.cpp:1323
+msgid " Black has played the middlegame poorly"
+msgstr ""
+
+#: pgn.cpp:1326
+msgid " White has played the middlegame well"
+msgstr ""
+
+#: pgn.cpp:1329
+msgid " Black has played the middlegame well"
+msgstr ""
+
+#: pgn.cpp:1332
+msgid " White has played the middlegame very well"
+msgstr ""
+
+#: pgn.cpp:1335
+msgid " Black has played the middlegame very well"
+msgstr ""
+
+#: pgn.cpp:1338
+msgid " White has played the ending very poorly"
+msgstr ""
+
+#: pgn.cpp:1341
+msgid " Black has played the ending very poorly"
+msgstr ""
+
+#: pgn.cpp:1344
+msgid " White has played the ending poorly"
+msgstr ""
+
+#: pgn.cpp:1347
+msgid " Black has played the ending poorly"
+msgstr ""
+
+#: pgn.cpp:1350
+msgid " White has played the ending well"
+msgstr ""
+
+#: pgn.cpp:1353
+msgid " Black has played the ending well"
+msgstr ""
+
+#: pgn.cpp:1356
+msgid " White has played the ending very well"
+msgstr ""
+
+#: pgn.cpp:1359
+msgid " Black has played the ending very well"
+msgstr ""
+
+#: pgn.cpp:1362
+msgid " White has slight counterplay"
+msgstr ""
+
+#: pgn.cpp:1365
+msgid " Black has slight counterplay"
+msgstr ""
+
+#: pgn.cpp:1368
+msgid " White has moderate counterplay"
+msgstr ""
+
+#: pgn.cpp:1371
+msgid " Black has moderate counterplay"
+msgstr ""
+
+#: pgn.cpp:1374
+msgid " White has decisive counterplay"
+msgstr ""
+
+#: pgn.cpp:1377
+msgid " Black has decisive counterplay"
+msgstr ""
+
+#: pgn.cpp:1380
+msgid " White has moderate time control pressure"
+msgstr ""
+
+#: pgn.cpp:1383
+msgid " Black has moderate time control pressure"
+msgstr ""
+
+#: pgn.cpp:1386
+msgid " White has severe time control pressure"
+msgstr ""
+
+#: pgn.cpp:1389
+msgid " Black has severe time control pressure"
+msgstr ""
+
+#: pgn.cpp:1391
+msgid " With the idea..."
+msgstr ""
+
+#: pgn.cpp:1394
+msgid " Aimed against..."
+msgstr ""
+
+#: pgn.cpp:1397
+msgid " Better Move"
+msgstr ""
+
+#: pgn.cpp:1400
+msgid " Worse Move"
+msgstr ""
+
+#: pgn.cpp:1403
+msgid " Equivalent move"
+msgstr ""
+
+#: pgn.cpp:1406
+msgid " Editor's Remark"
+msgstr ""
+
+#: pgn.cpp:1409
+msgid " Novelty"
+msgstr ""
+
+#: pgn.cpp:1412
+msgid " Weak point"
+msgstr ""
+
+#: pgn.cpp:1415
+msgid " Endgame"
+msgstr ""
+
+#: pgn.cpp:1418
+msgid " Line"
+msgstr ""
+
+#: pgn.cpp:1421
+msgid " Diagonal"
+msgstr ""
+
+#: pgn.cpp:1424
+msgid " White has a pair of Bishops"
+msgstr ""
+
+#: pgn.cpp:1427
+msgid " Black has a pair of Bishops"
+msgstr ""
+
+#: pgn.cpp:1430
+msgid " Bishops of opposite color"
+msgstr ""
+
+#: pgn.cpp:1433
+msgid " Bishops of same color"
+msgstr ""
+
+#: pgn.cpp:1436
+msgid " Etc."
+msgstr ""
+
+#: pgn.cpp:1439
+msgid " Doubled pawns"
+msgstr ""
+
+#: pgn.cpp:1442
+msgid " Isolated pawn"
+msgstr ""
+
+#: pgn.cpp:1445
+msgid " Connected pawns"
+msgstr ""
+
+#: pgn.cpp:1448
+msgid " Hanging pawns"
+msgstr ""
+
+#: pgn.cpp:1451
+msgid " Backwards pawn"
+msgstr ""
+
+#: setpageaudio.cpp:28
+msgid "enable Audio"
+msgstr ""
+
+#: setpageaudio.cpp:36
+msgid "Audio Themes"
+msgstr ""
+
+#: setpageaudio.cpp:47
+msgid "Volume"
+msgstr ""
+
+#: setpageaudio.cpp:48
+msgid "Maximum"
+msgstr ""
+
+#: setpageaudio.cpp:52
+msgid "Minimum"
+msgstr ""
+
+#: setpageaudio.cpp:55
+msgid "For Current Match Only"
+msgstr ""
+
+#: setpagedisplay.cpp:74
+msgid "Board Themes"
+msgstr ""
+
+#: setpagedisplay.cpp:79
+msgid "Chessman Themes"
+msgstr ""
+
+#: setpagedisplay.cpp:85
+msgid "Theme Size"
+msgstr ""
+
+#: setpagedisplay.cpp:88
+msgid "Small"
+msgstr ""
+
+#: setpagedisplay.cpp:95
+msgid "Large"
+msgstr ""
+
+#: setpagedisplay.cpp:99
+msgid "Other Display Options"
+msgstr ""
+
+#: setpagedisplay.cpp:102
+msgid "Reverse Board Orientation"
+msgstr ""
+
+#: setpagedisplay.cpp:107
+msgid "Display Startup Logo"
+msgstr ""
+
+#: setpagedisplay.cpp:112
+msgid "Automatic Preview"
+msgstr ""
+
+#: setpagedisplay.cpp:117
+msgid "Show Last Move"
+msgstr ""
+
+#: setpagedisplay.cpp:122
+msgid "Animate Moves"
+msgstr ""
+
+#: setpagedisplay.cpp:127
+msgid "Show Coordinates"
+msgstr ""
+
+#: setpagedisplay.cpp:161
+msgid "Restore Defaults"
+msgstr ""
+
+#: setpagedisplay.cpp:165
+msgid "Standard Font..."
+msgstr ""
+
+#: setpagedisplay.cpp:174
+msgid "Private Font..."
+msgstr ""
+
+#: setpagedisplay.cpp:183
+msgid "Channel Font..."
+msgstr ""
+
+#: setpagedisplay.cpp:192
+msgid "Shout Font..."
+msgstr ""
+
+#: setpagedisplay.cpp:201
+msgid "Whisper Font..."
+msgstr ""
+
+#: setpagedisplay.cpp:210
+msgid "Notification Font..."
+msgstr ""
+
+#: setpagedisplay.cpp:225
+msgid "Console"
+msgstr ""
+
+#: setpagedisplay.cpp:519
+msgid "Standard"
+msgstr ""
+
+#: setpagedisplay.cpp:520
+msgid "Private Tell"
+msgstr ""
+
+#: setpagedisplay.cpp:521
+msgid "Channel Tell"
+msgstr ""
+
+#: setpagedisplay.cpp:522
+msgid "Shout"
+msgstr ""
+
+#: setpagedisplay.cpp:524
+msgid "Notification"
+msgstr ""
+
+#: setpageengines.cpp:33
+msgid "Engines to Play White"
+msgstr ""
+
+#: setpageengines.cpp:36 setpageengines.cpp:48
+msgid "enable Book Engine"
+msgstr ""
+
+#: setpageengines.cpp:45
+msgid "Engines to Play Black"
+msgstr ""
+
+#: setpageengines.cpp:57
+msgid "Chess Engines"
+msgstr ""
+
+#: setpageengines.cpp:62 setpageservers.cpp:69 tab_seeklist.cpp:27
+msgid "Name"
+msgstr ""
+
+#: setpageengines.cpp:64
+msgid "Wins"
+msgstr ""
+
+#: setpageengines.cpp:65
+msgid "Losses"
+msgstr ""
+
+#: setpageengines.cpp:66
+msgid "Draws"
+msgstr ""
+
+#: setpageengines.cpp:73 setpageservers.cpp:77
+msgid "&Add..."
+msgstr ""
+
+#: setpageengines.cpp:74 setpageservers.cpp:78
+msgid "&Modify..."
+msgstr ""
+
+#: setpageengines.cpp:75 setpageservers.cpp:79
+msgid "&Delete..."
+msgstr ""
+
+#: setpagegeneral.cpp:29
+msgid "Your Name:"
+msgstr ""
+
+#: setpagegeneral.cpp:36
+msgid "When Knights Begins It Should:"
+msgstr ""
+
+#: setpagegeneral.cpp:38
+msgid "Do Nothing"
+msgstr ""
+
+#: setpagegeneral.cpp:39
+msgid "Start a Match vs. PC"
+msgstr ""
+
+#: setpagegeneral.cpp:40
+msgid "Connect to ICS"
+msgstr ""
+
+#: setpagegeneral.cpp:48
+msgid "Save Match on Close?"
+msgstr ""
+
+#: setpagegeneral.cpp:52
+msgid "Ask"
+msgstr ""
+
+#: setpagegeneral.cpp:62
+msgid "Append to Save File:"
+msgstr ""
+
+#: setpagegeneral.cpp:65
+msgid "Append to Save File"
+msgstr ""
+
+#: setpagegeneral.cpp:79
+msgid "Pause on Minimize"
+msgstr ""
+
+#: setpagegeneral.cpp:85
+msgid "Always Promote to Queen"
+msgstr ""
+
+#: setpagegeneral.cpp:91
+msgid "Call Flag Automatically"
+msgstr ""
+
+#: setpageservers.cpp:56
+msgid "Current Server"
+msgstr ""
+
+#: setpageservers.cpp:70
+msgid "URL"
+msgstr ""
+
+#: setpageservers.cpp:90
+msgid "Servers"
+msgstr ""
+
+#: setpageservers.cpp:106
+msgid "Profanity Filter"
+msgstr ""
+
+#: setpageservers.cpp:110
+msgid "Filter Everything"
+msgstr ""
+
+#: setpageservers.cpp:110
+msgid "No Filtering"
+msgstr ""
+
+#: setpageservers.cpp:115
+msgid "Automatically Close Previous ICS Match"
+msgstr ""
+
+#: setpageservers.cpp:120
+msgid "Private Matches"
+msgstr ""
+
+#: setpageservers.cpp:124
+msgid "enable Premove"
+msgstr ""
+
+#: setpageservers.cpp:128
+msgid "enable Kibitzes"
+msgstr ""
+
+#: setpageservers.cpp:132
+msgid "enable Unregistered Tells"
+msgstr ""
+
+#: setpageservers.cpp:136
+msgid "enable Shouts"
+msgstr ""
+
+#: setpageservers.cpp:140
+msgid "enable Seeks"
+msgstr ""
+
+#: setpageservers.cpp:150
+msgid "Seconds Between Seek Updates"
+msgstr ""
+
+#: tab_seeklist.cpp:29
+msgid "Match Type"
+msgstr ""
+
+#: tab_seeklist.cpp:30
+msgid "Is Rated?"
+msgstr ""
+
+#: tabbox.cpp:163
+msgid "%1 - Knights"
+msgstr ""
+
+#: wiz_setup.cpp:51
+msgid "Knights Setup Wizard"
+msgstr ""
+
+#: wiz_setup.cpp:74
+msgid ""
+"Thank you for installing Knights, the graphical chess interface for KDE. To "
+"help you get started quickly, there are a few things Knights will need to "
+"setup. You should click 'Next' to see what they are."
+msgstr ""
+
+#: wiz_setup.cpp:77
+msgid "Welcome to Knights v%1!"
+msgstr ""
+
+#: wiz_setup.cpp:97
+msgid ""
+"When Knights saves a match to disk, it uses Portable Game Notation (PGN) to "
+"store the match. Several other computer chess games use PGN too. If you "
+"like, Knights can be the default PGN viewer on this system."
+msgstr ""
+
+#: wiz_setup.cpp:100
+msgid "Let Knights handle PGN files?"
+msgstr ""
+
+#: wiz_setup.cpp:106
+msgid "Let Knights handle your .pgn files?"
+msgstr ""
+
+#: wiz_setup.cpp:125
+msgid ""
+"Knights can not play a chess match against you without help. Known as Chess "
+"Engines, these helpers can be found on the Internet and are often included "
+"with your distribution. Knights can look for Chess Engines that you may "
+"already have. If found, Knights will configure itself to use them."
+msgstr ""
+
+#: wiz_setup.cpp:128 wiz_setup.cpp:134
+msgid "Let Knights search for chess engines?"
+msgstr ""
+
+#: wiz_setup.cpp:153
+msgid ""
+"In order for you to play chess online, Knights will have to connect to a "
+"chess server. Knights has a list of several of these servers. If you like, "
+"this list can be used to automatically configure Knights."
+msgstr ""
+
+#: wiz_setup.cpp:156 wiz_setup.cpp:162
+msgid "Let Knights configure chess servers?"
+msgstr ""
+
+#: wiz_setup.cpp:181
+msgid ""
+"Knights has now configured itself according to your choices. We strongly "
+"recommend that you read the documentation to make full use of all that "
+"Knights has to offer. You can access it by pressing F1."
+msgstr ""
+
+#: wiz_setup.cpp:184
+msgid "Setup Complete"
+msgstr ""
+
+#: wiz_setup.cpp:213
+msgid "Do you accept the terms of our license?"
+msgstr ""
+
+#: wiz_setup.cpp:218
+msgid "Please read and accept our license:"
+msgstr ""
+
+#: wiz_setup.cpp:269
+msgid "Free Internet Chess Server"
+msgstr ""
+
+#: wiz_setup.cpp:269
+msgid "Internet Chess Club"
+msgstr ""
+
+#: wiz_setup.cpp:269
+msgid "Global Chess Server"
+msgstr ""
+
+#: wiz_setup.cpp:269
+msgid "Chess.Net"
+msgstr ""
+
+#: wiz_setup.cpp:270
+msgid "Chess-Square.Com"
+msgstr ""
+
+#: wiz_setup.cpp:270
+msgid "Australian FICS"
+msgstr ""
+
+#: wiz_setup.cpp:270
+msgid "Brazilian FICS"
+msgstr ""
+
+#: wiz_setup.cpp:270
+msgid "Chilean FICS"
+msgstr ""
+
+#: wiz_setup.cpp:271
+msgid "Croatian FICS"
+msgstr ""
+
+#: wiz_setup.cpp:271
+msgid "Dutch FICS"
+msgstr ""
+
+#: wiz_setup.cpp:271
+msgid "French FICS"
+msgstr ""
+
+#: wiz_setup.cpp:271
+msgid "German FICS"
+msgstr ""
+
+#: wiz_setup.cpp:271
+msgid "Swedish FICS"
+msgstr ""
+
+#: proto_xboard.cpp:443
+msgid ""
+"%1 suggests this move:\n"
+"%2"
+msgstr ""
+
+#: proto_xboard.cpp:465 proto_xboard.cpp:472 proto_xboard.cpp:479
+msgid ""
+"%1 tells you:\n"
+"%2"
+msgstr ""
diff --git a/po/et.po b/po/et.po
new file mode 100644
index 0000000..526fe56
--- /dev/null
+++ b/po/et.po
@@ -0,0 +1,2243 @@
+# Estonian translation of Knights.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# Kunnar Klauks, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Knights 0.5.4\n"
+"POT-Creation-Date: 2003-01-21 04:30-0600\n"
+"PO-Revision-Date: 2002-11-27 21:25GMT\n"
+"Last-Translator: Kunnar Klauks <kk001a@hot.ee>\n"
+"Language-Team: <et@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 0.9.6\n"
+
+#: accel.cpp:23
+msgid "Previous Move"
+msgstr "Eelmine käik"
+
+#: accel.cpp:24
+msgid "Next Move"
+msgstr "Järgmine käik"
+
+#: accel.cpp:25
+msgid "Enter Text"
+msgstr "Sisesta tekst"
+
+#: accel.cpp:26
+msgid "Page Up"
+msgstr "Page Up"
+
+#: accel.cpp:27
+msgid "Page Down"
+msgstr "Page Down"
+
+#: accel.cpp:28
+msgid "Increase Board Size"
+msgstr "Suurenda laua suurust"
+
+#: accel.cpp:29
+msgid "Decrease Board Size"
+msgstr "Vähenda laua suurust"
+
+#: accel.cpp:30
+msgid "Last History Item"
+msgstr "Viimane ajaloo element"
+
+#: accel.cpp:31
+msgid "Next History Item"
+msgstr "Järgmine ajaloo element"
+
+#: accel.cpp:32
+msgid "Reply to the Last Tell"
+msgstr "Vasta viimasele teatele"
+
+#: accel.cpp:33
+msgid "Reply to the Channel"
+msgstr "Vasta kanalisse"
+
+#: accel.cpp:34
+msgid "Kibitz"
+msgstr "Kiibitse"
+
+#: accel.cpp:35 setpagedisplay.cpp:523
+msgid "Whisper"
+msgstr "Sosista"
+
+#: challenge_graph.cpp:75 tab_seeklist.cpp:40
+msgid "Seek Matches"
+msgstr "Otsi partiid"
+
+#: challenge_graph.cpp:77 tab_seeklist.cpp:42
+msgid "Accept This Match"
+msgstr "Aktsepteeri see partii"
+
+#: challenge_graph.cpp:78 tab_seeklist.cpp:43
+msgid "Tell..."
+msgstr "Räägi..."
+
+#: challenge_graph.cpp:79 tab_seeklist.cpp:44
+msgid "Assess..."
+msgstr "Hinda..."
+
+#: challenge_graph.cpp:80 tab_seeklist.cpp:45
+msgid "Player Info"
+msgstr "Mängija info"
+
+#: challenge_graph.cpp:82 tab_seeklist.cpp:47
+msgid "Player History"
+msgstr "Mängija ajalugu"
+
+#: challenge_graph.cpp:84 tab_seeklist.cpp:49
+msgid "Add to Friends"
+msgstr "Lisa sõprade hulka"
+
+#: challenge_graph.cpp:85 tab_seeklist.cpp:50
+msgid "Ignore This Player"
+msgstr "Ignoreeri seda mängijat"
+
+#: challenge_graph.cpp:304 tab_seeklist.cpp:28
+msgid "Rating"
+msgstr "Reiting"
+
+#: challenge_graph.cpp:311
+msgid "Time"
+msgstr "Aeg"
+
+#: challenge_graph_view.cpp:105
+msgid " Name: %1 Rating: %2 Match Type: %3 %4 Base Time: %5 Increment: %6"
+msgstr "Nimi: %1 Reiting: %2 Partii tüüp: %3 %4 Mõtlemisaeg: %5 Inkrement: %6"
+
+#: core.cpp:385
+msgid "Hint"
+msgstr "Nõuanne"
+
+#: core.cpp:388
+msgid "Tell User"
+msgstr "Räägi kasutajale"
+
+#: core.cpp:391
+msgid "Tell User Error"
+msgstr "Tell User Error"
+
+#: core.cpp:397
+msgid "Tell Opponent"
+msgstr "Räägi vastasele"
+
+#: core.cpp:411
+msgid "Tell All"
+msgstr "Räägi kõigile"
+
+#: core.cpp:646
+#, fuzzy
+msgid "Load PGN..."
+msgstr "Ava partii"
+
+#: core.cpp:690
+#, fuzzy
+msgid "Would you like to save this match?"
+msgstr "Kas sa tahaksid salvestada seda partiid?"
+
+#: core.cpp:691
+#, fuzzy
+msgid "Save Match?"
+msgstr "Sa&lvesta partii "
+
+#: core.cpp:710
+#, fuzzy
+msgid "Save Match..."
+msgstr "Salvesta partii &kui..."
+
+#: dlg_challenge.cpp:25
+msgid "You've Been Challenged:"
+msgstr "Sulle esitati väljakutse"
+
+#: dlg_challenge.cpp:29
+msgid "Accept"
+msgstr "Aktsepteeri"
+
+#: dlg_challenge.cpp:30
+msgid "Decline"
+msgstr "Keeldu"
+
+#: dlg_challenge.cpp:49
+msgid "Time Odds Match"
+msgstr "Partii ajakontrollid"
+
+#: dlg_challenge.cpp:53
+msgid "Unrated"
+msgstr "Mittehinnatud"
+
+#: dlg_challenge.cpp:54
+msgid "Rated"
+msgstr "Hinnatud"
+
+#: dlg_challenge.cpp:60 dlg_challenge.cpp:69 dlg_newmatch.cpp:87
+#: dlg_newmatch.cpp:104 tab_seeklist.cpp:101
+msgid " min."
+msgstr " min."
+
+#: dlg_challenge.cpp:61 dlg_challenge.cpp:70 dlg_newmatch.cpp:97
+#: dlg_newmatch.cpp:114 setpageservers.cpp:146 tab_seeklist.cpp:102
+msgid " sec."
+msgstr " sek."
+
+#: dlg_challenge.cpp:62 dlg_challenge.cpp:71 tab_seeklist.cpp:31
+msgid "Base Time"
+msgstr "Mõtlemisaeg"
+
+#: dlg_challenge.cpp:63 dlg_challenge.cpp:72 tab_seeklist.cpp:32
+msgid "Increment"
+msgstr "Inkrement"
+
+#: dlg_challenge.cpp:109
+msgid ""
+"%1 %2 vs. %3 %4\n"
+"in a %5 match."
+msgstr ""
+"%1 %2 vs. %3 %4\n"
+"%5 partiis."
+
+#: dlg_challenge.cpp:124 dlg_challenge.cpp:125
+msgid "Time Controls"
+msgstr "Ajakontrollid"
+
+#: dlg_challenge.cpp:154
+msgid "Counter Offer"
+msgstr "Vastupakkumine"
+
+#: dlg_engine.cpp:26
+msgid "Configure Engine"
+msgstr "Seadista mootorit"
+
+#: dlg_engine.cpp:38
+msgid "Engine Name"
+msgstr "Mootori nimi"
+
+#: dlg_engine.cpp:43 setpageengines.cpp:63
+msgid "Protocol"
+msgstr "Protokoll"
+
+#: dlg_engine.cpp:48
+msgid "Engine Filename"
+msgstr "Mootori faili nimi"
+
+#: dlg_engine.cpp:54
+msgid "Command Line Arguments"
+msgstr "Käsurea argumendid"
+
+#: dlg_engine.cpp:59 dlg_server.cpp:88
+msgid "Log File"
+msgstr "Logi fail"
+
+#: dlg_login.cpp:21
+msgid "Login Prompt"
+msgstr "Sisselogimise viip"
+
+#: dlg_login.cpp:31
+msgid "Login:"
+msgstr "Logi sisse:"
+
+#: dlg_login.cpp:32
+msgid "Password:"
+msgstr "Parool:"
+
+#: dlg_login.cpp:38
+msgid "Log in as guest"
+msgstr "Logi sisse külalisena"
+
+#: dlg_login.cpp:54
+msgid "Login"
+msgstr "Login"
+
+#: dlg_login.cpp:54
+msgid "Log in to the chess server using this name and password."
+msgstr "Logi serverisse kasutades seda nime ja parooli"
+
+#: dlg_newmatch.cpp:38
+msgid "Start a New Match"
+msgstr "Alusta uut partiid"
+
+#: dlg_newmatch.cpp:45
+msgid "White"
+msgstr "Valge"
+
+#: dlg_newmatch.cpp:46
+msgid "Black"
+msgstr "Must"
+
+#: dlg_newmatch.cpp:59 dlg_newmatch.cpp:66
+msgid "Human"
+msgstr "Inimene"
+
+#: dlg_newmatch.cpp:60 dlg_newmatch.cpp:67
+msgid "Computer"
+msgstr "Arvuti"
+
+#: dlg_newmatch.cpp:61 dlg_newmatch.cpp:68
+msgid "Email"
+msgstr "E-post"
+
+#: dlg_newmatch.cpp:85 dlg_newmatch.cpp:102
+msgid "Base Time:"
+msgstr "Mõtlemisaeg"
+
+#: dlg_newmatch.cpp:90 dlg_newmatch.cpp:107
+msgid "Moves Per Base Time"
+msgstr "Käike mõtlemisaja jooksul"
+
+#: dlg_newmatch.cpp:92 dlg_newmatch.cpp:109
+msgid " moves"
+msgstr "käike"
+
+#: dlg_newmatch.cpp:95 dlg_newmatch.cpp:112
+msgid "Increment Per Move"
+msgstr "Inkrement käigule"
+
+#: dlg_promote.cpp:94
+msgid "Promote your pawn to..."
+msgstr "Muunda oma ettur..."
+
+#: dlg_promote.cpp:101
+msgid "Pawn Promotion"
+msgstr "Etturi muundamine"
+
+#: dlg_selectemail.cpp:27
+msgid "Select Email Address"
+msgstr "Vali e-posti aadress"
+
+#: dlg_selectengine.cpp:30
+msgid "Select Computer Player"
+msgstr "Valiti arvuti vastane"
+
+#: dlg_selectengine.cpp:41
+msgid "Computer Players"
+msgstr "Arvuti vastased"
+
+#: dlg_selectengine.cpp:61
+msgid "Player Strength"
+msgstr "Mängija tugevus"
+
+#: dlg_selectengine.cpp:63
+msgid "Weak"
+msgstr "Nõrk"
+
+#: dlg_selectengine.cpp:70
+msgid "Strong"
+msgstr "Tugev"
+
+#: dlg_server.cpp:25
+msgid "Configure Server"
+msgstr "Seadista serverit"
+
+#: dlg_server.cpp:37
+msgid "Server Name"
+msgstr "Serveri nimi"
+
+#: dlg_server.cpp:44
+msgid "Server URL"
+msgstr "Serveri URL"
+
+#: dlg_server.cpp:49
+msgid "Server Port"
+msgstr "Serveri port"
+
+#: dlg_server.cpp:56
+msgid "Username"
+msgstr "Kasutajanimi"
+
+#: dlg_server.cpp:59
+msgid "Remember My Password"
+msgstr "Pea minu parool meeles"
+
+#: dlg_server.cpp:64
+msgid "Password"
+msgstr "Parool"
+
+#: dlg_server.cpp:71
+msgid "Confirm Password"
+msgstr "Kinnita parool"
+
+#: dlg_server.cpp:79
+msgid "Timeseal"
+msgstr "Timeseal"
+
+#: dlg_settings.cpp:48 setpagedisplay.cpp:142
+msgid "General"
+msgstr "Ãœldine"
+
+#: dlg_settings.cpp:49
+msgid "Various aspects of Knights get configured here."
+msgstr "Siin muudetakse mitmesuguseid Knights'i seadeid."
+
+#: dlg_settings.cpp:55
+msgid "Display"
+msgstr "Välimus"
+
+#: dlg_settings.cpp:56
+msgid "These settings determine how Knights displays itself to you."
+msgstr "Knights'i välimuse seadistused."
+
+#: dlg_settings.cpp:62
+msgid "Audio"
+msgstr "Heli"
+
+#: dlg_settings.cpp:63
+msgid "These settings determine what Knights sounds like."
+msgstr "Siin seadistatakse Knights'i heli"
+
+#: dlg_settings.cpp:69
+msgid "Computer Opponents"
+msgstr "Arvuti vastased"
+
+#: dlg_settings.cpp:70
+msgid "Configure your chess engines here."
+msgstr "Seadista oma male mootoreid siin"
+
+#: dlg_settings.cpp:76 setpageservers.cpp:65
+msgid "Chess Servers"
+msgstr "Maleserverid"
+
+#: dlg_settings.cpp:77
+msgid "Configure your internet chess servers here."
+msgstr "Seadista interneti serverid siin"
+
+#: io_internet.cpp:80
+msgid ""
+"There are no servers configured.\n"
+"Please make sure you have at least one server configured."
+msgstr ""
+"Ãœkski server pole seadistatud.\n"
+"Palun seadista vähemalt üks server"
+
+#: io_internet.cpp:80
+msgid "Cannot find a server."
+msgstr "Serverit ei leitud"
+
+#: io_internet.cpp:99
+msgid ""
+"Knights can not start Timeseal.\n"
+"Please make sure you have the correct path and filename configured."
+msgstr ""
+"Knights ei suuda käivitada Timeseal'i.\n"
+"Palun kontrolli et tee failini on sisestatud korrektselt ja failinimi on "
+"seatud"
+
+#: io_internet.cpp:99
+msgid "Cannot find Timeseal."
+msgstr "Timeseali ei leitud"
+
+#: io_internet.cpp:109 io_internet.cpp:121
+msgid ""
+"Knights is unable to connect to the server.\n"
+" Please make sure your internet connection is working and try again."
+msgstr ""
+"Knights ei saanud serveriga ühendust.\n"
+"Palun kontrolli kas internetiühendus toimib ja proovi uuesti."
+
+#: io_internet.cpp:109 io_internet.cpp:121
+msgid "Cannot connect to server."
+msgstr "Ei saa serveriga ühendust"
+
+#: io_internet.cpp:144
+msgid "%1 Console"
+msgstr "%1 Konsool"
+
+#: io_internet.cpp:149
+#, fuzzy
+msgid "Sought Matches List"
+msgstr "Otsitavate partiide nimekiri"
+
+#: io_internet.cpp:154
+#, fuzzy
+msgid "Sought Matches Graph"
+msgstr "Otsitavate partiide graafik"
+
+#: knights.cpp:70 main.cpp:34
+msgid "Knights"
+msgstr "Knights"
+
+#: knights.cpp:250
+msgid "&Draw"
+msgstr "&Viik"
+
+#: knights.cpp:254
+msgid "&Retract Move"
+msgstr "Võta käik &tagasi"
+
+#: knights.cpp:256
+msgid "Select this to retract your last move."
+msgstr "Vali see viimase käigu käigu tagasivõtmiseks"
+
+#: knights.cpp:258
+msgid "Resign"
+msgstr "Alistu"
+
+#: knights.cpp:260
+msgid "Use this to concede the match to your opponent."
+msgstr "Kasuta seda vastasele alla andmiseks"
+
+#: knights.cpp:262
+msgid "&Call Flag"
+msgstr "&Aja ületamine"
+
+#: knights.cpp:264
+#, fuzzy
+msgid ""
+"Use this to declare the match over, due to your opponent being out of time."
+msgstr ""
+"Kasuta seda mängu lõpu deklareerimiseks, kuna su vastane on ületanud aja"
+
+#: knights.cpp:266
+msgid "&Hint"
+msgstr "&Nõuanne"
+
+#: knights.cpp:268
+msgid "This will ask your opponent for a hint."
+msgstr "Küsi selle abil vastaselt nõu"
+
+#: knights.cpp:270
+msgid "Move &Now"
+msgstr "&Käi nüüd"
+
+#: knights.cpp:272
+msgid "Clicking this option will force your opponent to move immediately."
+msgstr "Klikkides sellele valikule sunnid oma vastast koheselt käima"
+
+#: knights.cpp:274
+msgid "&Flip View"
+msgstr "&Vaheta vaadet"
+
+#: knights.cpp:276
+msgid "This will reverse the chessboard's orientation by 180 degrees."
+msgstr "See pöörab malelaua asendit 180 kraadi võrra."
+
+#: knights.cpp:278
+msgid "&Ponder"
+msgstr "&Mõtle vastase käigu ajal"
+
+#: knights.cpp:281
+msgid "This toggles your opponent's ability to think while it's your turn."
+msgstr "See vahetab vastase võimet mõelda või mitte mõelda sinu käigu ajal, "
+
+#: knights.cpp:285 knights.cpp:949
+msgid "Pause"
+msgstr "Peata"
+
+#: knights.cpp:287
+msgid "Select this to pause the clock for this match."
+msgstr "Vali see et peatada kell selles partiis"
+
+#: knights.cpp:292
+msgid "&Offer Draw"
+msgstr "&Paku viiki"
+
+#: knights.cpp:293
+#, fuzzy
+msgid ""
+"Clicking this will inform your opponent that you are willing draw the match."
+msgstr "Kliki siia kui tahad vastasele viiki pakkuda"
+
+#: knights.cpp:295
+msgid "&Accept Draw"
+msgstr "&Võta viik vastu"
+
+#: knights.cpp:296
+msgid "Clicking this will accept a draw offered by your opponent."
+msgstr "Kliki siia et võtta vastase viigipakkumine vastu"
+
+#: knights.cpp:298
+msgid "&Reject Draw"
+msgstr "&Lükka viigipakkumine tagasi"
+
+#: knights.cpp:299
+msgid "Clicking this will reject a draw offered by your opponent."
+msgstr "Kliki siia et vastase viigipakkumine tagasi lükata"
+
+#: knights.cpp:301
+msgid "&Ignore Draw"
+msgstr "&Ignoreeri viigipakkumist"
+
+#: knights.cpp:302
+msgid "Clicking this will ignore future draw offers from your opponent."
+msgstr "Kliki siia kui tahad edaspidi vastase viigipakkumisi ignoreerida"
+
+#: knights.cpp:308
+msgid "&New Match..."
+msgstr "&Uus partii"
+
+#: knights.cpp:309
+msgid "This allows you to begin a new match."
+msgstr "Siit on võimalik alustada uut partiid"
+
+#: knights.cpp:312
+msgid "&Load Match..."
+msgstr "&Ava partii "
+
+#: knights.cpp:313
+#, fuzzy
+msgid ""
+"The Load command will allow you to select a previously saved match and play "
+"it again."
+msgstr ""
+"Ava käsk võimaldab sul valida eelnevalt salvestatud partii ja mängida seda "
+"uuesti"
+
+#: knights.cpp:316 thinbuttons.cpp:40
+msgid "&Close Match"
+msgstr "&Sulge partii"
+
+#: knights.cpp:318
+msgid "This command removes the current match."
+msgstr "See käsk sulgeb käesoleva partii"
+
+#: knights.cpp:320
+msgid "Close All"
+msgstr "Sulge kõik"
+
+#: knights.cpp:322
+msgid "This command will remove all matches that are currently loaded."
+msgstr "See käsk sulgeb kõik partiid mis on sel hetkel laetud"
+
+#: knights.cpp:326 thinbuttons.cpp:32
+msgid "&Save Match"
+msgstr "Sa&lvesta partii "
+
+#: knights.cpp:328 knights.cpp:333
+#, fuzzy
+msgid ""
+"The Save command will allow you to store a copy of your current match for "
+"later use."
+msgstr ""
+"Salvesta käsk võimldab salvestatada koopia käesolevast partiidt hilisemaks "
+"kasutamiseks"
+
+#: knights.cpp:331 thinbuttons.cpp:34
+msgid "Save Match &As..."
+msgstr "Salvesta partii &kui..."
+
+#: knights.cpp:337 knights.cpp:859
+msgid "Connect to Server"
+msgstr "Ãœhenda serveriga"
+
+#: knights.cpp:338
+msgid "Clicking this will connect Knights with an internet chess server."
+msgstr "Sellele klikkides ühendab Knights ennast interneti maleserveriga"
+
+#: knights.cpp:342 thinbuttons.cpp:37
+msgid "&Print Notation..."
+msgstr "&Trüki notatsioon"
+
+#: knights.cpp:344
+msgid ""
+"The Print command will allow you to print this game's notation on your "
+"printer."
+msgstr "Trüki käsk võimaldab trükkida partii notatsiooni "
+
+#: knights.cpp:349
+#, fuzzy
+msgid "The Quit command will stop all matches and exit Knights."
+msgstr "Välju käsk peatab käesoleva partii ja sulgen Knights'i"
+
+#: knights.cpp:355
+msgid "Play &White"
+msgstr "Mängi &valgetega"
+
+#: knights.cpp:358
+msgid ""
+"If checked, this option tells Knights that you will play as the White army "
+"when you play vs. the computer."
+msgstr ""
+"Kui märgitud, teatab see valik Knights'ile et sa mängid valgete malenditega "
+"arvuti vastu. "
+
+#: knights.cpp:360
+msgid "Play &Black"
+msgstr "Mängi &mustadega"
+
+#: knights.cpp:363
+msgid ""
+"If checked, this option tells Knights that you will play as the Black army "
+"when you play vs. the computer."
+msgstr ""
+"Kui märgitud, teatab see valik Knights'ile et sa mängid mustade malenditega "
+"arvuti vastu. "
+
+#: knights.cpp:366
+msgid "&Install Themes"
+msgstr "&Paigalda uus teema "
+
+#: knights.cpp:367
+msgid "This lets you install downloaded themes into Knights."
+msgstr "Siit saad paigaldada uusi teemasid Knights'le"
+
+#: knights.cpp:371
+msgid ""
+"Click this if you want to change the keyboard shortcuts that Knights uses."
+msgstr "Kliki siia kui soovid muuta Knights'i klahvide seoseid"
+
+#: knights.cpp:374
+msgid "&Configure Knights..."
+msgstr "Knights &seadistamine..."
+
+#: knights.cpp:375
+msgid ""
+"This opens a new window which allows you to customize Knights to your "
+"particular tastes."
+msgstr "See avab uue akna mis võimaldab seadistada Knights'i oma maitse järgi"
+
+#: knights.cpp:381
+msgid "Begin a Tutorial"
+msgstr "Alusta õppetundi"
+
+#: knights.cpp:387
+msgid "&Match"
+msgstr "&Partii"
+
+#: knights.cpp:576
+#, fuzzy
+msgid "Error with white engine"
+msgstr "Valgete mootori viga"
+
+#: knights.cpp:578
+msgid ""
+"You selected %1 to play white,\n"
+"but it can only be used as a book engine.\n"
+"Please select another engine to play white."
+msgstr ""
+"Valgetega mängimiseks on valitud %1 ,\n"
+"kuid seda saab kasutada ainult avangumootorina. \n"
+"Palun vali teine mootor valgetega mängimiseks"
+
+#: knights.cpp:579
+msgid "White Engine Problem"
+msgstr "Valge mootori probleem"
+
+#: knights.cpp:582
+#, fuzzy
+msgid "Error with white book engine"
+msgstr "Valgete avangumootori viga"
+
+#: knights.cpp:584
+msgid ""
+"You selected %1 to play white's book,\n"
+"but it can only be used as a regular engine.\n"
+"Please select another engine to play white's book."
+msgstr ""
+"%1 valitud valge avanguraamatu jaoks,\n"
+"kuid seda saab kasutada ainult hariliku mootorina.\n"
+"Palun vali teine mootor valge avanguraamatu jaoks."
+
+#: knights.cpp:585
+msgid "White Book Engine Problem"
+msgstr "Valge avangumootori probleem"
+
+#: knights.cpp:588
+#, fuzzy
+msgid "Error with black engine"
+msgstr "Mustade mootori viga"
+
+#: knights.cpp:590
+msgid ""
+"You selected %1 to play black,\n"
+"but it can only be used as a book engine.\n"
+"Please select another engine to play black."
+msgstr ""
+"%1 valitud mustadega mängimiseks,\n"
+"kuid seda saab kasutada ainult avangumootorina.\n"
+"Palun vali teine mootor mustadega mängimiseks."
+
+#: knights.cpp:591
+msgid "Black Engine Problem"
+msgstr "Musta mootori probleem"
+
+#: knights.cpp:594
+#, fuzzy
+msgid "Error with black book engine"
+msgstr "Musta avangumootori viga"
+
+#: knights.cpp:596
+msgid ""
+"You selected %1 to play black's book,\n"
+"but it can only be used as a regular engine.\n"
+"Please select another engine to play black's book."
+msgstr ""
+"%1 valitud mustade avanguraamatu jaoks,\n"
+"kuid seda saab kasutada ainult hariliku mootorina.\n"
+"Palun vali teine mootor mustade avanguraamatu jaoks."
+
+#: knights.cpp:597
+msgid "Black Book Engine Problem"
+msgstr "Musta avangumootori viga"
+
+#: knights.cpp:600
+#, fuzzy
+msgid "The computer opponent assigned to play %1 has crashed"
+msgstr "Arvuti vastan %1 -ga mämgimiseks jooksis kokku."
+
+#: knights.cpp:603
+#, fuzzy
+msgid "There was an error while loading the file"
+msgstr "Viga faili avamisel"
+
+#: knights.cpp:606
+#, fuzzy
+msgid "There was an error while saving the file"
+msgstr "Viga faili salvestamisel"
+
+#: knights.cpp:610
+#, fuzzy
+msgid "Loading complete"
+msgstr "Laadimine lõpetatud"
+
+#: knights.cpp:613
+#, fuzzy
+msgid "Saving complete"
+msgstr "Salvestamine lõpetatud"
+
+#: knights.cpp:616
+#, fuzzy
+msgid "Reading File"
+msgstr "Faili lugemine"
+
+#: knights.cpp:619
+#, fuzzy
+msgid "Can not move a chessman while reviewing the match"
+msgstr "Malendit ei saa liigutada partii ülevaatamise ajal"
+
+#: knights.cpp:622
+#, fuzzy
+msgid "Illegal Move"
+msgstr "Illegaalne käik"
+
+#: knights.cpp:625
+#, fuzzy
+msgid "White's turn"
+msgstr "Valge käik"
+
+#: knights.cpp:628
+#, fuzzy
+msgid "Black's turn"
+msgstr "Musta käik"
+
+#: knights.cpp:631
+#, fuzzy
+msgid "White wins"
+msgstr "Valge võitis"
+
+#: knights.cpp:634
+#, fuzzy
+msgid "Black wins"
+msgstr "Must võitis"
+
+#: knights.cpp:637
+#, fuzzy
+msgid "Checkmate, White wins"
+msgstr "Matt, valge võitis"
+
+#: knights.cpp:640
+#, fuzzy
+msgid "Checkmate, Black wins"
+msgstr "Matt, must võitis"
+
+#: knights.cpp:643
+#, fuzzy
+msgid "White resigns"
+msgstr "Valge alistus"
+
+#: knights.cpp:646
+#, fuzzy
+msgid "Black resigns"
+msgstr "Must alistus"
+
+#: knights.cpp:649
+#, fuzzy
+msgid "White's flag fell"
+msgstr "Valge ületas aja"
+
+#: knights.cpp:652
+#, fuzzy
+msgid "Black's flag fell"
+msgstr "Must ületas aja"
+
+#: knights.cpp:655
+#, fuzzy
+msgid "Black's flag was called, White wins"
+msgstr "Must ületas aja, valge võitis"
+
+#: knights.cpp:658
+#, fuzzy
+msgid "White's flag was called, Black wins"
+msgstr "Valge ületas aja, must võitis"
+
+#: knights.cpp:661
+#, fuzzy
+msgid "Draw match"
+msgstr "Partii lõppes viigiga"
+
+#: knights.cpp:664
+#, fuzzy
+msgid "50 moves rule, draw match"
+msgstr "50 käigu reegel, viik"
+
+#: knights.cpp:667
+#, fuzzy
+msgid "Starting computer players, please wait"
+msgstr "Arvuti mängijate käivitamine, palun oota"
+
+#: knights.cpp:670
+#, fuzzy
+msgid "Match paused"
+msgstr "Partii tüüp"
+
+#: knights.cpp:673
+#, fuzzy
+msgid "White has offered a draw"
+msgstr "Valge pakkus viiki"
+
+#: knights.cpp:676
+#, fuzzy
+msgid "Black has offered a draw"
+msgstr "Must pakkus viiki"
+
+#: knights.cpp:679
+#, fuzzy
+msgid "Lost contact with opponent"
+msgstr "Kontakt vastasega kadunud"
+
+#: knights.cpp:682
+#, fuzzy
+msgid "Ready"
+msgstr "Valmis"
+
+#: knights.cpp:866
+msgid "Disconnect from Server"
+msgstr "Lahuta serverist"
+
+#: knights.cpp:955
+msgid "Resume"
+msgstr "Jätka"
+
+#: knights.cpp:1014
+msgid "Knights Themes"
+msgstr "Knightsi teemad"
+
+#: knights.cpp:1015
+msgid "Install Theme..."
+msgstr "Paigalda teema"
+
+#: knights.cpp:1045
+msgid ""
+"You do not have permission to install this theme systemwide, so Knights "
+"installed it locally."
+msgstr ""
+"Puuduvad õigused, et paigaldada seda teemat tervele süsteemile, Knights "
+"paigaldas selle lokaalselt."
+
+#: knights.cpp:1046
+msgid "Installed theme locally"
+msgstr "Lokaalselt paigaldatud teema"
+
+#: knights.cpp:1051
+#, c-format
+msgid ""
+"The theme could not be installed:\n"
+"%1"
+msgstr ""
+"Teemat ei õnnestunud paigaldada:\n"
+"%1"
+
+#: knights.cpp:1052
+msgid "Can not install theme"
+msgstr "Ei suuda paigaldada teemat"
+
+#: knightstextview.cpp:35
+msgid "Select &All"
+msgstr "Vali &kõik"
+
+#: knightstextview.cpp:44
+msgid "Zoom &In"
+msgstr "&Suurendus sisse"
+
+#: knightstextview.cpp:46
+msgid "Zoom &Out"
+msgstr "Suurendus &välja"
+
+#: list_pgn.cpp:29 list_pgn.cpp:48
+msgid "Result"
+msgstr "Tulemus"
+
+#: list_pgn.cpp:30 list_pgn.cpp:49
+msgid "Title"
+msgstr "Tiitel"
+
+#: list_pgn.cpp:31 list_pgn.cpp:50
+msgid "Round"
+msgstr "Voor"
+
+#: list_pgn.cpp:32 list_pgn.cpp:51
+msgid "Site"
+msgstr "Asukoht"
+
+#: list_pgn.cpp:33 list_pgn.cpp:52
+msgid "Date"
+msgstr "Kuupäev"
+
+#: list_pgn.cpp:81
+#, c-format
+msgid "Can not open %1"
+msgstr "Ei suuda avada %1"
+
+#: list_pgn.cpp:140
+msgid "%1 matches found."
+msgstr "leiti %1 partiid"
+
+#: main.cpp:26
+msgid "Specify the location of your Knights data directory."
+msgstr "Määra oma Knights'i andmete kataloogi asukoht"
+
+#: main.cpp:27
+msgid "A .pgn file to be loaded."
+msgstr "Avatav pgn fail"
+
+#: main.cpp:36
+msgid ""
+"The Knights Chess Interface\n"
+"\n"
+"Knights is a chess interface\n"
+"for the K Desktop Environment."
+msgstr ""
+"Graafiline maleliides Knights\n"
+"\n"
+"Knights on graafiline\n"
+"maleliides KDE jaoks"
+
+#: main.cpp:44
+msgid "Project Manager and Programmer"
+msgstr "Projekti juht ja programmeerija"
+
+#: main.cpp:48
+msgid "Communications Programmer"
+msgstr "Kommunikatsioonide programmeerija"
+
+#: main.cpp:52
+msgid "Qtopia port and patches"
+msgstr "Qtopia port ja parandused"
+
+#: main.cpp:56
+msgid "Patches and suggestions"
+msgstr "Parandused ja soovitused"
+
+#: main.cpp:60
+msgid "KDE3 Compatability Patch"
+msgstr "KDE3 kompatiibluse parandus"
+
+#: main.cpp:64
+msgid "XBoard protocol"
+msgstr "XBoard protokoll"
+
+#: _translatorinfo.cpp:1 main.cpp:67
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Kunnar Klauks"
+
+#: _translatorinfo.cpp:3 main.cpp:68
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "kk001a@hot.ee"
+
+#: match_param.cpp:107
+msgid "Unknown"
+msgstr "Tundmatu"
+
+#: pgn.cpp:145
+msgid "%1 vs. %2"
+msgstr "%1 vs. %2"
+
+#: pgn.cpp:943
+#, c-format
+msgid "Page %1"
+msgstr "Lehekülg %1"
+
+#: pgn.cpp:975
+msgid " Good move"
+msgstr "Hea käik"
+
+#: pgn.cpp:978
+msgid " Poor move"
+msgstr "Halb käik"
+
+#: pgn.cpp:981
+msgid " Very good move"
+msgstr "Väga hea käik"
+
+#: pgn.cpp:984
+msgid " Very poor move"
+msgstr "Väga halb käik"
+
+#: pgn.cpp:987
+msgid " Speculative move"
+msgstr "Spekulatiivne käik"
+
+#: pgn.cpp:990
+msgid " Questionable move"
+msgstr "Küsitav käik"
+
+#: pgn.cpp:993
+msgid " Forced move"
+msgstr "Sunnitud käik"
+
+#: pgn.cpp:996
+msgid " Singular move"
+msgstr "Ainuke käik"
+
+#: pgn.cpp:999
+msgid " Worst move"
+msgstr "Halvim käik"
+
+#: pgn.cpp:1002
+msgid " Drawish position"
+msgstr "Viigiline seis"
+
+#: pgn.cpp:1005
+msgid " Equal chances, quiet position"
+msgstr "Võrdsed võimalused, vaikne seis"
+
+#: pgn.cpp:1008
+msgid " Equal chances, active position"
+msgstr "Võrdsed võimalused, aktiivne seis"
+
+#: pgn.cpp:1011
+msgid " Unclear position"
+msgstr "Segane seis"
+
+#: pgn.cpp:1014
+msgid " White has a slight advantage"
+msgstr "Valgel on kerge paremus"
+
+#: pgn.cpp:1017
+msgid " Black has a slight advantage"
+msgstr "Mustal on kerge paremus"
+
+#: pgn.cpp:1020
+msgid " White has a moderate advantage"
+msgstr "Valgetel on keskmine paremus"
+
+#: pgn.cpp:1023
+msgid " Black has a moderate advantage"
+msgstr "Mustadel on keskmine paremus"
+
+#: pgn.cpp:1026
+msgid " White has a decisive advantage"
+msgstr "Valgel on otsustav paremus"
+
+#: pgn.cpp:1029
+msgid " Black has a decisive advantage"
+msgstr "Mustal on otsustav paremus"
+
+#: pgn.cpp:1032
+msgid " White has a crushing advantage ( Black should resign )"
+msgstr "Valgetel on hävitav paremus ( must peaks alistuma )"
+
+#: pgn.cpp:1035
+msgid " Black has a crushing advantage ( White should resign )"
+msgstr "Mustal on hävitav paremus ( valge peaks alistuma )"
+
+#: pgn.cpp:1038
+msgid " White is in zugzwang"
+msgstr "Valge on käigupuuduses"
+
+#: pgn.cpp:1041
+msgid " Black is in zugzwang"
+msgstr "Must on käigupuuduses"
+
+#: pgn.cpp:1044
+msgid " White has a slight space advantage"
+msgstr "Valgel on kerge ruumiline ülekaal"
+
+#: pgn.cpp:1047
+msgid " Black has a slight space advantage"
+msgstr "Mustal on kerge ruumiline ülekaal"
+
+#: pgn.cpp:1050
+msgid " White has a moderate space advantage"
+msgstr "Valgel on keskmine ruumiline paremus"
+
+#: pgn.cpp:1053
+msgid " Black has a moderate space advantage"
+msgstr "Mustal on keskmine ruumiline paremus"
+
+#: pgn.cpp:1056
+msgid " White has a decisive space advantage"
+msgstr "Valgel on otsustav ruumiline paremus"
+
+#: pgn.cpp:1059
+msgid " Black has a decisive space advantage"
+msgstr "Mustal on otsustav ruumiline paremus"
+
+#: pgn.cpp:1062
+msgid " White has a slight time ( development ) advantage"
+msgstr "Valgel on kerge paremus arenduses"
+
+#: pgn.cpp:1065
+msgid " Black has a slight time ( development ) advantage"
+msgstr "Mustal on kerge paremus arenduses"
+
+#: pgn.cpp:1068
+msgid " White has a moderate time ( development ) advantage"
+msgstr "Valgetel on keskmine paremus arenduses"
+
+#: pgn.cpp:1071
+msgid " Black has a moderate time ( development ) advantage"
+msgstr "Mustadel on keskmine paremus arenduses"
+
+#: pgn.cpp:1074
+msgid " White has a decisive time ( development ) advantage"
+msgstr "Valgel on otsustav paremus arenduses"
+
+#: pgn.cpp:1077
+msgid " Black has a decisive time ( development ) advantage"
+msgstr "Mustal on otsustav paremus arenduses"
+
+#: pgn.cpp:1080
+msgid " White has the initiative"
+msgstr "Valgel on initsiatiiv"
+
+#: pgn.cpp:1083
+msgid " Black has the initiative"
+msgstr "Mustal on initsiatiiv"
+
+#: pgn.cpp:1086
+msgid " White has a lasting initiative"
+msgstr "Valgel on kestev initsiatiiv"
+
+#: pgn.cpp:1089
+msgid " Black has a lasting initiative"
+msgstr "Mustal on kestev initsiatiiv"
+
+#: pgn.cpp:1092
+msgid " White has the attack"
+msgstr "Valge ründab"
+
+#: pgn.cpp:1095
+msgid " Black has the attack"
+msgstr "Must ründab"
+
+#: pgn.cpp:1098
+msgid " White has insufficient compensation for material deficit"
+msgstr "Valgel pole küllaldast kompensatsiooni materjalipuuduse eest"
+
+#: pgn.cpp:1101
+msgid " Black has insufficient compensation for material deficit"
+msgstr "Mustal pole küllaldast kompensatsiooni materjalipuuduse eest"
+
+#: pgn.cpp:1104
+msgid " White has sufficient compensation for material deficit"
+msgstr "Valgel on küllaldane kompensatsioon materjali eest"
+
+#: pgn.cpp:1107
+msgid " Black has sufficient compensation for material deficit"
+msgstr "Mustal on küllaldane kompensatsioon materjali eest"
+
+#: pgn.cpp:1110
+msgid " White has more than adequate compensation for material deficit"
+msgstr "Valgel on rohkem kui küllaldane kompensatsioon materjalipuuduse eest"
+
+#: pgn.cpp:1113
+msgid " Black has more than adequate compensation for material deficit"
+msgstr "Mustal on rohkem kui küllaldane kompensatsioon materjalipuuduse eest"
+
+#: pgn.cpp:1116
+msgid " White has a slight center control advantage"
+msgstr "Valgel on kerge paremus tsentris"
+
+#: pgn.cpp:1119
+msgid " Black has a slight center control advantage"
+msgstr "Mustal on kerge paremus tsentris"
+
+#: pgn.cpp:1122
+msgid " White has a moderate center control advantage"
+msgstr "Valgel on keskmine paremus tsentris"
+
+#: pgn.cpp:1125
+msgid " Black has a moderate center control advantage"
+msgstr "Mustal on keskmine paremus tsentris"
+
+#: pgn.cpp:1128
+msgid " White has a decisive center control advantage"
+msgstr "Valgel on otsustav paremus tsentris"
+
+#: pgn.cpp:1131
+msgid " Black has a decisive center control advantage"
+msgstr "Mustal on otsustav paremus tsentris"
+
+#: pgn.cpp:1134
+msgid " White has a slight kingside control advantage"
+msgstr "Valgel on kerge paremus kuningatiival"
+
+#: pgn.cpp:1137
+msgid " Black has a slight kingside control advantage"
+msgstr "Mustal on kerge paremus kuningatiival"
+
+#: pgn.cpp:1140
+msgid " White has a moderate kingside control advantage"
+msgstr "Valgel on keskmine paremus kuningatiival"
+
+#: pgn.cpp:1143
+msgid " Black has a moderate kingside control advantage"
+msgstr "Mustal on keskmine paremus kuningatiival"
+
+#: pgn.cpp:1146
+msgid " White has a decisive kingside control advantage"
+msgstr "Valgel on otsustav paremus kuningatiival"
+
+#: pgn.cpp:1149
+msgid " Black has a decisive kingside control advantage"
+msgstr "Mustal on otsustav paremus kuningatiival"
+
+#: pgn.cpp:1152
+msgid " White has a slight queenside control advantage"
+msgstr "Valgel on kerge paremus liputiival"
+
+#: pgn.cpp:1155
+msgid " Black has a slight queenside control advantage"
+msgstr "Mustal on kerge paremus liputiival"
+
+#: pgn.cpp:1158
+msgid " White has a moderate queenside control advantage"
+msgstr "Valgel on keskmine paremus liputiival"
+
+#: pgn.cpp:1161
+msgid " Black has a moderate queenside control advantage"
+msgstr "Mustal on keskmine paremus liputiival"
+
+#: pgn.cpp:1164
+msgid " White has a decisive queenside control advantage"
+msgstr "Valgel on otsustav paremus liputiival"
+
+#: pgn.cpp:1167
+msgid " Black has a decisive queenside control advantage"
+msgstr "Mustal on otsustav paremus liputiival"
+
+#: pgn.cpp:1170
+msgid " White has a vulnerable first rank"
+msgstr "Valgel esimene rida on kaitsetu."
+
+#: pgn.cpp:1173
+msgid " Black has a vulnerable first rank"
+msgstr "Musta esimene rida on kaitsetu."
+
+#: pgn.cpp:1176
+msgid " White has a well protected first rank"
+msgstr "Valgel on hästi kaitstud esimene rida"
+
+#: pgn.cpp:1179
+msgid " Black has a well protected first rank"
+msgstr "Mustal on hästi kaitstud esimene rida"
+
+#: pgn.cpp:1182
+msgid " White has a poorly protected king"
+msgstr "Valge kuningas on halvasti kaitstud"
+
+#: pgn.cpp:1185
+msgid " Black has a poorly protected king"
+msgstr "Musta kuningas on halvasti kaitstud"
+
+#: pgn.cpp:1188
+msgid " White has a well protected king"
+msgstr "Valgel on hästi kaitstud kuningas"
+
+#: pgn.cpp:1191
+msgid " Black has a well protected king"
+msgstr "Mustal on hästi kaitstud kuningas"
+
+#: pgn.cpp:1194
+msgid " White has a poorly placed king"
+msgstr "Valgel on halvasti seisev kuningas"
+
+#: pgn.cpp:1197
+msgid " Black has a poorly placed king"
+msgstr "Mustal on halvasti seisev kuningas"
+
+#: pgn.cpp:1200
+msgid " White has a well placed king"
+msgstr "Valgel on hästi seisev kuningas"
+
+#: pgn.cpp:1203
+msgid " Black has a well placed king"
+msgstr "Mustal on hästi seisev kuningas"
+
+#: pgn.cpp:1206
+msgid " White has a very weak pawn structure"
+msgstr "Valgel on väga nõrk etturistruktuur"
+
+#: pgn.cpp:1209
+msgid " Black has a very weak pawn structure"
+msgstr "Mustal on väga nõrk etturistruktuur"
+
+#: pgn.cpp:1212
+msgid " White has a moderately weak pawn structure"
+msgstr "Valgel on veidi nõrk etturistruktuur"
+
+#: pgn.cpp:1215
+msgid " Black has a moderately weak pawn structure"
+msgstr "Mustal on veidi nõrk etturistruktuur"
+
+#: pgn.cpp:1218
+msgid " White has a moderately strong pawn structure"
+msgstr "Valgel on keskmiselt tugev etturistruktuur"
+
+#: pgn.cpp:1221
+msgid " Black has a moderately strong pawn structure"
+msgstr "Mustal on keskmiselt tugev etturistruktuur"
+
+#: pgn.cpp:1224
+msgid " White has a very strong pawn structure"
+msgstr "Valgel on väga tugev etturistruktuur"
+
+#: pgn.cpp:1227
+msgid " Black has a very strong pawn structure"
+msgstr "Mustal on väga tugev etturistruktuur"
+
+#: pgn.cpp:1230
+msgid " White has poor knight placement"
+msgstr "Valge ratsu seisab halvasti"
+
+#: pgn.cpp:1233
+msgid " Black has poor knight placement"
+msgstr "Musta ratsu seisab halvasti"
+
+#: pgn.cpp:1236
+msgid " White has good knight placement"
+msgstr "Valge ratsu seisab hästi"
+
+#: pgn.cpp:1239
+msgid " Black has good knight placement"
+msgstr "Musta ratsu seisab hästi"
+
+#: pgn.cpp:1242
+msgid " White has poor bishop placement"
+msgstr "Valge oda seisab halvasti"
+
+#: pgn.cpp:1245
+msgid " Black has poor bishop placement"
+msgstr "Musta oda seisab halvasti"
+
+#: pgn.cpp:1248
+msgid " White has good bishop placement"
+msgstr "Valge oda seisab hästi"
+
+#: pgn.cpp:1251
+msgid " Black has good bishop placement"
+msgstr "Musta oda seisab hästi"
+
+#: pgn.cpp:1254
+msgid " White has poor rook placement"
+msgstr "Valge vanker seisab halvasti"
+
+#: pgn.cpp:1257
+msgid " Black has poor rook placement"
+msgstr "Musta vanker seisab halvasti"
+
+#: pgn.cpp:1260
+msgid " White has good rook placement"
+msgstr "Valge vanker seisab hästi"
+
+#: pgn.cpp:1263
+msgid " Black has good rook placement"
+msgstr "Musta vanker seisab hästi"
+
+#: pgn.cpp:1266
+msgid " White has poor queen placement"
+msgstr "Valge lipp seisab halvasti"
+
+#: pgn.cpp:1269
+msgid " Black has poor queen placement"
+msgstr "Musta lipp seisab halvasti"
+
+#: pgn.cpp:1272
+msgid " White has good queen placement"
+msgstr "Valge lipp seisab hästi"
+
+#: pgn.cpp:1275
+msgid " Black has good queen placement"
+msgstr "Musta lipp seisab hästi"
+
+#: pgn.cpp:1278
+msgid " White has poor piece coordination"
+msgstr "Valge vigurite koordinatsioon on halb"
+
+#: pgn.cpp:1281
+msgid " Black has poor piece coordination"
+msgstr "Musta vigurite koordinatsioon on halb"
+
+#: pgn.cpp:1284
+msgid " White has good piece coordination"
+msgstr "Valge vigurite koordinatsioon on hea"
+
+#: pgn.cpp:1287
+msgid " Black has good piece coordination"
+msgstr "Musta vigurite koordinatsioon on hea"
+
+#: pgn.cpp:1290
+msgid " White has played the opening very poorly"
+msgstr "Valge mängis avangut väga halvasti"
+
+#: pgn.cpp:1293
+msgid " Black has played the opening very poorly"
+msgstr "Must mängis avangut väga halvasti"
+
+#: pgn.cpp:1296
+msgid " White has played the opening poorly"
+msgstr "Valge mängis avangut halvasti"
+
+#: pgn.cpp:1299
+msgid " Black has played the opening poorly"
+msgstr "Must mängis avangut halvasti"
+
+#: pgn.cpp:1302
+msgid " White has played the opening well"
+msgstr "Valge mängis avangut hästi"
+
+#: pgn.cpp:1305
+msgid " Black has played the opening well"
+msgstr "Must mängis avangut hästi"
+
+#: pgn.cpp:1308
+msgid " White has played the opening very well"
+msgstr "Valge mängis avangut väga hästi"
+
+#: pgn.cpp:1311
+msgid " Black has played the opening very well"
+msgstr "Must mängis avangut väga hästi"
+
+#: pgn.cpp:1314
+msgid " White has played the middlegame very poorly"
+msgstr "Valge mängis keskmängu väga halvasti"
+
+#: pgn.cpp:1317
+msgid " Black has played the middlegame very poorly"
+msgstr "Must mängis keskmängu väga halvasti"
+
+#: pgn.cpp:1320
+msgid " White has played the middlegame poorly"
+msgstr "Valge mängis keskmängu halvasti"
+
+#: pgn.cpp:1323
+msgid " Black has played the middlegame poorly"
+msgstr "Must mängis keskmängu halvasti"
+
+#: pgn.cpp:1326
+msgid " White has played the middlegame well"
+msgstr "Valge mängis keskmängu hästi"
+
+#: pgn.cpp:1329
+msgid " Black has played the middlegame well"
+msgstr "Must mängis keskmängu hästi"
+
+#: pgn.cpp:1332
+msgid " White has played the middlegame very well"
+msgstr "Valge mängis keskmängu väga hästi"
+
+#: pgn.cpp:1335
+msgid " Black has played the middlegame very well"
+msgstr "Must mängis keskmängu väga hästi"
+
+#: pgn.cpp:1338
+msgid " White has played the ending very poorly"
+msgstr "Valge mängis lõppmängu väga halvasti"
+
+#: pgn.cpp:1341
+msgid " Black has played the ending very poorly"
+msgstr "Must mängis lõppmängu väga halvasti"
+
+#: pgn.cpp:1344
+msgid " White has played the ending poorly"
+msgstr "Valge mängis lõppmängu halvasti"
+
+#: pgn.cpp:1347
+msgid " Black has played the ending poorly"
+msgstr "Must mängis lõppmängu halvasti"
+
+#: pgn.cpp:1350
+msgid " White has played the ending well"
+msgstr "Valge mängis lõppmängu hästi"
+
+#: pgn.cpp:1353
+msgid " Black has played the ending well"
+msgstr "Must mängis lõppmängu hästi"
+
+#: pgn.cpp:1356
+msgid " White has played the ending very well"
+msgstr "Valge mängis lõppmängu väga hästi"
+
+#: pgn.cpp:1359
+msgid " Black has played the ending very well"
+msgstr "Must mängis lõppmängu väga hästi"
+
+#: pgn.cpp:1362
+msgid " White has slight counterplay"
+msgstr "Valgel on kerge vastumäng"
+
+#: pgn.cpp:1365
+msgid " Black has slight counterplay"
+msgstr "Mustal on kerge vastumäng"
+
+#: pgn.cpp:1368
+msgid " White has moderate counterplay"
+msgstr "Valgel on keskmine vastumäng"
+
+#: pgn.cpp:1371
+msgid " Black has moderate counterplay"
+msgstr "Mustal on keskmine vastumäng"
+
+#: pgn.cpp:1374
+msgid " White has decisive counterplay"
+msgstr "Valgel on otsustav vastumäng"
+
+#: pgn.cpp:1377
+msgid " Black has decisive counterplay"
+msgstr "Mustal on otsustav vastumäng"
+
+#: pgn.cpp:1380
+msgid " White has moderate time control pressure"
+msgstr "Valgel on keskmine ajapuudus"
+
+#: pgn.cpp:1383
+msgid " Black has moderate time control pressure"
+msgstr "Mustal on keskmine ajapuudus"
+
+#: pgn.cpp:1386
+msgid " White has severe time control pressure"
+msgstr "Valgel on teatud ajapuudus"
+
+#: pgn.cpp:1389
+msgid " Black has severe time control pressure"
+msgstr "Mustal on teatud ajapuudus"
+
+#: pgn.cpp:1391
+msgid " With the idea..."
+msgstr "Ideega..."
+
+#: pgn.cpp:1394
+msgid " Aimed against..."
+msgstr "Sihitud vastu..."
+
+#: pgn.cpp:1397
+msgid " Better Move"
+msgstr "Parem käik"
+
+#: pgn.cpp:1400
+msgid " Worse Move"
+msgstr "Halvem käik"
+
+#: pgn.cpp:1403
+msgid " Equivalent move"
+msgstr "Ekvivalentne käik"
+
+#: pgn.cpp:1406
+msgid " Editor's Remark"
+msgstr "Toimetaja märkus"
+
+#: pgn.cpp:1409
+msgid " Novelty"
+msgstr "Uuendus"
+
+#: pgn.cpp:1412
+msgid " Weak point"
+msgstr "Nõrk punkt"
+
+#: pgn.cpp:1415
+msgid " Endgame"
+msgstr "Lõppmäng"
+
+#: pgn.cpp:1418
+msgid " Line"
+msgstr " Liin"
+
+#: pgn.cpp:1421
+msgid " Diagonal"
+msgstr "Diagonaal"
+
+#: pgn.cpp:1424
+msgid " White has a pair of Bishops"
+msgstr "Valgel on kaksikodad"
+
+#: pgn.cpp:1427
+msgid " Black has a pair of Bishops"
+msgstr "Mustal on kaksikodad"
+
+#: pgn.cpp:1430
+msgid " Bishops of opposite color"
+msgstr "Lahkvärvi odad"
+
+#: pgn.cpp:1433
+msgid " Bishops of same color"
+msgstr "Samavärvi odad"
+
+#: pgn.cpp:1436
+msgid " Etc."
+msgstr "jne."
+
+#: pgn.cpp:1439
+msgid " Doubled pawns"
+msgstr "Topeltetturid"
+
+#: pgn.cpp:1442
+msgid " Isolated pawn"
+msgstr "Isoleeritud ettur"
+
+#: pgn.cpp:1445
+msgid " Connected pawns"
+msgstr "Ãœhendatud etturid"
+
+#: pgn.cpp:1448
+msgid " Hanging pawns"
+msgstr "Rippuvad etturid"
+
+#: pgn.cpp:1451
+msgid " Backwards pawn"
+msgstr "Mahajäänud ettur"
+
+#: setpageaudio.cpp:28
+msgid "enable Audio"
+msgstr "luba heli"
+
+#: setpageaudio.cpp:36
+msgid "Audio Themes"
+msgstr "Heli teemad"
+
+#: setpageaudio.cpp:47
+msgid "Volume"
+msgstr "Helitugevus"
+
+#: setpageaudio.cpp:48
+msgid "Maximum"
+msgstr "Maksimaalne"
+
+#: setpageaudio.cpp:52
+msgid "Minimum"
+msgstr "Minimaalne"
+
+#: setpageaudio.cpp:55
+msgid "For Current Match Only"
+msgstr "Ainult käesoleva partii jaoks"
+
+#: setpagedisplay.cpp:74
+msgid "Board Themes"
+msgstr "Laua teemad"
+
+#: setpagedisplay.cpp:79
+msgid "Chessman Themes"
+msgstr "Malendite teemad"
+
+#: setpagedisplay.cpp:85
+msgid "Theme Size"
+msgstr "Teema suurus"
+
+#: setpagedisplay.cpp:88
+msgid "Small"
+msgstr "Väike"
+
+#: setpagedisplay.cpp:95
+msgid "Large"
+msgstr "Suur"
+
+#: setpagedisplay.cpp:99
+msgid "Other Display Options"
+msgstr "Muud välimuse valikud"
+
+#: setpagedisplay.cpp:102
+msgid "Reverse Board Orientation"
+msgstr "Pööra laua asendit"
+
+#: setpagedisplay.cpp:107
+msgid "Display Startup Logo"
+msgstr "Näita logo käivitamisel"
+
+#: setpagedisplay.cpp:112
+msgid "Automatic Preview"
+msgstr "Automaatne eelvaade"
+
+#: setpagedisplay.cpp:117
+msgid "Show Last Move"
+msgstr "Näita viimast käiku"
+
+#: setpagedisplay.cpp:122
+msgid "Animate Moves"
+msgstr "Animeeri käike"
+
+#: setpagedisplay.cpp:127
+msgid "Show Coordinates"
+msgstr "Näita koordinaate"
+
+#: setpagedisplay.cpp:161
+msgid "Restore Defaults"
+msgstr "Taasta vaikimisi seaded"
+
+#: setpagedisplay.cpp:165
+msgid "Standard Font..."
+msgstr "Standard font..."
+
+#: setpagedisplay.cpp:174
+msgid "Private Font..."
+msgstr "Privaat font"
+
+#: setpagedisplay.cpp:183
+msgid "Channel Font..."
+msgstr "Kanali font"
+
+#: setpagedisplay.cpp:192
+msgid "Shout Font..."
+msgstr "Hüüdmise font"
+
+#: setpagedisplay.cpp:201
+msgid "Whisper Font..."
+msgstr "Sosistamise font"
+
+#: setpagedisplay.cpp:210
+msgid "Notification Font..."
+msgstr "Teadaande font"
+
+#: setpagedisplay.cpp:225
+msgid "Console"
+msgstr "Konsool"
+
+#: setpagedisplay.cpp:519
+msgid "Standard"
+msgstr "Standard"
+
+#: setpagedisplay.cpp:520
+msgid "Private Tell"
+msgstr "Privaatne teade"
+
+#: setpagedisplay.cpp:521
+msgid "Channel Tell"
+msgstr "Kanali teade"
+
+#: setpagedisplay.cpp:522
+msgid "Shout"
+msgstr "Hüüa"
+
+#: setpagedisplay.cpp:524
+msgid "Notification"
+msgstr "Teadaanne"
+
+#: setpageengines.cpp:33
+msgid "Engines to Play White"
+msgstr "Mootorid valgetega mängimiseks"
+
+#: setpageengines.cpp:36 setpageengines.cpp:48
+msgid "enable Book Engine"
+msgstr "luba avangumootor"
+
+#: setpageengines.cpp:45
+msgid "Engines to Play Black"
+msgstr "Mootorid mustadega mängimiseks"
+
+#: setpageengines.cpp:57
+msgid "Chess Engines"
+msgstr "Male mootorid"
+
+#: setpageengines.cpp:62 setpageservers.cpp:69 tab_seeklist.cpp:27
+msgid "Name"
+msgstr "Nimi"
+
+#: setpageengines.cpp:64
+msgid "Wins"
+msgstr "Võite"
+
+#: setpageengines.cpp:65
+msgid "Losses"
+msgstr "Kaotusi"
+
+#: setpageengines.cpp:66
+msgid "Draws"
+msgstr "Viike"
+
+#: setpageengines.cpp:73 setpageservers.cpp:77
+msgid "&Add..."
+msgstr "&Lisa..."
+
+#: setpageengines.cpp:74 setpageservers.cpp:78
+msgid "&Modify..."
+msgstr "&Muuda..."
+
+#: setpageengines.cpp:75 setpageservers.cpp:79
+msgid "&Delete..."
+msgstr "&Kustuta"
+
+#: setpagegeneral.cpp:29
+msgid "Your Name:"
+msgstr "Sinu nimi"
+
+#: setpagegeneral.cpp:36
+msgid "When Knights Begins It Should:"
+msgstr "Knights peaks käivitamisel"
+
+#: setpagegeneral.cpp:38
+msgid "Do Nothing"
+msgstr "mitte midagi tegema"
+
+#: setpagegeneral.cpp:39
+msgid "Start a Match vs. PC"
+msgstr "alustama partiid PC vastu"
+
+#: setpagegeneral.cpp:40
+msgid "Connect to ICS"
+msgstr "ühendama serveriga"
+
+#: setpagegeneral.cpp:48
+msgid "Save Match on Close?"
+msgstr "Salvesta partii sulgemisel"
+
+#: setpagegeneral.cpp:52
+msgid "Ask"
+msgstr "Küsi"
+
+#: setpagegeneral.cpp:62
+msgid "Append to Save File:"
+msgstr "Salvesta faili:"
+
+#: setpagegeneral.cpp:65
+msgid "Append to Save File"
+msgstr "Salvesta faili lõppu"
+
+#: setpagegeneral.cpp:79
+msgid "Pause on Minimize"
+msgstr "Peata partii akna minimiseerimisel"
+
+#: setpagegeneral.cpp:85
+msgid "Always Promote to Queen"
+msgstr "Muunda alati lipuks"
+
+#: setpagegeneral.cpp:91
+msgid "Call Flag Automatically"
+msgstr "Kutsu ajaületus automaatselt"
+
+#: setpageservers.cpp:56
+msgid "Current Server"
+msgstr "Käesolev server"
+
+#: setpageservers.cpp:70
+msgid "URL"
+msgstr "URL"
+
+#: setpageservers.cpp:90
+msgid "Servers"
+msgstr "Serverid"
+
+#: setpageservers.cpp:106
+msgid "Profanity Filter"
+msgstr "Profaansuse filter"
+
+#: setpageservers.cpp:110
+msgid "Filter Everything"
+msgstr "Filtreeri kõik"
+
+#: setpageservers.cpp:110
+msgid "No Filtering"
+msgstr "Ilma filtreerimiseta"
+
+#: setpageservers.cpp:115
+msgid "Automatically Close Previous ICS Match"
+msgstr "automaatselt sulge eelmine ICS partii"
+
+#: setpageservers.cpp:120
+msgid "Private Matches"
+msgstr "privaatsed partiid"
+
+#: setpageservers.cpp:124
+msgid "enable Premove"
+msgstr "luba eelkäik"
+
+#: setpageservers.cpp:128
+msgid "enable Kibitzes"
+msgstr "luba kiibitsemine"
+
+#: setpageservers.cpp:132
+msgid "enable Unregistered Tells"
+msgstr "luba registreerimata teated"
+
+#: setpageservers.cpp:136
+msgid "enable Shouts"
+msgstr "luba hüüdmised"
+
+#: setpageservers.cpp:140
+msgid "enable Seeks"
+msgstr "luba partiiotsimised"
+
+#: setpageservers.cpp:150
+msgid "Seconds Between Seek Updates"
+msgstr "sekundit partiiotsingute uuendamise vahel"
+
+#: tab_seeklist.cpp:29
+msgid "Match Type"
+msgstr "Partii tüüp"
+
+#: tab_seeklist.cpp:30
+msgid "Is Rated?"
+msgstr "On hinnatud?"
+
+#: tabbox.cpp:163
+msgid "%1 - Knights"
+msgstr "%1 - Knights"
+
+#: wiz_setup.cpp:51
+msgid "Knights Setup Wizard"
+msgstr "Knights'i paigaldamise viisard"
+
+#: wiz_setup.cpp:74
+msgid ""
+"Thank you for installing Knights, the graphical chess interface for KDE. To "
+"help you get started quickly, there are a few things Knights will need to "
+"setup. You should click 'Next' to see what they are."
+msgstr ""
+"Aitäh KDE maleliidese Knights'i paigaldamise eest. On mõningad seaded mida "
+"Knights saab ise paika sättida, et aidata sul kiiremini alustada. Vali "
+"'Järgmine' et näha mis need on."
+
+#: wiz_setup.cpp:77
+msgid "Welcome to Knights v%1!"
+msgstr "Tere tulemast kasutama Knights v%1!"
+
+#: wiz_setup.cpp:97
+#, fuzzy
+msgid ""
+"When Knights saves a match to disk, it uses Portable Game Notation (PGN) to "
+"store the match. Several other computer chess games use PGN too. If you "
+"like, Knights can be the default PGN viewer on this system."
+msgstr ""
+"Kui Knights salvestab partii kettale, kasutab ta Portable Game Notation "
+"(PGN) formaati. Paljud teised maleprogrammid kasutavad samuti PGN formaati. "
+"Kui sa tahad, siis Knights võib olla vaikimisi PGN vaataja sinu süsteemis."
+
+#: wiz_setup.cpp:100
+msgid "Let Knights handle PGN files?"
+msgstr "Seosta Knights PGN failidega?"
+
+#: wiz_setup.cpp:106
+msgid "Let Knights handle your .pgn files?"
+msgstr "Las Knights seostub sinu pgn failidega?"
+
+#: wiz_setup.cpp:125
+#, fuzzy
+msgid ""
+"Knights can not play a chess match against you without help. Known as Chess "
+"Engines, these helpers can be found on the Internet and are often included "
+"with your distribution. Knights can look for Chess Engines that you may "
+"already have. If found, Knights will configure itself to use them."
+msgstr ""
+"Knights ei suuda mängida malepartiid inimese vastu enne pisikese abita. "
+"Tuntud malemootorite nime all, võib neid abiprogramme leida internetist ja "
+"tihti on nad ka kaasas distributsioonidega. Knights võib otsida "
+"malemootoreid mis on juba süsteemis olemas. Kui leiab, seadistab Knights "
+"ennast ise neid kasutama."
+
+#: wiz_setup.cpp:128 wiz_setup.cpp:134
+msgid "Let Knights search for chess engines?"
+msgstr "Las Knights otsib mänguprogramme"
+
+#: wiz_setup.cpp:153
+msgid ""
+"In order for you to play chess online, Knights will have to connect to a "
+"chess server. Knights has a list of several of these servers. If you like, "
+"this list can be used to automatically configure Knights."
+msgstr ""
+"Knights peab ühenduma maleserveriga, et sa saaksid mängida malet onlainis. "
+"Knights'l on nimekiri mitmesugustest sellistest serveritest. Seda nimekirja "
+"võib kasutada Knights'i automaatseks seadistamiseks."
+
+#: wiz_setup.cpp:156 wiz_setup.cpp:162
+msgid "Let Knights configure chess servers?"
+msgstr "Las Knights seadistab maleserverid"
+
+#: wiz_setup.cpp:181
+msgid ""
+"Knights has now configured itself according to your choices. We strongly "
+"recommend that you read the documentation to make full use of all that "
+"Knights has to offer. You can access it by pressing F1."
+msgstr ""
+"Knights on ennast seadistanud sinu valikute järgi. Me soovitama soojalt "
+"lugeda dokumentatsiooni et osata teha kõike mida Knights suudab pakkuda. Sa "
+"näed dokumentatsiooni kui vajutad F1. "
+
+#: wiz_setup.cpp:184
+msgid "Setup Complete"
+msgstr "Paigaldamine lõpetatud"
+
+#: wiz_setup.cpp:213
+msgid "Do you accept the terms of our license?"
+msgstr "Kas sa nõustud meie litsentsi tingimustega?"
+
+#: wiz_setup.cpp:218
+msgid "Please read and accept our license:"
+msgstr "Palun loe litsentsi:"
+
+#: wiz_setup.cpp:269
+msgid "Free Internet Chess Server"
+msgstr "Free Internet Chess Server"
+
+#: wiz_setup.cpp:269
+msgid "Internet Chess Club"
+msgstr "Internet Chess Club"
+
+#: wiz_setup.cpp:269
+msgid "Global Chess Server"
+msgstr "Global Chess Server"
+
+#: wiz_setup.cpp:269
+msgid "Chess.Net"
+msgstr "Chess.Net"
+
+#: wiz_setup.cpp:270
+msgid "Chess-Square.Com"
+msgstr "Chess-Square.Com"
+
+#: wiz_setup.cpp:270
+msgid "Australian FICS"
+msgstr "Austraalia FICS"
+
+#: wiz_setup.cpp:270
+msgid "Brazilian FICS"
+msgstr "Brasiilia FICS"
+
+#: wiz_setup.cpp:270
+msgid "Chilean FICS"
+msgstr "TÅ¡iili FICS"
+
+#: wiz_setup.cpp:271
+msgid "Croatian FICS"
+msgstr "Horvaatia FICS"
+
+#: wiz_setup.cpp:271
+msgid "Dutch FICS"
+msgstr "Hollandi FICS"
+
+#: wiz_setup.cpp:271
+msgid "French FICS"
+msgstr "Prantsuse FICS"
+
+#: wiz_setup.cpp:271
+msgid "German FICS"
+msgstr "Saksa FICS"
+
+#: wiz_setup.cpp:271
+msgid "Swedish FICS"
+msgstr "Rootsi FICS"
+
+#: proto_xboard.cpp:443
+msgid ""
+"%1 suggests this move:\n"
+"%2"
+msgstr ""
+"%1 soovitab sellist käiku:\n"
+"%2"
+
+#: proto_xboard.cpp:465 proto_xboard.cpp:472 proto_xboard.cpp:479
+msgid ""
+"%1 tells you:\n"
+"%2"
+msgstr ""
+"%1 teatab sulle:\n"
+"%2"
+
+#~ msgid "Save Game?"
+#~ msgstr "Salvesta partii?"
+
+#~ msgid "Save Game..."
+#~ msgstr "Salvesta partii..."
+
+#~ msgid " Game paused"
+#~ msgstr "Partii peatatud"
+
+#, fuzzy
+#~ msgid "Chat"
+#~ msgstr "Crafty"
+
+#, fuzzy
+#~ msgid "&Find"
+#~ msgstr "&Nõuanne"
+
+#~ msgid "Red Hat Binary RPMs"
+#~ msgstr "Red Hat-i binaarsed RPM-d"
+
+#~ msgid "Early Beta Testing"
+#~ msgstr "Varajane beetatestimine"
+
+#~ msgid "Would you like to email this move?"
+#~ msgstr "Kas sa tahaksid e-postitada selle käigu?"
+
+#~ msgid "Send Email?"
+#~ msgstr "Saada e-post?"
+
+#~ msgid "Console Orientation"
+#~ msgstr "Konsooli paiknemine"
+
+#~ msgid "engineio"
+#~ msgstr "engineio"
+
+#, fuzzy
+#~ msgid "Knightsio"
+#~ msgstr "Knights"
+
+#~ msgid "pgn"
+#~ msgstr "pgn"
+
+#~ msgid "Server Login Failed"
+#~ msgstr "Serverisse logimine ebaõnnestus"
+
+#~ msgid "White's Time Controls"
+#~ msgstr "Valge ajakontrollid"
+
+#~ msgid "Black's Time Controls"
+#~ msgstr "Musta ajakontrollid"
+
+#~ msgid ""
+#~ "Knights can not find %1.\n"
+#~ "Please make sure the address was entered correctly and that you are "
+#~ "connected to the internet."
+#~ msgstr ""
+#~ "Knights ei leia %1.\n"
+#~ "Palun kontrolli, et aadress oli sisestatud korrektselt ja et ühendus "
+#~ "internetiga toimib."
+
+#~ msgid "&Solitaire Chess"
+#~ msgstr "&Mängi iseendaga"
+
+#~ msgid "&Computer vs. Computer"
+#~ msgstr "&Arvuti vs. arvuti"
+
+#~ msgid "&Save Game"
+#~ msgstr "&Salvesta partii"
+
+#~ msgid "Console - Knights"
+#~ msgstr "Konsool Knights"
+
+#~ msgid "High Quality"
+#~ msgstr "Kõrge kvaliteet"
+
+#~ msgid "GNUChess"
+#~ msgstr "GNUChess"
+
+#~ msgid "Sjeng"
+#~ msgstr "Sjeng"
+
+#~ msgid "KnightCap"
+#~ msgstr "KnightCap"
+
+#~ msgid "BabyChess"
+#~ msgstr "BabyChess"
+
+#~ msgid "Phalanx-XXII"
+#~ msgstr "Phalanx-XXII"
+
+#~ msgid "Bowron Abernethy Chess Engine"
+#~ msgstr "Bowron Abernethy malemootor"
+
+#~ msgid "enable Timeseal"
+#~ msgstr "luba Timeseal"
diff --git a/po/fi.po b/po/fi.po
new file mode 100644
index 0000000..ca782de
--- /dev/null
+++ b/po/fi.po
@@ -0,0 +1,2116 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2003-01-21 04:30-0600\n"
+"PO-Revision-Date: 2003-04-23 09:28+0300\n"
+"Last-Translator: bastian salmela <bastiansalmela@users.sourceforge.net>\n"
+"Language-Team: Finnish\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 0.9.6\n"
+
+#: accel.cpp:23
+msgid "Previous Move"
+msgstr "Edellinen siirto"
+
+#: accel.cpp:24
+msgid "Next Move"
+msgstr "Seuraava siirto"
+
+#: accel.cpp:25
+msgid "Enter Text"
+msgstr "Kirjoita Teksti"
+
+#: accel.cpp:26
+msgid "Page Up"
+msgstr "Sivu Ylös"
+
+#: accel.cpp:27
+msgid "Page Down"
+msgstr "Sivu alas"
+
+#: accel.cpp:28
+msgid "Increase Board Size"
+msgstr "Suurenna laudan kokoa"
+
+#: accel.cpp:29
+msgid "Decrease Board Size"
+msgstr "Pienennä laudan kokoa"
+
+#: accel.cpp:30
+msgid "Last History Item"
+msgstr "Viimeinen historiassa"
+
+#: accel.cpp:31
+msgid "Next History Item"
+msgstr "Seuraava historiassa"
+
+#: accel.cpp:32
+msgid "Reply to the Last Tell"
+msgstr "Vastaa viimeiseen viestiin"
+
+#: accel.cpp:33
+msgid "Reply to the Channel"
+msgstr "Vastaa kanavalle"
+
+#: accel.cpp:34
+msgid "Kibitz"
+msgstr ""
+
+#: accel.cpp:35
+#: setpagedisplay.cpp:523
+msgid "Whisper"
+msgstr "Kuiskaa"
+
+#: challenge_graph.cpp:75
+#: tab_seeklist.cpp:40
+msgid "Seek Matches"
+msgstr "Etsi Osumia"
+
+#: challenge_graph.cpp:77
+#: tab_seeklist.cpp:42
+msgid "Accept This Match"
+msgstr "Hyväksy Tämä Osuma"
+
+#: challenge_graph.cpp:78
+#: tab_seeklist.cpp:43
+msgid "Tell..."
+msgstr "Kerro..."
+
+#: challenge_graph.cpp:79
+#: tab_seeklist.cpp:44
+msgid "Assess..."
+msgstr "Arvioi..."
+
+#: challenge_graph.cpp:80
+#: tab_seeklist.cpp:45
+msgid "Player Info"
+msgstr "Pelaajatiedot"
+
+#: challenge_graph.cpp:82
+#: tab_seeklist.cpp:47
+msgid "Player History"
+msgstr "Pelaajahistoria"
+
+#: challenge_graph.cpp:84
+#: tab_seeklist.cpp:49
+msgid "Add to Friends"
+msgstr "Lisää Ystäviin"
+
+#: challenge_graph.cpp:85
+#: tab_seeklist.cpp:50
+msgid "Ignore This Player"
+msgstr "Ohita Tämä Pelaaja"
+
+#: challenge_graph.cpp:304
+#: tab_seeklist.cpp:28
+msgid "Rating"
+msgstr "Tasosi"
+
+#: challenge_graph.cpp:311
+msgid "Time"
+msgstr "Aika"
+
+#: challenge_graph_view.cpp:105
+msgid " Name: %1 Rating: %2 Match Type: %3 %4 Base Time: %5 Increment: %6"
+msgstr "Nimi: %1 Taso: %2 Pelityyppi: %3 %4 Peliaika: %5 Lisäys: %6"
+
+#: core.cpp:385
+msgid "Hint"
+msgstr "Vihje"
+
+#: core.cpp:388
+msgid "Tell User"
+msgstr "Viesti Käyttäjälle"
+
+#: core.cpp:391
+msgid "Tell User Error"
+msgstr "Viesti Käyttäjälle Virhe"
+
+#: core.cpp:397
+msgid "Tell Opponent"
+msgstr "Viesti Vastustajalle"
+
+#: core.cpp:411
+msgid "Tell All"
+msgstr "Viesti Kaikille"
+
+#: core.cpp:646
+#, fuzzy
+msgid "Load PGN..."
+msgstr "Lataa peli..."
+
+#: core.cpp:690
+msgid "Would you like to save this match?"
+msgstr "Haluatko tallentaa tämän pelin?"
+
+#: core.cpp:691
+msgid "Save Match?"
+msgstr "Tallenna peli"
+
+#: core.cpp:710
+msgid "Save Match..."
+msgstr "Tallenna peli nimellä..."
+
+#: dlg_challenge.cpp:25
+msgid "You've Been Challenged:"
+msgstr "Sinut On Haastettu: "
+
+#: dlg_challenge.cpp:29
+msgid "Accept"
+msgstr "Hyväksy"
+
+#: dlg_challenge.cpp:30
+msgid "Decline"
+msgstr "Kieltäydy"
+
+#: dlg_challenge.cpp:49
+msgid "Time Odds Match"
+msgstr " Aikatasoitus peli"
+
+#: dlg_challenge.cpp:53
+msgid "Unrated"
+msgstr " Luokittelematon"
+
+#: dlg_challenge.cpp:54
+msgid "Rated"
+msgstr " Luokiteltu"
+
+#: dlg_challenge.cpp:60
+#: dlg_challenge.cpp:69
+#: dlg_newmatch.cpp:87
+#: dlg_newmatch.cpp:104
+#: tab_seeklist.cpp:101
+msgid " min."
+msgstr " min."
+
+#: dlg_challenge.cpp:61
+#: dlg_challenge.cpp:70
+#: dlg_newmatch.cpp:97
+#: dlg_newmatch.cpp:114
+#: setpageservers.cpp:146
+#: tab_seeklist.cpp:102
+msgid " sec."
+msgstr " sek."
+
+#: dlg_challenge.cpp:62
+#: dlg_challenge.cpp:71
+#: tab_seeklist.cpp:31
+msgid "Base Time"
+msgstr "Pohja Aika"
+
+#: dlg_challenge.cpp:63
+#: dlg_challenge.cpp:72
+#: tab_seeklist.cpp:32
+msgid "Increment"
+msgstr "Lisäys"
+
+#: dlg_challenge.cpp:109
+msgid ""
+"%1 %2 vs. %3 %4\n"
+"in a %5 match."
+msgstr ""
+"%1 %2 vs. %3 %4\n"
+" %5 pelissä."
+
+#: dlg_challenge.cpp:124
+#: dlg_challenge.cpp:125
+#, fuzzy
+msgid "Time Controls"
+msgstr "Ajan säädöt"
+
+#: dlg_challenge.cpp:154
+msgid "Counter Offer"
+msgstr "Vastatarjous"
+
+#: dlg_engine.cpp:26
+msgid "Configure Engine"
+msgstr "Määrittele pelikone"
+
+#: dlg_engine.cpp:38
+msgid "Engine Name"
+msgstr "Pelikoneen nimi"
+
+#: dlg_engine.cpp:43
+#: setpageengines.cpp:63
+msgid "Protocol"
+msgstr "Protokolla"
+
+#: dlg_engine.cpp:48
+msgid "Engine Filename"
+msgstr "Pelikoneen tiedostonnimi"
+
+#: dlg_engine.cpp:54
+msgid "Command Line Arguments"
+msgstr "Komentorivi käskyt"
+
+#: dlg_engine.cpp:59
+#: dlg_server.cpp:88
+msgid "Log File"
+msgstr "Lokitiedosto"
+
+#: dlg_login.cpp:21
+msgid "Login Prompt"
+msgstr "Login"
+
+#: dlg_login.cpp:31
+msgid "Login:"
+msgstr "Login:"
+
+#: dlg_login.cpp:32
+msgid "Password:"
+msgstr "Passwort:"
+
+#: dlg_login.cpp:38
+msgid "Log in as guest"
+msgstr "Kirjaudu sisään vieraana"
+
+#: dlg_login.cpp:54
+msgid "Login"
+msgstr "Login"
+
+#: dlg_login.cpp:54
+msgid "Log in to the chess server using this name and password."
+msgstr "Kirjaudu sisään shakki palvelimelle käyttäen tätä nimeä ja salasanaa."
+
+#: dlg_newmatch.cpp:38
+msgid "Start a New Match"
+msgstr "Aloita Uusi Peli"
+
+#: dlg_newmatch.cpp:45
+msgid "White"
+msgstr "Valkoiset"
+
+#: dlg_newmatch.cpp:46
+msgid "Black"
+msgstr "Mustat"
+
+#: dlg_newmatch.cpp:59
+#: dlg_newmatch.cpp:66
+msgid "Human"
+msgstr "Ihminen"
+
+#: dlg_newmatch.cpp:60
+#: dlg_newmatch.cpp:67
+msgid "Computer"
+msgstr "Tietokone"
+
+#: dlg_newmatch.cpp:61
+#: dlg_newmatch.cpp:68
+msgid "Email"
+msgstr "Sähköposti"
+
+#: dlg_newmatch.cpp:85
+#: dlg_newmatch.cpp:102
+msgid "Base Time:"
+msgstr "Peliaika:"
+
+#: dlg_newmatch.cpp:90
+#: dlg_newmatch.cpp:107
+msgid "Moves Per Base Time"
+msgstr "Siirtoja peliaikana"
+
+# German NAG values taken from:
+# http://scid.sourceforge.net/dhelp/NAGs.html
+#: dlg_newmatch.cpp:92
+#: dlg_newmatch.cpp:109
+msgid " moves"
+msgstr " siirtoa"
+
+#: dlg_newmatch.cpp:95
+#: dlg_newmatch.cpp:112
+msgid "Increment Per Move"
+msgstr "Lisäys per vuoro"
+
+#: dlg_promote.cpp:94
+msgid "Promote your pawn to..."
+msgstr "Korota\t sotilaasi ..."
+
+#: dlg_promote.cpp:101
+msgid "Pawn Promotion"
+msgstr "Sotilaan korotus"
+
+#: dlg_selectemail.cpp:27
+msgid "Select Email Address"
+msgstr "Valitse Sähköposti Osoite"
+
+#: dlg_selectengine.cpp:30
+msgid "Select Computer Player"
+msgstr "Valitse Tietokone Vastustaja"
+
+#: dlg_selectengine.cpp:41
+msgid "Computer Players"
+msgstr "Tietokone Vastustajat"
+
+#: dlg_selectengine.cpp:61
+msgid "Player Strength"
+msgstr "Pelaajan Vahvuus"
+
+#: dlg_selectengine.cpp:63
+msgid "Weak"
+msgstr "Heikko"
+
+#: dlg_selectengine.cpp:70
+msgid "Strong"
+msgstr "Vahva"
+
+#: dlg_server.cpp:25
+msgid "Configure Server"
+msgstr "Aseta palvelin"
+
+#: dlg_server.cpp:37
+msgid "Server Name"
+msgstr "Palvelimen nimi"
+
+#: dlg_server.cpp:44
+msgid "Server URL"
+msgstr "Palvelimen URL"
+
+#: dlg_server.cpp:49
+msgid "Server Port"
+msgstr "Palvelimen portti"
+
+#: dlg_server.cpp:56
+msgid "Username"
+msgstr "Käyttäjänimi"
+
+#: dlg_server.cpp:59
+msgid "Remember My Password"
+msgstr "Muista salasanani"
+
+#: dlg_server.cpp:64
+msgid "Password"
+msgstr "Salasana"
+
+#: dlg_server.cpp:71
+msgid "Confirm Password"
+msgstr "Varmista salasana"
+
+#: dlg_server.cpp:79
+msgid "Timeseal"
+msgstr "Timeseal"
+
+#: dlg_settings.cpp:48
+#: setpagedisplay.cpp:142
+msgid "General"
+msgstr "Yleiset"
+
+#: dlg_settings.cpp:49
+msgid "Various aspects of Knights get configured here."
+msgstr "Yleiset Knightsin asetukset."
+
+#: dlg_settings.cpp:55
+msgid "Display"
+msgstr "Näyttö"
+
+#: dlg_settings.cpp:56
+msgid "These settings determine how Knights displays itself to you."
+msgstr "Nämä asetukset määrittelevät miltä Knights näyttää."
+
+#: dlg_settings.cpp:62
+msgid "Audio"
+msgstr "Ääni"
+
+#: dlg_settings.cpp:63
+msgid "These settings determine what Knights sounds like."
+msgstr "Nämä asetukset määrittelevät miltä Knights kuulostaa."
+
+#: dlg_settings.cpp:69
+msgid "Computer Opponents"
+msgstr "Tietokone vastustajat"
+
+#: dlg_settings.cpp:70
+msgid "Configure your chess engines here."
+msgstr "Määrittele shakki pelikoneet täällä."
+
+#: dlg_settings.cpp:76
+#: setpageservers.cpp:65
+msgid "Chess Servers"
+msgstr "Shakki palvelimet"
+
+#: dlg_settings.cpp:77
+msgid "Configure your internet chess servers here."
+msgstr "Määrittele internet shakki palvelimet täällä."
+
+#: io_internet.cpp:80
+msgid ""
+"There are no servers configured.\n"
+"Please make sure you have at least one server configured."
+msgstr ""
+"Palvelimia ei ole määritelty.\n"
+"Varmista ett sinulla on vähintään yksi palvelin asennettu."
+
+#: io_internet.cpp:80
+msgid "Cannot find a server."
+msgstr "Palvelinta ei löydy."
+
+#: io_internet.cpp:99
+msgid ""
+"Knights can not start Timeseal.\n"
+"Please make sure you have the correct path and filename configured."
+msgstr ""
+"Knights ei voinut käynnistää Timeseal:ia.\n"
+"Varmista että asetukset tiedoston nimelle ja polulle ovat oikein."
+
+#: io_internet.cpp:99
+msgid "Cannot find Timeseal."
+msgstr "Timesealia ei löytynyt."
+
+#: io_internet.cpp:109
+#: io_internet.cpp:121
+msgid ""
+"Knights is unable to connect to the server.\n"
+" Please make sure your internet connection is working and try again."
+msgstr ""
+"Knights ei onnistunut yhdistämään palvelimelle.\n"
+" Varmista että internet yhteytesi toimii, ja yritä uudelleen."
+
+#: io_internet.cpp:109
+#: io_internet.cpp:121
+msgid "Cannot connect to server."
+msgstr "Yhdistäminen palvelimelle epäonnistui."
+
+#: io_internet.cpp:144
+msgid "%1 Console"
+msgstr "%1 Konsoli"
+
+#: io_internet.cpp:149
+msgid "Sought Matches List"
+msgstr "Pelattujen pelien lista"
+
+#: io_internet.cpp:154
+msgid "Sought Matches Graph"
+msgstr "Pelattujen pelien tilastot"
+
+#: knights.cpp:70
+#: main.cpp:34
+msgid "Knights"
+msgstr "Knights"
+
+#: knights.cpp:250
+msgid "&Draw"
+msgstr "&Tasapeli"
+
+#: knights.cpp:254
+msgid "&Retract Move"
+msgstr "&Peru siirto"
+
+#: knights.cpp:256
+msgid "Select this to retract your last move."
+msgstr "Tällä voit perua edellisen siirtosi."
+
+#: knights.cpp:258
+msgid "Resign"
+msgstr "Luovuta"
+
+#: knights.cpp:260
+msgid "Use this to concede the match to your opponent."
+msgstr "Käytä tätä myöntääksesi tappiosi pelissä."
+
+#: knights.cpp:262
+msgid "&Call Flag"
+msgstr "&Ilmoita lippu"
+
+#: knights.cpp:264
+msgid "Use this to declare the match over, due to your opponent being out of time."
+msgstr "Käytä tätä julistaaksesi peli päättyneeksi, kun vastustajaltasi on loppunut aika"
+
+#: knights.cpp:266
+msgid "&Hint"
+msgstr "&Vihje"
+
+#: knights.cpp:268
+msgid "This will ask your opponent for a hint."
+msgstr "Tällä voit kysyä vastustajaltasi vihjettä."
+
+#: knights.cpp:270
+msgid "Move &Now"
+msgstr "Siirrä &Nyt"
+
+#: knights.cpp:272
+msgid "Clicking this option will force your opponent to move immediately."
+msgstr "Tästä klikkaamalla pakotat vastustajasi siirtämään heti."
+
+#: knights.cpp:274
+msgid "&Flip View"
+msgstr "&Käännä Näkymä"
+
+#: knights.cpp:276
+msgid "This will reverse the chessboard's orientation by 180 degrees."
+msgstr "Tämä kääntää shakkilaudan näkymää 180 astetta."
+
+#: knights.cpp:278
+msgid "&Ponder"
+msgstr "&Mieti"
+
+#: knights.cpp:281
+msgid "This toggles your opponent's ability to think while it's your turn."
+msgstr "Tällä voit valita saako vastustaja miettiä siirtosi aikana."
+
+#: knights.cpp:285
+#: knights.cpp:949
+msgid "Pause"
+msgstr "Tauko"
+
+#: knights.cpp:287
+msgid "Select this to pause the clock for this match."
+msgstr "Valitse tämän pysäyttääksesi pelin kellon hetkeksi."
+
+#: knights.cpp:292
+msgid "&Offer Draw"
+msgstr "&Ehdota tasapeliä"
+
+#: knights.cpp:293
+msgid "Clicking this will inform your opponent that you are willing draw the match."
+msgstr "Ilmoita vastustajallesi että olet valmis tasapeliin."
+
+#: knights.cpp:295
+msgid "&Accept Draw"
+msgstr "&Hyväksy tasapeli"
+
+#: knights.cpp:296
+msgid "Clicking this will accept a draw offered by your opponent."
+msgstr "Hyväksy vastustajasi ehdotuksen tasapeliin."
+
+#: knights.cpp:298
+msgid "&Reject Draw"
+msgstr "&Kieltäydy tasapelistä"
+
+#: knights.cpp:299
+msgid "Clicking this will reject a draw offered by your opponent."
+msgstr "Kieltäydy vastustajasi ehdottomasta tasapelistä."
+
+#: knights.cpp:301
+msgid "&Ignore Draw"
+msgstr "&Hylkää tasapelit"
+
+#: knights.cpp:302
+msgid "Clicking this will ignore future draw offers from your opponent."
+msgstr "Hylkää kaikki vastustajasi tulevat ehdotukset tasapelistä automaattisesti."
+
+#: knights.cpp:308
+msgid "&New Match..."
+msgstr "&Uusi peli..."
+
+#: knights.cpp:309
+msgid "This allows you to begin a new match."
+msgstr "Tästä voit aloittaa uuden pelin."
+
+#: knights.cpp:312
+msgid "&Load Match..."
+msgstr "&Lataa peli..."
+
+#: knights.cpp:313
+msgid "The Load command will allow you to select a previously saved match and play it again."
+msgstr "Voit valita aikaisemmin tallentamasi pelin ja pelata sitä uudestaan. "
+
+#: knights.cpp:316
+#: thinbuttons.cpp:40
+msgid "&Close Match"
+msgstr "&Sulje peli"
+
+#: knights.cpp:318
+msgid "This command removes the current match."
+msgstr "Sulkee auki olevan nykyisen pelin."
+
+#: knights.cpp:320
+msgid "Close All"
+msgstr "Sulje kaikki"
+
+#: knights.cpp:322
+msgid "This command will remove all matches that are currently loaded."
+msgstr "Poistaa kaikki tällä hetkellä avoinna olevat pelit."
+
+#: knights.cpp:326
+#: thinbuttons.cpp:32
+msgid "&Save Match"
+msgstr "&Tallenna peli"
+
+#: knights.cpp:328
+#: knights.cpp:333
+msgid "The Save command will allow you to store a copy of your current match for later use."
+msgstr "Tallentaa nykyisen pelisi myöhempää käyttöä varten."
+
+#: knights.cpp:331
+#: thinbuttons.cpp:34
+msgid "Save Match &As..."
+msgstr "Tallenna peli &nimellä..."
+
+#: knights.cpp:337
+#: knights.cpp:859
+msgid "Connect to Server"
+msgstr "Yhdistä palvelimeen"
+
+#: knights.cpp:338
+msgid "Clicking this will connect Knights with an internet chess server."
+msgstr "Yhdistää Knightsin internet shakki palvelimeen."
+
+#: knights.cpp:342
+#: thinbuttons.cpp:37
+msgid "&Print Notation..."
+msgstr "&Tulosta ..."
+
+# !! tsekkaa "notation"
+#: knights.cpp:344
+msgid "The Print command will allow you to print this game's notation on your printer."
+msgstr "Tulostaa pelin nuotit ja tilanteen."
+
+#: knights.cpp:349
+msgid "The Quit command will stop all matches and exit Knights."
+msgstr "Keskeyttää käynnissä olevat pelit ja poistuu Knightsista."
+
+#: knights.cpp:355
+msgid "Play &White"
+msgstr "Pelaa &Valkoisilla"
+
+#: knights.cpp:358
+msgid "If checked, this option tells Knights that you will play as the White army when you play vs. the computer."
+msgstr "Jos valitset tämän, pelaat Valkoisilla pelatessasi tietokonetta vastaan. "
+
+#: knights.cpp:360
+msgid "Play &Black"
+msgstr "Pelaa &Mustilla"
+
+#: knights.cpp:363
+msgid "If checked, this option tells Knights that you will play as the Black army when you play vs. the computer."
+msgstr "Jos valitset tämän, pelaat Mustilla pelatessasi tietokonetta vastaan."
+
+#: knights.cpp:366
+msgid "&Install Themes"
+msgstr "&Asenna Teemoja"
+
+#: knights.cpp:367
+msgid "This lets you install downloaded themes into Knights."
+msgstr "Tällä voit asentaa imuroimiasi teemoja Knightsiin."
+
+#: knights.cpp:371
+msgid "Click this if you want to change the keyboard shortcuts that Knights uses."
+msgstr "Klikkaa tästä jos haluat vaihtaa Knightsin pikanäppäimiä."
+
+#: knights.cpp:374
+msgid "&Configure Knights..."
+msgstr "Aseta &Knights..."
+
+#: knights.cpp:375
+msgid "This opens a new window which allows you to customize Knights to your particular tastes."
+msgstr "Tästä voit avata uuden ikkunan jossa voit muokata Knightsin ulkoasua mielesi mukaiseksi."
+
+#: knights.cpp:381
+msgid "Begin a Tutorial"
+msgstr "Aloita opetuspeli"
+
+#: knights.cpp:387
+msgid "&Match"
+msgstr "&Peli"
+
+#: knights.cpp:576
+msgid "Error with white engine"
+msgstr " Virhe valkoisen koneessa"
+
+#: knights.cpp:578
+#, fuzzy
+msgid ""
+"You selected %1 to play white,\n"
+"but it can only be used as a book engine.\n"
+"Please select another engine to play white."
+msgstr ""
+"Olet valinnut %1 pelataksesi valkoista,\n"
+"mutta sitä voidaan käyttää vain book enginenä.\n"
+"Ole hyvä ja valitse toinen engine. "
+
+#: knights.cpp:579
+msgid "White Engine Problem"
+msgstr "Valkoisen koneessa ongelmia"
+
+#: knights.cpp:582
+#, fuzzy
+msgid "Error with white book engine"
+msgstr " Virhe valkoisen book enginessä"
+
+#: knights.cpp:584
+msgid ""
+"You selected %1 to play white's book,\n"
+"but it can only be used as a regular engine.\n"
+"Please select another engine to play white's book."
+msgstr ""
+"Olet valinnut %1 pelataksesi valkoisen book engineä,\n"
+"mutta sitä voidaan käyttää vain normaalina koneena.\n"
+"Ole hyäv ja valitse toinen pelikone."
+
+#: knights.cpp:585
+msgid "White Book Engine Problem"
+msgstr "Ongelmia valkoisen book enginessä"
+
+#: knights.cpp:588
+#, fuzzy
+msgid "Error with black engine"
+msgstr " Ongelmia mustan book enginessä"
+
+#: knights.cpp:590
+#, fuzzy
+msgid ""
+"You selected %1 to play black,\n"
+"but it can only be used as a book engine.\n"
+"Please select another engine to play black."
+msgstr ""
+"Olet valinnut %1 pelataksesi mustaa,\n"
+"mutta sitä voidaan käyttää vain book enginenä.\n"
+"Ole hyvä ja valitse toinen pelikone."
+
+#: knights.cpp:591
+msgid "Black Engine Problem"
+msgstr "Ongelmia mustan pelikoneen kanssa"
+
+#: knights.cpp:594
+#, fuzzy
+msgid "Error with black book engine"
+msgstr " Ongelmia mustan book enginen kanssa"
+
+#: knights.cpp:596
+#, fuzzy
+msgid ""
+"You selected %1 to play black's book,\n"
+"but it can only be used as a regular engine.\n"
+"Please select another engine to play black's book."
+msgstr ""
+"Olet valinnut %1 pelataksesi mustan kirjaa,\n"
+"mutta sitä voidaan käyttää vain normaaleihin peleihin.\n"
+"Ole hyvä ja valitse toinen pelikone."
+
+#: knights.cpp:597
+msgid "Black Book Engine Problem"
+msgstr "Ongelmia mustan book enginen kanssa"
+
+#: knights.cpp:600
+msgid "The computer opponent assigned to play %1 has crashed"
+msgstr " Tietokone vastustaja joka oli määrätty pelaamaan %1, on kaatunut."
+
+#: knights.cpp:603
+msgid "There was an error while loading the file"
+msgstr " Virhe ladattaessa tiedostoa"
+
+#: knights.cpp:606
+msgid "There was an error while saving the file"
+msgstr " Virhe tallentaessa tiedostoa"
+
+#: knights.cpp:610
+msgid "Loading complete"
+msgstr " Lataus valmis"
+
+#: knights.cpp:613
+msgid "Saving complete"
+msgstr " Tallennus valmis"
+
+#: knights.cpp:616
+msgid "Reading File"
+msgstr " Luetaan tiedostoa"
+
+#: knights.cpp:619
+msgid "Can not move a chessman while reviewing the match"
+msgstr " Et voi siirtää nappulaa tarkastellessasi peliä"
+
+#: knights.cpp:622
+msgid "Illegal Move"
+msgstr " Laiton siirto"
+
+#: knights.cpp:625
+msgid "White's turn"
+msgstr " Valkoisen vuoro"
+
+#: knights.cpp:628
+msgid "Black's turn"
+msgstr " Mustan vuoro"
+
+#: knights.cpp:631
+msgid "White wins"
+msgstr " Valkoinen voitti"
+
+#: knights.cpp:634
+msgid "Black wins"
+msgstr " Musta voitti"
+
+#: knights.cpp:637
+msgid "Checkmate, White wins"
+msgstr " Shakki-matti, Valkoinen voitti"
+
+#: knights.cpp:640
+msgid "Checkmate, Black wins"
+msgstr " Shakki-matti, Musta voitti"
+
+#: knights.cpp:643
+msgid "White resigns"
+msgstr " Valkoinen luovutti"
+
+#: knights.cpp:646
+msgid "Black resigns"
+msgstr " Musta luovutti"
+
+#: knights.cpp:649
+msgid "White's flag fell"
+msgstr " Valkoisen merkkilippu putosi"
+
+#: knights.cpp:652
+msgid "Black's flag fell"
+msgstr " Mustan merkkilippu putosi"
+
+#: knights.cpp:655
+msgid "Black's flag was called, White wins"
+msgstr " Mustan merkkilippu huomattiin pudonneeksi, Valkoinen voitti"
+
+#: knights.cpp:658
+msgid "White's flag was called, Black wins"
+msgstr " Valkoisen merkkilippu huomattiin pudonneeksi, Musta voitti"
+
+#: knights.cpp:661
+msgid "Draw match"
+msgstr " Lopeta tasapeliin"
+
+#: knights.cpp:664
+msgid "50 moves rule, draw match"
+msgstr " 50 siirron säännöt, tasapeli"
+
+#: knights.cpp:667
+msgid "Starting computer players, please wait"
+msgstr " Käynnistellään tietokone vastustajia, odota hetki"
+
+#: knights.cpp:670
+msgid "Match paused"
+msgstr "Pelitauko"
+
+#: knights.cpp:673
+msgid "White has offered a draw"
+msgstr " Valkoinen ehdottaa tasapeliä"
+
+# !!
+# onko kanssa tasapeli?
+#: knights.cpp:676
+msgid "Black has offered a draw"
+msgstr " Musta ehdottaa tasapeliä"
+
+#: knights.cpp:679
+msgid "Lost contact with opponent"
+msgstr " Yhteys vastustajaan katkesi"
+
+#: knights.cpp:682
+msgid "Ready"
+msgstr " Valmis"
+
+#: knights.cpp:866
+msgid "Disconnect from Server"
+msgstr "Katkaise yhteys palvelimeen"
+
+#: knights.cpp:955
+msgid "Resume"
+msgstr "Jatka"
+
+#: knights.cpp:1014
+msgid "Knights Themes"
+msgstr "Knights Teemat"
+
+#: knights.cpp:1015
+msgid "Install Theme..."
+msgstr "Asenna Teema..."
+
+#: knights.cpp:1045
+msgid "You do not have permission to install this theme systemwide, so Knights installed it locally."
+msgstr "Sinulla ei ole riittäviä oikeuksia asentaa teemaa järjestelmänlaajuisesti, joten Knights asensi sen paikallisesti."
+
+#: knights.cpp:1046
+msgid "Installed theme locally"
+msgstr "Teema asennettiin paikallisesti"
+
+#: knights.cpp:1051
+#, c-format
+msgid ""
+"The theme could not be installed:\n"
+"%1"
+msgstr ""
+"Teemaa ei voitu asentaa:\n"
+"%1"
+
+#: knights.cpp:1052
+msgid "Can not install theme"
+msgstr "Teemaa ei voida asentaa"
+
+#: knightstextview.cpp:35
+msgid "Select &All"
+msgstr "Valitse &Kaikki"
+
+#: knightstextview.cpp:44
+msgid "Zoom &In"
+msgstr "&Suurenna"
+
+#: knightstextview.cpp:46
+msgid "Zoom &Out"
+msgstr "&Pienennä"
+
+#: list_pgn.cpp:29
+#: list_pgn.cpp:48
+msgid "Result"
+msgstr "Tulos"
+
+#: list_pgn.cpp:30
+#: list_pgn.cpp:49
+msgid "Title"
+msgstr "Otsikko"
+
+#: list_pgn.cpp:31
+#: list_pgn.cpp:50
+msgid "Round"
+msgstr "Kierros"
+
+#: list_pgn.cpp:32
+#: list_pgn.cpp:51
+msgid "Site"
+msgstr "Sivu"
+
+#: list_pgn.cpp:33
+#: list_pgn.cpp:52
+msgid "Date"
+msgstr "Päivä"
+
+#: list_pgn.cpp:81
+#, c-format
+msgid "Can not open %1"
+msgstr "Tiedostoa %1 ei voitu avata"
+
+#: list_pgn.cpp:140
+msgid "%1 matches found."
+msgstr "%1 löydettiin."
+
+#: main.cpp:26
+msgid "Specify the location of your Knights data directory."
+msgstr "Määrittele Knightsin data hakemiston sijainti."
+
+#: main.cpp:27
+msgid "A .pgn file to be loaded."
+msgstr "Ladatattava .pgn tiedosto."
+
+#: main.cpp:36
+msgid ""
+"The Knights Chess Interface\n"
+"\n"
+"Knights is a chess interface\n"
+"for the K Desktop Environment."
+msgstr ""
+"Knights Shakki Käyttöliittymä\n"
+"\n"
+"Knights on shakki käyttöliittymä\n"
+"KDE työpöytäympäristölle. "
+
+#: main.cpp:44
+msgid "Project Manager and Programmer"
+msgstr "Projektin Manageri ja Ohjelmoija"
+
+#: main.cpp:48
+msgid "Communications Programmer"
+msgstr "Kommunikaatio ohjelmointi"
+
+#: main.cpp:52
+msgid "Qtopia port and patches"
+msgstr "Qtopia käännös ja patchit"
+
+#: main.cpp:56
+msgid "Patches and suggestions"
+msgstr "Patchit ja ehdotukset"
+
+#: main.cpp:60
+msgid "KDE3 Compatability Patch"
+msgstr "KDE3 yhteensopivat patchit"
+
+#: main.cpp:64
+msgid "XBoard protocol"
+msgstr "XBoard-Protokolla"
+
+#: _translatorinfo.cpp:1
+#: main.cpp:67
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Bastian Salmela"
+
+#: _translatorinfo.cpp:3
+#: main.cpp:68
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "bastiansalmela@users.sourceforge.net"
+
+#: match_param.cpp:107
+msgid "Unknown"
+msgstr "Tuntematon"
+
+#: pgn.cpp:145
+msgid "%1 vs. %2"
+msgstr "%1 vs. %2"
+
+#: pgn.cpp:943
+#, c-format
+msgid "Page %1"
+msgstr "Sivu %1"
+
+# German NAG values taken from:
+# http://scid.sourceforge.net/dhelp/NAGs.html
+#: pgn.cpp:975
+msgid " Good move"
+msgstr "Hyvä siirto"
+
+#: pgn.cpp:978
+msgid " Poor move"
+msgstr "Surkea siirto"
+
+#: pgn.cpp:981
+msgid " Very good move"
+msgstr "Todella upea siirto"
+
+#: pgn.cpp:984
+msgid " Very poor move"
+msgstr "Hirveän karmea siirto"
+
+#: pgn.cpp:987
+msgid " Speculative move"
+msgstr " "
+
+#: pgn.cpp:990
+msgid " Questionable move"
+msgstr "Kyseenalainen siirto"
+
+#: pgn.cpp:993
+msgid " Forced move"
+msgstr "Pakotettu siirto"
+
+#: pgn.cpp:996
+msgid " Singular move"
+msgstr " Poikkeuksellinen siirto"
+
+#: pgn.cpp:999
+msgid " Worst move"
+msgstr "Huonoin siirto"
+
+#: pgn.cpp:1002
+msgid " Drawish position"
+msgstr " Tasapelin kaltainen asetelma"
+
+#: pgn.cpp:1005
+msgid " Equal chances, quiet position"
+msgstr " Yhtäläiset mahdollisuudet, hiljainen asema"
+
+#: pgn.cpp:1008
+msgid " Equal chances, active position"
+msgstr " Yhtäläiset mahdollisuudet, aktiivinen asema "
+
+#: pgn.cpp:1011
+msgid " Unclear position"
+msgstr "Epäselvä asema"
+
+#: pgn.cpp:1014
+msgid " White has a slight advantage"
+msgstr "Valkoisella on lievä etu"
+
+#: pgn.cpp:1017
+msgid " Black has a slight advantage"
+msgstr "Mustalla on lievä etu"
+
+#: pgn.cpp:1020
+msgid " White has a moderate advantage"
+msgstr "Valkoisella on keskinkertainen etu"
+
+#: pgn.cpp:1023
+msgid " Black has a moderate advantage"
+msgstr "Mustalla on keskinkertainen etu"
+
+#: pgn.cpp:1026
+msgid " White has a decisive advantage"
+msgstr " Valkoisella on ratkaiseva etu"
+
+#: pgn.cpp:1029
+msgid " Black has a decisive advantage"
+msgstr " Mustalla on ratkaiseva etu"
+
+#: pgn.cpp:1032
+msgid " White has a crushing advantage ( Black should resign )"
+msgstr " Valkoisella on murskaava etu ( Mustan olisi syytä luovuttaa )"
+
+#: pgn.cpp:1035
+msgid " Black has a crushing advantage ( White should resign )"
+msgstr " Mustalle on murskaava etu ( Valkoisen olisi syytä luovuttaa )"
+
+#: pgn.cpp:1038
+msgid " White is in zugzwang"
+msgstr " Valkoisella on siirtopakko"
+
+#: pgn.cpp:1041
+msgid " Black is in zugzwang"
+msgstr " Mustalla on siirtopakko"
+
+#: pgn.cpp:1044
+msgid " White has a slight space advantage"
+msgstr " Valkoisella on lievä tila etu"
+
+#: pgn.cpp:1047
+msgid " Black has a slight space advantage"
+msgstr " Mustalla on lievä tila etu"
+
+#: pgn.cpp:1050
+msgid " White has a moderate space advantage"
+msgstr " Valkoisella on keskinkertainen tila etu"
+
+#: pgn.cpp:1053
+msgid " Black has a moderate space advantage"
+msgstr " Mustalla on keskinkertainen tila etu"
+
+#: pgn.cpp:1056
+msgid " White has a decisive space advantage"
+msgstr " Valkoisella on ratkaiseva tila etu"
+
+#: pgn.cpp:1059
+msgid " Black has a decisive space advantage"
+msgstr " Mustalla on ratkaiseva tila etu"
+
+#: pgn.cpp:1062
+msgid " White has a slight time ( development ) advantage"
+msgstr " Valkoisella on lievä aika ( kehitys ) etu"
+
+#: pgn.cpp:1065
+msgid " Black has a slight time ( development ) advantage"
+msgstr " Mustalla on lievä aika ( kehitys ) etu"
+
+#: pgn.cpp:1068
+msgid " White has a moderate time ( development ) advantage"
+msgstr " Valkoisella on keskinkertainen aika ( kehitys ) etu"
+
+#: pgn.cpp:1071
+msgid " Black has a moderate time ( development ) advantage"
+msgstr " Mustalla on keskinkertainen aika ( kehitys ) etu"
+
+#: pgn.cpp:1074
+msgid " White has a decisive time ( development ) advantage"
+msgstr " Valkoisella on ratkaiseva aika ( kehitys ) etu"
+
+#: pgn.cpp:1077
+msgid " Black has a decisive time ( development ) advantage"
+msgstr " Mustalla on ratkaiseva aika ( kehitys ) etu"
+
+#: pgn.cpp:1080
+msgid " White has the initiative"
+msgstr " Valkoisella on aloitus"
+
+#: pgn.cpp:1083
+msgid " Black has the initiative"
+msgstr " Mustalla on aloitus"
+
+#: pgn.cpp:1086
+msgid " White has a lasting initiative"
+msgstr " Valkoisella on kestävä aloitus"
+
+#: pgn.cpp:1089
+msgid " Black has a lasting initiative"
+msgstr " Mustalla on kestävä aloitus"
+
+#: pgn.cpp:1092
+msgid " White has the attack"
+msgstr " Valkoinen hyökkää"
+
+#: pgn.cpp:1095
+msgid " Black has the attack"
+msgstr " Musta hyökkää"
+
+#: pgn.cpp:1098
+msgid " White has insufficient compensation for material deficit"
+msgstr " Valkoisella on riittämätön hyvitys materiaaliseen menetykseen"
+
+#: pgn.cpp:1101
+msgid " Black has insufficient compensation for material deficit"
+msgstr " Mustalla on riittämätön hyvitys materiaaliseen menetykseen"
+
+#: pgn.cpp:1104
+msgid " White has sufficient compensation for material deficit"
+msgstr " Valkoisella on riittävä hyvitys materiaaliseen menetykseen"
+
+#: pgn.cpp:1107
+msgid " Black has sufficient compensation for material deficit"
+msgstr " Mustalla on riittävä hyvitys materiaaliseen menetykseen"
+
+#: pgn.cpp:1110
+msgid " White has more than adequate compensation for material deficit"
+msgstr " Valkoisella on enemmän kuin riittävä hyvitys materiaaliseen menetykseen"
+
+#: pgn.cpp:1113
+msgid " Black has more than adequate compensation for material deficit"
+msgstr " Mustalla on enemmän kuin riittävä hyvitys materiaaliseen menetykseen"
+
+#: pgn.cpp:1116
+msgid " White has a slight center control advantage"
+msgstr " Valkoisella on lievä keskustan etu"
+
+#: pgn.cpp:1119
+msgid " Black has a slight center control advantage"
+msgstr " Mustalla on lievä keskustan etu"
+
+#: pgn.cpp:1122
+msgid " White has a moderate center control advantage"
+msgstr " Valkoisella on keskinkertainen keskustan etu"
+
+#: pgn.cpp:1125
+msgid " Black has a moderate center control advantage"
+msgstr " Mustalla on keskinkertainen keskustan etu"
+
+#: pgn.cpp:1128
+msgid " White has a decisive center control advantage"
+msgstr " Valkoisella on ratkaiseva keskustan etu"
+
+#: pgn.cpp:1131
+msgid " Black has a decisive center control advantage"
+msgstr " Mustalla on ratkaiseva keskustan etu"
+
+#: pgn.cpp:1134
+msgid " White has a slight kingside control advantage"
+msgstr " Valkoisella on lievä kuningassivustan etu"
+
+#: pgn.cpp:1137
+msgid " Black has a slight kingside control advantage"
+msgstr " Mustalla on lievä kuningassivustan etu"
+
+#: pgn.cpp:1140
+msgid " White has a moderate kingside control advantage"
+msgstr " Valkoisella on keskinkertainen kuningassivustan etu"
+
+#: pgn.cpp:1143
+msgid " Black has a moderate kingside control advantage"
+msgstr " Mustalla on keskinkertainen kuningassivustan etu"
+
+#: pgn.cpp:1146
+msgid " White has a decisive kingside control advantage"
+msgstr " Valkoisella on ratkaiseva kuningassivustan etu"
+
+#: pgn.cpp:1149
+msgid " Black has a decisive kingside control advantage"
+msgstr " Mustalla on ratkaiseva kuningassivustan etu"
+
+#: pgn.cpp:1152
+msgid " White has a slight queenside control advantage"
+msgstr " Valkoisella on lievä kuningatarsivustan etu"
+
+#: pgn.cpp:1155
+msgid " Black has a slight queenside control advantage"
+msgstr " Mustalla on lievä kuningatarsivustan etu"
+
+#: pgn.cpp:1158
+msgid " White has a moderate queenside control advantage"
+msgstr " Valkoisella on keskinkertainen kuningatarsivustan etu"
+
+#: pgn.cpp:1161
+msgid " Black has a moderate queenside control advantage"
+msgstr " Mustalla on keskinkertainen kuningatarsivustan etu"
+
+#: pgn.cpp:1164
+msgid " White has a decisive queenside control advantage"
+msgstr " Valkoisella on ratkaiseva kuningatarsivustan etu"
+
+#: pgn.cpp:1167
+msgid " Black has a decisive queenside control advantage"
+msgstr " Mustalla on ratkaiseva kuningatarsivustan etu"
+
+#: pgn.cpp:1170
+msgid " White has a vulnerable first rank"
+msgstr " Valkoisella on haavoittuvainen ensimmäinen rivi "
+
+#: pgn.cpp:1173
+msgid " Black has a vulnerable first rank"
+msgstr " Mustalla on haavoittuvainen ensimmäinen rivi"
+
+#: pgn.cpp:1176
+msgid " White has a well protected first rank"
+msgstr " Valkoisella on hyvin suojattu ensimmäinen rivi"
+
+#: pgn.cpp:1179
+msgid " Black has a well protected first rank"
+msgstr " Mustalla on hyvin suojattu ensimmäinen rivi"
+
+#: pgn.cpp:1182
+msgid " White has a poorly protected king"
+msgstr "Valkoisella on surkeasti suojattu kuningas"
+
+#: pgn.cpp:1185
+msgid " Black has a poorly protected king"
+msgstr " Mustalla on surkeasti suojattu kuningas"
+
+#: pgn.cpp:1188
+msgid " White has a well protected king"
+msgstr " Valkoisella on hyvin suojattu kuningas"
+
+#: pgn.cpp:1191
+msgid " Black has a well protected king"
+msgstr " Mustalla on hyvin suojattu kuningas"
+
+#: pgn.cpp:1194
+msgid " White has a poorly placed king"
+msgstr " Valkoisella on surkeasti sijoitettu kuningas"
+
+#: pgn.cpp:1197
+msgid " Black has a poorly placed king"
+msgstr " Mustalla on surkeasti sijoitettu kuningas"
+
+#: pgn.cpp:1200
+msgid " White has a well placed king"
+msgstr " Valkoisella on hyvin sijoitettu kuningas"
+
+#: pgn.cpp:1203
+msgid " Black has a well placed king"
+msgstr " Mustalla on hyvin sijoitettu kuningas"
+
+#: pgn.cpp:1206
+msgid " White has a very weak pawn structure"
+msgstr " Valkoisella on hyvin heikko sotilaiden asetelma"
+
+#: pgn.cpp:1209
+msgid " Black has a very weak pawn structure"
+msgstr " Mustalla on hyvin heikko sotilaiden asetelma"
+
+#: pgn.cpp:1212
+msgid " White has a moderately weak pawn structure"
+msgstr " Valkoisella on heikko sotilaiden asetelma"
+
+#: pgn.cpp:1215
+msgid " Black has a moderately weak pawn structure"
+msgstr " Mustalla on heikko sotilaiden asetelma"
+
+#: pgn.cpp:1218
+msgid " White has a moderately strong pawn structure"
+msgstr " Valkoisella on hyvä sotilaiden asetelma"
+
+#: pgn.cpp:1221
+msgid " Black has a moderately strong pawn structure"
+msgstr " Mustalla on hyvä sotilaiden asetelma"
+
+#: pgn.cpp:1224
+msgid " White has a very strong pawn structure"
+msgstr " Valkoisella on erittäin hyvä sotilaiden asetelma"
+
+#: pgn.cpp:1227
+msgid " Black has a very strong pawn structure"
+msgstr " Mustalla on erittäin hyvä sotilaiden asetelma"
+
+#: pgn.cpp:1230
+msgid " White has poor knight placement"
+msgstr " Valkoisella on surkea ratsun sijoitus"
+
+#: pgn.cpp:1233
+msgid " Black has poor knight placement"
+msgstr " Mustalla on surkea ratsun sijoitus"
+
+#: pgn.cpp:1236
+msgid " White has good knight placement"
+msgstr " Valkoisella on hyvä ratsun sijoitus"
+
+#: pgn.cpp:1239
+msgid " Black has good knight placement"
+msgstr " Mustalla on hyvä ratsun sijoitus"
+
+#: pgn.cpp:1242
+msgid " White has poor bishop placement"
+msgstr " Valkoisella on surkea lähetin sijoitus"
+
+#: pgn.cpp:1245
+msgid " Black has poor bishop placement"
+msgstr " Mustalla on surkea lähetin sijoitus"
+
+#: pgn.cpp:1248
+msgid " White has good bishop placement"
+msgstr " Valkoisella on hyvä lähetin sijoitus"
+
+#: pgn.cpp:1251
+msgid " Black has good bishop placement"
+msgstr " Mustalla on hyvä lähetin sijoitus"
+
+#: pgn.cpp:1254
+msgid " White has poor rook placement"
+msgstr " Valkoisella on surkea tornin sijoitus"
+
+#: pgn.cpp:1257
+msgid " Black has poor rook placement"
+msgstr " Mustalla on surkea tornin sijoitus"
+
+#: pgn.cpp:1260
+msgid " White has good rook placement"
+msgstr " Valkoisella on hyvä tornin sijoitus"
+
+#: pgn.cpp:1263
+msgid " Black has good rook placement"
+msgstr " Mustalla on hyvä tornin sijoitus"
+
+#: pgn.cpp:1266
+msgid " White has poor queen placement"
+msgstr " Valkoisella on surkea kuningattaren sijoitus"
+
+#: pgn.cpp:1269
+msgid " Black has poor queen placement"
+msgstr " Mustalla on surkea kuningattaren sijoitus"
+
+#: pgn.cpp:1272
+msgid " White has good queen placement"
+msgstr " Valkoisella on hyvä kuningattaren sijoitus"
+
+#: pgn.cpp:1275
+msgid " Black has good queen placement"
+msgstr " Mustalla on hyvä kuningattaren sijoitus"
+
+#: pgn.cpp:1278
+msgid " White has poor piece coordination"
+msgstr " Valkoisella on surkea shakkinappuloiden koordinaatio"
+
+#: pgn.cpp:1281
+msgid " Black has poor piece coordination"
+msgstr " Mustalla on surkea shakkinappuloiden koordinaatio"
+
+#: pgn.cpp:1284
+msgid " White has good piece coordination"
+msgstr " Valkoisella on hyvä shakkinappuloiden koordinaatio "
+
+#: pgn.cpp:1287
+msgid " Black has good piece coordination"
+msgstr " Mustalla on hyvä shakkinappuloiden koordinaatio"
+
+#: pgn.cpp:1290
+msgid " White has played the opening very poorly"
+msgstr " Valkoinen on pelannut avauksen todella huonosti"
+
+#: pgn.cpp:1293
+msgid " Black has played the opening very poorly"
+msgstr " Musta on pelannut avauksen todella huonosti"
+
+#: pgn.cpp:1296
+msgid " White has played the opening poorly"
+msgstr " Valkoinen on pelannut avauksen huonosti"
+
+#: pgn.cpp:1299
+msgid " Black has played the opening poorly"
+msgstr " Musta on pelannut avauksen huonosti"
+
+#: pgn.cpp:1302
+msgid " White has played the opening well"
+msgstr " Valkoinen on pelannut avauksen hyvin"
+
+#: pgn.cpp:1305
+msgid " Black has played the opening well"
+msgstr " Mutsa on pelannut avauksen hyvin"
+
+#: pgn.cpp:1308
+msgid " White has played the opening very well"
+msgstr " Valkoinen on pelannut avauksen erittäin hyvin"
+
+#: pgn.cpp:1311
+msgid " Black has played the opening very well"
+msgstr " Musta on pelannut avauksen erittäin hyvin"
+
+#: pgn.cpp:1314
+msgid " White has played the middlegame very poorly"
+msgstr " Valkoinen on pelannut keskipeli erittäin huonosti"
+
+#: pgn.cpp:1317
+msgid " Black has played the middlegame very poorly"
+msgstr " Musta on pelannut keskipelin erittäin huonosti"
+
+#: pgn.cpp:1320
+msgid " White has played the middlegame poorly"
+msgstr " Valkoinen on pelannut keskipelin huonosti"
+
+#: pgn.cpp:1323
+msgid " Black has played the middlegame poorly"
+msgstr " Musta on pelannut keskipelin huonosti"
+
+#: pgn.cpp:1326
+msgid " White has played the middlegame well"
+msgstr " Valkoinen on pelannut keskipelin hyvin"
+
+#: pgn.cpp:1329
+msgid " Black has played the middlegame well"
+msgstr " Musta on pelannut keskipelin hyvin"
+
+#: pgn.cpp:1332
+msgid " White has played the middlegame very well"
+msgstr " Valkoinen on pelannut keskipelin erittäin hyvin"
+
+#: pgn.cpp:1335
+msgid " Black has played the middlegame very well"
+msgstr " Musta on pelannut keskipelin erittäin hyvin"
+
+#: pgn.cpp:1338
+msgid " White has played the ending very poorly"
+msgstr " Valkoinen on pelannut lopun todella huonosti"
+
+#: pgn.cpp:1341
+msgid " Black has played the ending very poorly"
+msgstr " Musta on pelannut lopun erittäin huonosti"
+
+#: pgn.cpp:1344
+msgid " White has played the ending poorly"
+msgstr " Valkoinen on pelannut lopun huonosti"
+
+#: pgn.cpp:1347
+msgid " Black has played the ending poorly"
+msgstr " Musta on pelannut lopun huonosti"
+
+#: pgn.cpp:1350
+msgid " White has played the ending well"
+msgstr " Valkoinen on pelannut lopun hyvin"
+
+#: pgn.cpp:1353
+msgid " Black has played the ending well"
+msgstr " Musta on pelannut lopun hyvin"
+
+#: pgn.cpp:1356
+msgid " White has played the ending very well"
+msgstr " Valkoinen on pelannut lopun erittäin hyvin"
+
+#: pgn.cpp:1359
+msgid " Black has played the ending very well"
+msgstr " Musta on pelannut lopun erittäin hyvin"
+
+#: pgn.cpp:1362
+msgid " White has slight counterplay"
+msgstr " Valkoisella on lievä vastapeli"
+
+#: pgn.cpp:1365
+msgid " Black has slight counterplay"
+msgstr " Mustalla on lievä vastapeli"
+
+#: pgn.cpp:1368
+msgid " White has moderate counterplay"
+msgstr " Valkoisella on keskinkertainen vastapeli"
+
+#: pgn.cpp:1371
+msgid " Black has moderate counterplay"
+msgstr " Mustalla on keskinkertainen vastapeli"
+
+#: pgn.cpp:1374
+msgid " White has decisive counterplay"
+msgstr " Valkoisella on ratkaiseva vastapeli"
+
+#: pgn.cpp:1377
+msgid " Black has decisive counterplay"
+msgstr " Mustalla on ratkaiseva vastapeli"
+
+#: pgn.cpp:1380
+msgid " White has moderate time control pressure"
+msgstr " Valkoisella on keskinkertainen ajanhallinnan paine"
+
+#: pgn.cpp:1383
+msgid " Black has moderate time control pressure"
+msgstr " Mustalla on keskinkertainen ajanhallinnan paine"
+
+#: pgn.cpp:1386
+msgid " White has severe time control pressure"
+msgstr " Valkoisella on paha ajanhallinnan paine"
+
+#: pgn.cpp:1389
+msgid " Black has severe time control pressure"
+msgstr " Mustalla on paha ajanhallinnan paine"
+
+#: pgn.cpp:1391
+msgid " With the idea..."
+msgstr " Ajatuksena..."
+
+#: pgn.cpp:1394
+msgid " Aimed against..."
+msgstr " Suunnattu kohti..."
+
+#: pgn.cpp:1397
+msgid " Better Move"
+msgstr "Parempi siirto"
+
+#: pgn.cpp:1400
+msgid " Worse Move"
+msgstr " Huonompi siirto"
+
+#: pgn.cpp:1403
+msgid " Equivalent move"
+msgstr " Vastaava siirto"
+
+#: pgn.cpp:1406
+msgid " Editor's Remark"
+msgstr " Toim.Huom."
+
+#: pgn.cpp:1409
+msgid " Novelty"
+msgstr " Uutuus"
+
+#: pgn.cpp:1412
+msgid " Weak point"
+msgstr "Heikkous"
+
+#: pgn.cpp:1415
+msgid " Endgame"
+msgstr " Loppupeli"
+
+#: pgn.cpp:1418
+msgid " Line"
+msgstr " Linja"
+
+#: pgn.cpp:1421
+msgid " Diagonal"
+msgstr " Diagonaali"
+
+#: pgn.cpp:1424
+msgid " White has a pair of Bishops"
+msgstr " Valkoisella on lähetti pari"
+
+#: pgn.cpp:1427
+msgid " Black has a pair of Bishops"
+msgstr " Mustalla on lähetti pari"
+
+#: pgn.cpp:1430
+msgid " Bishops of opposite color"
+msgstr " Vastakkaisen väriset lähetit"
+
+#: pgn.cpp:1433
+msgid " Bishops of same color"
+msgstr " Saman väriset lähetit"
+
+#: pgn.cpp:1436
+msgid " Etc."
+msgstr " Jne."
+
+#: pgn.cpp:1439
+msgid " Doubled pawns"
+msgstr " Kaksoissotilaat "
+
+#: pgn.cpp:1442
+msgid " Isolated pawn"
+msgstr " Eristetty sotilas"
+
+#: pgn.cpp:1445
+msgid " Connected pawns"
+msgstr " Sotilasketju"
+
+#: pgn.cpp:1448
+msgid " Hanging pawns"
+msgstr " Vapaasotilas"
+
+#: pgn.cpp:1451
+msgid " Backwards pawn"
+msgstr " Takasotilas"
+
+#: setpageaudio.cpp:28
+msgid "enable Audio"
+msgstr "käytä Ääniä"
+
+#: setpageaudio.cpp:36
+msgid "Audio Themes"
+msgstr "Ääniteemat"
+
+#: setpageaudio.cpp:47
+msgid "Volume"
+msgstr "Äänenvoimakkuus"
+
+#: setpageaudio.cpp:48
+msgid "Maximum"
+msgstr "Maksimi"
+
+#: setpageaudio.cpp:52
+msgid "Minimum"
+msgstr "Minimi"
+
+#: setpageaudio.cpp:55
+msgid "For Current Match Only"
+msgstr "Vain tämän hetkiselle pelille"
+
+#: setpagedisplay.cpp:74
+msgid "Board Themes"
+msgstr "Lautateemat"
+
+#: setpagedisplay.cpp:79
+msgid "Chessman Themes"
+msgstr "Nappulateemat"
+
+#: setpagedisplay.cpp:85
+msgid "Theme Size"
+msgstr "Teeman koko"
+
+#: setpagedisplay.cpp:88
+msgid "Small"
+msgstr "Pieni"
+
+#: setpagedisplay.cpp:95
+msgid "Large"
+msgstr "Suuri"
+
+#: setpagedisplay.cpp:99
+msgid "Other Display Options"
+msgstr "Muut Näytön Asetukset"
+
+#: setpagedisplay.cpp:102
+msgid "Reverse Board Orientation"
+msgstr "Vastakkainen laudan sijainti"
+
+#: setpagedisplay.cpp:107
+msgid "Display Startup Logo"
+msgstr "Näytä käynnistys logo"
+
+#: setpagedisplay.cpp:112
+msgid "Automatic Preview"
+msgstr "Automaattinen esikatselu"
+
+#: setpagedisplay.cpp:117
+msgid "Show Last Move"
+msgstr "Näytä edellinen siirto"
+
+#: setpagedisplay.cpp:122
+msgid "Animate Moves"
+msgstr "Animoi siirrot"
+
+#: setpagedisplay.cpp:127
+msgid "Show Coordinates"
+msgstr "Näytä koordinaatit"
+
+#: setpagedisplay.cpp:161
+msgid "Restore Defaults"
+msgstr "Palauta oletukset"
+
+#: setpagedisplay.cpp:165
+msgid "Standard Font..."
+msgstr "Vakio..."
+
+#: setpagedisplay.cpp:174
+msgid "Private Font..."
+msgstr "Yksityinen..."
+
+#: setpagedisplay.cpp:183
+msgid "Channel Font..."
+msgstr "Kanava..."
+
+#: setpagedisplay.cpp:192
+msgid "Shout Font..."
+msgstr "Huuto..."
+
+#: setpagedisplay.cpp:201
+msgid "Whisper Font..."
+msgstr "Kuiskaus..."
+
+#: setpagedisplay.cpp:210
+msgid "Notification Font..."
+msgstr "Ilmoitus..."
+
+#: setpagedisplay.cpp:225
+msgid "Console"
+msgstr "Konsoli"
+
+#: setpagedisplay.cpp:519
+msgid "Standard"
+msgstr "Vakio"
+
+#: setpagedisplay.cpp:520
+msgid "Private Tell"
+msgstr "Yksityinen Viesti"
+
+#: setpagedisplay.cpp:521
+msgid "Channel Tell"
+msgstr "Kanava Viesti"
+
+#: setpagedisplay.cpp:522
+msgid "Shout"
+msgstr "Huuda"
+
+#: setpagedisplay.cpp:524
+msgid "Notification"
+msgstr "Ilmoitus"
+
+#: setpageengines.cpp:33
+msgid "Engines to Play White"
+msgstr "Pelikoneet valkoiselle"
+
+#: setpageengines.cpp:36
+#: setpageengines.cpp:48
+msgid "enable Book Engine"
+msgstr "Book Engine"
+
+#: setpageengines.cpp:45
+msgid "Engines to Play Black"
+msgstr "Pelikoneet mustalle"
+
+#: setpageengines.cpp:57
+msgid "Chess Engines"
+msgstr "Shakkikoneet"
+
+#: setpageengines.cpp:62
+#: setpageservers.cpp:69
+#: tab_seeklist.cpp:27
+msgid "Name"
+msgstr "Nimi"
+
+#: setpageengines.cpp:64
+msgid "Wins"
+msgstr "Voittaa"
+
+#: setpageengines.cpp:65
+msgid "Losses"
+msgstr "Häviää"
+
+#: setpageengines.cpp:66
+msgid "Draws"
+msgstr "Tasapeli"
+
+#: setpageengines.cpp:73
+#: setpageservers.cpp:77
+msgid "&Add..."
+msgstr "&Lisää..."
+
+#: setpageengines.cpp:74
+#: setpageservers.cpp:78
+msgid "&Modify..."
+msgstr "&Muokkaa..."
+
+#: setpageengines.cpp:75
+#: setpageservers.cpp:79
+msgid "&Delete..."
+msgstr "&Tuhoa..."
+
+#: setpagegeneral.cpp:29
+msgid "Your Name:"
+msgstr "Nimesi:"
+
+#: setpagegeneral.cpp:36
+msgid "When Knights Begins It Should:"
+msgstr "Knightsin käynnistyttyä sen pitäisi:"
+
+#: setpagegeneral.cpp:38
+msgid "Do Nothing"
+msgstr "Älä tee mitään"
+
+#: setpagegeneral.cpp:39
+msgid "Start a Match vs. PC"
+msgstr "Aloita peli tietokonetta vastaan"
+
+#: setpagegeneral.cpp:40
+msgid "Connect to ICS"
+msgstr "Yhdistä ICS:n"
+
+#: setpagegeneral.cpp:48
+msgid "Save Match on Close?"
+msgstr "Talleta peli lopettaessa?"
+
+#: setpagegeneral.cpp:52
+msgid "Ask"
+msgstr "Kysy"
+
+#: setpagegeneral.cpp:62
+msgid "Append to Save File:"
+msgstr "Jatka tallennetuun tiedostoon:"
+
+#: setpagegeneral.cpp:65
+msgid "Append to Save File"
+msgstr "Määritä tiedosto"
+
+#: setpagegeneral.cpp:79
+msgid "Pause on Minimize"
+msgstr "Pysäytä pienennettäessä"
+
+#: setpagegeneral.cpp:85
+msgid "Always Promote to Queen"
+msgstr "Korota aina kuningattareksi"
+
+#: setpagegeneral.cpp:91
+msgid "Call Flag Automatically"
+msgstr " Huomaa pudonnut merkkilippu automaattisesti"
+
+#: setpageservers.cpp:56
+msgid "Current Server"
+msgstr "Nykyinen palvelin"
+
+#: setpageservers.cpp:70
+msgid "URL"
+msgstr "URL"
+
+#: setpageservers.cpp:90
+msgid "Servers"
+msgstr "Palvelimet"
+
+#: setpageservers.cpp:106
+msgid "Profanity Filter"
+msgstr "Kieli suodatin"
+
+#: setpageservers.cpp:110
+msgid "Filter Everything"
+msgstr "Suodata Kaikki"
+
+#: setpageservers.cpp:110
+msgid "No Filtering"
+msgstr "Ei Suodatusta"
+
+#: setpageservers.cpp:115
+msgid "Automatically Close Previous ICS Match"
+msgstr "sulje automaattisesti edellinen ICS-peli"
+
+#: setpageservers.cpp:120
+msgid "Private Matches"
+msgstr "yksityiset pelit"
+
+#: setpageservers.cpp:124
+msgid "enable Premove"
+msgstr "käytä ennakkosiirtoa"
+
+#: setpageservers.cpp:128
+msgid "enable Kibitzes"
+msgstr "käytä kibitzes"
+
+#: setpageservers.cpp:132
+msgid "enable Unregistered Tells"
+msgstr "käytä rekisteröimättömiä viestejä"
+
+#: setpageservers.cpp:136
+msgid "enable Shouts"
+msgstr "käytä huutoja"
+
+#: setpageservers.cpp:140
+msgid "enable Seeks"
+msgstr "käytä hakuja"
+
+#: setpageservers.cpp:150
+msgid "Seconds Between Seek Updates"
+msgstr " sekunteja hakujen välissä"
+
+#: tab_seeklist.cpp:29
+msgid "Match Type"
+msgstr "Pelityyppi"
+
+#: tab_seeklist.cpp:30
+msgid "Is Rated?"
+msgstr "Is Rated?"
+
+#: tabbox.cpp:163
+msgid "%1 - Knights"
+msgstr "%1 - Knights"
+
+#: wiz_setup.cpp:51
+msgid "Knights Setup Wizard"
+msgstr "Knights Ohjattu Asennus"
+
+#: wiz_setup.cpp:74
+msgid "Thank you for installing Knights, the graphical chess interface for KDE. To help you get started quickly, there are a few things Knights will need to setup. You should click 'Next' to see what they are."
+msgstr "Kiitoksia että asensit Knightsin, graafisen shakki käyttöliittymän KDE:lle. Päästäksesi mahdollisimman nopeasti aloittamaan, Knights voi suorittaa muutamia asetuksia puolestasi. Painamalla 'Seuraava' näet mitä ne ovat. Jos haluat tehdä kaikki asetukset itse, paina 'Peruuta'."
+
+#: wiz_setup.cpp:77
+msgid "Welcome to Knights v%1!"
+msgstr "Tervetuloa Knights v%1:n!"
+
+#: wiz_setup.cpp:97
+msgid "When Knights saves a match to disk, it uses Portable Game Notation (PGN) to store the match. Several other computer chess games use PGN too. If you like, Knights can be the default PGN viewer on this system."
+msgstr "Knights tallentaa pelin käyttämällä Portable Game Notation (PGN) systeemiä. Monet muutkin tietokoneshakit käyttävät tätä. Jos haluat, Knights voi toimia oletusohjelmana PGN tiedostojen avaamisessa."
+
+#: wiz_setup.cpp:100
+msgid "Let Knights handle PGN files?"
+msgstr "Haluatko että Knights hoitaa PGN tiedostojen avauksen?"
+
+#: wiz_setup.cpp:106
+msgid "Let Knights handle your .pgn files?"
+msgstr "Haluatko että Knights hoitaa PGN tiedostojen avauksen?"
+
+#: wiz_setup.cpp:125
+msgid "Knights can not play a chess match against you without help. Known as Chess Engines, these helpers can be found on the Internet and are often included with your distribution. Knights can look for Chess Engines that you may already have. If found, Knights will configure itself to use them."
+msgstr "Knights ei pysty pelaamaan shakkia kanssasi ilman pientä apua. Näitä apuohjelmia kutsutaan shakki koneiksi, ja ovat imuroitavissa internetistä, ja useasti pakattu myös mukaan Linux jakelupakettiin. Knights voi etsiä shakki konetta kovalevyltäsi, ja löytäessään asettaa itsensä käyttämään niitä. "
+
+#: wiz_setup.cpp:128
+#: wiz_setup.cpp:134
+msgid "Let Knights search for chess engines?"
+msgstr "Haluatko että Knights etsii Chess Engineitä?"
+
+#: wiz_setup.cpp:153
+msgid "In order for you to play chess online, Knights will have to connect to a chess server. Knights has a list of several of these servers. If you like, this list can be used to automatically configure Knights."
+msgstr "Pelataksesi shakkia verkossa, Knightsin on otettava yhteys shakki-palvelimelle. Knightsissa on mukana iso lista näistä palvelimista. Jos haluat, shakkipalvelimien asetukset voidaan ottaa automaattisesti tältä listalta."
+
+#: wiz_setup.cpp:156
+#: wiz_setup.cpp:162
+msgid "Let Knights configure chess servers?"
+msgstr "Haluatko että Knights asettaa shakki palvelimet?"
+
+#: wiz_setup.cpp:181
+msgid "Knights has now configured itself according to your choices. We strongly recommend that you read the documentation to make full use of all that Knights has to offer. You can access it by pressing F1."
+msgstr "Knights on nyt määritellyt asetukset valintojesi mukaan. Suosittelemme, että käyt vielä läpi mukana tulevat ohjeet, jotta saat täyden hyödyn kaikesta mitä Knightsilla on tarjottavana. Ohjeet saat painamalla F1."
+
+#: wiz_setup.cpp:184
+msgid "Setup Complete"
+msgstr "Asennus On Valmis"
+
+#: wiz_setup.cpp:213
+msgid "Do you accept the terms of our license?"
+msgstr "Oletko lukenut, ja hyväksynyt lisenssi ehdot?"
+
+#: wiz_setup.cpp:218
+msgid "Please read and accept our license:"
+msgstr "Olet hyvä, ja lue lisenssimme:"
+
+#: wiz_setup.cpp:269
+msgid "Free Internet Chess Server"
+msgstr "Ilmainen Internet Shakki Palvelin"
+
+#: wiz_setup.cpp:269
+msgid "Internet Chess Club"
+msgstr "Internet Shakki Klubi"
+
+#: wiz_setup.cpp:269
+msgid "Global Chess Server"
+msgstr "Yleinen Shakki Palvelin"
+
+#: wiz_setup.cpp:269
+msgid "Chess.Net"
+msgstr "Chess.Net"
+
+#: wiz_setup.cpp:270
+msgid "Chess-Square.Com"
+msgstr "Chess-Square.Com"
+
+#: wiz_setup.cpp:270
+msgid "Australian FICS"
+msgstr "Australian FICS"
+
+#: wiz_setup.cpp:270
+msgid "Brazilian FICS"
+msgstr "Brazilian FICS"
+
+#: wiz_setup.cpp:270
+msgid "Chilean FICS"
+msgstr "Chilean FICS"
+
+#: wiz_setup.cpp:271
+msgid "Croatian FICS"
+msgstr "Croatian FICS"
+
+#: wiz_setup.cpp:271
+msgid "Dutch FICS"
+msgstr "Dutch FICS"
+
+#: wiz_setup.cpp:271
+msgid "French FICS"
+msgstr "French FICS"
+
+#: wiz_setup.cpp:271
+msgid "German FICS"
+msgstr "German FICS"
+
+#: wiz_setup.cpp:271
+msgid "Swedish FICS"
+msgstr "Swedish FICS"
+
+#: proto_xboard.cpp:443
+msgid ""
+"%1 suggests this move:\n"
+"%2"
+msgstr ""
+"%1 ehdota tätä siirtoa: \n"
+"%2"
+
+#: proto_xboard.cpp:465
+#: proto_xboard.cpp:472
+#: proto_xboard.cpp:479
+msgid ""
+"%1 tells you:\n"
+"%2"
+msgstr ""
+"%1 kertoo:\n"
+"%2"
+
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..7c1edca
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,2258 @@
+# translation of fr.po to Française
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# Gilles CAULIER <caulier.gilles@free.fr>, 2003
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: fr\n"
+"POT-Creation-Date: 2003-01-21 04:30-0600\n"
+"PO-Revision-Date: 2003-04-25 11:10+0200\n"
+"Last-Translator: Gilles CAULIER <caulier.gilles@free.fr>\n"
+"Language-Team: Française <fr@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.0.1\n"
+
+#: accel.cpp:23
+msgid "Previous Move"
+msgstr "Déplacement précèdent"
+
+#: accel.cpp:24
+msgid "Next Move"
+msgstr "Déplacement suivant"
+
+#: accel.cpp:25
+msgid "Enter Text"
+msgstr "Saisir un texte"
+
+#: accel.cpp:26
+msgid "Page Up"
+msgstr "Page supérieure"
+
+#: accel.cpp:27
+msgid "Page Down"
+msgstr "Page inférieure"
+
+#: accel.cpp:28
+msgid "Increase Board Size"
+msgstr "Augmenter la taille de l'échiquier"
+
+#: accel.cpp:29
+msgid "Decrease Board Size"
+msgstr "Réduire la taille de l'échiquier"
+
+#: accel.cpp:30
+msgid "Last History Item"
+msgstr "Historique suivant des déplacements"
+
+#: accel.cpp:31
+msgid "Next History Item"
+msgstr "Historique précédent des déplacements"
+
+#: accel.cpp:32
+msgid "Reply to the Last Tell"
+msgstr "Répondre à la derniére discussion"
+
+#: accel.cpp:33
+msgid "Reply to the Channel"
+msgstr "Répondre dans le canal de discussion"
+
+#: accel.cpp:34
+msgid "Kibitz"
+msgstr "Messages issus des joueurs et des observateurs (Kibitz)"
+
+#: accel.cpp:35 setpagedisplay.cpp:523
+msgid "Whisper"
+msgstr "Chuchotement"
+
+#: challenge_graph.cpp:75 tab_seeklist.cpp:40
+msgid "Seek Matches"
+msgstr "Afficher la liste des matchs"
+
+#: challenge_graph.cpp:77 tab_seeklist.cpp:42
+msgid "Accept This Match"
+msgstr "Accepter cette partie d'échecs"
+
+#: challenge_graph.cpp:78 tab_seeklist.cpp:43
+msgid "Tell..."
+msgstr "Communiquer..."
+
+#: challenge_graph.cpp:79 tab_seeklist.cpp:44
+msgid "Assess..."
+msgstr "Évaluer cette partie d'échecs..."
+
+#: challenge_graph.cpp:80 tab_seeklist.cpp:45
+msgid "Player Info"
+msgstr "Informations sur le joueur"
+
+#: challenge_graph.cpp:82 tab_seeklist.cpp:47
+msgid "Player History"
+msgstr "Historique du joueur"
+
+#: challenge_graph.cpp:84 tab_seeklist.cpp:49
+msgid "Add to Friends"
+msgstr "Ajouter ce joueur à la liste des amis"
+
+#: challenge_graph.cpp:85 tab_seeklist.cpp:50
+msgid "Ignore This Player"
+msgstr "Ignorer ce joueur"
+
+#: challenge_graph.cpp:304 tab_seeklist.cpp:28
+msgid "Rating"
+msgstr "Classement"
+
+#: challenge_graph.cpp:311
+msgid "Time"
+msgstr "Temps"
+
+#: challenge_graph_view.cpp:105
+msgid " Name: %1 Rating: %2 Match Type: %3 %4 Base Time: %5 Increment: %6"
+msgstr ""
+" Nom : %1 Taux : %2 Type de partie : %3 %4 Temps de base : %5 "
+"Incrémentation : %6"
+
+#: core.cpp:385
+msgid "Hint"
+msgstr "Conseil"
+
+#: core.cpp:388
+msgid "Tell User"
+msgstr "Communiquer avec l'utilisateur"
+
+#: core.cpp:391
+msgid "Tell User Error"
+msgstr "Communiquer l'erreur à l'utilisateur"
+
+#: core.cpp:397
+msgid "Tell Opponent"
+msgstr "Communiquer avec l'adversaire"
+
+#: core.cpp:411
+msgid "Tell All"
+msgstr "Communiquer avec tous les joueurs"
+
+#: core.cpp:646
+msgid "Load PGN..."
+msgstr "Ouvrir un fichier PGN..."
+
+#: core.cpp:690
+msgid "Would you like to save this match?"
+msgstr "Voulez-vous enregistrer cette partie ?"
+
+#: core.cpp:691
+msgid "Save Match?"
+msgstr "Enregistrer la partie ?"
+
+#: core.cpp:710
+msgid "Save Match..."
+msgstr "Enregistrer la partie..."
+
+#: dlg_challenge.cpp:25
+msgid "You've Been Challenged:"
+msgstr "Proposition de partie d'échecs :"
+
+#: dlg_challenge.cpp:29
+msgid "Accept"
+msgstr "Accepter"
+
+#: dlg_challenge.cpp:30
+msgid "Decline"
+msgstr "Refuser"
+
+#: dlg_challenge.cpp:49
+msgid "Time Odds Match"
+msgstr "Différences temporelles entre les deux joueurs"
+
+#: dlg_challenge.cpp:53
+msgid "Unrated"
+msgstr "Non classifié"
+
+#: dlg_challenge.cpp:54
+msgid "Rated"
+msgstr "Classifié"
+
+#: dlg_challenge.cpp:60 dlg_challenge.cpp:69 dlg_newmatch.cpp:87
+#: dlg_newmatch.cpp:104 tab_seeklist.cpp:101
+msgid " min."
+msgstr " min."
+
+#: dlg_challenge.cpp:61 dlg_challenge.cpp:70 dlg_newmatch.cpp:97
+#: dlg_newmatch.cpp:114 setpageservers.cpp:146 tab_seeklist.cpp:102
+msgid " sec."
+msgstr " sec."
+
+#: dlg_challenge.cpp:62 dlg_challenge.cpp:71 tab_seeklist.cpp:31
+msgid "Base Time"
+msgstr "Temps de base"
+
+#: dlg_challenge.cpp:63 dlg_challenge.cpp:72 tab_seeklist.cpp:32
+msgid "Increment"
+msgstr "Temps additionel"
+
+#: dlg_challenge.cpp:109
+msgid ""
+"%1 %2 vs. %3 %4\n"
+"in a %5 match."
+msgstr ""
+"« %1 %2 » contre « %3 %4 »\n"
+"dans une partie du type « %5 »."
+
+#: dlg_challenge.cpp:124 dlg_challenge.cpp:125
+msgid "Time Controls"
+msgstr "Paramètres temporels"
+
+#: dlg_challenge.cpp:154
+msgid "Counter Offer"
+msgstr "Proposer un temps plus long"
+
+#: dlg_engine.cpp:26
+msgid "Configure Engine"
+msgstr "Configurer le calculateur pour jeux d'échecs"
+
+#: dlg_engine.cpp:38
+msgid "Engine Name"
+msgstr "Nom du calculateur pour jeux d'échecs"
+
+#: dlg_engine.cpp:43 setpageengines.cpp:63
+msgid "Protocol"
+msgstr "Protocole"
+
+#: dlg_engine.cpp:48
+msgid "Engine Filename"
+msgstr "Nom de fichier du calculateur pour jeux d'échecs"
+
+#: dlg_engine.cpp:54
+msgid "Command Line Arguments"
+msgstr "Arguments de la ligne de commande"
+
+#: dlg_engine.cpp:59 dlg_server.cpp:88
+msgid "Log File"
+msgstr "Fichier journal"
+
+#: dlg_login.cpp:21
+msgid "Login Prompt"
+msgstr "Informations d'identification"
+
+#: dlg_login.cpp:31
+msgid "Login:"
+msgstr "Identification :"
+
+#: dlg_login.cpp:32
+msgid "Password:"
+msgstr "Mot de passe :"
+
+#: dlg_login.cpp:38
+msgid "Log in as guest"
+msgstr "Se connecter comme invité"
+
+#: dlg_login.cpp:54
+msgid "Login"
+msgstr "Se connecter"
+
+#: dlg_login.cpp:54
+msgid "Log in to the chess server using this name and password."
+msgstr ""
+"S'identifie a un serveur de jeu d'échecs en utilisant un nom d'utilisateur "
+"et un mot de passe."
+
+#: dlg_newmatch.cpp:38
+msgid "Start a New Match"
+msgstr "Commencer une nouvelle partie"
+
+#: dlg_newmatch.cpp:45
+msgid "White"
+msgstr "Blancs"
+
+#: dlg_newmatch.cpp:46
+msgid "Black"
+msgstr "Noirs"
+
+#: dlg_newmatch.cpp:59 dlg_newmatch.cpp:66
+msgid "Human"
+msgstr "Humain"
+
+#: dlg_newmatch.cpp:60 dlg_newmatch.cpp:67
+msgid "Computer"
+msgstr "Ordinateur"
+
+#: dlg_newmatch.cpp:61 dlg_newmatch.cpp:68
+msgid "Email"
+msgstr "Messagerie électronique"
+
+#: dlg_newmatch.cpp:85 dlg_newmatch.cpp:102
+msgid "Base Time:"
+msgstr "Temps de base :"
+
+#: dlg_newmatch.cpp:90 dlg_newmatch.cpp:107
+msgid "Moves Per Base Time"
+msgstr "Déplacements par temps de base"
+
+#: dlg_newmatch.cpp:92 dlg_newmatch.cpp:109
+msgid " moves"
+msgstr " déplacements"
+
+#: dlg_newmatch.cpp:95 dlg_newmatch.cpp:112
+msgid "Increment Per Move"
+msgstr "Incrémentation par déplacement"
+
+#: dlg_promote.cpp:94
+msgid "Promote your pawn to..."
+msgstr "Promouvoir votre pion pour..."
+
+#: dlg_promote.cpp:101
+msgid "Pawn Promotion"
+msgstr "Promotion du pion"
+
+#: dlg_selectemail.cpp:27
+msgid "Select Email Address"
+msgstr "Choisir l'adresse de courrier électronique"
+
+#: dlg_selectengine.cpp:30
+msgid "Select Computer Player"
+msgstr "Sélectionner l'adversaire informatique"
+
+#: dlg_selectengine.cpp:41
+msgid "Computer Players"
+msgstr "Adversaires informatiques"
+
+#: dlg_selectengine.cpp:61
+msgid "Player Strength"
+msgstr "Niveau du joueur"
+
+#: dlg_selectengine.cpp:63
+msgid "Weak"
+msgstr "Faible"
+
+#: dlg_selectengine.cpp:70
+msgid "Strong"
+msgstr "Mauvais"
+
+#: dlg_server.cpp:25
+msgid "Configure Server"
+msgstr "Configurer le serveur"
+
+#: dlg_server.cpp:37
+msgid "Server Name"
+msgstr "Nom du serveur"
+
+#: dlg_server.cpp:44
+msgid "Server URL"
+msgstr "Adresse du serveur"
+
+#: dlg_server.cpp:49
+msgid "Server Port"
+msgstr "Port du serveur"
+
+#: dlg_server.cpp:56
+msgid "Username"
+msgstr "Nom d'utilisateur"
+
+#: dlg_server.cpp:59
+msgid "Remember My Password"
+msgstr "Se souvenir du mot de passe"
+
+#: dlg_server.cpp:64
+msgid "Password"
+msgstr "Mot de passe"
+
+#: dlg_server.cpp:71
+msgid "Confirm Password"
+msgstr "Confirmation du mot de passe"
+
+#: dlg_server.cpp:79
+msgid "Timeseal"
+msgstr "Programme de compensation des délais du réseau internet"
+
+#: dlg_settings.cpp:48 setpagedisplay.cpp:142
+msgid "General"
+msgstr "Général"
+
+#: dlg_settings.cpp:49
+msgid "Various aspects of Knights get configured here."
+msgstr "Plusieurs aspects de Knights peuvent être configurés ici."
+
+#: dlg_settings.cpp:55
+msgid "Display"
+msgstr "Affichage"
+
+#: dlg_settings.cpp:56
+msgid "These settings determine how Knights displays itself to you."
+msgstr "Ces paramètres configurent l'affichage de Knights."
+
+#: dlg_settings.cpp:62
+msgid "Audio"
+msgstr "Audio"
+
+#: dlg_settings.cpp:63
+msgid "These settings determine what Knights sounds like."
+msgstr "Ces paramètres réglent les options sonores de Knights."
+
+#: dlg_settings.cpp:69
+msgid "Computer Opponents"
+msgstr "Adversaire informatique"
+
+#: dlg_settings.cpp:70
+msgid "Configure your chess engines here."
+msgstr "Configurer ici votre calculateur pour jeux d'échecs."
+
+#: dlg_settings.cpp:76 setpageservers.cpp:65
+msgid "Chess Servers"
+msgstr "Serveurs de jeux d'échecs"
+
+#: dlg_settings.cpp:77
+msgid "Configure your internet chess servers here."
+msgstr "Configurer ici les serveurs du jeu d'échecs disponibles sur internet."
+
+#: io_internet.cpp:80
+msgid ""
+"There are no servers configured.\n"
+"Please make sure you have at least one server configured."
+msgstr ""
+"Il n'y a aucun serveur de configuré.\n"
+"Veuillez vérifier que vous avez au moins un serveur de configuré."
+
+#: io_internet.cpp:80
+msgid "Cannot find a server."
+msgstr "Impossible de trouver un serveur."
+
+#: io_internet.cpp:99
+msgid ""
+"Knights can not start Timeseal.\n"
+"Please make sure you have the correct path and filename configured."
+msgstr ""
+"Knights ne peut pas démarrer le programme de compensation des délais du "
+"réseau internet.\n"
+"Veuillez vérifier que le chemin et le nom du programme sont correct."
+
+#: io_internet.cpp:99
+msgid "Cannot find Timeseal."
+msgstr ""
+"Impossible de trouver le programme de synchronisation du temps pour les "
+"serveurs de jeu d'échecs."
+
+#: io_internet.cpp:109 io_internet.cpp:121
+msgid ""
+"Knights is unable to connect to the server.\n"
+" Please make sure your internet connection is working and try again."
+msgstr ""
+"Knights ne peut pas se connecter au serveur. Vérifier que votre connexion "
+"internet est active et réessayer."
+
+#: io_internet.cpp:109 io_internet.cpp:121
+msgid "Cannot connect to server."
+msgstr "Impossible de se connecter au serveur"
+
+#: io_internet.cpp:144
+msgid "%1 Console"
+msgstr "Console « %1 »"
+
+#: io_internet.cpp:149
+msgid "Sought Matches List"
+msgstr "Liste des parties d'échecs"
+
+#: io_internet.cpp:154
+msgid "Sought Matches Graph"
+msgstr "Graphique des parties d'échecs"
+
+#: knights.cpp:70 main.cpp:34
+msgid "Knights"
+msgstr "Knights"
+
+#: knights.cpp:250
+msgid "&Draw"
+msgstr "&Partie nulle"
+
+#: knights.cpp:254
+msgid "&Retract Move"
+msgstr "Annule&r le mouvement"
+
+#: knights.cpp:256
+msgid "Select this to retract your last move."
+msgstr "Selectionnez cette option pour annuler votre dernier déplacement."
+
+#: knights.cpp:258
+msgid "Resign"
+msgstr "Abandonner la partie"
+
+#: knights.cpp:260
+msgid "Use this to concede the match to your opponent."
+msgstr "Utilisez cette option pour abandonner la partie."
+
+#: knights.cpp:262
+msgid "&Call Flag"
+msgstr "&Fin de jeu sur dépassement du temps (drapeau)"
+
+#: knights.cpp:264
+msgid "Use this to declare the match over, due to your opponent being out of time."
+msgstr ""
+"Utiliser cette option pour déclarer la fin de la partie d'échecs, si l'adversaire a "
+"dépassé le temps réglementaire pour jouer."
+
+#: knights.cpp:266
+msgid "&Hint"
+msgstr "Demander un consei&l"
+
+#: knights.cpp:268
+msgid "This will ask your opponent for a hint."
+msgstr "Cette option demande un conseil à votre adversaire."
+
+#: knights.cpp:270
+msgid "Move &Now"
+msgstr "Déplacer mai&ntenant"
+
+#: knights.cpp:272
+msgid "Clicking this option will force your opponent to move immediately."
+msgstr ""
+"Choisissez cette option pour forcer votre adverssaire à déplacer une piéce "
+"immédiatement."
+
+#: knights.cpp:274
+msgid "&Flip View"
+msgstr "Retourner l'échi&quier"
+
+#: knights.cpp:276
+msgid "This will reverse the chessboard's orientation by 180 degrees."
+msgstr "Retourne la vue de l'échiquier suivant un angle de 180 degrés."
+
+#: knights.cpp:278
+msgid "&Ponder"
+msgstr "&Réfléchir constamment"
+
+#: knights.cpp:281
+msgid "This toggles your opponent's ability to think while it's your turn."
+msgstr ""
+"Cette option indique à votre adversaire qu'il doit calculer ses prochains "
+"coups tout le temps et pas uniquement lorsque c'est son tour."
+
+#: knights.cpp:285 knights.cpp:949
+msgid "Pause"
+msgstr "Mettre en pause"
+
+#: knights.cpp:287
+msgid "Select this to pause the clock for this match."
+msgstr ""
+"Selectionnez cette option pour faire mettre le chronométre en pause pour "
+"cette partie."
+
+#: knights.cpp:292
+msgid "&Offer Draw"
+msgstr "Pr&oposer une partie nulle"
+
+#: knights.cpp:293
+msgid "Clicking this will inform your opponent that you are willing draw the match."
+msgstr ""
+"Selectionner cette option pour informer à votre adversersaire lorsque vous voulez "
+"rendre nulle la partie d'échecs."
+
+#: knights.cpp:295
+msgid "&Accept Draw"
+msgstr "&Accepter une partie nulle"
+
+#: knights.cpp:296
+msgid "Clicking this will accept a draw offered by your opponent."
+msgstr ""
+"Selectionner cette option pour informer votre adversaire de votre accord "
+"pour déclarer la partie comme nulle lorsque celui ci en fait la proposition."
+
+#: knights.cpp:298
+msgid "&Reject Draw"
+msgstr "&Rejeter une partie nulle"
+
+#: knights.cpp:299
+msgid "Clicking this will reject a draw offered by your opponent."
+msgstr ""
+"Selectionner cette option pour informer votre adversaire de votre désaccord "
+"pour déclarer la partie comme nulle lorsque celui ci en fait la proposition."
+
+#: knights.cpp:301
+msgid "&Ignore Draw"
+msgstr "&Ignorer une partie nulle"
+
+#: knights.cpp:302
+msgid "Clicking this will ignore future draw offers from your opponent."
+msgstr ""
+"Selectionner cette option pour informer votre adversaire que vous ignorez "
+"toute proposition de partie nulle."
+
+#: knights.cpp:308
+msgid "&New Match..."
+msgstr "&Nouvelle partie d'échecs..."
+
+#: knights.cpp:309
+msgid "This allows you to begin a new match."
+msgstr "Ceci vous permet de commencer une nouvelle partie."
+
+#: knights.cpp:312
+msgid "&Load Match..."
+msgstr "&Ouvrir une partie..."
+
+#: knights.cpp:313
+msgid ""
+"The Load command will allow you to select a previously saved match and play "
+"it again."
+msgstr ""
+"Cette option permet d'ouvrir et de poursuivre une partie d'échecs préalablement "
+"jouée et enregistrée."
+
+#: knights.cpp:316 thinbuttons.cpp:40
+msgid "&Close Match"
+msgstr "Ferme&r la partie"
+
+#: knights.cpp:318
+msgid "This command removes the current match."
+msgstr "Cette commande ferme la partie en cours."
+
+#: knights.cpp:320
+msgid "Close All"
+msgstr "Fermer tout"
+
+#: knights.cpp:322
+msgid "This command will remove all matches that are currently loaded."
+msgstr "Cette commande fermera toutes les parties en cours."
+
+#: knights.cpp:326 thinbuttons.cpp:32
+msgid "&Save Match"
+msgstr "&Enregistrer la partie"
+
+#: knights.cpp:328 knights.cpp:333
+msgid ""
+"The Save command will allow you to store a copy of your current match for "
+"later use."
+msgstr ""
+"Cette option permet de faire un enregistrement de la partie d'échecs en cours pour "
+"la poursuivre plus tard."
+
+#: knights.cpp:331 thinbuttons.cpp:34
+msgid "Save Match &As..."
+msgstr "Enregistrer la p&artie sous..."
+
+#: knights.cpp:337 knights.cpp:859
+msgid "Connect to Server"
+msgstr "Se connecter à un serveur"
+
+#: knights.cpp:338
+msgid "Clicking this will connect Knights with an internet chess server."
+msgstr ""
+"Sélectionnez cette option pour connecter Knights avec un serveur d'échecs "
+"sur internet."
+
+#: knights.cpp:342 thinbuttons.cpp:37
+msgid "&Print Notation..."
+msgstr "Im&primer la liste des déplacements..."
+
+#: knights.cpp:344
+msgid ""
+"The Print command will allow you to print this game's notation on your "
+"printer."
+msgstr "Cette option imprimera tous les déplacement réalisés dans une partie."
+
+#: knights.cpp:349
+msgid "The Quit command will stop all matches and exit Knights."
+msgstr "Cette option arrête la partie d'échecs en cours et quitte Knights."
+
+#: knights.cpp:355
+msgid "Play &White"
+msgstr "Jouer avec les &blancs"
+
+#: knights.cpp:358
+msgid ""
+"If checked, this option tells Knights that you will play as the White army "
+"when you play vs. the computer."
+msgstr ""
+"Cette option indique à Knights que vous voulez jouer avec l'équipe des "
+"blancs quand vous débutez une partie contre l'ordinateur."
+
+#: knights.cpp:360
+msgid "Play &Black"
+msgstr "Jouer avec les &noirs"
+
+#: knights.cpp:363
+msgid ""
+"If checked, this option tells Knights that you will play as the Black army "
+"when you play vs. the computer."
+msgstr ""
+"Cette option indique à Knights que vous voulez jouer avec l'équipe des noirs "
+"quand vous débutez une partie contre l'ordinateur."
+
+#: knights.cpp:366
+msgid "&Install Themes"
+msgstr "&Installer des thèmes"
+
+#: knights.cpp:367
+msgid "This lets you install downloaded themes into Knights."
+msgstr ""
+"Cette option vous permet d'installer dans Knights des thémes préalablement "
+"téléchargé."
+
+#: knights.cpp:371
+msgid "Click this if you want to change the keyboard shortcuts that Knights uses."
+msgstr ""
+"Cliquer sur cette option si vous voulez changer les raccourcis clavier que "
+"Knights utilise."
+
+#: knights.cpp:374
+msgid "&Configure Knights..."
+msgstr "&Configurer Knights..."
+
+#: knights.cpp:375
+msgid ""
+"This opens a new window which allows you to customize Knights to your "
+"particular tastes."
+msgstr ""
+"Cette option ouvre une nouvelle fenêtre qui vous permet de paramètrer toutes "
+"les options de Knights."
+
+#: knights.cpp:381
+msgid "Begin a Tutorial"
+msgstr "Lancer le tutoriel"
+
+#: knights.cpp:387
+msgid "&Match"
+msgstr "&Partie d'échecs"
+
+#: knights.cpp:576
+msgid "Error with white engine"
+msgstr "Erreur avec le moteur d'échecs associé aux pions blancs"
+
+#: knights.cpp:578
+msgid ""
+"You selected %1 to play white,\n"
+"but it can only be used as a book engine.\n"
+"Please select another engine to play white."
+msgstr ""
+"Vous avez sélectionné %1 pour jouer avec avec l'équipes des blancs,\n"
+"mais il peut seulement être utilisé comme un livre de reférences du jeu "
+"d'échecs.\n"
+"Veuillez sélectionner un autre programme de jeu d'échecs pour l'équipe des "
+"blancs."
+
+#: knights.cpp:579
+msgid "White Engine Problem"
+msgstr "Problème avec le calculateur pour jeux d'échecs associé aux blancs"
+
+#: knights.cpp:582
+msgid "Error with white book engine"
+msgstr "Erreur avec le livre de reférences des pions blancs"
+
+#: knights.cpp:584
+msgid ""
+"You selected %1 to play white's book,\n"
+"but it can only be used as a regular engine.\n"
+"Please select another engine to play white's book."
+msgstr ""
+"Vous avez sélectionné %1 pour jouer avec avec l'équipes des blancs avec un "
+"livre de reférences,\n"
+"mais il peut seulement être utilisé comme un programme de calcul pour le jeu "
+"d'échecs sans livre de références.\n"
+"Veuillez sélectionner un autre programme de jeu d'échecs pour l'équipe des "
+"blancs qui autorise les livres de références."
+
+#: knights.cpp:585
+msgid "White Book Engine Problem"
+msgstr "Problème avec le livre de reférences des blancs"
+
+#: knights.cpp:588
+msgid "Error with black engine"
+msgstr "Erreur avec le moteur d'échecs associé aux pions noirs"
+
+#: knights.cpp:590
+msgid ""
+"You selected %1 to play black,\n"
+"but it can only be used as a book engine.\n"
+"Please select another engine to play black."
+msgstr ""
+"Vous avez sélectionné %1 pour jouer avec avec l'équipes des noirs,\n"
+"mais il peut seulement être utilisé comme un livre de reférences du jeu "
+"d'échecs.\n"
+"Veuillez sélectionner un autre programme de jeu d'échecs pour l'équipe des "
+"noirs."
+
+#: knights.cpp:591
+msgid "Black Engine Problem"
+msgstr "Problème avec le moteur d'échecs associé aux noirs"
+
+#: knights.cpp:594
+msgid "Error with black book engine"
+msgstr "Erreur avec le livre de reférences des pions noirs"
+
+#: knights.cpp:596
+msgid ""
+"You selected %1 to play black's book,\n"
+"but it can only be used as a regular engine.\n"
+"Please select another engine to play black's book."
+msgstr ""
+"Vous avez sélectionné %1 pour jouer avec avec l'équipes des noirs avec un "
+"livre de reférences,\n"
+"mais il peut seulement être utilisé comme un programme de calcul pour le jeu "
+"d'échecs sans livre de références.\n"
+"Veuillez sélectionner un autre programme de jeu d'échecs pour l'équipe des "
+"noirs qui autorise les livres de références."
+
+#: knights.cpp:597
+msgid "Black Book Engine Problem"
+msgstr "Problème avec le livre de reférences des noirs"
+
+#: knights.cpp:600
+msgid "The computer opponent assigned to play %1 has crashed"
+msgstr ""
+"L'adverssaire informatique qui est assigné à jouer avec les pions %1 c'est arrêté "
+"anormalement"
+
+#: knights.cpp:603
+msgid "There was an error while loading the file"
+msgstr "Une erreur est survenue pendant l'ouverture du fichier"
+
+#: knights.cpp:606
+msgid "There was an error while saving the file"
+msgstr "Une erreur est survenue pendant l'enregistrement du fichier"
+
+#: knights.cpp:610
+msgid "Loading complete"
+msgstr "Chargement terminé"
+
+#: knights.cpp:613
+msgid "Saving complete"
+msgstr "Enregistrement terminé"
+
+#: knights.cpp:616
+msgid "Reading File"
+msgstr "Lecture du fichier"
+
+#: knights.cpp:619
+msgid "Can not move a chessman while reviewing the match"
+msgstr "Impossible de déplacer une piéce du jeu pendant que j'examine la partie d'échecs"
+
+#: knights.cpp:622
+msgid "Illegal Move"
+msgstr "Déplacement illégal"
+
+#: knights.cpp:625
+msgid "White's turn"
+msgstr "Les blancs doivent jouer"
+
+#: knights.cpp:628
+msgid "Black's turn"
+msgstr "Les noirs doivent jouer"
+
+#: knights.cpp:631
+msgid "White wins"
+msgstr "Les blancs ont gagné"
+
+#: knights.cpp:634
+msgid "Black wins"
+msgstr "Les noirs ont gagné"
+
+#: knights.cpp:637
+msgid "Checkmate, White wins"
+msgstr "Échecs et mat, les blancs ont gagné"
+
+#: knights.cpp:640
+msgid "Checkmate, Black wins"
+msgstr "Échecs et mat, les noirs ont gagné"
+
+#: knights.cpp:643
+msgid "White resigns"
+msgstr "Les blancs ont abandonné"
+
+#: knights.cpp:646
+msgid "Black resigns"
+msgstr "Les noirs ont abandonné"
+
+#: knights.cpp:649
+msgid "White's flag fell"
+msgstr "Le temps pour les blancs est dépassé"
+
+#: knights.cpp:652
+msgid "Black's flag fell"
+msgstr "Le temps pour les noirs est dépassé"
+
+#: knights.cpp:655
+msgid "Black's flag was called, White wins"
+msgstr "Les blancs gagnent en prennant le drapeau des noirs"
+
+#: knights.cpp:658
+msgid "White's flag was called, Black wins"
+msgstr "Les noirs gagnent en prennant le drapeau des blancs"
+
+#: knights.cpp:661
+msgid "Draw match"
+msgstr "Partie nulle"
+
+#: knights.cpp:664
+msgid "50 moves rule, draw match"
+msgstr "50 déplacements ont été effectué, la partie d'échecs est nulle"
+
+#: knights.cpp:667
+msgid "Starting computer players, please wait"
+msgstr "Patientez, exécution de l'adversaire informatique"
+
+#: knights.cpp:670
+msgid "Match paused"
+msgstr "Type de partie d'échecs"
+
+#: knights.cpp:673
+msgid "White has offered a draw"
+msgstr "Les blancs proposent une partie nulle"
+
+#: knights.cpp:676
+msgid "Black has offered a draw"
+msgstr "Les noirs proposent une partie nulle"
+
+#: knights.cpp:679
+msgid "Lost contact with opponent"
+msgstr "Connexion perdue avec l'adversaire"
+
+#: knights.cpp:682
+msgid "Ready"
+msgstr "Prêt"
+
+#: knights.cpp:866
+msgid "Disconnect from Server"
+msgstr "Se déconnecter du serveur"
+
+#: knights.cpp:955
+msgid "Resume"
+msgstr "Reprendre"
+
+#: knights.cpp:1014
+msgid "Knights Themes"
+msgstr "Thémes de Knights"
+
+#: knights.cpp:1015
+msgid "Install Theme..."
+msgstr "Installer un thème..."
+
+#: knights.cpp:1045
+msgid ""
+"You do not have permission to install this theme systemwide, so Knights "
+"installed it locally."
+msgstr ""
+"Vous n'avez pas les permissions d'installer ce théme dans les répertoires "
+"systémes de votre machine. Cependant, Knights peut faire une installation "
+"dans votre répertoire personnel."
+
+#: knights.cpp:1046
+msgid "Installed theme locally"
+msgstr "Installer un théme en local"
+
+#: knights.cpp:1051
+#, c-format
+msgid ""
+"The theme could not be installed:\n"
+"%1"
+msgstr ""
+"Impossible d'installer le thème :\n"
+"%1"
+
+#: knights.cpp:1052
+msgid "Can not install theme"
+msgstr "Impossible d'installer le thème"
+
+#: knightstextview.cpp:35
+msgid "Select &All"
+msgstr "Sélectionner &Tout"
+
+#: knightstextview.cpp:44
+msgid "Zoom &In"
+msgstr "Zoomer vers l'&interieur"
+
+#: knightstextview.cpp:46
+msgid "Zoom &Out"
+msgstr "Z&oomer vers l'exterieur"
+
+#: list_pgn.cpp:29 list_pgn.cpp:48
+msgid "Result"
+msgstr "Résultat"
+
+#: list_pgn.cpp:30 list_pgn.cpp:49
+msgid "Title"
+msgstr "Titre"
+
+#: list_pgn.cpp:31 list_pgn.cpp:50
+msgid "Round"
+msgstr "Partie"
+
+#: list_pgn.cpp:32 list_pgn.cpp:51
+msgid "Site"
+msgstr "Site"
+
+#: list_pgn.cpp:33 list_pgn.cpp:52
+msgid "Date"
+msgstr "Date"
+
+#: list_pgn.cpp:81
+#, c-format
+msgid "Can not open %1"
+msgstr "Impossible d'ouvrir %1"
+
+#: list_pgn.cpp:140
+msgid "%1 matches found."
+msgstr "%1 parties ont été trouvé."
+
+#: main.cpp:26
+msgid "Specify the location of your Knights data directory."
+msgstr "Spécifiez l'emplacement du dossier contenant vos données pour Knights."
+
+#: main.cpp:27
+msgid "A .pgn file to be loaded."
+msgstr "Un fichier « .png » est ouvert."
+
+#: main.cpp:36
+msgid ""
+"The Knights Chess Interface\n"
+"\n"
+"Knights is a chess interface\n"
+"for the K Desktop Environment."
+msgstr ""
+"L'interface graphique Knights pour les échecs\n"
+"\n"
+"Knights est une interface du jeu des échecs\n"
+"pour l'environnement de bureau KDE."
+
+#: main.cpp:44
+msgid "Project Manager and Programmer"
+msgstr "Administrateur du projet et programmeur"
+
+#: main.cpp:48
+msgid "Communications Programmer"
+msgstr "Programmeur des couches de communications"
+
+#: main.cpp:52
+msgid "Qtopia port and patches"
+msgstr "Portage sur « Qtopia » et correctifs"
+
+#: main.cpp:56
+msgid "Patches and suggestions"
+msgstr "Correctifs et suggestions"
+
+#: main.cpp:60
+msgid "KDE3 Compatability Patch"
+msgstr "Correctif pour une compatibilté avec KDE3"
+
+#: main.cpp:64
+msgid "XBoard protocol"
+msgstr "Protocole « XBoard »"
+
+#: _translatorinfo.cpp:1 main.cpp:67
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Caulier Gilles,Caulier Danielle"
+
+#: _translatorinfo.cpp:3 main.cpp:68
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "caulier.gilles@free.fr,caulier.danielle@free.fr"
+
+#: match_param.cpp:107
+msgid "Unknown"
+msgstr "Inconnu"
+
+#: pgn.cpp:145
+msgid "%1 vs. %2"
+msgstr "%1 contre %2"
+
+#: pgn.cpp:943
+#, c-format
+msgid "Page %1"
+msgstr "Page %1"
+
+#: pgn.cpp:975
+msgid " Good move"
+msgstr " Bon déplacement"
+
+#: pgn.cpp:978
+msgid " Poor move"
+msgstr " Mauvais déplacement "
+
+#: pgn.cpp:981
+msgid " Very good move"
+msgstr " Très bon déplacement"
+
+#: pgn.cpp:984
+msgid " Very poor move"
+msgstr " Très mauvais déplacement"
+
+#: pgn.cpp:987
+msgid " Speculative move"
+msgstr " Déplacement spéculatif"
+
+#: pgn.cpp:990
+msgid " Questionable move"
+msgstr " Déplacement douteux"
+
+#: pgn.cpp:993
+msgid " Forced move"
+msgstr " Déplacement forcé"
+
+#: pgn.cpp:996
+msgid " Singular move"
+msgstr " Déplacement singulier"
+
+#: pgn.cpp:999
+msgid " Worst move"
+msgstr "Déplacement très mauvais"
+
+#: pgn.cpp:1002
+msgid " Drawish position"
+msgstr "Position pour une partie nulle"
+
+#: pgn.cpp:1005
+msgid " Equal chances, quiet position"
+msgstr " Chance égale, position discréte"
+
+#: pgn.cpp:1008
+msgid " Equal chances, active position"
+msgstr " Chance égale, position active"
+
+#: pgn.cpp:1011
+msgid " Unclear position"
+msgstr " Position invérifiable"
+
+#: pgn.cpp:1014
+msgid " White has a slight advantage"
+msgstr " Les blancs ont un faible avantage"
+
+#: pgn.cpp:1017
+msgid " Black has a slight advantage"
+msgstr " Les noirs ont un faible avantage"
+
+#: pgn.cpp:1020
+msgid " White has a moderate advantage"
+msgstr " Les blancs ont un avantage moyen"
+
+#: pgn.cpp:1023
+msgid " Black has a moderate advantage"
+msgstr " Les noirs ont un avantage moyen"
+
+#: pgn.cpp:1026
+msgid " White has a decisive advantage"
+msgstr " Les Blancs ont un bon avantage"
+
+#: pgn.cpp:1029
+msgid " Black has a decisive advantage"
+msgstr " Les noirs ont un bon avantage"
+
+#: pgn.cpp:1032
+msgid " White has a crushing advantage ( Black should resign )"
+msgstr " Les blancs ont un avantage très fort (Les noirs doivent abandonner)"
+
+#: pgn.cpp:1035
+msgid " Black has a crushing advantage ( White should resign )"
+msgstr " Les noirs ont un avantage très fort (Les blancs doivent abandonner)"
+
+#: pgn.cpp:1038
+msgid " White is in zugzwang"
+msgstr " Les blancs sont dans une position indésirable"
+
+#: pgn.cpp:1041
+msgid " Black is in zugzwang"
+msgstr " Les noirs sont dans une position indésirable"
+
+#: pgn.cpp:1044
+msgid " White has a slight space advantage"
+msgstr " Les blancs ont un faible avantage sur l'échiquier"
+
+#: pgn.cpp:1047
+msgid " Black has a slight space advantage"
+msgstr " Les noirs ont un faible avantage sur l'échiquier"
+
+#: pgn.cpp:1050
+msgid " White has a moderate space advantage"
+msgstr " Les blancs ont un avantage moyen sur l'échiquier"
+
+#: pgn.cpp:1053
+msgid " Black has a moderate space advantage"
+msgstr " Les noirs ont un avantage moyen sur l'échiquier"
+
+#: pgn.cpp:1056
+msgid " White has a decisive space advantage"
+msgstr " Les blancs ont un bon avantage sur l'échiquier"
+
+#: pgn.cpp:1059
+msgid " Black has a decisive space advantage"
+msgstr " Les noirs ont un bon avantage sur l'échiquier"
+
+#: pgn.cpp:1062
+msgid " White has a slight time ( development ) advantage"
+msgstr " Les blancs ont un faible avantage dans le temps"
+
+#: pgn.cpp:1065
+msgid " Black has a slight time ( development ) advantage"
+msgstr " Les noirs ont un faible avantage dans le temps"
+
+#: pgn.cpp:1068
+msgid " White has a moderate time ( development ) advantage"
+msgstr " Les blancs ont un avantage moyen dans le temps"
+
+#: pgn.cpp:1071
+msgid " Black has a moderate time ( development ) advantage"
+msgstr " Les noirs ont un avantage moyen dans le temps"
+
+#: pgn.cpp:1074
+msgid " White has a decisive time ( development ) advantage"
+msgstr " Les blancs ont un bon avantage dans le temps"
+
+#: pgn.cpp:1077
+msgid " Black has a decisive time ( development ) advantage"
+msgstr " Les noirs ont un bon avantage dans le temps"
+
+#: pgn.cpp:1080
+msgid " White has the initiative"
+msgstr " Les blancs réagissent en premier"
+
+#: pgn.cpp:1083
+msgid " Black has the initiative"
+msgstr " Les noirs réagissent en premier"
+
+#: pgn.cpp:1086
+msgid " White has a lasting initiative"
+msgstr " Les blancs prennent une derniére initiative"
+
+#: pgn.cpp:1089
+msgid " Black has a lasting initiative"
+msgstr " Les noirs prennent une derniére initiative"
+
+#: pgn.cpp:1092
+msgid " White has the attack"
+msgstr " Les blancs attaquent"
+
+#: pgn.cpp:1095
+msgid " Black has the attack"
+msgstr "Les noirs attaquent"
+
+#: pgn.cpp:1098
+msgid " White has insufficient compensation for material deficit"
+msgstr ""
+" Les blancs n'ont pas suffisamment de piéces adverses pour compenser leur "
+"infériorité materielle"
+
+#: pgn.cpp:1101
+msgid " Black has insufficient compensation for material deficit"
+msgstr ""
+" Les noirs n'ont pas suffisamment de piéces adverses pour compenser leur "
+"infériorité materielle"
+
+#: pgn.cpp:1104
+msgid " White has sufficient compensation for material deficit"
+msgstr ""
+" Les blancs ont suffisamment de piéces adverses pour compenser leur "
+"infériorité materielle"
+
+#: pgn.cpp:1107
+msgid " Black has sufficient compensation for material deficit"
+msgstr ""
+" Les noirs ont suffisamment de piéces adverses pour compenser leur "
+"infériorité materielle"
+
+#: pgn.cpp:1110
+msgid " White has more than adequate compensation for material deficit"
+msgstr ""
+" Les blancs ont largement plus de piéces adverses pour compenser leur "
+"infériorité materielle"
+
+#: pgn.cpp:1113
+msgid " Black has more than adequate compensation for material deficit"
+msgstr ""
+" Les noirs ont largement plus de piéces adverses pour compenser leur "
+"infériorité materielle"
+
+#: pgn.cpp:1116
+msgid " White has a slight center control advantage"
+msgstr " Les blancs ont un faible avantage de contrôle au centre de l'échiquier"
+
+#: pgn.cpp:1119
+msgid " Black has a slight center control advantage"
+msgstr " Les noirs ont un faible avantage pour le contrôle au centre de l'échiquier"
+
+#: pgn.cpp:1122
+msgid " White has a moderate center control advantage"
+msgstr " Les blancs ont un avantage modéré pour le contrôle au centre de l'échiquier"
+
+#: pgn.cpp:1125
+msgid " Black has a moderate center control advantage"
+msgstr " Les noirs ont un avantage modéré pour le contrôle au centre de l'échiquier"
+
+#: pgn.cpp:1128
+msgid " White has a decisive center control advantage"
+msgstr " Les blancs ont un avantage décisif pour le contrôle au centre de l'échiquier"
+
+#: pgn.cpp:1131
+msgid " Black has a decisive center control advantage"
+msgstr " Les noirs ont un avantage décisif pour le contrôle au centre de l'échiquier"
+
+#: pgn.cpp:1134
+msgid " White has a slight kingside control advantage"
+msgstr " Les blancs ont un faible avantage pour le contrôle du rois"
+
+#: pgn.cpp:1137
+msgid " Black has a slight kingside control advantage"
+msgstr " Les noirs ont un faible avantage pour le contrôle du rois"
+
+#: pgn.cpp:1140
+msgid " White has a moderate kingside control advantage"
+msgstr " Les blancs ont un avantage moyen pour le contrôle du rois"
+
+#: pgn.cpp:1143
+msgid " Black has a moderate kingside control advantage"
+msgstr " Les noirs ont un avantage moyen pour le contrôle du rois"
+
+#: pgn.cpp:1146
+msgid " White has a decisive kingside control advantage"
+msgstr " Les blancs ont un avantage décisif pour le contrôle du rois"
+
+#: pgn.cpp:1149
+msgid " Black has a decisive kingside control advantage"
+msgstr " Les noirs ont un avantage décisif pour le contrôle du rois"
+
+#: pgn.cpp:1152
+msgid " White has a slight queenside control advantage"
+msgstr " Les blancs ont un faible avantage pour le contrôle de la reine"
+
+#: pgn.cpp:1155
+msgid " Black has a slight queenside control advantage"
+msgstr " Les noirs ont un faible avantage pour le contrôle de la reine"
+
+#: pgn.cpp:1158
+msgid " White has a moderate queenside control advantage"
+msgstr " Les blancs ont un avantage moyen pour le contrôle de la reine"
+
+#: pgn.cpp:1161
+msgid " Black has a moderate queenside control advantage"
+msgstr " Les noirs ont un avantage moyen pour le contrôle de la reine"
+
+#: pgn.cpp:1164
+msgid " White has a decisive queenside control advantage"
+msgstr " Les blancs ont un avantage décisif pour le contrôle de la reine"
+
+#: pgn.cpp:1167
+msgid " Black has a decisive queenside control advantage"
+msgstr " Les noirs ont un avantage décisif pour le contrôle de la reine"
+
+#: pgn.cpp:1170
+msgid " White has a vulnerable first rank"
+msgstr " Les blancs ont une premiére ligne de front vulnérable"
+
+#: pgn.cpp:1173
+msgid " Black has a vulnerable first rank"
+msgstr " Les noirs ont une premiére ligne de front vulnérable"
+
+#: pgn.cpp:1176
+msgid " White has a well protected first rank"
+msgstr " Les blancs ont une premiére ligne de front bien protégée"
+
+#: pgn.cpp:1179
+msgid " Black has a well protected first rank"
+msgstr " Les noirs ont une premiére ligne de front bien protégée"
+
+#: pgn.cpp:1182
+msgid " White has a poorly protected king"
+msgstr " Les blancs ont un roi qui est faiblement protégé"
+
+#: pgn.cpp:1185
+msgid " Black has a poorly protected king"
+msgstr " Les noirs ont un roi qui est faiblement protégé"
+
+#: pgn.cpp:1188
+msgid " White has a well protected king"
+msgstr " Les blancs ont un roi qui est bien protégé"
+
+#: pgn.cpp:1191
+msgid " Black has a well protected king"
+msgstr " Les noirs ont un roi qui est bien protégé"
+
+#: pgn.cpp:1194
+msgid " White has a poorly placed king"
+msgstr " Les blancs ont un roi qui est mal placé"
+
+#: pgn.cpp:1197
+msgid " Black has a poorly placed king"
+msgstr " Les noirs ont un roi qui est mal placé"
+
+#: pgn.cpp:1200
+msgid " White has a well placed king"
+msgstr " Les blancs ont un roi qui est bien placé"
+
+#: pgn.cpp:1203
+msgid " Black has a well placed king"
+msgstr " Les noirs ont un roi qui est bien placé"
+
+#: pgn.cpp:1206
+msgid " White has a very weak pawn structure"
+msgstr " Les blancs ont une structure de pions très fragile"
+
+#: pgn.cpp:1209
+msgid " Black has a very weak pawn structure"
+msgstr " Les noirs ont une structure de pions très fragile"
+
+#: pgn.cpp:1212
+msgid " White has a moderately weak pawn structure"
+msgstr " Les blancs ont une structure de pions fragile"
+
+#: pgn.cpp:1215
+msgid " Black has a moderately weak pawn structure"
+msgstr " Les noirs ont une structure de pions fragile"
+
+#: pgn.cpp:1218
+msgid " White has a moderately strong pawn structure"
+msgstr " Les blancs ont une structure de pions moyennement solide"
+
+#: pgn.cpp:1221
+msgid " Black has a moderately strong pawn structure"
+msgstr " Les noirs ont une structure de pions moyennement solide"
+
+#: pgn.cpp:1224
+msgid " White has a very strong pawn structure"
+msgstr " Les blancs ont une structure de pions solide"
+
+#: pgn.cpp:1227
+msgid " Black has a very strong pawn structure"
+msgstr " Les noirs ont une structure de pions solide"
+
+#: pgn.cpp:1230
+msgid " White has poor knight placement"
+msgstr " Les blancs ont un cheval en difficulté"
+
+#: pgn.cpp:1233
+msgid " Black has poor knight placement"
+msgstr " Les noirs ont un cheval en difficulté"
+
+#: pgn.cpp:1236
+msgid " White has good knight placement"
+msgstr " Les blancs ont un cheval bien placé"
+
+#: pgn.cpp:1239
+msgid " Black has good knight placement"
+msgstr " Les noirs ont un cheval bien placé"
+
+#: pgn.cpp:1242
+msgid " White has poor bishop placement"
+msgstr " Les blancs ont un fou en difficulté"
+
+#: pgn.cpp:1245
+msgid " Black has poor bishop placement"
+msgstr " Les noirs ont un fou en difficulté"
+
+#: pgn.cpp:1248
+msgid " White has good bishop placement"
+msgstr " Les blancs ont un fou bien placé"
+
+#: pgn.cpp:1251
+msgid " Black has good bishop placement"
+msgstr " Les noirs ont un fou bien placé"
+
+#: pgn.cpp:1254
+msgid " White has poor rook placement"
+msgstr " Les blancs ont une tour en difficulté"
+
+#: pgn.cpp:1257
+msgid " Black has poor rook placement"
+msgstr " Les noirs ont une tour en difficulté"
+
+#: pgn.cpp:1260
+msgid " White has good rook placement"
+msgstr " Les blancs ont une tour bien placé"
+
+#: pgn.cpp:1263
+msgid " Black has good rook placement"
+msgstr " Les noirs ont une tour bien placé"
+
+#: pgn.cpp:1266
+msgid " White has poor queen placement"
+msgstr " Les blancs ont la dame en difficulté"
+
+#: pgn.cpp:1269
+msgid " Black has poor queen placement"
+msgstr " Les noirs ont la dame en difficulté"
+
+#: pgn.cpp:1272
+msgid " White has good queen placement"
+msgstr " Les blancs ont la dame bien placée"
+
+#: pgn.cpp:1275
+msgid " Black has good queen placement"
+msgstr " Les noirs ont la dame bien placée"
+
+#: pgn.cpp:1278
+msgid " White has poor piece coordination"
+msgstr " Les blancs ont une mauvaise coordination des piéces"
+
+#: pgn.cpp:1281
+msgid " Black has poor piece coordination"
+msgstr " Les noirs ont une mauvaise coordination des piéces"
+
+#: pgn.cpp:1284
+msgid " White has good piece coordination"
+msgstr " Les blancs ont une bonne coordination des piéces"
+
+#: pgn.cpp:1287
+msgid " Black has good piece coordination"
+msgstr " Les noirs ont une bonne coordination des piéces"
+
+#: pgn.cpp:1290
+msgid " White has played the opening very poorly"
+msgstr " Les blancs ont joué une très mauvaise ouverture"
+
+#: pgn.cpp:1293
+msgid " Black has played the opening very poorly"
+msgstr " Les noirs ont joué une très mauvaise ouverture"
+
+#: pgn.cpp:1296
+msgid " White has played the opening poorly"
+msgstr " Les blancs ont joué une mauvaise ouverture"
+
+#: pgn.cpp:1299
+msgid " Black has played the opening poorly"
+msgstr " Les noirs ont joué une mauvaise ouverture"
+
+#: pgn.cpp:1302
+msgid " White has played the opening well"
+msgstr " Les blancs ont joué une bonne ouverture"
+
+#: pgn.cpp:1305
+msgid " Black has played the opening well"
+msgstr " Les noirs ont joué une bonne ouverture"
+
+#: pgn.cpp:1308
+msgid " White has played the opening very well"
+msgstr " Les blancs ont joué une très bonne ouverture"
+
+#: pgn.cpp:1311
+msgid " Black has played the opening very well"
+msgstr " Les noirs ont joué une très bonne ouverture"
+
+#: pgn.cpp:1314
+msgid " White has played the middlegame very poorly"
+msgstr " Les blancs ont joué une très mauvaise moitié de jeu"
+
+#: pgn.cpp:1317
+msgid " Black has played the middlegame very poorly"
+msgstr " Les noirs ont joué une très mauvaise moitié de jeu"
+
+#: pgn.cpp:1320
+msgid " White has played the middlegame poorly"
+msgstr " Les blancs ont joué une mauvaise moitié de jeu"
+
+#: pgn.cpp:1323
+msgid " Black has played the middlegame poorly"
+msgstr " Les noirs ont joué une mauvaise moitié de jeu"
+
+#: pgn.cpp:1326
+msgid " White has played the middlegame well"
+msgstr " Les blancs ont joué une bonne moitié de jeu"
+
+#: pgn.cpp:1329
+msgid " Black has played the middlegame well"
+msgstr " Les noirs ont joué une bonne moitié de jeu"
+
+#: pgn.cpp:1332
+msgid " White has played the middlegame very well"
+msgstr " Les blancs ont joué une très bonne moitié de jeu"
+
+#: pgn.cpp:1335
+msgid " Black has played the middlegame very well"
+msgstr " Les noirs ont joué une très bonne moitié de jeu"
+
+#: pgn.cpp:1338
+msgid " White has played the ending very poorly"
+msgstr " Les blancs ont joué une très mauvaise fin de jeu"
+
+#: pgn.cpp:1341
+msgid " Black has played the ending very poorly"
+msgstr " Les noirs ont joué une très mauvaise fin de jeu"
+
+#: pgn.cpp:1344
+msgid " White has played the ending poorly"
+msgstr " Les blancs ont joué une mauvaise fin de jeu"
+
+#: pgn.cpp:1347
+msgid " Black has played the ending poorly"
+msgstr " Les noirs ont joué une mauvaise fin de jeu"
+
+#: pgn.cpp:1350
+msgid " White has played the ending well"
+msgstr " Les blancs ont joué une bonne fin de jeu"
+
+#: pgn.cpp:1353
+msgid " Black has played the ending well"
+msgstr " Les noirs ont joué une bonne fin de jeu"
+
+#: pgn.cpp:1356
+msgid " White has played the ending very well"
+msgstr " Les blancs ont joué une très bonne fin de jeu"
+
+#: pgn.cpp:1359
+msgid " Black has played the ending very well"
+msgstr " Les noirs ont joué une très bonne fin de jeu"
+
+#: pgn.cpp:1362
+msgid " White has slight counterplay"
+msgstr " Les blancs ont fait une pauvre diversion"
+
+#: pgn.cpp:1365
+msgid " Black has slight counterplay"
+msgstr " Les noirs ont fait une pauvre diversion"
+
+#: pgn.cpp:1368
+msgid " White has moderate counterplay"
+msgstr " Les blancs ont fait une diversion moyenne"
+
+#: pgn.cpp:1371
+msgid " Black has moderate counterplay"
+msgstr " Les noirs ont fait une diversion moyenne"
+
+#: pgn.cpp:1374
+msgid " White has decisive counterplay"
+msgstr " Les blancs ont fait une diversion décisive"
+
+#: pgn.cpp:1377
+msgid " Black has decisive counterplay"
+msgstr " Les noirs ont fait une diversion décisive"
+
+#: pgn.cpp:1380
+msgid " White has moderate time control pressure"
+msgstr " Les blancs ne sont pas trop limités par le temps"
+
+#: pgn.cpp:1383
+msgid " Black has moderate time control pressure"
+msgstr " Les noirs ne sont pas trop limités par le temps"
+
+#: pgn.cpp:1386
+msgid " White has severe time control pressure"
+msgstr " Les blancs sont très limités par le temps"
+
+#: pgn.cpp:1389
+msgid " Black has severe time control pressure"
+msgstr " Les noirs sont très limités par le temps"
+
+#: pgn.cpp:1391
+msgid " With the idea..."
+msgstr " Avec une arriére pensée..."
+
+#: pgn.cpp:1394
+msgid " Aimed against..."
+msgstr " Faire opposition à l'adversaire..."
+
+#: pgn.cpp:1397
+msgid " Better Move"
+msgstr " Déplacement bénéfique"
+
+#: pgn.cpp:1400
+msgid " Worse Move"
+msgstr " Déplacement empirique"
+
+#: pgn.cpp:1403
+msgid " Equivalent move"
+msgstr " Déplacement équivalent"
+
+#: pgn.cpp:1406
+msgid " Editor's Remark"
+msgstr " Commentaires"
+
+#: pgn.cpp:1409
+msgid " Novelty"
+msgstr " Nouveauté"
+
+#: pgn.cpp:1412
+msgid " Weak point"
+msgstr " Point faible"
+
+#: pgn.cpp:1415
+msgid " Endgame"
+msgstr " Fin de jeu"
+
+#: pgn.cpp:1418
+msgid " Line"
+msgstr " Ligne"
+
+#: pgn.cpp:1421
+msgid " Diagonal"
+msgstr " Diagonale"
+
+#: pgn.cpp:1424
+msgid " White has a pair of Bishops"
+msgstr " Les blancs ont une paire de Fous"
+
+#: pgn.cpp:1427
+msgid " Black has a pair of Bishops"
+msgstr " Les noirs ont une paire de Fous"
+
+#: pgn.cpp:1430
+msgid " Bishops of opposite color"
+msgstr " Fous de couleurs opposées"
+
+#: pgn.cpp:1433
+msgid " Bishops of same color"
+msgstr " Fous de même couleur"
+
+#: pgn.cpp:1436
+msgid " Etc."
+msgstr " Etc..."
+
+#: pgn.cpp:1439
+msgid " Doubled pawns"
+msgstr " Pions en binôme"
+
+#: pgn.cpp:1442
+msgid " Isolated pawn"
+msgstr " Pion isolé"
+
+#: pgn.cpp:1445
+msgid " Connected pawns"
+msgstr " Pions liés"
+
+#: pgn.cpp:1448
+msgid " Hanging pawns"
+msgstr " Pions à prendre"
+
+#: pgn.cpp:1451
+msgid " Backwards pawn"
+msgstr " Pions en arriére"
+
+#: setpageaudio.cpp:28
+msgid "enable Audio"
+msgstr "Activer l'audio"
+
+#: setpageaudio.cpp:36
+msgid "Audio Themes"
+msgstr "Thèmes sonores"
+
+#: setpageaudio.cpp:47
+msgid "Volume"
+msgstr "Volume"
+
+#: setpageaudio.cpp:48
+msgid "Maximum"
+msgstr "Maximum"
+
+#: setpageaudio.cpp:52
+msgid "Minimum"
+msgstr "Minimum"
+
+#: setpageaudio.cpp:55
+msgid "For Current Match Only"
+msgstr "Seulement pour la partie active"
+
+#: setpagedisplay.cpp:74
+msgid "Board Themes"
+msgstr "Thèmes pour l'échiquier"
+
+#: setpagedisplay.cpp:79
+msgid "Chessman Themes"
+msgstr "Thèmes pour les piéces"
+
+#: setpagedisplay.cpp:85
+msgid "Theme Size"
+msgstr "Taille du théme"
+
+#: setpagedisplay.cpp:88
+msgid "Small"
+msgstr "Petit"
+
+#: setpagedisplay.cpp:95
+msgid "Large"
+msgstr "Large"
+
+#: setpagedisplay.cpp:99
+msgid "Other Display Options"
+msgstr "Autres options d'affichage"
+
+#: setpagedisplay.cpp:102
+msgid "Reverse Board Orientation"
+msgstr "Inverser l'orientation de l'échiquier"
+
+#: setpagedisplay.cpp:107
+msgid "Display Startup Logo"
+msgstr "Afficher le logo de démarrage."
+
+#: setpagedisplay.cpp:112
+msgid "Automatic Preview"
+msgstr "Prévisualisation automatique des piéces"
+
+#: setpagedisplay.cpp:117
+msgid "Show Last Move"
+msgstr "Voir le dernier mouvement"
+
+#: setpagedisplay.cpp:122
+msgid "Animate Moves"
+msgstr "Mouvements animés"
+
+#: setpagedisplay.cpp:127
+msgid "Show Coordinates"
+msgstr "Voir les coordonnées sur l'échiquier"
+
+#: setpagedisplay.cpp:161
+msgid "Restore Defaults"
+msgstr "Rétablir les paramètres par défaut"
+
+#: setpagedisplay.cpp:165
+msgid "Standard Font..."
+msgstr "Police standard..."
+
+#: setpagedisplay.cpp:174
+msgid "Private Font..."
+msgstr "Police pour les discussions privées..."
+
+#: setpagedisplay.cpp:183
+msgid "Channel Font..."
+msgstr "Police pour les canaux de discussions..."
+
+#: setpagedisplay.cpp:192
+msgid "Shout Font..."
+msgstr "Police pour les appels..."
+
+#: setpagedisplay.cpp:201
+msgid "Whisper Font..."
+msgstr "Police pour les chuchotements..."
+
+#: setpagedisplay.cpp:210
+msgid "Notification Font..."
+msgstr "Police pour les notifications..."
+
+#: setpagedisplay.cpp:225
+msgid "Console"
+msgstr "Console"
+
+#: setpagedisplay.cpp:519
+msgid "Standard"
+msgstr "Standard"
+
+#: setpagedisplay.cpp:520
+msgid "Private Tell"
+msgstr "Discussion privée"
+
+#: setpagedisplay.cpp:521
+msgid "Channel Tell"
+msgstr "Canal de discussion"
+
+#: setpagedisplay.cpp:522
+msgid "Shout"
+msgstr "Appel"
+
+#: setpagedisplay.cpp:524
+msgid "Notification"
+msgstr "Notification"
+
+#: setpageengines.cpp:33
+msgid "Engines to Play White"
+msgstr "Calculateur pour jeux d'échecs jouant avec les blancs"
+
+#: setpageengines.cpp:36 setpageengines.cpp:48
+msgid "enable Book Engine"
+msgstr "Activer le livre de reférences"
+
+#: setpageengines.cpp:45
+msgid "Engines to Play Black"
+msgstr "Calculateur pour jeux d'échecs jouant avec les noirs"
+
+#: setpageengines.cpp:57
+msgid "Chess Engines"
+msgstr "Programmes d'échecs"
+
+#: setpageengines.cpp:62 setpageservers.cpp:69 tab_seeklist.cpp:27
+msgid "Name"
+msgstr "Nom"
+
+#: setpageengines.cpp:64
+msgid "Wins"
+msgstr "Parties gagnées"
+
+#: setpageengines.cpp:65
+msgid "Losses"
+msgstr "Parties perdues"
+
+#: setpageengines.cpp:66
+msgid "Draws"
+msgstr "Parties nulles"
+
+#: setpageengines.cpp:73 setpageservers.cpp:77
+msgid "&Add..."
+msgstr "&Ajouter..."
+
+#: setpageengines.cpp:74 setpageservers.cpp:78
+msgid "&Modify..."
+msgstr "&Modifier..."
+
+#: setpageengines.cpp:75 setpageservers.cpp:79
+msgid "&Delete..."
+msgstr "&Supprimer..."
+
+#: setpagegeneral.cpp:29
+msgid "Your Name:"
+msgstr "Votre nom :"
+
+#: setpagegeneral.cpp:36
+msgid "When Knights Begins It Should:"
+msgstr "Quand le programme démarre, il doit :"
+
+#: setpagegeneral.cpp:38
+msgid "Do Nothing"
+msgstr "Ne rien faire"
+
+#: setpagegeneral.cpp:39
+msgid "Start a Match vs. PC"
+msgstr "Commencer une partie contre l'ordinateur"
+
+#: setpagegeneral.cpp:40
+msgid "Connect to ICS"
+msgstr "Se connecter à un serveur Internet"
+
+#: setpagegeneral.cpp:48
+msgid "Save Match on Close?"
+msgstr "Enregistrer la partie lors de la fermeture du programme ?"
+
+#: setpagegeneral.cpp:52
+msgid "Ask"
+msgstr "Demander"
+
+#: setpagegeneral.cpp:62
+msgid "Append to Save File:"
+msgstr "Enregistrement de toutes les parties dans un unique fichier PNG :"
+
+#: setpagegeneral.cpp:65
+msgid "Append to Save File"
+msgstr "Ajouter les parties dans un fichier PNG unique"
+
+#: setpagegeneral.cpp:79
+msgid "Pause on Minimize"
+msgstr "Mettre le chronomètre en pause lorsqu'on réduit la fenêtre"
+
+#: setpagegeneral.cpp:85
+msgid "Always Promote to Queen"
+msgstr "Toujours promouvoir un pion pour une reine"
+
+#: setpagegeneral.cpp:91
+msgid "Call Flag Automatically"
+msgstr "Tenir compte automatiquement du dépassement de temps (drapeau)"
+
+#: setpageservers.cpp:56
+msgid "Current Server"
+msgstr "Serveur courant"
+
+#: setpageservers.cpp:70
+msgid "URL"
+msgstr "Adresse Internet"
+
+#: setpageservers.cpp:90
+msgid "Servers"
+msgstr "Serveurs"
+
+#: setpageservers.cpp:106
+msgid "Profanity Filter"
+msgstr "Filtrage des messages"
+
+#: setpageservers.cpp:110
+msgid "Filter Everything"
+msgstr "Filtrer tous"
+
+#: setpageservers.cpp:110
+msgid "No Filtering"
+msgstr "Pas de filtre"
+
+#: setpageservers.cpp:115
+msgid "Automatically Close Previous ICS Match"
+msgstr ""
+"Fermer automatiquement la partie précédente avec le serveur de jeux d'échecs "
+"sur Internet"
+
+#: setpageservers.cpp:120
+msgid "Private Matches"
+msgstr "Parties en privé (non observables)"
+
+#: setpageservers.cpp:124
+msgid "enable Premove"
+msgstr "Activer les pré-mouvements"
+
+#: setpageservers.cpp:128
+msgid "enable Kibitzes"
+msgstr ""
+"Activer les messages issus de tous les joueurs ou de tous les observateurs "
+"d'une partie (Kibitz)"
+
+#: setpageservers.cpp:132
+msgid "enable Unregistered Tells"
+msgstr "Activer les dialogues non déclarés"
+
+#: setpageservers.cpp:136
+msgid "enable Shouts"
+msgstr "Activer les appels"
+
+#: setpageservers.cpp:140
+msgid "enable Seeks"
+msgstr "Activer les messages de diffusion des matchs"
+
+#: setpageservers.cpp:150
+msgid "Seconds Between Seek Updates"
+msgstr ""
+"Secondes pour le rafraîchissement à l'écran de la liste des matchs dans la "
+"console"
+
+#: tab_seeklist.cpp:29
+msgid "Match Type"
+msgstr "Type de partie d'échecs"
+
+#: tab_seeklist.cpp:30
+msgid "Is Rated?"
+msgstr "Est classifié ?"
+
+#: tabbox.cpp:163
+msgid "%1 - Knights"
+msgstr "%1 - Knights"
+
+#: wiz_setup.cpp:51
+msgid "Knights Setup Wizard"
+msgstr "Assistant de configuration de Knights"
+
+#: wiz_setup.cpp:74
+msgid ""
+"Thank you for installing Knights, the graphical chess interface for KDE. To "
+"help you get started quickly, there are a few things Knights will need to "
+"setup. You should click 'Next' to see what they are."
+msgstr ""
+"Merci d'utiliser « Knights », l'interface graphique du jeu d'échecs pour "
+"l'environnement de bureau KDE. Pour vous aider à démarrer rapidement le jeu, "
+"cet assistant vous propose de configurer quelques options. Appuyez sur "
+"« Suivant » pour continuer."
+
+#: wiz_setup.cpp:77
+msgid "Welcome to Knights v%1!"
+msgstr "Bienvenue dans Knights v%1 !"
+
+#: wiz_setup.cpp:97
+msgid ""
+"When Knights saves a match to disk, it uses Portable Game Notation (PGN) to "
+"store the match. Several other computer chess games use PGN too. If you "
+"like, Knights can be the default PGN viewer on this system."
+msgstr ""
+"Lorsque Knights enregistre une partie d'échecs sur un disque, il utilise le format "
+"PGN (Notation Portable pour les Jeux). D'autres jeux d'échecs comme Knights "
+"utilisent aussi ce format d'enregistrement. Si vous le désirez, Knights peut "
+"utiliser par défaut le format PGN sur votre système."
+
+#: wiz_setup.cpp:100
+msgid "Let Knights handle PGN files?"
+msgstr "Gestion du format PGN ?"
+
+#: wiz_setup.cpp:106
+msgid "Let Knights handle your .pgn files?"
+msgstr "Knights doit il utiliser le format PGN ?"
+
+#: wiz_setup.cpp:125
+msgid ""
+"Knights can not play a chess match against you without help. Known as Chess "
+"Engines, these helpers can be found on the Internet and are often included "
+"with your distribution. Knights can look for Chess Engines that you may "
+"already have. If found, Knights will configure itself to use them."
+msgstr ""
+"Knights ne peut pas jouer une partie d'échecs sans aide extérieure. Pour "
+"reconnaître le programme externe qui réalisera les calculs nécessaires au "
+"jeu d'échecs, cet assistant vous aidera à rechercher les programmes du jeu "
+"des échecs sur le réseau Internet ou sur votre système. Si Knights trouve un "
+"de ces programmes, il le configurera de lui-même pour que vous puissiez l'utiliser."
+
+#: wiz_setup.cpp:128 wiz_setup.cpp:134
+msgid "Let Knights search for chess engines?"
+msgstr "Recherche des programmes d'échecs ?"
+
+#: wiz_setup.cpp:153
+msgid ""
+"In order for you to play chess online, Knights will have to connect to a "
+"chess server. Knights has a list of several of these servers. If you like, "
+"this list can be used to automatically configure Knights."
+msgstr ""
+"Pour pouvoir jouer au échecs en ligne, Knights devra se connecter à un "
+"serveur de jeu d'échecs. Knights a une liste quelques serveurs. Si vous le "
+"désirez, cette liste peut être utilisée automatiquement pour configurer "
+"Knights."
+
+#: wiz_setup.cpp:156 wiz_setup.cpp:162
+msgid "Let Knights configure chess servers?"
+msgstr "Configuration des serveurs d'échecs ?"
+
+#: wiz_setup.cpp:181
+msgid ""
+"Knights has now configured itself according to your choices. We strongly "
+"recommend that you read the documentation to make full use of all that "
+"Knights has to offer. You can access it by pressing F1."
+msgstr ""
+"Knights est maintenant configuré en fonction de vos choix. Nous vous "
+"recommendons vivement de lire la documentation du logiciel pour profiter "
+"pleinement de toutes ses possiblités. Pour y accéder, vous pouvez utiliser "
+"la touche F1."
+
+#: wiz_setup.cpp:184
+msgid "Setup Complete"
+msgstr "Configuration terminée"
+
+#: wiz_setup.cpp:213
+msgid "Do you accept the terms of our license?"
+msgstr "Acceptez vous les termes de la licence ?"
+
+#: wiz_setup.cpp:218
+msgid "Please read and accept our license:"
+msgstr "Veuillez lire et accepter la licence :"
+
+#: wiz_setup.cpp:269
+msgid "Free Internet Chess Server"
+msgstr "Serveur d'échecs gratuit sur Internet"
+
+#: wiz_setup.cpp:269
+msgid "Internet Chess Club"
+msgstr "Club d'échecs sur Internet"
+
+#: wiz_setup.cpp:269
+msgid "Global Chess Server"
+msgstr "Serveur d'échecs global"
+
+#: wiz_setup.cpp:269
+msgid "Chess.Net"
+msgstr "Chess.Net"
+
+#: wiz_setup.cpp:270
+msgid "Chess-Square.Com"
+msgstr "Chess-Square.Com"
+
+#: wiz_setup.cpp:270
+msgid "Australian FICS"
+msgstr "FICS d'Australie"
+
+#: wiz_setup.cpp:270
+msgid "Brazilian FICS"
+msgstr "FICS du Brésil"
+
+#: wiz_setup.cpp:270
+msgid "Chilean FICS"
+msgstr "FICS du Chili"
+
+#: wiz_setup.cpp:271
+msgid "Croatian FICS"
+msgstr "FICS de Croatie"
+
+#: wiz_setup.cpp:271
+msgid "Dutch FICS"
+msgstr "Dutch d'Allemagne"
+
+#: wiz_setup.cpp:271
+msgid "French FICS"
+msgstr "FICS de France"
+
+#: wiz_setup.cpp:271
+msgid "German FICS"
+msgstr "FICS Germanique"
+
+#: wiz_setup.cpp:271
+msgid "Swedish FICS"
+msgstr "FICS de Suéde"
+
+#: proto_xboard.cpp:443
+msgid ""
+"%1 suggests this move:\n"
+"%2"
+msgstr ""
+"%1 suggère ce déplacement :\n"
+"%2"
+
+#: proto_xboard.cpp:465 proto_xboard.cpp:472 proto_xboard.cpp:479
+msgid ""
+"%1 tells you:\n"
+"%2"
+msgstr ""
+"%1 vous a envoyé ce message :\n"
+"%2"
+
+#~ msgid "Save Game?"
+#~ msgstr "Enregistrer la partie ?"
+
+#~ msgid "Save Game..."
+#~ msgstr "Partie enregistree..."
+
+#~ msgid " Game paused"
+#~ msgstr " Partie en pause"
+
+#~ msgid "Chat"
+#~ msgstr "Chat"
+
+#~ msgid "&Find"
+#~ msgstr "&Rechercher"
+
+#~ msgid "Programmer"
+#~ msgstr "Programmeur"
+
+#~ msgid "Red Hat Binary RPMs"
+#~ msgstr "RPMs des exécutables pour RedHat"
+
+#~ msgid "Early Beta Testing"
+#~ msgstr "Béta testeur"
+
+#~ msgid "Would you like to email this move?"
+#~ msgstr ""
+#~ "Voulez vous envoyer ce déplacement de piéce par la messagerie électronique"
+
+#~ msgid "Send Email?"
+#~ msgstr "Envoyer le courrier ?"
+
+#~ msgid "Console Orientation"
+#~ msgstr "Orientation de la console"
+
+#~ msgid "engineio"
+#~ msgstr "engineio"
+
+#~ msgid "Knightsio"
+#~ msgstr "Knightsio"
+
+#~ msgid "pgn"
+#~ msgstr "pgn"
+
+#~ msgid "Server Login Failed"
+#~ msgstr "La séquence d'identification au serveur a échoué"
+
+#~ msgid "White's Time Controls"
+#~ msgstr "Paramétres temporels pour les Blancs"
+
+#~ msgid "Black's Time Controls"
+#~ msgstr "Paramétres temporels pour les Noirs"
+
+#~ msgid ""
+#~ "Knights can not find %1.\n"
+#~ "Please make sure the address was entered correctly and that you are "
+#~ "connected to the internet."
+#~ msgstr ""
+#~ "Knights ne peut pas trouver %1.\n"
+#~ "Veuillez vérifier que l'adresse est correctement saisie et que vous êtes "
+#~ "bien connecté au réseau internet."
+
+#~ msgid "&Solitaire Chess"
+#~ msgstr "Jeu en &solitaire"
+
+#~ msgid "&Computer vs. Computer"
+#~ msgstr "&Ordinateur contre ordinateur"
+
+#~ msgid "&Save Game"
+#~ msgstr "&Sauvegarder la partie"
+
+#~ msgid "Console - Knights"
+#~ msgstr "Knights - console"
+
+#~ msgid "High Quality"
+#~ msgstr "Haute qualité"
+
+#~ msgid "GNUChess"
+#~ msgstr "GNUChess"
+
+#~ msgid "Sjeng"
+#~ msgstr "Sjeng"
+
+#~ msgid "KnightCap"
+#~ msgstr "KnightCap"
+
+#~ msgid "BabyChess"
+#~ msgstr "BabyChess"
+
+#~ msgid "Phalanx-XXII"
+#~ msgstr "Phalanx-XXII"
+
+#~ msgid "Bowron Abernethy Chess Engine"
+#~ msgstr "Bowron Abernethy Chess Engine"
+
diff --git a/po/it.po b/po/it.po
new file mode 100644
index 0000000..766cc02
--- /dev/null
+++ b/po/it.po
@@ -0,0 +1,2242 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2003-01-21 04:30-0600\n"
+"PO-Revision-Date: 2002-11-19 16:31+0100\n"
+"Last-Translator: Daniele Medri <madrid@linuxmeeting.net>\n"
+"Language-Team: Italian <it@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 0.9.6\n"
+
+#: accel.cpp:23
+msgid "Previous Move"
+msgstr "Mossa precedente"
+
+#: accel.cpp:24
+msgid "Next Move"
+msgstr "Mossa successiva"
+
+#: accel.cpp:25
+msgid "Enter Text"
+msgstr "Immetti testo"
+
+#: accel.cpp:26
+msgid "Page Up"
+msgstr "Pagina su"
+
+#: accel.cpp:27
+msgid "Page Down"
+msgstr "Pagina giù"
+
+#: accel.cpp:28
+msgid "Increase Board Size"
+msgstr "Incrementa dimensione scacchiera"
+
+#: accel.cpp:29
+msgid "Decrease Board Size"
+msgstr "Diminuisci dimensione scacchiera"
+
+#: accel.cpp:30
+msgid "Last History Item"
+msgstr "Ultima voce nella cronologia"
+
+#: accel.cpp:31
+msgid "Next History Item"
+msgstr "Prossima voce nella cronologia"
+
+#: accel.cpp:32
+msgid "Reply to the Last Tell"
+msgstr "Rispondi all'ultimo comunicato"
+
+#: accel.cpp:33
+msgid "Reply to the Channel"
+msgstr "Rispondi in canale"
+
+#: accel.cpp:34
+msgid "Kibitz"
+msgstr "Kibitz"
+
+#: accel.cpp:35 setpagedisplay.cpp:523
+msgid "Whisper"
+msgstr "Bisbiglio"
+
+#: challenge_graph.cpp:75 tab_seeklist.cpp:40
+msgid "Seek Matches"
+msgstr "Ricerca partite"
+
+#: challenge_graph.cpp:77 tab_seeklist.cpp:42
+msgid "Accept This Match"
+msgstr "Accetta questa partita"
+
+#: challenge_graph.cpp:78 tab_seeklist.cpp:43
+msgid "Tell..."
+msgstr "Comunica..."
+
+#: challenge_graph.cpp:79 tab_seeklist.cpp:44
+msgid "Assess..."
+msgstr "Valutazione..."
+
+#: challenge_graph.cpp:80 tab_seeklist.cpp:45
+msgid "Player Info"
+msgstr "Informazioni giocatore"
+
+#: challenge_graph.cpp:82 tab_seeklist.cpp:47
+msgid "Player History"
+msgstr "Storico giocatore"
+
+#: challenge_graph.cpp:84 tab_seeklist.cpp:49
+msgid "Add to Friends"
+msgstr "Aggiungi agli amici"
+
+#: challenge_graph.cpp:85 tab_seeklist.cpp:50
+msgid "Ignore This Player"
+msgstr "Ignora questo giocatore"
+
+#: challenge_graph.cpp:304 tab_seeklist.cpp:28
+msgid "Rating"
+msgstr "Valutazione"
+
+#: challenge_graph.cpp:311
+msgid "Time"
+msgstr "Tempo"
+
+#: challenge_graph_view.cpp:105
+msgid " Name: %1 Rating: %2 Match Type: %3 %4 Base Time: %5 Increment: %6"
+msgstr ""
+" Nome: %1 Punteggio: %2 Tipo di partita: %3 %4 Tempo base: %5 Incremento: %6"
+
+#: core.cpp:385
+msgid "Hint"
+msgstr "Suggerimento"
+
+#: core.cpp:388
+msgid "Tell User"
+msgstr "Comunica all'utente"
+
+#: core.cpp:391
+msgid "Tell User Error"
+msgstr "Comunica l'errore dell'utente"
+
+#: core.cpp:397
+msgid "Tell Opponent"
+msgstr "Comunica all'avversario"
+
+#: core.cpp:411
+msgid "Tell All"
+msgstr "Comunica a tutti"
+
+#: core.cpp:646
+#, fuzzy
+msgid "Load PGN..."
+msgstr "Carica gioco..."
+
+#: core.cpp:690
+#, fuzzy
+msgid "Would you like to save this match?"
+msgstr "Desideri salvare questa partita?"
+
+#: core.cpp:691
+#, fuzzy
+msgid "Save Match?"
+msgstr "&Salva partita"
+
+#: core.cpp:710
+#, fuzzy
+msgid "Save Match..."
+msgstr "S&alva partita come..."
+
+#: dlg_challenge.cpp:25
+msgid "You've Been Challenged:"
+msgstr "Sei stato sfidato:"
+
+#: dlg_challenge.cpp:29
+msgid "Accept"
+msgstr "Accetta"
+
+#: dlg_challenge.cpp:30
+msgid "Decline"
+msgstr "Declina"
+
+#: dlg_challenge.cpp:49
+msgid "Time Odds Match"
+msgstr ""
+
+#: dlg_challenge.cpp:53
+msgid "Unrated"
+msgstr "Non classificato"
+
+#: dlg_challenge.cpp:54
+msgid "Rated"
+msgstr "Classificato"
+
+#: dlg_challenge.cpp:60 dlg_challenge.cpp:69 dlg_newmatch.cpp:87
+#: dlg_newmatch.cpp:104 tab_seeklist.cpp:101
+msgid " min."
+msgstr " min."
+
+#: dlg_challenge.cpp:61 dlg_challenge.cpp:70 dlg_newmatch.cpp:97
+#: dlg_newmatch.cpp:114 setpageservers.cpp:146 tab_seeklist.cpp:102
+msgid " sec."
+msgstr " secondi."
+
+#: dlg_challenge.cpp:62 dlg_challenge.cpp:71 tab_seeklist.cpp:31
+msgid "Base Time"
+msgstr "Tempo base"
+
+#: dlg_challenge.cpp:63 dlg_challenge.cpp:72 tab_seeklist.cpp:32
+msgid "Increment"
+msgstr "Incremento"
+
+#: dlg_challenge.cpp:109
+msgid ""
+"%1 %2 vs. %3 %4\n"
+"in a %5 match."
+msgstr ""
+"%1 %2 contro %3 %4\n"
+"in una %5 partita."
+
+#: dlg_challenge.cpp:124 dlg_challenge.cpp:125
+msgid "Time Controls"
+msgstr "Controlli dei tempi"
+
+#: dlg_challenge.cpp:154
+msgid "Counter Offer"
+msgstr ""
+
+#: dlg_engine.cpp:26
+msgid "Configure Engine"
+msgstr "Configura engine"
+
+#: dlg_engine.cpp:38
+msgid "Engine Name"
+msgstr "Nome engine"
+
+#: dlg_engine.cpp:43 setpageengines.cpp:63
+msgid "Protocol"
+msgstr "Protocollo"
+
+#: dlg_engine.cpp:48
+msgid "Engine Filename"
+msgstr "Nome file engine"
+
+#: dlg_engine.cpp:54
+msgid "Command Line Arguments"
+msgstr "Argomenti della riga dei comandi"
+
+#: dlg_engine.cpp:59 dlg_server.cpp:88
+msgid "Log File"
+msgstr "File log"
+
+#: dlg_login.cpp:21
+msgid "Login Prompt"
+msgstr "Prompt di accesso"
+
+#: dlg_login.cpp:31
+msgid "Login:"
+msgstr "Login:"
+
+#: dlg_login.cpp:32
+msgid "Password:"
+msgstr "Password:"
+
+#: dlg_login.cpp:38
+msgid "Log in as guest"
+msgstr "Autenticati come \"guest\""
+
+#: dlg_login.cpp:54
+msgid "Login"
+msgstr "Login"
+
+#: dlg_login.cpp:54
+msgid "Log in to the chess server using this name and password."
+msgstr "Autenticati in questo server degli scacchi con questo nome e password."
+
+#: dlg_newmatch.cpp:38
+msgid "Start a New Match"
+msgstr "Avvia una nuova partita"
+
+#: dlg_newmatch.cpp:45
+msgid "White"
+msgstr "Bianco"
+
+#: dlg_newmatch.cpp:46
+msgid "Black"
+msgstr "Nero"
+
+#: dlg_newmatch.cpp:59 dlg_newmatch.cpp:66
+msgid "Human"
+msgstr "Umano"
+
+#: dlg_newmatch.cpp:60 dlg_newmatch.cpp:67
+msgid "Computer"
+msgstr "Computer"
+
+#: dlg_newmatch.cpp:61 dlg_newmatch.cpp:68
+msgid "Email"
+msgstr "Posta elettronica"
+
+#: dlg_newmatch.cpp:85 dlg_newmatch.cpp:102
+msgid "Base Time:"
+msgstr "Tempo base:"
+
+#: dlg_newmatch.cpp:90 dlg_newmatch.cpp:107
+msgid "Moves Per Base Time"
+msgstr "Mosse per il tempo base"
+
+#: dlg_newmatch.cpp:92 dlg_newmatch.cpp:109
+msgid " moves"
+msgstr " mosse"
+
+#: dlg_newmatch.cpp:95 dlg_newmatch.cpp:112
+msgid "Increment Per Move"
+msgstr "Incremento per mossa"
+
+#: dlg_promote.cpp:94
+msgid "Promote your pawn to..."
+msgstr "Promuovi i tuoi pedini a..."
+
+#: dlg_promote.cpp:101
+msgid "Pawn Promotion"
+msgstr "Promozione pedini"
+
+#: dlg_selectemail.cpp:27
+msgid "Select Email Address"
+msgstr "Seleziona indirizzo di posta elettronica"
+
+#: dlg_selectengine.cpp:30
+msgid "Select Computer Player"
+msgstr "Seleziona il computer come giocatore"
+
+#: dlg_selectengine.cpp:41
+msgid "Computer Players"
+msgstr "Computer avversario"
+
+#: dlg_selectengine.cpp:61
+msgid "Player Strength"
+msgstr "Esperienza giocatore"
+
+#: dlg_selectengine.cpp:63
+msgid "Weak"
+msgstr "Debole"
+
+#: dlg_selectengine.cpp:70
+msgid "Strong"
+msgstr "Forte"
+
+#: dlg_server.cpp:25
+msgid "Configure Server"
+msgstr "Configura server"
+
+#: dlg_server.cpp:37
+msgid "Server Name"
+msgstr "Nome server"
+
+#: dlg_server.cpp:44
+msgid "Server URL"
+msgstr "URL del server"
+
+#: dlg_server.cpp:49
+msgid "Server Port"
+msgstr "Porta server"
+
+#: dlg_server.cpp:56
+msgid "Username"
+msgstr "Nome utente"
+
+#: dlg_server.cpp:59
+msgid "Remember My Password"
+msgstr "Ricorda la mia password"
+
+#: dlg_server.cpp:64
+msgid "Password"
+msgstr "Password"
+
+#: dlg_server.cpp:71
+msgid "Confirm Password"
+msgstr "Conferma password"
+
+#: dlg_server.cpp:79
+msgid "Timeseal"
+msgstr "Timeseal"
+
+#: dlg_settings.cpp:48 setpagedisplay.cpp:142
+msgid "General"
+msgstr "Generale"
+
+#: dlg_settings.cpp:49
+msgid "Various aspects of Knights get configured here."
+msgstr "Vari aspetti di Knights possono essere configurati qui."
+
+#: dlg_settings.cpp:55
+msgid "Display"
+msgstr "Visualizzazione"
+
+#: dlg_settings.cpp:56
+msgid "These settings determine how Knights displays itself to you."
+msgstr "Queste configurazioni determinano l'aspetto di Knights."
+
+#: dlg_settings.cpp:62
+msgid "Audio"
+msgstr "Audio"
+
+#: dlg_settings.cpp:63
+msgid "These settings determine what Knights sounds like."
+msgstr "Queste impostazioni determineranno come saranno gli effetti sonori."
+
+#: dlg_settings.cpp:69
+msgid "Computer Opponents"
+msgstr "Computer avversario"
+
+#: dlg_settings.cpp:70
+msgid "Configure your chess engines here."
+msgstr "Configura qui il tuo engine di scacchi."
+
+#: dlg_settings.cpp:76 setpageservers.cpp:65
+msgid "Chess Servers"
+msgstr "Server per gli scacchi"
+
+#: dlg_settings.cpp:77
+msgid "Configure your internet chess servers here."
+msgstr "Configura qui il tuo server internet per gli scacchi."
+
+#: io_internet.cpp:80
+msgid ""
+"There are no servers configured.\n"
+"Please make sure you have at least one server configured."
+msgstr ""
+"Knights non può avviare il Timeseal.\n"
+"Per piacere, assicurati di avere il percorso corretto e il nome file "
+"configurati."
+
+#: io_internet.cpp:80
+msgid "Cannot find a server."
+msgstr "Non è possibile trovare il server."
+
+#: io_internet.cpp:99
+msgid ""
+"Knights can not start Timeseal.\n"
+"Please make sure you have the correct path and filename configured."
+msgstr ""
+"Knights non può avviare il Timeseal.\n"
+"Per piacere, assicurati di avere il percorso corretto e il nome file "
+"configurati."
+
+#: io_internet.cpp:99
+msgid "Cannot find Timeseal."
+msgstr "Non è possibile trovare il Timeseal."
+
+#: io_internet.cpp:109 io_internet.cpp:121
+msgid ""
+"Knights is unable to connect to the server.\n"
+" Please make sure your internet connection is working and try again."
+msgstr ""
+"Knights non può collegarsi a questo server. Per piacere, controlla il tuo "
+"username e la tua password prima di riprovare nuovamente."
+
+#: io_internet.cpp:109 io_internet.cpp:121
+msgid "Cannot connect to server."
+msgstr "Non è possibile collegarsi al server."
+
+#: io_internet.cpp:144
+msgid "%1 Console"
+msgstr "Console %1"
+
+#: io_internet.cpp:149
+#, fuzzy
+msgid "Sought Matches List"
+msgstr "Lista dei giochi richiesti"
+
+#: io_internet.cpp:154
+#, fuzzy
+msgid "Sought Matches Graph"
+msgstr "Grafico dei giochi richiesti"
+
+#: knights.cpp:70 main.cpp:34
+msgid "Knights"
+msgstr "Knights"
+
+#: knights.cpp:250
+msgid "&Draw"
+msgstr "&Patta"
+
+#: knights.cpp:254
+msgid "&Retract Move"
+msgstr "&Ritira la mossa"
+
+#: knights.cpp:256
+msgid "Select this to retract your last move."
+msgstr "Seleziona questo per ritrarre l'ultima mossa."
+
+#: knights.cpp:258
+msgid "Resign"
+msgstr "Abbandona"
+
+#: knights.cpp:260
+msgid "Use this to concede the match to your opponent."
+msgstr "Utilizza questo per concedere la partita al tuo avversario."
+
+#: knights.cpp:262
+msgid "&Call Flag"
+msgstr "&Chiama bandiera"
+
+#: knights.cpp:264
+#, fuzzy
+msgid ""
+"Use this to declare the match over, due to your opponent being out of time."
+msgstr ""
+"Utilizza questo per dichiarare il termine del gioco, visto che l'avversario "
+"è andato fuori tempo."
+
+#: knights.cpp:266
+msgid "&Hint"
+msgstr "&Suggerimento"
+
+#: knights.cpp:268
+msgid "This will ask your opponent for a hint."
+msgstr "Questo chiederà al tuo avversario un suggerimento."
+
+#: knights.cpp:270
+msgid "Move &Now"
+msgstr "Muovi &ora"
+
+#: knights.cpp:272
+msgid "Clicking this option will force your opponent to move immediately."
+msgstr ""
+"Selezionando questa opzione forzerai l'avversario a muovere immediatamente."
+
+#: knights.cpp:274
+msgid "&Flip View"
+msgstr "&Inverti la scacchiera"
+
+#: knights.cpp:276
+msgid "This will reverse the chessboard's orientation by 180 degrees."
+msgstr "Questa opzione invertirà la scacchiera di 180 gradi."
+
+#: knights.cpp:278
+msgid "&Ponder"
+msgstr "&Pondera"
+
+#: knights.cpp:281
+msgid "This toggles your opponent's ability to think while it's your turn."
+msgstr ""
+"Questo dà al tuo avversario la possibilità di pensare durante il tuo turno."
+
+#: knights.cpp:285 knights.cpp:949
+msgid "Pause"
+msgstr "Pausa"
+
+#: knights.cpp:287
+msgid "Select this to pause the clock for this match."
+msgstr ""
+"Seleziona questa opzione per mettere in pausa l'orologio per la partita."
+
+#: knights.cpp:292
+msgid "&Offer Draw"
+msgstr "&Offri la patta"
+
+#: knights.cpp:293
+#, fuzzy
+msgid ""
+"Clicking this will inform your opponent that you are willing draw the match."
+msgstr ""
+"Cliccando qui informerai il tuo avversario che stai per ritirarti dal gioco."
+
+#: knights.cpp:295
+msgid "&Accept Draw"
+msgstr "&Accetta la patta"
+
+#: knights.cpp:296
+msgid "Clicking this will accept a draw offered by your opponent."
+msgstr "Cliccando qui accetterai un ritiro offerto dal tuo avversario."
+
+#: knights.cpp:298
+msgid "&Reject Draw"
+msgstr "&Rifiuta la patta"
+
+#: knights.cpp:299
+msgid "Clicking this will reject a draw offered by your opponent."
+msgstr "Cliccando qui rifiuterai un ritiro offerto dal tuo avversario."
+
+#: knights.cpp:301
+msgid "&Ignore Draw"
+msgstr "&Ignora la patta"
+
+#: knights.cpp:302
+msgid "Clicking this will ignore future draw offers from your opponent."
+msgstr "Cliccando qui ignorerai futuri ritiri offerti dai tuoi avversari."
+
+#: knights.cpp:308
+msgid "&New Match..."
+msgstr "&Nuova partita..."
+
+#: knights.cpp:309
+msgid "This allows you to begin a new match."
+msgstr "Questo ti permette di iniziare una nuova partita."
+
+#: knights.cpp:312
+msgid "&Load Match..."
+msgstr "&Carica partita..."
+
+#: knights.cpp:313
+#, fuzzy
+msgid ""
+"The Load command will allow you to select a previously saved match and play "
+"it again."
+msgstr ""
+"Il comando Apri ti permette di selezionare un gioco precedentemente salvato "
+"e riutilizzarlo."
+
+#: knights.cpp:316 thinbuttons.cpp:40
+msgid "&Close Match"
+msgstr "&Chiudi partita"
+
+#: knights.cpp:318
+msgid "This command removes the current match."
+msgstr "Questo comando rimuove la partita attuale."
+
+#: knights.cpp:320
+msgid "Close All"
+msgstr "Chiudi tutto"
+
+#: knights.cpp:322
+msgid "This command will remove all matches that are currently loaded."
+msgstr "Questo comando rimuoverà tutte le partite attualmente caricate."
+
+#: knights.cpp:326 thinbuttons.cpp:32
+msgid "&Save Match"
+msgstr "&Salva partita"
+
+#: knights.cpp:328 knights.cpp:333
+#, fuzzy
+msgid ""
+"The Save command will allow you to store a copy of your current match for "
+"later use."
+msgstr ""
+"Il comando Salva ti permette di memorizzare una copia del gioco attuale per "
+"un utilizzo successivo."
+
+#: knights.cpp:331 thinbuttons.cpp:34
+msgid "Save Match &As..."
+msgstr "S&alva partita come..."
+
+#: knights.cpp:337 knights.cpp:859
+msgid "Connect to Server"
+msgstr "Connessione al server"
+
+#: knights.cpp:338
+msgid "Clicking this will connect Knights with an internet chess server."
+msgstr ""
+"Cliccando qui collegherai Knights con un server di scacchi su Internet."
+
+#: knights.cpp:342 thinbuttons.cpp:37
+msgid "&Print Notation..."
+msgstr "Stam&pa notazione..."
+
+#: knights.cpp:344
+msgid ""
+"The Print command will allow you to print this game's notation on your "
+"printer."
+msgstr ""
+"Il comando Stampa ti permette di stampare la notazione del gioco tramite la "
+"stampante."
+
+#: knights.cpp:349
+#, fuzzy
+msgid "The Quit command will stop all matches and exit Knights."
+msgstr "Il comando Esci terminerà il gioco attuale e uscirà da Knights."
+
+#: knights.cpp:355
+msgid "Play &White"
+msgstr "Gioca come &Bianco"
+
+#: knights.cpp:358
+msgid ""
+"If checked, this option tells Knights that you will play as the White army "
+"when you play vs. the computer."
+msgstr ""
+"Se attivata, questa opzione dice a Knights che utilizzerai gli scacchi "
+"Bianchi quando giocherai contro il computer."
+
+#: knights.cpp:360
+msgid "Play &Black"
+msgstr "Gioca come &Nero"
+
+#: knights.cpp:363
+msgid ""
+"If checked, this option tells Knights that you will play as the Black army "
+"when you play vs. the computer."
+msgstr ""
+"Se attivata, questa opzione dice a Knights che utilizzerai gli scacchi Neri "
+"per giocare contro il computer."
+
+#: knights.cpp:366
+msgid "&Install Themes"
+msgstr "&Installa temi"
+
+#: knights.cpp:367
+msgid "This lets you install downloaded themes into Knights."
+msgstr "Questo ti permette di installare temi in Knights."
+
+#: knights.cpp:371
+msgid ""
+"Click this if you want to change the keyboard shortcuts that Knights uses."
+msgstr ""
+"Clicca questo se vuoi cambiare le scorciatoie della tastiera che utilizza "
+"Knights."
+
+#: knights.cpp:374
+msgid "&Configure Knights..."
+msgstr "&Configura Knights..."
+
+#: knights.cpp:375
+msgid ""
+"This opens a new window which allows you to customize Knights to your "
+"particular tastes."
+msgstr ""
+"Questo apre una nuova finestra la quale permette di personalizzare Knights "
+"secondo le personali preferenze."
+
+#: knights.cpp:381
+msgid "Begin a Tutorial"
+msgstr "Incomincia un tutorial"
+
+#: knights.cpp:387
+msgid "&Match"
+msgstr "&Partita"
+
+#: knights.cpp:576
+#, fuzzy
+msgid "Error with white engine"
+msgstr " Errore con l'engine Bianco"
+
+#: knights.cpp:578
+msgid ""
+"You selected %1 to play white,\n"
+"but it can only be used as a book engine.\n"
+"Please select another engine to play white."
+msgstr ""
+"Hai selezionato %1 per giocare come bianco,\n"
+"ma può essere utilizzato unicamente come book engine.\n"
+"Per favore seleziona un'altro engine per giocare con i Bianchi."
+
+#: knights.cpp:579
+msgid "White Engine Problem"
+msgstr "Problema con l'engine dei Bianchi"
+
+#: knights.cpp:582
+#, fuzzy
+msgid "Error with white book engine"
+msgstr " Errore con il book engine bianco"
+
+#: knights.cpp:584
+msgid ""
+"You selected %1 to play white's book,\n"
+"but it can only be used as a regular engine.\n"
+"Please select another engine to play white's book."
+msgstr ""
+"Hai selezionato %1 per giocare con il libro bianco,\n"
+"ma può essere utilizzato unicamente come un engine regolare.\n"
+"Per favore seleziona un'altro engine per giocare con il libro bianco."
+
+#: knights.cpp:585
+msgid "White Book Engine Problem"
+msgstr "Problema con l'engine del libro bianco"
+
+#: knights.cpp:588
+#, fuzzy
+msgid "Error with black engine"
+msgstr " Errore con l'engine nero"
+
+#: knights.cpp:590
+msgid ""
+"You selected %1 to play black,\n"
+"but it can only be used as a book engine.\n"
+"Please select another engine to play black."
+msgstr ""
+"Hai selezionato %1 per giocare come nero,\n"
+"ma può essere utilizzato unicamente come un book engine.\n"
+"Per favore seleziona un'altro engine per giocare con i Neri."
+
+#: knights.cpp:591
+msgid "Black Engine Problem"
+msgstr "Problema con l'engine nero"
+
+#: knights.cpp:594
+#, fuzzy
+msgid "Error with black book engine"
+msgstr " Errore con il book engine nero"
+
+#: knights.cpp:596
+msgid ""
+"You selected %1 to play black's book,\n"
+"but it can only be used as a regular engine.\n"
+"Please select another engine to play black's book."
+msgstr ""
+"Hai selezionato %1 per giocare con il libro dei Neri,\n"
+"ma può essere utilizzato unicamente come engine regolare.\n"
+"Per favore seleziona un'altro engine per giocare con il libro dei Neri."
+
+#: knights.cpp:597
+msgid "Black Book Engine Problem"
+msgstr "Problema con il book engine nero"
+
+#: knights.cpp:600
+#, fuzzy
+msgid "The computer opponent assigned to play %1 has crashed"
+msgstr ""
+" Il computer avversario assegnato per giocare come %1 è andato in crash"
+
+#: knights.cpp:603
+#, fuzzy
+msgid "There was an error while loading the file"
+msgstr " C'è stato un errore durante il caricamento del file"
+
+#: knights.cpp:606
+#, fuzzy
+msgid "There was an error while saving the file"
+msgstr " C'è stato un errore salvando il file"
+
+#: knights.cpp:610
+#, fuzzy
+msgid "Loading complete"
+msgstr " Caricamento completato"
+
+#: knights.cpp:613
+#, fuzzy
+msgid "Saving complete"
+msgstr " Salvataggio completato"
+
+#: knights.cpp:616
+#, fuzzy
+msgid "Reading File"
+msgstr " Lettura file in corso"
+
+#: knights.cpp:619
+#, fuzzy
+msgid "Can not move a chessman while reviewing the match"
+msgstr " Non è possibile muovere uno scacco mentre si rivede un gioco"
+
+#: knights.cpp:622
+#, fuzzy
+msgid "Illegal Move"
+msgstr " Mossa illegale"
+
+#: knights.cpp:625
+#, fuzzy
+msgid "White's turn"
+msgstr " Turno dei Bianchi"
+
+#: knights.cpp:628
+#, fuzzy
+msgid "Black's turn"
+msgstr " Turno dei Neri"
+
+#: knights.cpp:631
+#, fuzzy
+msgid "White wins"
+msgstr " i Bianchi vincono"
+
+#: knights.cpp:634
+#, fuzzy
+msgid "Black wins"
+msgstr " i Neri vincono"
+
+#: knights.cpp:637
+#, fuzzy
+msgid "Checkmate, White wins"
+msgstr " Scacco matto, i Bianchi vincono"
+
+#: knights.cpp:640
+#, fuzzy
+msgid "Checkmate, Black wins"
+msgstr " Scacco matto, i Neri vincono"
+
+#: knights.cpp:643
+#, fuzzy
+msgid "White resigns"
+msgstr " I Bianchi abbandonano"
+
+#: knights.cpp:646
+#, fuzzy
+msgid "Black resigns"
+msgstr " I Neri abbandonano"
+
+#: knights.cpp:649
+#, fuzzy
+msgid "White's flag fell"
+msgstr " Caduta bandiera Bianchi"
+
+#: knights.cpp:652
+#, fuzzy
+msgid "Black's flag fell"
+msgstr " Caduta bandiera Neri"
+
+#: knights.cpp:655
+#, fuzzy
+msgid "Black's flag was called, White wins"
+msgstr " Presentata la bandiera dei Neri, i Bianchi vincono"
+
+#: knights.cpp:658
+#, fuzzy
+msgid "White's flag was called, Black wins"
+msgstr " Presentata bandiera dei Bianchi, i Neri vincono"
+
+#: knights.cpp:661
+#, fuzzy
+msgid "Draw match"
+msgstr "Ritiro dal gioco"
+
+#: knights.cpp:664
+#, fuzzy
+msgid "50 moves rule, draw match"
+msgstr " regola delle 50 mosse, abbandono gioco"
+
+#: knights.cpp:667
+#, fuzzy
+msgid "Starting computer players, please wait"
+msgstr " Avvio in corso dei computer avversari, attendere per favore"
+
+#: knights.cpp:670
+#, fuzzy
+msgid "Match paused"
+msgstr "Tipo di partita"
+
+#: knights.cpp:673
+#, fuzzy
+msgid "White has offered a draw"
+msgstr " I Bianchi hanno offerto la patta"
+
+#: knights.cpp:676
+#, fuzzy
+msgid "Black has offered a draw"
+msgstr " I Neri hanno offerto la patta"
+
+#: knights.cpp:679
+#, fuzzy
+msgid "Lost contact with opponent"
+msgstr " Perso il contatto con l'avversario"
+
+#: knights.cpp:682
+#, fuzzy
+msgid "Ready"
+msgstr " Pronto"
+
+#: knights.cpp:866
+msgid "Disconnect from Server"
+msgstr "Disconnetti dal server"
+
+#: knights.cpp:955
+msgid "Resume"
+msgstr "Ripristina"
+
+#: knights.cpp:1014
+msgid "Knights Themes"
+msgstr "Temi di Knights"
+
+#: knights.cpp:1015
+msgid "Install Theme..."
+msgstr "Installa nuovo tema..."
+
+#: knights.cpp:1045
+msgid ""
+"You do not have permission to install this theme systemwide, so Knights "
+"installed it locally."
+msgstr ""
+"Non hai i permessi per installare questo tema nel sistema, per tale motivo "
+"sarà installato localmente."
+
+#: knights.cpp:1046
+msgid "Installed theme locally"
+msgstr "Installato il tema localmente"
+
+#: knights.cpp:1051
+#, c-format
+msgid ""
+"The theme could not be installed:\n"
+"%1"
+msgstr ""
+"Il tema non può essere installato:\n"
+"%1"
+
+#: knights.cpp:1052
+msgid "Can not install theme"
+msgstr "Non è possibile installare il tema"
+
+#: knightstextview.cpp:35
+msgid "Select &All"
+msgstr "Seleziona t&utto"
+
+#: knightstextview.cpp:44
+msgid "Zoom &In"
+msgstr "Zoom &avanti"
+
+#: knightstextview.cpp:46
+msgid "Zoom &Out"
+msgstr "Zoom &indietro"
+
+#: list_pgn.cpp:29 list_pgn.cpp:48
+msgid "Result"
+msgstr "Risultato"
+
+#: list_pgn.cpp:30 list_pgn.cpp:49
+msgid "Title"
+msgstr "Titolo"
+
+#: list_pgn.cpp:31 list_pgn.cpp:50
+msgid "Round"
+msgstr "Turno"
+
+#: list_pgn.cpp:32 list_pgn.cpp:51
+msgid "Site"
+msgstr "Sito"
+
+#: list_pgn.cpp:33 list_pgn.cpp:52
+msgid "Date"
+msgstr "Data"
+
+#: list_pgn.cpp:81
+#, c-format
+msgid "Can not open %1"
+msgstr "Impossibile aprire %1"
+
+#: list_pgn.cpp:140
+msgid "%1 matches found."
+msgstr "%1 partite trovate."
+
+#: main.cpp:26
+msgid "Specify the location of your Knights data directory."
+msgstr "Specifica la posizone della directory dati di Knights."
+
+#: main.cpp:27
+msgid "A .pgn file to be loaded."
+msgstr "Un file .pgn per essere caricato."
+
+#: main.cpp:36
+msgid ""
+"The Knights Chess Interface\n"
+"\n"
+"Knights is a chess interface\n"
+"for the K Desktop Environment."
+msgstr ""
+"Knights: interfaccia grafica per il gioco degli scacchi\n"
+"\n"
+"Knights è un'interfaccia per il gioco degli scacchi\n"
+"per l'ambiente desktop KDE."
+
+#: main.cpp:44
+msgid "Project Manager and Programmer"
+msgstr "Capo progetto e programmatore"
+
+#: main.cpp:48
+msgid "Communications Programmer"
+msgstr "Programmatore delle comunicazioni"
+
+#: main.cpp:52
+msgid "Qtopia port and patches"
+msgstr "Port di Qtopia e patch"
+
+#: main.cpp:56
+msgid "Patches and suggestions"
+msgstr "Patch e suggerimenti"
+
+#: main.cpp:60
+msgid "KDE3 Compatability Patch"
+msgstr "Patch per la compatibilità con KDE3"
+
+#: main.cpp:64
+msgid "XBoard protocol"
+msgstr "Protocollo XBoard"
+
+#: _translatorinfo.cpp:1 main.cpp:67
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Daniele Medri"
+
+#: _translatorinfo.cpp:3 main.cpp:68
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "madrid@linuxmeeting.net"
+
+#: match_param.cpp:107
+msgid "Unknown"
+msgstr "Sconosciuto"
+
+#: pgn.cpp:145
+msgid "%1 vs. %2"
+msgstr "%1 contro %2"
+
+#: pgn.cpp:943
+#, c-format
+msgid "Page %1"
+msgstr "Pagina %1"
+
+#: pgn.cpp:975
+msgid " Good move"
+msgstr " Buona mossa"
+
+#: pgn.cpp:978
+msgid " Poor move"
+msgstr " Mossa debole"
+
+#: pgn.cpp:981
+msgid " Very good move"
+msgstr " Mossa ottima"
+
+#: pgn.cpp:984
+msgid " Very poor move"
+msgstr " Mossa debolissima"
+
+#: pgn.cpp:987
+msgid " Speculative move"
+msgstr " Mossa stravagante"
+
+#: pgn.cpp:990
+msgid " Questionable move"
+msgstr " Mossa dubbia"
+
+#: pgn.cpp:993
+msgid " Forced move"
+msgstr " Mossa forzata"
+
+#: pgn.cpp:996
+msgid " Singular move"
+msgstr " Mossa singolare"
+
+#: pgn.cpp:999
+msgid " Worst move"
+msgstr " Mossa pessima"
+
+#: pgn.cpp:1002
+msgid " Drawish position"
+msgstr " Posizione di ritiro"
+
+#: pgn.cpp:1005
+msgid " Equal chances, quiet position"
+msgstr "Uguali possibilità, posizione calma"
+
+#: pgn.cpp:1008
+msgid " Equal chances, active position"
+msgstr "Uguali possibilità, posizione attiva"
+
+#: pgn.cpp:1011
+msgid " Unclear position"
+msgstr " Posizione non chiara"
+
+#: pgn.cpp:1014
+msgid " White has a slight advantage"
+msgstr " i Bianchi hanno un vantaggio esiguo"
+
+#: pgn.cpp:1017
+msgid " Black has a slight advantage"
+msgstr " i Neri hanno un vantaggio esiguo"
+
+#: pgn.cpp:1020
+msgid " White has a moderate advantage"
+msgstr " i Bianchi hanno un moderato vantaggio"
+
+#: pgn.cpp:1023
+msgid " Black has a moderate advantage"
+msgstr " i Neri hanno un moderato vantaggio"
+
+#: pgn.cpp:1026
+msgid " White has a decisive advantage"
+msgstr " I Bianchi hanno un vantaggio decisivo"
+
+#: pgn.cpp:1029
+msgid " Black has a decisive advantage"
+msgstr " I Neri hanno un vantaggio decisivo"
+
+#: pgn.cpp:1032
+msgid " White has a crushing advantage ( Black should resign )"
+msgstr ""
+" i Bianchi hanno un vantaggio schiacciante (i Neri dovrebbero abbandonare)"
+
+#: pgn.cpp:1035
+msgid " Black has a crushing advantage ( White should resign )"
+msgstr ""
+" i Neri hanno un vantaggio schiacciante (i Bianchi dovrebbero abbandonare)"
+
+#: pgn.cpp:1038
+msgid " White is in zugzwang"
+msgstr " i Bianchi sono in zugzwang"
+
+#: pgn.cpp:1041
+msgid " Black is in zugzwang"
+msgstr " i Neri sono in zugzwang"
+
+#: pgn.cpp:1044
+msgid " White has a slight space advantage"
+msgstr " i Bianchi hanno uno spazio di vantaggio esiguo"
+
+#: pgn.cpp:1047
+msgid " Black has a slight space advantage"
+msgstr " i Neri hanno uno spazio di vantaggio esiguo"
+
+#: pgn.cpp:1050
+msgid " White has a moderate space advantage"
+msgstr " i Bianchi hanno un moderato spazio di vantaggio"
+
+#: pgn.cpp:1053
+msgid " Black has a moderate space advantage"
+msgstr " i Neri hanno un moderato spazio di vantaggio"
+
+#: pgn.cpp:1056
+msgid " White has a decisive space advantage"
+msgstr " i Bianchi hanno un decisivo spazio di vantaggio"
+
+#: pgn.cpp:1059
+msgid " Black has a decisive space advantage"
+msgstr " i Neri hanno un decisivo spazio di vantaggio"
+
+#: pgn.cpp:1062
+msgid " White has a slight time ( development ) advantage"
+msgstr " i Bianchi hanno un esiguo (sviluppo) vantaggio di tempo"
+
+#: pgn.cpp:1065
+msgid " Black has a slight time ( development ) advantage"
+msgstr " i Neri hanno un esiguo (sviluppo) vantaggio di tempo"
+
+#: pgn.cpp:1068
+msgid " White has a moderate time ( development ) advantage"
+msgstr " i Bianchi hanno un moderato (sviluppo) vantaggio di tempo"
+
+#: pgn.cpp:1071
+msgid " Black has a moderate time ( development ) advantage"
+msgstr " i Neri hanno un moderato (sviluppo) vantaggio di tempo"
+
+#: pgn.cpp:1074
+msgid " White has a decisive time ( development ) advantage"
+msgstr " i Bianchi hanno un decisivo (sviluppo) vantaggio di tempo"
+
+#: pgn.cpp:1077
+msgid " Black has a decisive time ( development ) advantage"
+msgstr " i Neri hanno un decisivo (sviluppo) vantaggio di tempo"
+
+#: pgn.cpp:1080
+msgid " White has the initiative"
+msgstr "i Bianchi hanno l'iniziativa"
+
+#: pgn.cpp:1083
+msgid " Black has the initiative"
+msgstr " i Neri hanno l'iniziativa"
+
+#: pgn.cpp:1086
+msgid " White has a lasting initiative"
+msgstr " i Bianchi hanno un'iniziativa duratura"
+
+#: pgn.cpp:1089
+msgid " Black has a lasting initiative"
+msgstr " i Neri hanno un'iniziativa duratura"
+
+#: pgn.cpp:1092
+msgid " White has the attack"
+msgstr " I Bianchi hanno l'attacco"
+
+#: pgn.cpp:1095
+msgid " Black has the attack"
+msgstr " I Neri hanno l'attacco"
+
+#: pgn.cpp:1098
+msgid " White has insufficient compensation for material deficit"
+msgstr ""
+" i Bianchi hanno un'insufficiente compensazione per la perdita dei pezzi"
+
+#: pgn.cpp:1101
+msgid " Black has insufficient compensation for material deficit"
+msgstr " i Neri hanno un'insufficiente compensazione per la perdita dei pezzi"
+
+#: pgn.cpp:1104
+msgid " White has sufficient compensation for material deficit"
+msgstr ""
+" i Bianchi hanno una sufficiente compensazione per la perdita dei pezzi"
+
+#: pgn.cpp:1107
+msgid " Black has sufficient compensation for material deficit"
+msgstr " i Neri hanno una sufficiente compensazione per la perdita dei pezzi"
+
+#: pgn.cpp:1110
+msgid " White has more than adequate compensation for material deficit"
+msgstr ""
+" i Bianchi hanno più che adeguata compensazione per la perdita dei pezzi"
+
+#: pgn.cpp:1113
+msgid " Black has more than adequate compensation for material deficit"
+msgstr " i Neri hanno più che adeguata compensazione per la perdita dei pezzi"
+
+#: pgn.cpp:1116
+msgid " White has a slight center control advantage"
+msgstr " i Bianchi hanno un esile vantaggio sul controllo centrale"
+
+#: pgn.cpp:1119
+msgid " Black has a slight center control advantage"
+msgstr " i Neri hanno un esile vantaggio sul controllo centrale"
+
+#: pgn.cpp:1122
+msgid " White has a moderate center control advantage"
+msgstr " i Bianchi hanno un moderato vantaggio sul controllo centrale"
+
+#: pgn.cpp:1125
+msgid " Black has a moderate center control advantage"
+msgstr " i Neri hanno un moderato vantaggio sul controllo centrale"
+
+#: pgn.cpp:1128
+msgid " White has a decisive center control advantage"
+msgstr " i Bianchi hanno un decisivo vantaggio sul controllo centrale"
+
+#: pgn.cpp:1131
+msgid " Black has a decisive center control advantage"
+msgstr " i Neri hanno un decisivo vantaggio sul controllo centrale"
+
+#: pgn.cpp:1134
+msgid " White has a slight kingside control advantage"
+msgstr " i Bianchi hanno un esile vantaggio sul controllo lato Rè"
+
+#: pgn.cpp:1137
+msgid " Black has a slight kingside control advantage"
+msgstr " i Neri hanno un esile vantaggio sul controllo lato Rè"
+
+#: pgn.cpp:1140
+msgid " White has a moderate kingside control advantage"
+msgstr " i Bianchi hanno un moderato vantaggio sul controllo lato Rè"
+
+#: pgn.cpp:1143
+msgid " Black has a moderate kingside control advantage"
+msgstr " i Neri hanno un moderato vantaggio sul controllo lato Rè"
+
+#: pgn.cpp:1146
+msgid " White has a decisive kingside control advantage"
+msgstr " i Bianchi hanno un decisivo vantaggio sul controllo lato Rè"
+
+#: pgn.cpp:1149
+msgid " Black has a decisive kingside control advantage"
+msgstr " i Neri hanno un decisivo vantaggio sul controllo lato Rè"
+
+#: pgn.cpp:1152
+msgid " White has a slight queenside control advantage"
+msgstr " i Bianchi hanno un esiguo vantaggio sul controllo lato Regina"
+
+#: pgn.cpp:1155
+msgid " Black has a slight queenside control advantage"
+msgstr " i Neri hanno un esiguo vantaggio sul controllo lato Regina"
+
+#: pgn.cpp:1158
+msgid " White has a moderate queenside control advantage"
+msgstr " i Bianchi hanno un moderato vantaggio sul controllo lato Regina"
+
+#: pgn.cpp:1161
+msgid " Black has a moderate queenside control advantage"
+msgstr " i Neri hanno un moderato vantaggio sul controllo lato Regina"
+
+#: pgn.cpp:1164
+msgid " White has a decisive queenside control advantage"
+msgstr " i Bianchi hanno un decisivo vantaggio sul controllo lato Regina"
+
+#: pgn.cpp:1167
+msgid " Black has a decisive queenside control advantage"
+msgstr " i Neri hanno un decisivo vantaggio sul controllo lato Regina"
+
+#: pgn.cpp:1170
+msgid " White has a vulnerable first rank"
+msgstr " i Bianchi hanno le prime case vulnerabili"
+
+#: pgn.cpp:1173
+msgid " Black has a vulnerable first rank"
+msgstr " i Neri hanno le prime case vulnerabili"
+
+#: pgn.cpp:1176
+msgid " White has a well protected first rank"
+msgstr " i Bianchi hanno le prime case ben protette"
+
+#: pgn.cpp:1179
+msgid " Black has a well protected first rank"
+msgstr " i Neri hanno le prime case ben protette"
+
+#: pgn.cpp:1182
+msgid " White has a poorly protected king"
+msgstr " i Bianchi hanno il Rè scarsamente protetto"
+
+#: pgn.cpp:1185
+msgid " Black has a poorly protected king"
+msgstr " i Neri hanno il Rè scarsamente protetto"
+
+#: pgn.cpp:1188
+msgid " White has a well protected king"
+msgstr " i Bianchi hanno il Rè ben protetto"
+
+#: pgn.cpp:1191
+msgid " Black has a well protected king"
+msgstr " i Neri hanno il Rè ben protetto"
+
+#: pgn.cpp:1194
+msgid " White has a poorly placed king"
+msgstr " i Bianchi hanno il Rè posizionato male"
+
+#: pgn.cpp:1197
+msgid " Black has a poorly placed king"
+msgstr " i Neri hanno il Rè posizionato male"
+
+#: pgn.cpp:1200
+msgid " White has a well placed king"
+msgstr " i Bianchi hanno il Rè posizionato bene"
+
+#: pgn.cpp:1203
+msgid " Black has a well placed king"
+msgstr " i Neri hanno il Rè posizionato bene"
+
+#: pgn.cpp:1206
+msgid " White has a very weak pawn structure"
+msgstr " i Bianchi hanno una struttura dei pedini veramente resistente"
+
+#: pgn.cpp:1209
+msgid " Black has a very weak pawn structure"
+msgstr " i Neri hanno una struttura dei pedini veramente resistente"
+
+#: pgn.cpp:1212
+msgid " White has a moderately weak pawn structure"
+msgstr " i Bianchi hanno una struttura dei pedini moderatamente debole"
+
+#: pgn.cpp:1215
+msgid " Black has a moderately weak pawn structure"
+msgstr " i Neri hanno una struttura dei pedini moderatamente debole"
+
+#: pgn.cpp:1218
+msgid " White has a moderately strong pawn structure"
+msgstr " i Bianchi hanno una struttura dei pedini moderatamente forte"
+
+#: pgn.cpp:1221
+msgid " Black has a moderately strong pawn structure"
+msgstr " i Neri hanno una struttura dei pedini moderatamente forte"
+
+#: pgn.cpp:1224
+msgid " White has a very strong pawn structure"
+msgstr " i Bianchi hanno una struttura dei pedini veramente forte"
+
+#: pgn.cpp:1227
+msgid " Black has a very strong pawn structure"
+msgstr " i Neri hanno una struttura dei pedini veramente forte"
+
+#: pgn.cpp:1230
+msgid " White has poor knight placement"
+msgstr " i Bianchi hanno posizionato il Rè in maniera povera"
+
+#: pgn.cpp:1233
+msgid " Black has poor knight placement"
+msgstr " i Neri hanno posizionato il Rè in maniera povera"
+
+#: pgn.cpp:1236
+msgid " White has good knight placement"
+msgstr " i Bianchi hanno posizionato il Rè in maniera buona"
+
+#: pgn.cpp:1239
+msgid " Black has good knight placement"
+msgstr " i Neri hanno posizionato il Rè in maniera buona"
+
+#: pgn.cpp:1242
+msgid " White has poor bishop placement"
+msgstr " i Bianchi hanno posizionato l'Alfiere in maniera povera"
+
+#: pgn.cpp:1245
+msgid " Black has poor bishop placement"
+msgstr " i Neri hanno posizionato l'Alfiere in maniera povera"
+
+#: pgn.cpp:1248
+msgid " White has good bishop placement"
+msgstr " i Bianchi hanno posizionato l'Alfiere in maniera buona"
+
+#: pgn.cpp:1251
+msgid " Black has good bishop placement"
+msgstr " i Neri hanno posizionato l'Alfiere in maniera buona"
+
+#: pgn.cpp:1254
+msgid " White has poor rook placement"
+msgstr " i Bianchi hanno posizionato la Torre in maniera debole"
+
+#: pgn.cpp:1257
+msgid " Black has poor rook placement"
+msgstr " i Neri hanno posizionato la Torre in maniera debole"
+
+#: pgn.cpp:1260
+msgid " White has good rook placement"
+msgstr " i Bianchi hanno posizionato la Torre in maniera buona"
+
+#: pgn.cpp:1263
+msgid " Black has good rook placement"
+msgstr " i Neri hanno posizionato la Torre in maniera buona"
+
+#: pgn.cpp:1266
+msgid " White has poor queen placement"
+msgstr " i Bianchi hanno posizionato la Regina in maniera debole"
+
+#: pgn.cpp:1269
+msgid " Black has poor queen placement"
+msgstr " i Neri hanno posizionato la Regina in maniera debole"
+
+#: pgn.cpp:1272
+msgid " White has good queen placement"
+msgstr " i Bianchi hanno posizionato la Regina in maniera buona"
+
+#: pgn.cpp:1275
+msgid " Black has good queen placement"
+msgstr " i Neri hanno posizionato la Regina in maniera buona"
+
+#: pgn.cpp:1278
+msgid " White has poor piece coordination"
+msgstr " i Bianchi hanno una debole coordinazione del pezzo"
+
+#: pgn.cpp:1281
+msgid " Black has poor piece coordination"
+msgstr " i Neri hanno una debole coordinazione del pezzo"
+
+#: pgn.cpp:1284
+msgid " White has good piece coordination"
+msgstr " i Bianchi hanno una buona coordinazione del pezzo"
+
+#: pgn.cpp:1287
+msgid " Black has good piece coordination"
+msgstr " i Neri hanno una buona coordinazione del pezzo"
+
+#: pgn.cpp:1290
+msgid " White has played the opening very poorly"
+msgstr " i Bianchi hanno giocato molto male nell'apertura"
+
+#: pgn.cpp:1293
+msgid " Black has played the opening very poorly"
+msgstr " i Neri hanno giocato molto male nell'apertura"
+
+#: pgn.cpp:1296
+msgid " White has played the opening poorly"
+msgstr " i Bianchi hanno giocato male nell'apertura"
+
+#: pgn.cpp:1299
+msgid " Black has played the opening poorly"
+msgstr " i Neri hanno giocato male nell'apertura"
+
+#: pgn.cpp:1302
+msgid " White has played the opening well"
+msgstr " i Bianchi hanno giocato bene nell'apertura"
+
+#: pgn.cpp:1305
+msgid " Black has played the opening well"
+msgstr " i Neri hanno giocato bene nell'apertura"
+
+#: pgn.cpp:1308
+msgid " White has played the opening very well"
+msgstr " i Bianchi hanno giocato molto bene nell'apertura"
+
+#: pgn.cpp:1311
+msgid " Black has played the opening very well"
+msgstr " i Neri hanno giocato molto bene nell'apertura"
+
+#: pgn.cpp:1314
+msgid " White has played the middlegame very poorly"
+msgstr " i Bianchi hanno giocato molto male nel medio gioco"
+
+#: pgn.cpp:1317
+msgid " Black has played the middlegame very poorly"
+msgstr " i Neri hanno giocato molto male nel medio gioco"
+
+#: pgn.cpp:1320
+msgid " White has played the middlegame poorly"
+msgstr " i Bianchi hanno giocato male nel medio gioco"
+
+#: pgn.cpp:1323
+msgid " Black has played the middlegame poorly"
+msgstr " i Neri hanno giocato male nel medio gioco"
+
+#: pgn.cpp:1326
+msgid " White has played the middlegame well"
+msgstr " i Bianchi hanno giocato bene nel medio gioco"
+
+#: pgn.cpp:1329
+msgid " Black has played the middlegame well"
+msgstr " i Neri hanno giocato bene nel medio gioco"
+
+#: pgn.cpp:1332
+msgid " White has played the middlegame very well"
+msgstr " i Bianchi hanno giocato molto bene nel medio gioco"
+
+#: pgn.cpp:1335
+msgid " Black has played the middlegame very well"
+msgstr " i Neri hanno giocato molto bene nel medio gioco"
+
+#: pgn.cpp:1338
+msgid " White has played the ending very poorly"
+msgstr " i Bianchi hanno giocato molto male verso la fine"
+
+#: pgn.cpp:1341
+msgid " Black has played the ending very poorly"
+msgstr " i Neri hanno giocato molto male verso la fine"
+
+#: pgn.cpp:1344
+msgid " White has played the ending poorly"
+msgstr " i Bianchi hanno giocato male verso la fine"
+
+#: pgn.cpp:1347
+msgid " Black has played the ending poorly"
+msgstr " i Neri hanno giocato male verso la fine"
+
+#: pgn.cpp:1350
+msgid " White has played the ending well"
+msgstr " i Bianchi hanno giocato bene verso la fine"
+
+#: pgn.cpp:1353
+msgid " Black has played the ending well"
+msgstr " i Neri hanno giocato bene verso la fine"
+
+#: pgn.cpp:1356
+msgid " White has played the ending very well"
+msgstr " i Bianchi hanno giocato molto bene verso la fine"
+
+#: pgn.cpp:1359
+msgid " Black has played the ending very well"
+msgstr " i Neri hanno giocato molto bene verso la fine"
+
+#: pgn.cpp:1362
+msgid " White has slight counterplay"
+msgstr " i Bianchi hanno un esiguo contrattacco"
+
+#: pgn.cpp:1365
+msgid " Black has slight counterplay"
+msgstr " i Neri hanno un esiguo contrattacco"
+
+#: pgn.cpp:1368
+msgid " White has moderate counterplay"
+msgstr " i Bianchi hanno un moderato contrattacco"
+
+#: pgn.cpp:1371
+msgid " Black has moderate counterplay"
+msgstr " i Neri hanno un moderato contrattacco"
+
+#: pgn.cpp:1374
+msgid " White has decisive counterplay"
+msgstr " i Bianchi hanno un decisivo contrattacco"
+
+#: pgn.cpp:1377
+msgid " Black has decisive counterplay"
+msgstr " i Neri hanno un decisivo contrattacco"
+
+#: pgn.cpp:1380
+msgid " White has moderate time control pressure"
+msgstr ""
+
+#: pgn.cpp:1383
+msgid " Black has moderate time control pressure"
+msgstr ""
+
+#: pgn.cpp:1386
+msgid " White has severe time control pressure"
+msgstr ""
+
+#: pgn.cpp:1389
+msgid " Black has severe time control pressure"
+msgstr ""
+
+#: pgn.cpp:1391
+msgid " With the idea..."
+msgstr " Con l'idea..."
+
+#: pgn.cpp:1394
+msgid " Aimed against..."
+msgstr " Puntato contro..."
+
+#: pgn.cpp:1397
+msgid " Better Move"
+msgstr " Mossa migliore"
+
+#: pgn.cpp:1400
+msgid " Worse Move"
+msgstr " Pessima mossa"
+
+#: pgn.cpp:1403
+msgid " Equivalent move"
+msgstr " Mossa equivalente"
+
+#: pgn.cpp:1406
+msgid " Editor's Remark"
+msgstr "Osservazione dell'editore"
+
+#: pgn.cpp:1409
+msgid " Novelty"
+msgstr " Novità"
+
+#: pgn.cpp:1412
+msgid " Weak point"
+msgstr " Punto debole"
+
+#: pgn.cpp:1415
+msgid " Endgame"
+msgstr " Fine gioco"
+
+#: pgn.cpp:1418
+msgid " Line"
+msgstr " Linea"
+
+#: pgn.cpp:1421
+msgid " Diagonal"
+msgstr " Diagonale"
+
+#: pgn.cpp:1424
+msgid " White has a pair of Bishops"
+msgstr " i Bianchi hanno una coppia di Alfieri"
+
+#: pgn.cpp:1427
+msgid " Black has a pair of Bishops"
+msgstr " i Neri hanno una coppia di Alfieri"
+
+#: pgn.cpp:1430
+msgid " Bishops of opposite color"
+msgstr " Alfieri del colore opposto"
+
+#: pgn.cpp:1433
+msgid " Bishops of same color"
+msgstr "Alfieri dello stesso colore"
+
+#: pgn.cpp:1436
+msgid " Etc."
+msgstr " Ecc."
+
+#: pgn.cpp:1439
+msgid " Doubled pawns"
+msgstr " Pedini doppi"
+
+#: pgn.cpp:1442
+msgid " Isolated pawn"
+msgstr " Pedino isolato"
+
+#: pgn.cpp:1445
+msgid " Connected pawns"
+msgstr " Pedini collegati"
+
+#: pgn.cpp:1448
+msgid " Hanging pawns"
+msgstr " Pedini sospesi"
+
+#: pgn.cpp:1451
+msgid " Backwards pawn"
+msgstr " Pedino arretrato"
+
+#: setpageaudio.cpp:28
+msgid "enable Audio"
+msgstr "Attiva l'audio"
+
+#: setpageaudio.cpp:36
+msgid "Audio Themes"
+msgstr "Temi sonori"
+
+#: setpageaudio.cpp:47
+msgid "Volume"
+msgstr "Volume"
+
+#: setpageaudio.cpp:48
+msgid "Maximum"
+msgstr "Massimo"
+
+#: setpageaudio.cpp:52
+msgid "Minimum"
+msgstr "Minimo"
+
+#: setpageaudio.cpp:55
+msgid "For Current Match Only"
+msgstr "Unicamente per la partita corrente"
+
+#: setpagedisplay.cpp:74
+msgid "Board Themes"
+msgstr "Temi della scacchiera"
+
+#: setpagedisplay.cpp:79
+msgid "Chessman Themes"
+msgstr "Tema degli scacchi"
+
+#: setpagedisplay.cpp:85
+msgid "Theme Size"
+msgstr "Dimensione tema"
+
+#: setpagedisplay.cpp:88
+msgid "Small"
+msgstr "Piccolo"
+
+#: setpagedisplay.cpp:95
+msgid "Large"
+msgstr "Grande"
+
+#: setpagedisplay.cpp:99
+msgid "Other Display Options"
+msgstr "Ulteriori opzioni relative all'aspetto"
+
+#: setpagedisplay.cpp:102
+msgid "Reverse Board Orientation"
+msgstr "Inverti la scacchiera"
+
+#: setpagedisplay.cpp:107
+msgid "Display Startup Logo"
+msgstr "Mostra logo all'avvio"
+
+#: setpagedisplay.cpp:112
+msgid "Automatic Preview"
+msgstr "Anteprima automatica"
+
+#: setpagedisplay.cpp:117
+msgid "Show Last Move"
+msgstr "Mostra l'ultima mossa"
+
+#: setpagedisplay.cpp:122
+msgid "Animate Moves"
+msgstr "Anima le mosse"
+
+#: setpagedisplay.cpp:127
+msgid "Show Coordinates"
+msgstr "Mostra le coordinate"
+
+#: setpagedisplay.cpp:161
+msgid "Restore Defaults"
+msgstr "Ripristina valori predefiniti"
+
+#: setpagedisplay.cpp:165
+msgid "Standard Font..."
+msgstr "Carattere predefinito..."
+
+#: setpagedisplay.cpp:174
+msgid "Private Font..."
+msgstr "Carattere privato..."
+
+#: setpagedisplay.cpp:183
+msgid "Channel Font..."
+msgstr "Carattere canale..."
+
+#: setpagedisplay.cpp:192
+msgid "Shout Font..."
+msgstr "Carattere dell'urlo..."
+
+#: setpagedisplay.cpp:201
+msgid "Whisper Font..."
+msgstr "Carattere del bisbiglio..."
+
+#: setpagedisplay.cpp:210
+msgid "Notification Font..."
+msgstr "Carattere notifica..."
+
+#: setpagedisplay.cpp:225
+msgid "Console"
+msgstr "Console"
+
+#: setpagedisplay.cpp:519
+msgid "Standard"
+msgstr "Standard"
+
+#: setpagedisplay.cpp:520
+msgid "Private Tell"
+msgstr "Comunicazione privata"
+
+#: setpagedisplay.cpp:521
+msgid "Channel Tell"
+msgstr "Comunicazione in canale"
+
+#: setpagedisplay.cpp:522
+msgid "Shout"
+msgstr "Urlo"
+
+#: setpagedisplay.cpp:524
+msgid "Notification"
+msgstr "Notifica"
+
+#: setpageengines.cpp:33
+msgid "Engines to Play White"
+msgstr "Motori per giocare come Bianchi"
+
+#: setpageengines.cpp:36 setpageengines.cpp:48
+msgid "enable Book Engine"
+msgstr "Attiva libri di sistema"
+
+#: setpageengines.cpp:45
+msgid "Engines to Play Black"
+msgstr "Motori per giocare come Neri"
+
+#: setpageengines.cpp:57
+msgid "Chess Engines"
+msgstr "Motori scacchistici"
+
+#: setpageengines.cpp:62 setpageservers.cpp:69 tab_seeklist.cpp:27
+msgid "Name"
+msgstr "Nome"
+
+#: setpageengines.cpp:64
+msgid "Wins"
+msgstr "Vinte"
+
+#: setpageengines.cpp:65
+msgid "Losses"
+msgstr "Perse"
+
+#: setpageengines.cpp:66
+msgid "Draws"
+msgstr "Ritiri"
+
+#: setpageengines.cpp:73 setpageservers.cpp:77
+msgid "&Add..."
+msgstr "&Aggiungi..."
+
+#: setpageengines.cpp:74 setpageservers.cpp:78
+msgid "&Modify..."
+msgstr "&Modifica..."
+
+#: setpageengines.cpp:75 setpageservers.cpp:79
+msgid "&Delete..."
+msgstr "&Elimina..."
+
+#: setpagegeneral.cpp:29
+msgid "Your Name:"
+msgstr "Il vostro nome:"
+
+#: setpagegeneral.cpp:36
+msgid "When Knights Begins It Should:"
+msgstr "Quando Knights è avviato:"
+
+#: setpagegeneral.cpp:38
+msgid "Do Nothing"
+msgstr "Non far nulla"
+
+#: setpagegeneral.cpp:39
+msgid "Start a Match vs. PC"
+msgstr "Avvia una partita contro il PC"
+
+#: setpagegeneral.cpp:40
+msgid "Connect to ICS"
+msgstr "Collegati a ICS"
+
+#: setpagegeneral.cpp:48
+msgid "Save Match on Close?"
+msgstr "Salvare le partite in chiusura?"
+
+#: setpagegeneral.cpp:52
+msgid "Ask"
+msgstr "Chiedi"
+
+#: setpagegeneral.cpp:62
+msgid "Append to Save File:"
+msgstr "Aggiungere informazioni al file:"
+
+#: setpagegeneral.cpp:65
+msgid "Append to Save File"
+msgstr "Aggiungere al file"
+
+#: setpagegeneral.cpp:79
+msgid "Pause on Minimize"
+msgstr "Metti in pausa quando minimizzato"
+
+#: setpagegeneral.cpp:85
+msgid "Always Promote to Queen"
+msgstr "Promuovi sempre la regina"
+
+#: setpagegeneral.cpp:91
+msgid "Call Flag Automatically"
+msgstr "Chiama bandiera automaticamente"
+
+#: setpageservers.cpp:56
+msgid "Current Server"
+msgstr "Server corrente"
+
+#: setpageservers.cpp:70
+msgid "URL"
+msgstr "URL"
+
+#: setpageservers.cpp:90
+msgid "Servers"
+msgstr "Server"
+
+#: setpageservers.cpp:106
+msgid "Profanity Filter"
+msgstr "Filtro di profanity"
+
+#: setpageservers.cpp:110
+msgid "Filter Everything"
+msgstr "Filtra qualsiasi cosa"
+
+#: setpageservers.cpp:110
+msgid "No Filtering"
+msgstr "Nessun filtro"
+
+#: setpageservers.cpp:115
+msgid "Automatically Close Previous ICS Match"
+msgstr "Chiudi automaticamente la precedente partita ICS"
+
+#: setpageservers.cpp:120
+msgid "Private Matches"
+msgstr "Partite private"
+
+#: setpageservers.cpp:124
+msgid "enable Premove"
+msgstr "Mosse anticipate"
+
+#: setpageservers.cpp:128
+msgid "enable Kibitzes"
+msgstr "Attiva Kibitzes"
+
+#: setpageservers.cpp:132
+msgid "enable Unregistered Tells"
+msgstr "Attiva commenti non registrati"
+
+#: setpageservers.cpp:136
+msgid "enable Shouts"
+msgstr "Attiva urli"
+
+#: setpageservers.cpp:140
+msgid "enable Seeks"
+msgstr "Attiva ricerche"
+
+#: setpageservers.cpp:150
+msgid "Seconds Between Seek Updates"
+msgstr "Secondi tra gli aggiornamenti della ricerca"
+
+#: tab_seeklist.cpp:29
+msgid "Match Type"
+msgstr "Tipo di partita"
+
+#: tab_seeklist.cpp:30
+msgid "Is Rated?"
+msgstr "E' classificato?"
+
+#: tabbox.cpp:163
+msgid "%1 - Knights"
+msgstr "%1 - Knights"
+
+#: wiz_setup.cpp:51
+msgid "Knights Setup Wizard"
+msgstr "Configurazione guidata di Knights"
+
+#: wiz_setup.cpp:74
+msgid ""
+"Thank you for installing Knights, the graphical chess interface for KDE. To "
+"help you get started quickly, there are a few things Knights will need to "
+"setup. You should click 'Next' to see what they are."
+msgstr ""
+"Vi ringraziamo per aver installato Knights, l'applicazione per giocare a "
+"scacchi per KDE. Per aiutarvi in una partenza rapida, ci sono alcune cose "
+"che Knights deve configurare. Premete il pulsante 'Successivo' per inserire "
+"le informazioni richieste. Se preferite configurare da soli Knights, premete "
+"il pulsante 'Annulla'."
+
+#: wiz_setup.cpp:77
+msgid "Welcome to Knights v%1!"
+msgstr "Benvenuto in Knights v%1!"
+
+#: wiz_setup.cpp:97
+#, fuzzy
+msgid ""
+"When Knights saves a match to disk, it uses Portable Game Notation (PGN) to "
+"store the match. Several other computer chess games use PGN too. If you "
+"like, Knights can be the default PGN viewer on this system."
+msgstr ""
+"Quando Knights un gioco sul disco, utilizza il formato Portable Game "
+"Notation (PGN). Moltissimi altri programmi di scacchi per computer "
+"utilizzano PGN. Se desideri,Knights può essere il visualizzatore predefinito "
+"su questo sistema per PGN."
+
+#: wiz_setup.cpp:100
+msgid "Let Knights handle PGN files?"
+msgstr "Lasciate gestire a Knights i file PGN?"
+
+#: wiz_setup.cpp:106
+msgid "Let Knights handle your .pgn files?"
+msgstr "Lascia che Knights gestisca i tuoi file .pgn?"
+
+#: wiz_setup.cpp:125
+#, fuzzy
+msgid ""
+"Knights can not play a chess match against you without help. Known as Chess "
+"Engines, these helpers can be found on the Internet and are often included "
+"with your distribution. Knights can look for Chess Engines that you may "
+"already have. If found, Knights will configure itself to use them."
+msgstr ""
+"Knights non può giocare un gioco di scacchi contro te senza aiuto. "
+"Conosciuti come motori scacchistici, questi aiuti possono essere trovati su "
+"Internet e sono spesso inclusi con la tua distribuzione. Knights può cercare "
+"automaticamente se li hai installati. Una volta trovati, Knights li "
+"configurerà per l'utilizzo."
+
+#: wiz_setup.cpp:128 wiz_setup.cpp:134
+msgid "Let Knights search for chess engines?"
+msgstr "Ricerca automatica di sistemi scacchistici?"
+
+#: wiz_setup.cpp:153
+msgid ""
+"In order for you to play chess online, Knights will have to connect to a "
+"chess server. Knights has a list of several of these servers. If you like, "
+"this list can be used to automatically configure Knights."
+msgstr ""
+"Per giocare a scacchi online, Knights deve collegarsi ad un server per gli "
+"scacchi. Knights ha una lista con alcuni di questi. Se desideri, questa "
+"lista può essere utilizzata per configurare automaticamente Knights."
+
+#: wiz_setup.cpp:156 wiz_setup.cpp:162
+msgid "Let Knights configure chess servers?"
+msgstr "Configurazione automatica dei server?"
+
+#: wiz_setup.cpp:181
+msgid ""
+"Knights has now configured itself according to your choices. We strongly "
+"recommend that you read the documentation to make full use of all that "
+"Knights has to offer. You can access it by pressing F1."
+msgstr ""
+"Knights è stato configurato secondo le tue preferenze. Ti raccomandiamo di "
+"leggere la documentazione per poter utilizzare a pieno ciò che Knights "
+"offre. Puoi visualizzarla ora premento il tasto F1."
+
+#: wiz_setup.cpp:184
+msgid "Setup Complete"
+msgstr "Impostazioni completate"
+
+#: wiz_setup.cpp:213
+msgid "Do you accept the terms of our license?"
+msgstr "Accetti i termini della nostra licenza?"
+
+#: wiz_setup.cpp:218
+msgid "Please read and accept our license:"
+msgstr "Per piacere, leggi e accetta la nostra licenza:"
+
+#: wiz_setup.cpp:269
+msgid "Free Internet Chess Server"
+msgstr "Free Internet Chess Server"
+
+#: wiz_setup.cpp:269
+msgid "Internet Chess Club"
+msgstr "Internet Chess Club"
+
+#: wiz_setup.cpp:269
+msgid "Global Chess Server"
+msgstr "Global Chess Server"
+
+#: wiz_setup.cpp:269
+msgid "Chess.Net"
+msgstr "Chess.Net"
+
+#: wiz_setup.cpp:270
+msgid "Chess-Square.Com"
+msgstr "Chess-Square.Com"
+
+#: wiz_setup.cpp:270
+msgid "Australian FICS"
+msgstr "FICS Australiano"
+
+#: wiz_setup.cpp:270
+msgid "Brazilian FICS"
+msgstr "FICS Brasiliano"
+
+#: wiz_setup.cpp:270
+msgid "Chilean FICS"
+msgstr "FICS Cileno"
+
+#: wiz_setup.cpp:271
+msgid "Croatian FICS"
+msgstr "FICS Croato"
+
+#: wiz_setup.cpp:271
+msgid "Dutch FICS"
+msgstr "FICS Olandese"
+
+#: wiz_setup.cpp:271
+msgid "French FICS"
+msgstr "FICS Francese"
+
+#: wiz_setup.cpp:271
+msgid "German FICS"
+msgstr "FICS Tedesco"
+
+#: wiz_setup.cpp:271
+msgid "Swedish FICS"
+msgstr "FICS Svedese"
+
+#: proto_xboard.cpp:443
+msgid ""
+"%1 suggests this move:\n"
+"%2"
+msgstr ""
+"%1 suggerisce questa mossa:\n"
+"%2"
+
+#: proto_xboard.cpp:465 proto_xboard.cpp:472 proto_xboard.cpp:479
+msgid ""
+"%1 tells you:\n"
+"%2"
+msgstr ""
+"%1 dice:\n"
+"%2"
+
+#~ msgid "Save Game?"
+#~ msgstr "Salva gioco?"
+
+#~ msgid "Save Game..."
+#~ msgstr "Salva gioco..."
+
+#~ msgid " Game paused"
+#~ msgstr " Gioco in pausa"
+
+#~ msgid "Hint:"
+#~ msgstr "Suggerimento:"
+
+#~ msgid "Server Login Failed"
+#~ msgstr "Autenticazione al server fallita"
+
+#~ msgid "White's Time Controls"
+#~ msgstr "Controlli dei tempi per i Bianchi"
+
+#~ msgid "Black's Time Controls"
+#~ msgstr "Controlli dei tempi per i Neri"
+
+#~ msgid ""
+#~ "Knights can not find %1.\n"
+#~ "Please make sure the address was entered correctly and that you are "
+#~ "connected to the internet."
+#~ msgstr ""
+#~ "Knights non può trovare %1.\n"
+#~ "Per piacere, assicurati che l'indirizzo era stato inserito correttamente "
+#~ "e che sei attualmente collegato a Internet."
+
+#~ msgid "&Solitaire Chess"
+#~ msgstr "Scacchi &solitari"
+
+#~ msgid "&Computer vs. Computer"
+#~ msgstr "&Computer contro computer"
+
+#~ msgid "&Save Game"
+#~ msgstr "&Salva partita"
+
+#~ msgid "Console - Knights"
+#~ msgstr "Console - Knights"
+
+#~ msgid "Red Hat Binary RPMs"
+#~ msgstr "Pacchetti RPM per Red Hat"
+
+#~ msgid "Early Beta Testing"
+#~ msgstr "Iniziali fase di beta test"
+
+#~ msgid "Would you like to email this move?"
+#~ msgstr "Desideri inviare tramite posta elettronica questa mossa?"
+
+#~ msgid "Send Email?"
+#~ msgstr "Invia posta elettronica?"
+
+#~ msgid "High Quality"
+#~ msgstr "Alta qualità"
+
+#~ msgid "Console Orientation"
+#~ msgstr "Orientamento console"
+
+#~ msgid "GNUChess"
+#~ msgstr "GNUChess"
+
+#~ msgid "Crafty"
+#~ msgstr "Crafty"
+
+#~ msgid "BabyChess"
+#~ msgstr "BabyChess"
+
+#~ msgid "pgn"
+#~ msgstr "pgn"
diff --git a/po/knights.pot b/po/knights.pot
new file mode 100644
index 0000000..29f36d3
--- /dev/null
+++ b/po/knights.pot
@@ -0,0 +1,2048 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2003-03-02 12:02-0600\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=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: setpageengines.cpp:33
+msgid "Engines to Play White"
+msgstr ""
+
+#: setpageengines.cpp:36 setpageengines.cpp:48
+msgid "Enable Book Engine"
+msgstr ""
+
+#: setpageengines.cpp:45
+msgid "Engines to Play Black"
+msgstr ""
+
+#: setpageengines.cpp:57
+msgid "Chess Engines"
+msgstr ""
+
+#: setpageengines.cpp:62 setpageservers.cpp:69 tab_seeklist.cpp:27
+msgid "Name"
+msgstr ""
+
+#: setpageengines.cpp:63 dlg_engine.cpp:43
+msgid "Protocol"
+msgstr ""
+
+#: setpageengines.cpp:64
+msgid "Wins"
+msgstr ""
+
+#: setpageengines.cpp:65
+msgid "Losses"
+msgstr ""
+
+#: setpageengines.cpp:66
+msgid "Draws"
+msgstr ""
+
+#: setpageengines.cpp:73 setpageservers.cpp:77
+msgid "&Add..."
+msgstr ""
+
+#: setpageengines.cpp:74 setpageservers.cpp:78
+msgid "&Modify..."
+msgstr ""
+
+#: setpageengines.cpp:75 setpageservers.cpp:79
+msgid "&Delete..."
+msgstr ""
+
+#: setpageservers.cpp:56
+msgid "Current Server"
+msgstr ""
+
+#: setpageservers.cpp:65 dlg_settings.cpp:76
+msgid "Chess Servers"
+msgstr ""
+
+#: setpageservers.cpp:70
+msgid "URL"
+msgstr ""
+
+#: setpageservers.cpp:90
+msgid "Servers"
+msgstr ""
+
+#: setpageservers.cpp:106
+msgid "Profanity Filter"
+msgstr ""
+
+#: setpageservers.cpp:110
+msgid "Filter Everything"
+msgstr ""
+
+#: setpageservers.cpp:110
+msgid "No Filtering"
+msgstr ""
+
+#: setpageservers.cpp:115
+msgid "Automatically Close Previous ICS Match"
+msgstr ""
+
+#: setpageservers.cpp:120
+msgid "Private Matches"
+msgstr ""
+
+#: setpageservers.cpp:124
+msgid "Enable Premove"
+msgstr ""
+
+#: setpageservers.cpp:128
+msgid "Enable Kibitzes"
+msgstr ""
+
+#: setpageservers.cpp:132
+msgid "Enable Unregistered Tells"
+msgstr ""
+
+#: setpageservers.cpp:136
+msgid "Enable Shouts"
+msgstr ""
+
+#: setpageservers.cpp:140
+msgid "Enable Seeks"
+msgstr ""
+
+#: setpageservers.cpp:146 dlg_newmatch.cpp:97 dlg_newmatch.cpp:114
+#: tab_seeklist.cpp:102 dlg_challenge.cpp:61 dlg_challenge.cpp:70
+msgid " sec."
+msgstr ""
+
+#: setpageservers.cpp:150
+msgid "Seconds Between Seek Updates"
+msgstr ""
+
+#: wiz_setup.cpp:51
+msgid "Knights Setup Wizard"
+msgstr ""
+
+#: wiz_setup.cpp:74
+msgid ""
+"Thank you for installing Knights, the graphical chess interface for KDE. To "
+"help you get started quickly, there are a few things Knights will need to "
+"setup. You should click 'Next' to see what they are."
+msgstr ""
+
+#: wiz_setup.cpp:77
+msgid "Welcome to Knights v%1!"
+msgstr ""
+
+#: wiz_setup.cpp:97
+msgid ""
+"When Knights saves a match to disk, it uses Portable Game Notation (PGN) to "
+"store the match. Several other computer chess games use PGN too. If you "
+"like, Knights can be the default PGN viewer on this system."
+msgstr ""
+
+#: wiz_setup.cpp:100
+msgid "Let Knights handle PGN files?"
+msgstr ""
+
+#: wiz_setup.cpp:106
+msgid "Let Knights handle your .pgn files?"
+msgstr ""
+
+#: wiz_setup.cpp:125
+msgid ""
+"Knights can not play a chess match against you without help. Known as Chess "
+"Engines, these helpers can be found on the Internet and are often included "
+"with your distribution. Knights can look for Chess Engines that you may "
+"already have. If found, Knights will configure itself to use them."
+msgstr ""
+
+#: wiz_setup.cpp:128 wiz_setup.cpp:134
+msgid "Let Knights search for chess engines?"
+msgstr ""
+
+#: wiz_setup.cpp:153
+msgid ""
+"In order for you to play chess online, Knights will have to connect to a "
+"chess server. Knights has a list of several of these servers. If you like, "
+"this list can be used to automatically configure Knights."
+msgstr ""
+
+#: wiz_setup.cpp:156 wiz_setup.cpp:162
+msgid "Let Knights configure chess servers?"
+msgstr ""
+
+#: wiz_setup.cpp:181
+msgid ""
+"Knights has now configured itself according to your choices. We strongly "
+"recommend that you read the documentation to make full use of all that "
+"Knights has to offer. You can access it by pressing F1."
+msgstr ""
+
+#: wiz_setup.cpp:184
+msgid "Setup Complete"
+msgstr ""
+
+#: wiz_setup.cpp:213
+msgid "Do you accept the terms of our license?"
+msgstr ""
+
+#: wiz_setup.cpp:218
+msgid "Please read and accept our license:"
+msgstr ""
+
+#: wiz_setup.cpp:269
+msgid "Free Internet Chess Server"
+msgstr ""
+
+#: wiz_setup.cpp:269
+msgid "Internet Chess Club"
+msgstr ""
+
+#: wiz_setup.cpp:269
+msgid "Global Chess Server"
+msgstr ""
+
+#: wiz_setup.cpp:269
+msgid "Chess.Net"
+msgstr ""
+
+#: wiz_setup.cpp:270
+msgid "Chess-Square.Com"
+msgstr ""
+
+#: wiz_setup.cpp:270
+msgid "Australian FICS"
+msgstr ""
+
+#: wiz_setup.cpp:270
+msgid "Brazilian FICS"
+msgstr ""
+
+#: wiz_setup.cpp:270
+msgid "Chilean FICS"
+msgstr ""
+
+#: wiz_setup.cpp:271
+msgid "Croatian FICS"
+msgstr ""
+
+#: wiz_setup.cpp:271
+msgid "Dutch FICS"
+msgstr ""
+
+#: wiz_setup.cpp:271
+msgid "French FICS"
+msgstr ""
+
+#: wiz_setup.cpp:271
+msgid "German FICS"
+msgstr ""
+
+#: wiz_setup.cpp:271
+msgid "Swedish FICS"
+msgstr ""
+
+#: knights.cpp:70 main.cpp:34
+msgid "Knights"
+msgstr ""
+
+#: knights.cpp:247
+msgid "&Draw"
+msgstr ""
+
+#: knights.cpp:251
+msgid "&Retract Move"
+msgstr ""
+
+#: knights.cpp:253
+msgid "Select this to retract your last move."
+msgstr ""
+
+#: knights.cpp:255
+msgid "Resign"
+msgstr ""
+
+#: knights.cpp:257
+msgid "Use this to concede the match to your opponent."
+msgstr ""
+
+#: knights.cpp:259
+msgid "&Call Flag"
+msgstr ""
+
+#: knights.cpp:261
+msgid ""
+"Use this to declare the match over, due to your opponent being out of time."
+msgstr ""
+
+#: knights.cpp:263
+msgid "&Hint"
+msgstr ""
+
+#: knights.cpp:265
+msgid "This will ask your opponent for a hint."
+msgstr ""
+
+#: knights.cpp:267
+msgid "Move &Now"
+msgstr ""
+
+#: knights.cpp:269
+msgid "Clicking this option will force your opponent to move immediately."
+msgstr ""
+
+#: knights.cpp:271
+msgid "&Flip View"
+msgstr ""
+
+#: knights.cpp:273
+msgid "This will reverse the chessboard's orientation by 180 degrees."
+msgstr ""
+
+#: knights.cpp:275
+msgid "&Ponder"
+msgstr ""
+
+#: knights.cpp:278
+msgid "This toggles your opponent's ability to think while it's your turn."
+msgstr ""
+
+#: knights.cpp:282 knights.cpp:918
+msgid "Pause"
+msgstr ""
+
+#: knights.cpp:284
+msgid "Select this to pause the clock for this match."
+msgstr ""
+
+#: knights.cpp:289
+msgid "&Offer Draw"
+msgstr ""
+
+#: knights.cpp:290
+msgid ""
+"Clicking this will inform your opponent that you are willing draw the match."
+msgstr ""
+
+#: knights.cpp:292
+msgid "&Accept Draw"
+msgstr ""
+
+#: knights.cpp:293
+msgid "Clicking this will accept a draw offered by your opponent."
+msgstr ""
+
+#: knights.cpp:295
+msgid "&Reject Draw"
+msgstr ""
+
+#: knights.cpp:296
+msgid "Clicking this will reject a draw offered by your opponent."
+msgstr ""
+
+#: knights.cpp:298
+msgid "&Ignore Draw"
+msgstr ""
+
+#: knights.cpp:299
+msgid "Clicking this will ignore future draw offers from your opponent."
+msgstr ""
+
+#: knights.cpp:305
+msgid "&New Match..."
+msgstr ""
+
+#: knights.cpp:306
+msgid "This allows you to begin a new match."
+msgstr ""
+
+#: knights.cpp:309
+msgid "&Load Match..."
+msgstr ""
+
+#: knights.cpp:310
+msgid ""
+"The Load command will allow you to select a previously saved match and play "
+"it again."
+msgstr ""
+
+#: knights.cpp:314 thinbuttons.cpp:32
+msgid "&Save Match"
+msgstr ""
+
+#: knights.cpp:316 knights.cpp:321
+msgid ""
+"The Save command will allow you to store a copy of your current match for "
+"later use."
+msgstr ""
+
+#: knights.cpp:319 thinbuttons.cpp:34
+msgid "Save Match &As..."
+msgstr ""
+
+#: knights.cpp:325 knights.cpp:841
+msgid "Connect to Server"
+msgstr ""
+
+#: knights.cpp:326
+msgid "Clicking this will connect Knights with an internet chess server."
+msgstr ""
+
+#: knights.cpp:330 thinbuttons.cpp:37
+msgid "&Print Notation..."
+msgstr ""
+
+#: knights.cpp:332
+msgid ""
+"The Print command will allow you to print this game's notation on your "
+"printer."
+msgstr ""
+
+#: knights.cpp:336 thinbuttons.cpp:40
+msgid "&Close Match"
+msgstr ""
+
+#: knights.cpp:338
+msgid "This command removes the current match."
+msgstr ""
+
+#: knights.cpp:340
+msgid "Close All"
+msgstr ""
+
+#: knights.cpp:342
+msgid "This command will remove all matches that are currently loaded."
+msgstr ""
+
+#: knights.cpp:347
+msgid "The Quit command will stop all matches and exit Knights."
+msgstr ""
+
+#: knights.cpp:352
+msgid "&Install Themes"
+msgstr ""
+
+#: knights.cpp:353
+msgid "This lets you install downloaded themes into Knights."
+msgstr ""
+
+#: knights.cpp:357
+msgid ""
+"Click this if you want to change the keyboard shortcuts that Knights uses."
+msgstr ""
+
+#: knights.cpp:360
+msgid "&Configure Knights..."
+msgstr ""
+
+#: knights.cpp:361
+msgid ""
+"This opens a new window which allows you to customize Knights to your "
+"particular tastes."
+msgstr ""
+
+#: knights.cpp:367
+msgid "Begin a Tutorial"
+msgstr ""
+
+#: knights.cpp:373
+msgid "&Match"
+msgstr ""
+
+#: knights.cpp:562
+msgid "Error with white engine"
+msgstr ""
+
+#: knights.cpp:564
+msgid ""
+"You selected %1 to play white,\n"
+"but it can only be used as a book engine.\n"
+"Please select another engine to play white."
+msgstr ""
+
+#: knights.cpp:565
+msgid "White Engine Problem"
+msgstr ""
+
+#: knights.cpp:568
+msgid "Error with white book engine"
+msgstr ""
+
+#: knights.cpp:570
+msgid ""
+"You selected %1 to play white's book,\n"
+"but it can only be used as a regular engine.\n"
+"Please select another engine to play white's book."
+msgstr ""
+
+#: knights.cpp:571
+msgid "White Book Engine Problem"
+msgstr ""
+
+#: knights.cpp:574
+msgid "Error with black engine"
+msgstr ""
+
+#: knights.cpp:576
+msgid ""
+"You selected %1 to play black,\n"
+"but it can only be used as a book engine.\n"
+"Please select another engine to play black."
+msgstr ""
+
+#: knights.cpp:577
+msgid "Black Engine Problem"
+msgstr ""
+
+#: knights.cpp:580
+msgid "Error with black book engine"
+msgstr ""
+
+#: knights.cpp:582
+msgid ""
+"You selected %1 to play black's book,\n"
+"but it can only be used as a regular engine.\n"
+"Please select another engine to play black's book."
+msgstr ""
+
+#: knights.cpp:583
+msgid "Black Book Engine Problem"
+msgstr ""
+
+#: knights.cpp:586
+msgid "The computer opponent assigned to play %1 has crashed"
+msgstr ""
+
+#: knights.cpp:589
+msgid "There was an error while loading the file"
+msgstr ""
+
+#: knights.cpp:592
+msgid "There was an error while saving the file"
+msgstr ""
+
+#: knights.cpp:596
+msgid "Loading complete"
+msgstr ""
+
+#: knights.cpp:599
+msgid "Saving complete"
+msgstr ""
+
+#: knights.cpp:602
+msgid "Reading File"
+msgstr ""
+
+#: knights.cpp:605
+msgid "Can not move a chessman while reviewing the match"
+msgstr ""
+
+#: knights.cpp:608
+msgid "Illegal Move"
+msgstr ""
+
+#: knights.cpp:611
+msgid "White's turn"
+msgstr ""
+
+#: knights.cpp:614
+msgid "Black's turn"
+msgstr ""
+
+#: knights.cpp:617
+msgid "White wins"
+msgstr ""
+
+#: knights.cpp:620
+msgid "Black wins"
+msgstr ""
+
+#: knights.cpp:623
+msgid "Checkmate, White wins"
+msgstr ""
+
+#: knights.cpp:626
+msgid "Checkmate, Black wins"
+msgstr ""
+
+#: knights.cpp:629
+msgid "White resigns"
+msgstr ""
+
+#: knights.cpp:632
+msgid "Black resigns"
+msgstr ""
+
+#: knights.cpp:635
+msgid "White's flag fell"
+msgstr ""
+
+#: knights.cpp:638
+msgid "Black's flag fell"
+msgstr ""
+
+#: knights.cpp:641
+msgid "Black's flag was called, White wins"
+msgstr ""
+
+#: knights.cpp:644
+msgid "White's flag was called, Black wins"
+msgstr ""
+
+#: knights.cpp:647
+msgid "Draw match"
+msgstr ""
+
+#: knights.cpp:650
+msgid "50 moves rule, draw match"
+msgstr ""
+
+#: knights.cpp:653
+msgid "Starting computer players, please wait"
+msgstr ""
+
+#: knights.cpp:656
+msgid "Match paused"
+msgstr ""
+
+#: knights.cpp:659
+msgid "White has offered a draw"
+msgstr ""
+
+#: knights.cpp:662
+msgid "Black has offered a draw"
+msgstr ""
+
+#: knights.cpp:665
+msgid "Lost contact with opponent"
+msgstr ""
+
+#: knights.cpp:668
+msgid "Ready"
+msgstr ""
+
+#: knights.cpp:848
+msgid "Disconnect from Server"
+msgstr ""
+
+#: knights.cpp:924
+msgid "Resume"
+msgstr ""
+
+#: knights.cpp:983
+msgid "Knights Themes"
+msgstr ""
+
+#: knights.cpp:984
+msgid "Install Theme..."
+msgstr ""
+
+#: knights.cpp:1014
+msgid ""
+"You do not have permission to install this theme systemwide, so Knights "
+"installed it locally."
+msgstr ""
+
+#: knights.cpp:1015
+msgid "Installed theme locally"
+msgstr ""
+
+#: knights.cpp:1020
+msgid ""
+"The theme could not be installed:\n"
+"%1"
+msgstr ""
+
+#: knights.cpp:1021
+msgid "Can not install theme"
+msgstr ""
+
+#: io_internet.cpp:135
+msgid ""
+"There are no servers configured.\n"
+"Please make sure you have at least one server configured."
+msgstr ""
+
+#: io_internet.cpp:135
+msgid "Cannot find a server."
+msgstr ""
+
+#: io_internet.cpp:154 io_internet.cpp:172
+msgid ""
+"Knights can not start Timeseal.\n"
+"Please make sure you have the correct path and filename configured."
+msgstr ""
+
+#: io_internet.cpp:154 io_internet.cpp:172
+msgid "Cannot find Timeseal."
+msgstr ""
+
+#: io_internet.cpp:182 io_internet.cpp:195
+msgid ""
+"Knights is unable to connect to the server.\n"
+" Please make sure your internet connection is working and try again."
+msgstr ""
+
+#: io_internet.cpp:182
+msgid "Cannot connect to server(timeseal)."
+msgstr ""
+
+#: io_internet.cpp:195
+msgid "Cannot connect to server."
+msgstr ""
+
+#: io_internet.cpp:226
+msgid "%1 Console"
+msgstr ""
+
+#: io_internet.cpp:232
+msgid "Sought Matches List"
+msgstr ""
+
+#: io_internet.cpp:238
+msgid "Sought Matches Graph"
+msgstr ""
+
+#: tabbox.cpp:163
+msgid "%1 - Knights"
+msgstr ""
+
+#: dlg_promote.cpp:94
+msgid "Promote your pawn to..."
+msgstr ""
+
+#: dlg_promote.cpp:101
+msgid "Pawn Promotion"
+msgstr ""
+
+#: dlg_newmatch.cpp:38
+msgid "Start a New Match"
+msgstr ""
+
+#: dlg_newmatch.cpp:45 list_pgn.cpp:30 list_pgn.cpp:50
+msgid "White"
+msgstr ""
+
+#: dlg_newmatch.cpp:46 list_pgn.cpp:31 list_pgn.cpp:51
+msgid "Black"
+msgstr ""
+
+#: dlg_newmatch.cpp:59 dlg_newmatch.cpp:66
+msgid "Human"
+msgstr ""
+
+#: dlg_newmatch.cpp:60 dlg_newmatch.cpp:67
+msgid "Computer"
+msgstr ""
+
+#: dlg_newmatch.cpp:61 dlg_newmatch.cpp:68
+msgid "Email"
+msgstr ""
+
+#: dlg_newmatch.cpp:85 dlg_newmatch.cpp:102
+msgid "Base Time:"
+msgstr ""
+
+#: dlg_newmatch.cpp:87 dlg_newmatch.cpp:104 tab_seeklist.cpp:101
+#: dlg_challenge.cpp:60 dlg_challenge.cpp:69
+msgid " min."
+msgstr ""
+
+#: dlg_newmatch.cpp:90 dlg_newmatch.cpp:107
+msgid "Moves Per Base Time"
+msgstr ""
+
+#: dlg_newmatch.cpp:92 dlg_newmatch.cpp:109
+msgid " moves"
+msgstr ""
+
+#: dlg_newmatch.cpp:95 dlg_newmatch.cpp:112
+msgid "Increment Per Move"
+msgstr ""
+
+#: knightstextview.cpp:45
+msgid "Select &All"
+msgstr ""
+
+#: knightstextview.cpp:48
+msgid "&Print"
+msgstr ""
+
+#: knightstextview.cpp:56
+msgid "Zoom &In"
+msgstr ""
+
+#: knightstextview.cpp:58
+msgid "Zoom &Out"
+msgstr ""
+
+#: knightstextview.cpp:218
+msgid "Page %1 of %2"
+msgstr ""
+
+#: dlg_selectemail.cpp:27
+msgid "Select Email Address"
+msgstr ""
+
+#: accel.cpp:23
+msgid "Previous Move"
+msgstr ""
+
+#: accel.cpp:24
+msgid "Next Move"
+msgstr ""
+
+#: accel.cpp:25
+msgid "Enter Text"
+msgstr ""
+
+#: accel.cpp:26
+msgid "Page Up"
+msgstr ""
+
+#: accel.cpp:27
+msgid "Page Down"
+msgstr ""
+
+#: accel.cpp:28
+msgid "Increase Board Size"
+msgstr ""
+
+#: accel.cpp:29
+msgid "Decrease Board Size"
+msgstr ""
+
+#: accel.cpp:30
+msgid "Last History Item"
+msgstr ""
+
+#: accel.cpp:31
+msgid "Next History Item"
+msgstr ""
+
+#: accel.cpp:32
+msgid "Reply to the Last Tell"
+msgstr ""
+
+#: accel.cpp:33
+msgid "Reply to the Channel"
+msgstr ""
+
+#: accel.cpp:34
+msgid "Kibitz"
+msgstr ""
+
+#: accel.cpp:35 setpagedisplay.cpp:531
+msgid "Whisper"
+msgstr ""
+
+#: _translatorinfo.cpp:1 main.cpp:67
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr ""
+
+#: _translatorinfo.cpp:3 main.cpp:68
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr ""
+
+#: challenge_graph_view.cpp:105
+msgid " Name: %1 Rating: %2 Match Type: %3 %4 Base Time: %5 Increment: %6"
+msgstr ""
+
+#: list_pgn.cpp:29 list_pgn.cpp:49
+msgid "Result"
+msgstr ""
+
+#: list_pgn.cpp:32 list_pgn.cpp:52
+msgid "Round"
+msgstr ""
+
+#: list_pgn.cpp:33 list_pgn.cpp:53
+msgid "Site"
+msgstr ""
+
+#: list_pgn.cpp:34 list_pgn.cpp:54
+msgid "Date"
+msgstr ""
+
+#: list_pgn.cpp:83
+msgid "Can not open %1"
+msgstr ""
+
+#: main.cpp:26
+msgid "Specify the location of your Knights data directory."
+msgstr ""
+
+#: main.cpp:27
+msgid "A .pgn file to be loaded."
+msgstr ""
+
+#: main.cpp:36
+msgid ""
+"The Knights Chess Interface\n"
+"\n"
+"Knights is a chess interface\n"
+"for the K Desktop Environment."
+msgstr ""
+
+#: main.cpp:44
+msgid "Project Manager and Programmer"
+msgstr ""
+
+#: main.cpp:48
+msgid "Communications Programmer"
+msgstr ""
+
+#: main.cpp:52
+msgid "Qtopia port and patches"
+msgstr ""
+
+#: main.cpp:56
+msgid "Patches and suggestions"
+msgstr ""
+
+#: main.cpp:60
+msgid "KDE3 Compatability Patch"
+msgstr ""
+
+#: main.cpp:64
+msgid "XBoard protocol"
+msgstr ""
+
+#: setpagegeneral.cpp:29
+msgid "Your Name:"
+msgstr ""
+
+#: setpagegeneral.cpp:39
+msgid "When Knights Begins It Should:"
+msgstr ""
+
+#: setpagegeneral.cpp:40
+msgid "Do Nothing"
+msgstr ""
+
+#: setpagegeneral.cpp:41
+msgid "Start a Match vs. PC"
+msgstr ""
+
+#: setpagegeneral.cpp:42
+msgid "Connect to ICS"
+msgstr ""
+
+#: setpagegeneral.cpp:50
+msgid "Save Match on Close?"
+msgstr ""
+
+#: setpagegeneral.cpp:53
+msgid "Ask"
+msgstr ""
+
+#: setpagegeneral.cpp:63
+msgid "Append to Save File:"
+msgstr ""
+
+#: setpagegeneral.cpp:66
+msgid "Append to Save File"
+msgstr ""
+
+#: setpagegeneral.cpp:81
+msgid "Pause on Minimize"
+msgstr ""
+
+#: setpagegeneral.cpp:87
+msgid "Always Promote to Queen"
+msgstr ""
+
+#: setpagegeneral.cpp:93
+msgid "Call Flag Automatically"
+msgstr ""
+
+#: setpagegeneral.cpp:218
+msgid "Find PGN..."
+msgstr ""
+
+#: dlg_settings.cpp:48 setpagedisplay.cpp:150
+msgid "General"
+msgstr ""
+
+#: dlg_settings.cpp:49
+msgid "Various aspects of Knights get configured here."
+msgstr ""
+
+#: dlg_settings.cpp:55
+msgid "Display"
+msgstr ""
+
+#: dlg_settings.cpp:56
+msgid "These settings determine how Knights displays itself to you."
+msgstr ""
+
+#: dlg_settings.cpp:62
+msgid "Audio"
+msgstr ""
+
+#: dlg_settings.cpp:63
+msgid "These settings determine what Knights sounds like."
+msgstr ""
+
+#: dlg_settings.cpp:69
+msgid "Computer Opponents"
+msgstr ""
+
+#: dlg_settings.cpp:70
+msgid "Configure your chess engines here."
+msgstr ""
+
+#: dlg_settings.cpp:77
+msgid "Configure your internet chess servers here."
+msgstr ""
+
+#: match_param.cpp:108
+msgid "Unknown"
+msgstr ""
+
+#: core.cpp:385
+msgid "Hint"
+msgstr ""
+
+#: core.cpp:388
+msgid "Tell User"
+msgstr ""
+
+#: core.cpp:391
+msgid "Tell User Error"
+msgstr ""
+
+#: core.cpp:397
+msgid "Tell Opponent"
+msgstr ""
+
+#: core.cpp:411
+msgid "Tell All"
+msgstr ""
+
+#: core.cpp:617
+msgid "Load PGN..."
+msgstr ""
+
+#: core.cpp:661
+msgid "Would you like to save this match?"
+msgstr ""
+
+#: core.cpp:662
+msgid "Save Match?"
+msgstr ""
+
+#: core.cpp:681
+msgid "Save Match..."
+msgstr ""
+
+#: dlg_server.cpp:25
+msgid "Configure Server"
+msgstr ""
+
+#: dlg_server.cpp:37
+msgid "Server Name"
+msgstr ""
+
+#: dlg_server.cpp:44
+msgid "Server URL"
+msgstr ""
+
+#: dlg_server.cpp:49
+msgid "Server Port"
+msgstr ""
+
+#: dlg_server.cpp:56
+msgid "Username"
+msgstr ""
+
+#: dlg_server.cpp:59
+msgid "Remember My Password"
+msgstr ""
+
+#: dlg_server.cpp:64
+msgid "Password"
+msgstr ""
+
+#: dlg_server.cpp:71
+msgid "Confirm Password"
+msgstr ""
+
+#: dlg_server.cpp:79
+msgid "Timeseal"
+msgstr ""
+
+#: dlg_server.cpp:88 dlg_engine.cpp:59
+msgid "Log File"
+msgstr ""
+
+#: setpageaudio.cpp:28
+msgid "Enable Audio"
+msgstr ""
+
+#: setpageaudio.cpp:36
+msgid "Audio Themes"
+msgstr ""
+
+#: setpageaudio.cpp:47
+msgid "Volume"
+msgstr ""
+
+#: setpageaudio.cpp:48
+msgid "Maximum"
+msgstr ""
+
+#: setpageaudio.cpp:52
+msgid "Minimum"
+msgstr ""
+
+#: setpageaudio.cpp:55
+msgid "For Current Match Only"
+msgstr ""
+
+#: dlg_engine.cpp:26
+msgid "Configure Engine"
+msgstr ""
+
+#: dlg_engine.cpp:38
+msgid "Engine Name"
+msgstr ""
+
+#: dlg_engine.cpp:48
+msgid "Engine Filename"
+msgstr ""
+
+#: dlg_engine.cpp:54
+msgid "Command Line Arguments"
+msgstr ""
+
+#: tab_seeklist.cpp:28 challenge_graph.cpp:304
+msgid "Rating"
+msgstr ""
+
+#: tab_seeklist.cpp:29
+msgid "Match Type"
+msgstr ""
+
+#: tab_seeklist.cpp:30
+msgid "Is Rated?"
+msgstr ""
+
+#: tab_seeklist.cpp:31 dlg_challenge.cpp:62 dlg_challenge.cpp:71
+msgid "Base Time"
+msgstr ""
+
+#: tab_seeklist.cpp:32 dlg_challenge.cpp:63 dlg_challenge.cpp:72
+msgid "Increment"
+msgstr ""
+
+#: tab_seeklist.cpp:40 challenge_graph.cpp:75
+msgid "Seek Matches"
+msgstr ""
+
+#: tab_seeklist.cpp:42 challenge_graph.cpp:77
+msgid "Accept This Match"
+msgstr ""
+
+#: tab_seeklist.cpp:43 challenge_graph.cpp:78
+msgid "Tell..."
+msgstr ""
+
+#: tab_seeklist.cpp:44 challenge_graph.cpp:79
+msgid "Assess..."
+msgstr ""
+
+#: tab_seeklist.cpp:45 challenge_graph.cpp:80
+msgid "Player Info"
+msgstr ""
+
+#: tab_seeklist.cpp:47 challenge_graph.cpp:82
+msgid "Player History"
+msgstr ""
+
+#: tab_seeklist.cpp:49 challenge_graph.cpp:84
+msgid "Add to Friends"
+msgstr ""
+
+#: tab_seeklist.cpp:50 challenge_graph.cpp:85
+msgid "Ignore This Player"
+msgstr ""
+
+#: tabpage.cpp:55
+msgid "Close This Tab"
+msgstr ""
+
+#: dlg_login.cpp:21
+msgid "Login Prompt"
+msgstr ""
+
+#: dlg_login.cpp:32
+msgid "Select Server"
+msgstr ""
+
+#: dlg_login.cpp:51
+msgid "User info"
+msgstr ""
+
+#: dlg_login.cpp:57
+msgid "Login:"
+msgstr ""
+
+#: dlg_login.cpp:58
+msgid "Password:"
+msgstr ""
+
+#: dlg_login.cpp:64
+msgid "Log in as guest"
+msgstr ""
+
+#: dlg_login.cpp:78
+msgid "Login"
+msgstr ""
+
+#: dlg_login.cpp:78
+msgid "Log in to the chess server using this name and password."
+msgstr ""
+
+#: dlg_login.cpp:79
+msgid "Abort logging into the server"
+msgstr ""
+
+#: challenge_graph.cpp:311
+msgid "Time"
+msgstr ""
+
+#: dlg_challenge.cpp:25
+msgid "You've Been Challenged:"
+msgstr ""
+
+#: dlg_challenge.cpp:29
+msgid "Accept"
+msgstr ""
+
+#: dlg_challenge.cpp:30
+msgid "Decline"
+msgstr ""
+
+#: dlg_challenge.cpp:49
+msgid "Time Odds Match"
+msgstr ""
+
+#: dlg_challenge.cpp:53
+msgid "Unrated"
+msgstr ""
+
+#: dlg_challenge.cpp:54
+msgid "Rated"
+msgstr ""
+
+#: dlg_challenge.cpp:109
+msgid ""
+"%1 %2 vs. %3 %4\n"
+"in a %5 match."
+msgstr ""
+
+#: dlg_challenge.cpp:123 dlg_challenge.cpp:124
+msgid "Time Controls"
+msgstr ""
+
+#: dlg_challenge.cpp:153
+msgid "Counter Offer"
+msgstr ""
+
+#: pgn.cpp:207 pgn.cpp:390 pgn.cpp:953
+msgid "%1 vs. %2"
+msgstr ""
+
+#: pgn.cpp:980
+msgid "Good move"
+msgstr ""
+
+#: pgn.cpp:983
+msgid "Poor move"
+msgstr ""
+
+#: pgn.cpp:986
+msgid "Very good move"
+msgstr ""
+
+#: pgn.cpp:989
+msgid "Very poor move"
+msgstr ""
+
+#: pgn.cpp:992
+msgid "Speculative move"
+msgstr ""
+
+#: pgn.cpp:995
+msgid "Questionable move"
+msgstr ""
+
+#: pgn.cpp:998
+msgid "Forced move"
+msgstr ""
+
+#: pgn.cpp:1001
+msgid "Singular move"
+msgstr ""
+
+#: pgn.cpp:1004
+msgid "Worst move"
+msgstr ""
+
+#: pgn.cpp:1007
+msgid "Drawish position"
+msgstr ""
+
+#: pgn.cpp:1010
+msgid "Equal chances, quiet position"
+msgstr ""
+
+#: pgn.cpp:1013
+msgid "Equal chances, active position"
+msgstr ""
+
+#: pgn.cpp:1016
+msgid "Unclear position"
+msgstr ""
+
+#: pgn.cpp:1019
+msgid "White has a slight advantage"
+msgstr ""
+
+#: pgn.cpp:1022
+msgid "Black has a slight advantage"
+msgstr ""
+
+#: pgn.cpp:1025
+msgid "White has a moderate advantage"
+msgstr ""
+
+#: pgn.cpp:1028
+msgid "Black has a moderate advantage"
+msgstr ""
+
+#: pgn.cpp:1031
+msgid "White has a decisive advantage"
+msgstr ""
+
+#: pgn.cpp:1034
+msgid "Black has a decisive advantage"
+msgstr ""
+
+#: pgn.cpp:1037
+msgid "White has a crushing advantage ( Black should resign )"
+msgstr ""
+
+#: pgn.cpp:1040
+msgid "Black has a crushing advantage ( White should resign )"
+msgstr ""
+
+#: pgn.cpp:1043
+msgid "White is in zugzwang"
+msgstr ""
+
+#: pgn.cpp:1046
+msgid "Black is in zugzwang"
+msgstr ""
+
+#: pgn.cpp:1049
+msgid "White has a slight space advantage"
+msgstr ""
+
+#: pgn.cpp:1052
+msgid "Black has a slight space advantage"
+msgstr ""
+
+#: pgn.cpp:1055
+msgid "White has a moderate space advantage"
+msgstr ""
+
+#: pgn.cpp:1058
+msgid "Black has a moderate space advantage"
+msgstr ""
+
+#: pgn.cpp:1061
+msgid "White has a decisive space advantage"
+msgstr ""
+
+#: pgn.cpp:1064
+msgid "Black has a decisive space advantage"
+msgstr ""
+
+#: pgn.cpp:1067
+msgid "White has a slight time ( development ) advantage"
+msgstr ""
+
+#: pgn.cpp:1070
+msgid "Black has a slight time ( development ) advantage"
+msgstr ""
+
+#: pgn.cpp:1073
+msgid "White has a moderate time ( development ) advantage"
+msgstr ""
+
+#: pgn.cpp:1076
+msgid "Black has a moderate time ( development ) advantage"
+msgstr ""
+
+#: pgn.cpp:1079
+msgid "White has a decisive time ( development ) advantage"
+msgstr ""
+
+#: pgn.cpp:1082
+msgid "Black has a decisive time ( development ) advantage"
+msgstr ""
+
+#: pgn.cpp:1085
+msgid "White has the initiative"
+msgstr ""
+
+#: pgn.cpp:1088
+msgid "Black has the initiative"
+msgstr ""
+
+#: pgn.cpp:1091
+msgid "White has a lasting initiative"
+msgstr ""
+
+#: pgn.cpp:1094
+msgid "Black has a lasting initiative"
+msgstr ""
+
+#: pgn.cpp:1097
+msgid "White has the attack"
+msgstr ""
+
+#: pgn.cpp:1100
+msgid "Black has the attack"
+msgstr ""
+
+#: pgn.cpp:1103
+msgid "White has insufficient compensation for material deficit"
+msgstr ""
+
+#: pgn.cpp:1106
+msgid "Black has insufficient compensation for material deficit"
+msgstr ""
+
+#: pgn.cpp:1109
+msgid "White has sufficient compensation for material deficit"
+msgstr ""
+
+#: pgn.cpp:1112
+msgid "Black has sufficient compensation for material deficit"
+msgstr ""
+
+#: pgn.cpp:1115
+msgid "White has more than adequate compensation for material deficit"
+msgstr ""
+
+#: pgn.cpp:1118
+msgid "Black has more than adequate compensation for material deficit"
+msgstr ""
+
+#: pgn.cpp:1121
+msgid "White has a slight center control advantage"
+msgstr ""
+
+#: pgn.cpp:1124
+msgid "Black has a slight center control advantage"
+msgstr ""
+
+#: pgn.cpp:1127
+msgid "White has a moderate center control advantage"
+msgstr ""
+
+#: pgn.cpp:1130
+msgid "Black has a moderate center control advantage"
+msgstr ""
+
+#: pgn.cpp:1133
+msgid "White has a decisive center control advantage"
+msgstr ""
+
+#: pgn.cpp:1136
+msgid "Black has a decisive center control advantage"
+msgstr ""
+
+#: pgn.cpp:1139
+msgid "White has a slight kingside control advantage"
+msgstr ""
+
+#: pgn.cpp:1142
+msgid "Black has a slight kingside control advantage"
+msgstr ""
+
+#: pgn.cpp:1145
+msgid "White has a moderate kingside control advantage"
+msgstr ""
+
+#: pgn.cpp:1148
+msgid "Black has a moderate kingside control advantage"
+msgstr ""
+
+#: pgn.cpp:1151
+msgid "White has a decisive kingside control advantage"
+msgstr ""
+
+#: pgn.cpp:1154
+msgid "Black has a decisive kingside control advantage"
+msgstr ""
+
+#: pgn.cpp:1157
+msgid "White has a slight queenside control advantage"
+msgstr ""
+
+#: pgn.cpp:1160
+msgid "Black has a slight queenside control advantage"
+msgstr ""
+
+#: pgn.cpp:1163
+msgid "White has a moderate queenside control advantage"
+msgstr ""
+
+#: pgn.cpp:1166
+msgid "Black has a moderate queenside control advantage"
+msgstr ""
+
+#: pgn.cpp:1169
+msgid "White has a decisive queenside control advantage"
+msgstr ""
+
+#: pgn.cpp:1172
+msgid "Black has a decisive queenside control advantage"
+msgstr ""
+
+#: pgn.cpp:1175
+msgid "White has a vulnerable first rank"
+msgstr ""
+
+#: pgn.cpp:1178
+msgid "Black has a vulnerable first rank"
+msgstr ""
+
+#: pgn.cpp:1181
+msgid "White has a well protected first rank"
+msgstr ""
+
+#: pgn.cpp:1184
+msgid "Black has a well protected first rank"
+msgstr ""
+
+#: pgn.cpp:1187
+msgid "White has a poorly protected king"
+msgstr ""
+
+#: pgn.cpp:1190
+msgid "Black has a poorly protected king"
+msgstr ""
+
+#: pgn.cpp:1193
+msgid "White has a well protected king"
+msgstr ""
+
+#: pgn.cpp:1196
+msgid "Black has a well protected king"
+msgstr ""
+
+#: pgn.cpp:1199
+msgid "White has a poorly placed king"
+msgstr ""
+
+#: pgn.cpp:1202
+msgid "Black has a poorly placed king"
+msgstr ""
+
+#: pgn.cpp:1205
+msgid "White has a well placed king"
+msgstr ""
+
+#: pgn.cpp:1208
+msgid "Black has a well placed king"
+msgstr ""
+
+#: pgn.cpp:1211
+msgid "White has a very weak pawn structure"
+msgstr ""
+
+#: pgn.cpp:1214
+msgid "Black has a very weak pawn structure"
+msgstr ""
+
+#: pgn.cpp:1217
+msgid "White has a moderately weak pawn structure"
+msgstr ""
+
+#: pgn.cpp:1220
+msgid "Black has a moderately weak pawn structure"
+msgstr ""
+
+#: pgn.cpp:1223
+msgid "White has a moderately strong pawn structure"
+msgstr ""
+
+#: pgn.cpp:1226
+msgid "Black has a moderately strong pawn structure"
+msgstr ""
+
+#: pgn.cpp:1229
+msgid "White has a very strong pawn structure"
+msgstr ""
+
+#: pgn.cpp:1232
+msgid "Black has a very strong pawn structure"
+msgstr ""
+
+#: pgn.cpp:1235
+msgid "White has poor knight placement"
+msgstr ""
+
+#: pgn.cpp:1238
+msgid "Black has poor knight placement"
+msgstr ""
+
+#: pgn.cpp:1241
+msgid "White has good knight placement"
+msgstr ""
+
+#: pgn.cpp:1244
+msgid "Black has good knight placement"
+msgstr ""
+
+#: pgn.cpp:1247
+msgid "White has poor bishop placement"
+msgstr ""
+
+#: pgn.cpp:1250
+msgid "Black has poor bishop placement"
+msgstr ""
+
+#: pgn.cpp:1253
+msgid "White has good bishop placement"
+msgstr ""
+
+#: pgn.cpp:1256
+msgid "Black has good bishop placement"
+msgstr ""
+
+#: pgn.cpp:1259
+msgid "White has poor rook placement"
+msgstr ""
+
+#: pgn.cpp:1262
+msgid "Black has poor rook placement"
+msgstr ""
+
+#: pgn.cpp:1265
+msgid "White has good rook placement"
+msgstr ""
+
+#: pgn.cpp:1268
+msgid "Black has good rook placement"
+msgstr ""
+
+#: pgn.cpp:1271
+msgid "White has poor queen placement"
+msgstr ""
+
+#: pgn.cpp:1274
+msgid "Black has poor queen placement"
+msgstr ""
+
+#: pgn.cpp:1277
+msgid "White has good queen placement"
+msgstr ""
+
+#: pgn.cpp:1280
+msgid "Black has good queen placement"
+msgstr ""
+
+#: pgn.cpp:1283
+msgid "White has poor piece coordination"
+msgstr ""
+
+#: pgn.cpp:1286
+msgid "Black has poor piece coordination"
+msgstr ""
+
+#: pgn.cpp:1289
+msgid "White has good piece coordination"
+msgstr ""
+
+#: pgn.cpp:1292
+msgid "Black has good piece coordination"
+msgstr ""
+
+#: pgn.cpp:1295
+msgid "White has played the opening very poorly"
+msgstr ""
+
+#: pgn.cpp:1298
+msgid "Black has played the opening very poorly"
+msgstr ""
+
+#: pgn.cpp:1301
+msgid "White has played the opening poorly"
+msgstr ""
+
+#: pgn.cpp:1304
+msgid "Black has played the opening poorly"
+msgstr ""
+
+#: pgn.cpp:1307
+msgid "White has played the opening well"
+msgstr ""
+
+#: pgn.cpp:1310
+msgid "Black has played the opening well"
+msgstr ""
+
+#: pgn.cpp:1313
+msgid "White has played the opening very well"
+msgstr ""
+
+#: pgn.cpp:1316
+msgid "Black has played the opening very well"
+msgstr ""
+
+#: pgn.cpp:1319
+msgid "White has played the middlegame very poorly"
+msgstr ""
+
+#: pgn.cpp:1322
+msgid "Black has played the middlegame very poorly"
+msgstr ""
+
+#: pgn.cpp:1325
+msgid "White has played the middlegame poorly"
+msgstr ""
+
+#: pgn.cpp:1328
+msgid "Black has played the middlegame poorly"
+msgstr ""
+
+#: pgn.cpp:1331
+msgid "White has played the middlegame well"
+msgstr ""
+
+#: pgn.cpp:1334
+msgid "Black has played the middlegame well"
+msgstr ""
+
+#: pgn.cpp:1337
+msgid "White has played the middlegame very well"
+msgstr ""
+
+#: pgn.cpp:1340
+msgid "Black has played the middlegame very well"
+msgstr ""
+
+#: pgn.cpp:1343
+msgid "White has played the ending very poorly"
+msgstr ""
+
+#: pgn.cpp:1346
+msgid "Black has played the ending very poorly"
+msgstr ""
+
+#: pgn.cpp:1349
+msgid "White has played the ending poorly"
+msgstr ""
+
+#: pgn.cpp:1352
+msgid "Black has played the ending poorly"
+msgstr ""
+
+#: pgn.cpp:1355
+msgid "White has played the ending well"
+msgstr ""
+
+#: pgn.cpp:1358
+msgid "Black has played the ending well"
+msgstr ""
+
+#: pgn.cpp:1361
+msgid "White has played the ending very well"
+msgstr ""
+
+#: pgn.cpp:1364
+msgid "Black has played the ending very well"
+msgstr ""
+
+#: pgn.cpp:1367
+msgid "White has slight counterplay"
+msgstr ""
+
+#: pgn.cpp:1370
+msgid "Black has slight counterplay"
+msgstr ""
+
+#: pgn.cpp:1373
+msgid "White has moderate counterplay"
+msgstr ""
+
+#: pgn.cpp:1376
+msgid "Black has moderate counterplay"
+msgstr ""
+
+#: pgn.cpp:1379
+msgid "White has decisive counterplay"
+msgstr ""
+
+#: pgn.cpp:1382
+msgid "Black has decisive counterplay"
+msgstr ""
+
+#: pgn.cpp:1385
+msgid "White has moderate time control pressure"
+msgstr ""
+
+#: pgn.cpp:1388
+msgid "Black has moderate time control pressure"
+msgstr ""
+
+#: pgn.cpp:1391
+msgid "White has severe time control pressure"
+msgstr ""
+
+#: pgn.cpp:1394
+msgid "Black has severe time control pressure"
+msgstr ""
+
+#: pgn.cpp:1396
+msgid "With the idea..."
+msgstr ""
+
+#: pgn.cpp:1399
+msgid "Aimed against..."
+msgstr ""
+
+#: pgn.cpp:1402
+msgid "Better Move"
+msgstr ""
+
+#: pgn.cpp:1405
+msgid "Worse Move"
+msgstr ""
+
+#: pgn.cpp:1408
+msgid "Equivalent move"
+msgstr ""
+
+#: pgn.cpp:1411
+msgid "Editor's Remark"
+msgstr ""
+
+#: pgn.cpp:1414
+msgid "Novelty"
+msgstr ""
+
+#: pgn.cpp:1417
+msgid "Weak point"
+msgstr ""
+
+#: pgn.cpp:1420
+msgid "Endgame"
+msgstr ""
+
+#: pgn.cpp:1423
+msgid "Line"
+msgstr ""
+
+#: pgn.cpp:1426
+msgid "Diagonal"
+msgstr ""
+
+#: pgn.cpp:1429
+msgid "White has a pair of Bishops"
+msgstr ""
+
+#: pgn.cpp:1432
+msgid "Black has a pair of Bishops"
+msgstr ""
+
+#: pgn.cpp:1435
+msgid "Bishops of opposite color"
+msgstr ""
+
+#: pgn.cpp:1438
+msgid "Bishops of same color"
+msgstr ""
+
+#: pgn.cpp:1441
+msgid "Etc."
+msgstr ""
+
+#: pgn.cpp:1444
+msgid "Doubled pawns"
+msgstr ""
+
+#: pgn.cpp:1447
+msgid "Isolated pawn"
+msgstr ""
+
+#: pgn.cpp:1450
+msgid "Connected pawns"
+msgstr ""
+
+#: pgn.cpp:1453
+msgid "Hanging pawns"
+msgstr ""
+
+#: pgn.cpp:1456
+msgid "Backwards pawn"
+msgstr ""
+
+#: dlg_selectengine.cpp:30
+msgid "Select Computer Player"
+msgstr ""
+
+#: dlg_selectengine.cpp:41
+msgid "Computer Players"
+msgstr ""
+
+#: dlg_selectengine.cpp:61
+msgid "Player Strength"
+msgstr ""
+
+#: dlg_selectengine.cpp:63
+msgid "Weak"
+msgstr ""
+
+#: dlg_selectengine.cpp:70
+msgid "Strong"
+msgstr ""
+
+#: proto_xboard.cpp:449
+msgid ""
+"%1 suggests this move:\n"
+"%2"
+msgstr ""
+
+#: proto_xboard.cpp:471 proto_xboard.cpp:478 proto_xboard.cpp:485
+msgid ""
+"%1 tells you:\n"
+"%2"
+msgstr ""
+
+#: setpagedisplay.cpp:74
+msgid "Board Themes"
+msgstr ""
+
+#: setpagedisplay.cpp:79
+msgid "Chessman Themes"
+msgstr ""
+
+#: setpagedisplay.cpp:85
+msgid "Theme Size"
+msgstr ""
+
+#: setpagedisplay.cpp:88
+msgid "Small"
+msgstr ""
+
+#: setpagedisplay.cpp:95
+msgid "Large"
+msgstr ""
+
+#: setpagedisplay.cpp:97
+msgid "Player Images File:"
+msgstr ""
+
+#: setpagedisplay.cpp:107
+msgid "Other Display Options"
+msgstr ""
+
+#: setpagedisplay.cpp:110
+msgid "Reverse Board Orientation"
+msgstr ""
+
+#: setpagedisplay.cpp:115
+msgid "Display Startup Logo"
+msgstr ""
+
+#: setpagedisplay.cpp:120
+msgid "Automatic Preview"
+msgstr ""
+
+#: setpagedisplay.cpp:125
+msgid "Show Last Move"
+msgstr ""
+
+#: setpagedisplay.cpp:130
+msgid "Animate Moves"
+msgstr ""
+
+#: setpagedisplay.cpp:135
+msgid "Show Coordinates"
+msgstr ""
+
+#: setpagedisplay.cpp:169
+msgid "Restore Defaults"
+msgstr ""
+
+#: setpagedisplay.cpp:173
+msgid "Standard Font..."
+msgstr ""
+
+#: setpagedisplay.cpp:182
+msgid "Private Font..."
+msgstr ""
+
+#: setpagedisplay.cpp:191
+msgid "Channel Font..."
+msgstr ""
+
+#: setpagedisplay.cpp:200
+msgid "Shout Font..."
+msgstr ""
+
+#: setpagedisplay.cpp:209
+msgid "Whisper Font..."
+msgstr ""
+
+#: setpagedisplay.cpp:218
+msgid "Notification Font..."
+msgstr ""
+
+#: setpagedisplay.cpp:233
+msgid "Console"
+msgstr ""
+
+#: setpagedisplay.cpp:527
+msgid "Standard"
+msgstr ""
+
+#: setpagedisplay.cpp:528
+msgid "Private Tell"
+msgstr ""
+
+#: setpagedisplay.cpp:529
+msgid "Channel Tell"
+msgstr ""
+
+#: setpagedisplay.cpp:530
+msgid "Shout"
+msgstr ""
+
+#: setpagedisplay.cpp:532
+msgid "Notification"
+msgstr ""
+
+#: setpagedisplay.cpp:556
+msgid "Find Player Images File..."
+msgstr ""
diff --git a/stamp-h.in b/stamp-h.in
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/stamp-h.in
@@ -0,0 +1 @@
+timestamp
diff --git a/subdirs b/subdirs
new file mode 100644
index 0000000..bc39422
--- /dev/null
+++ b/subdirs
@@ -0,0 +1,5 @@
+admin
+doc
+knights
+media
+po