http://bugs.freeciv.org/Ticket/Display.html?id=40144 >
I think being able to build multiple clients without having
to reconfigure is very useful, so I have updated the patch
to the latest revision of trunk and made some improvements.
I removed the --enable-multiclient option and the configure/
makefile code dealing with a "main client" since it seems
to me overly complicated and not necessary.
Now --enable-client takes a list of comma separated gui
names, or the special arguments 'no', 'auto' or 'all'. The
'no' argument disables client compilation (like --disable-
client). If 'auto' (the default) is used, then configure
selects only the first client gui that it successfully
detects. If 'all' is used, then configure selects all guis
that are successfully detected. When specific guis are
given via the list (including just one), and detection of
any one of them fails, then configure aborts with an error
message.
At the end of the configure script, a summary is printed
showing what will be built. For example the output on my
system using the configure command line:
./configure --enable-client=all --enable-debug --enable-auth --with-
mysql-prefix=/usr/local/mysql
is
** Configuration Summary **
Build freeciv client: yes
Debugging support: yes
Client frontends:
Gtk-2.0: yes
SDL: yes
Xaw: yes
Win32: no
FTWL:no
Beos:no
Stub:yes
Build freeciv server:yes
Debugging support: yes
Auth database support: yes
I also made the ./civ script able to take a --gui argument
(only as the first), so it can be run like
./civ --gui=sdl
./civ --gui=xaw
to run various client frontends from the build directory.
Only thing that annoys me is that by using libtool, the
compilation time is at least doubled, since it compiles
object files for both static and shared libraries. Maybe
the static library object file compilation can be disabled
(since as far as I can see, almost everything goes into
shared libs), so that building doesn't take so long? :(
Perhaps also the hackish looking client/dummy.c can be
worked around somehow in client/Makefile.am...
Otherwise, I would please ask that people that are able
to build on the various platforms freeciv should work on
to test this patch and report any breakage due to changes
in the configure script or makefiles.
If at least the double-compilation problem can be improved,
I would consider committing this to trunk.
---
正義のために変身して団結せよ!!
commit 582a7b9c10ccb8699d81cf5d1872d3d53371510d
Author: Madeline Book <[EMAIL PROTECTED]>
Date: Sat Nov 8 00:15:03 2008 -0500
Multiclient patch v2.
---
ai/Makefile.am |4 +-
autogen.sh |9 ++
bootstrap/civ.in | 37 +--
client/Makefile.am | 116 ++
client/agents/Makefile.am |6 +-
client/dummy.c | 14 ++
client/gui-ftwl/Makefile.am|6 +-
client/gui-gtk-2.0/Makefile.am |8 +-
client/gui-sdl/Makefile.am |6 +-
client/gui-stub/Makefile.am|6 +-
client/gui-win32/Makefile.am |6 +-
client/gui-xaw/Makefile.am |8 +-
client/text.c |2 +-
common/Makefile.am |8 +-
common/aicore/Makefile.am |4 +-
configure.ac | 263
m4/auth.m4 | 38 +++---
m4/gtk2-client.m4 | 20 ++--
m4/no-client.m4|2 +-
m4/sdl-client.m4 | 30 +++--
m4/win32-client.m4 | 10 +-
m4/xaw-client.m4 | 24 ++--
manual/Makefile.am | 27 ++---
server/Makefile.am | 33 +++---
server/generator/Makefile.am |4 +-
server/scripting/Makefile.am |4 +-
utility/Makefile.am|4 +-
27 files changed, 463 insertions(+), 236 deletions(-)
diff --git a/ai/Makefile.am b/ai/Makefile.am
index f162c7f..58c8cf2 100644
--- a/ai/Makefile.am
+++ b/ai/Makefile.am
@@ -1,10 +1,10 @@
## Process this file with automake to produce Makefile.in
-noinst_LIBRARIES = libcivai.a
+noinst_LTLIBRARIES = libfreeciv-ai.la
AM_CPPFLAGS = -I$(top_srcdir)/utility -I$(srcdir)/../common -I$(srcdir)/../server -I$(top_srcdir)/common/aicore -I$(top_srcdir)/server/generator
-libcivai_a_SOURCES = \
+libfreeciv_ai_la_SOURCES = \
advdomestic.c \
advdomestic.h \
advmilitary.c \
diff --git a/autogen.sh b/autogen.sh
index 065752a..730ec82 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -239,6 +239,9 @@ AUTOMAKE=$REALPKGNAME
real_package_name "aclocal" "ftp://ftp.gnu.org/pub/gnu/automake/"; 1 6 || DIE=1
ACLOCAL=$REALPKGNAME
+real_package_name "libtoolize" "ftp://ftp.gnu.org/pub/gnu/libtool/"; 1 || DIE=1
+LIBTOOLIZE=$REALPKGNAME
+
if [ "$FC_USE_NLS" = "yes" ]; then
DIE2=0
version_check 1 "xgettext" "xgettext" "ftp://ftp.gnu.org/p