Stalemate is a win in Shogi

In regular Shogi this never occurs, but in the mini variants it happens
often enough.
Adjudicate perpetual checks as loss also in Shogi

The Xiangqi code for recognizing perpetual checks is now also activated for
Shogi, but in this case we bail out before checking for perpetual chases.
The mini-Shogi case is then recognized as a win for gote.
Adjudicate pawn-drop mate as loss in Shogi

Mating with a Pawn drop is illegal in Shogi, but rather than burdoning
the legality-testing by this complex rule, we simply invert the result
for such a mate. After all, Shogi customs are such that everything illegal
leads to an immediate loss.
Catch unknown engine in tourney games

When an XBoard instance is playing on a tourney it can happen that it is
using a settings file with an engine list not yet containing a certain
participant, because that participant was just installed in the instance
that created the tourney file, but it did not save those modifications yet.
This error is now caught, and leads to an error popup and stopping of the
tourney play. This error was made non-fatal to allow the user to decide
if he wants to quit with or without saving the settings (which, after all,
does not seem up-to-date).
Preserve mode on engine loading (sometimes)

That the mode always switched to EditGame after engine loading was
particularly annoying at the start of a game (where leaving BeginningOfGame
mode would disablethe Time Control dialog, and the engine would not
automatically reply if you start playing) and AnalyzeMode. These two
modes are now preserved, BeginningOfGame by refraining from calling
EditGameEvent() and sending 'force' to the new engine, and AnalyzeMode
be calling AnalyzeModeEvent() after the engine is loaded and repositioned.
Preserve PGN tags when loading engine

Switching to EditGame mode would normally erase the tags, but when analyzing
a loaded game this would be undesirable. When the engine is playing, keeping
the tags is dubious, but it is not obvious what to put in a new name tag,
so we leave that for now.
Fix library order

On OS X dialog windows could not get focus if -lXaw appeared after
-lX11 -lXt in the linker command. This was cured by moving
@FRONTEND_FLAGS@ (which expands to -lXaw) first in the LDADD parameter
of the automake file.