Re: [Freeciv-Dev] (PR#40177) [Patch] Shared common library

2009-01-08 Thread Marko Lindqvist

URL: http://bugs.freeciv.org/Ticket/Display.html?id=40177 

2009/1/8 Madeline Book:
 Maybe dummy.c could be renamed civclient.c and the
 existing civclient.[ch] renamed to client.[ch]? Or
 perhaps client_main.[ch] would be a better name,
 since there is already clinet. It's just that
 calling it dummy makes it look like a hack... :/

 It *is* a hack, but ok, I'll move files around when committing this.
I'm not updating this to patch, as moving has to be made with 'svn mv'
and not by 'patch'.


 - Fixed building of civmanual when shared libraries are enabled and
static libraries disabled



 - ML

diff -Nurd -X.diff_ignore freeciv/ai/Makefile.am freeciv/ai/Makefile.am
--- freeciv/ai/Makefile.am  2008-10-27 04:13:32.0 +0200
+++ freeciv/ai/Makefile.am  2009-01-08 10:33:45.0 +0200
@@ -1,10 +1,10 @@
 ## Process this file with automake to produce Makefile.in
 
-noinst_LIBRARIES = libcivai.a
+noinst_LTLIBRARIES = libcivai.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 = \
+libcivai_la_SOURCES = \
advdomestic.c   \
advdomestic.h   \
advmilitary.c   \
diff -Nurd -X.diff_ignore freeciv/autogen.sh freeciv/autogen.sh
--- freeciv/autogen.sh  2008-10-27 04:14:13.0 +0200
+++ freeciv/autogen.sh  2009-01-08 10:33:45.0 +0200
@@ -238,6 +238,8 @@
 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
@@ -274,6 +276,12 @@
   echo $AUTOCONF failed
   exit 1
 }
+echo + running $LIBTOOLIZE ... 
+$LIBTOOLIZE -f || {
+  echo
+  echo $LIBTOOLIZE failed
+  exit 1
+}
 echo + running $AUTOMAKE ... 
 $AUTOMAKE -a -c || {
   echo
diff -Nurd -X.diff_ignore freeciv/client/agents/Makefile.am 
freeciv/client/agents/Makefile.am
--- freeciv/client/agents/Makefile.am   2008-10-27 04:13:58.0 +0200
+++ freeciv/client/agents/Makefile.am   2009-01-08 10:33:45.0 +0200
@@ -1,10 +1,10 @@
 ## Process this file with automake to produce Makefile.in
 
-noinst_LIBRARIES = libagents.a
+noinst_LTLIBRARIES = libagents.la
 
 AM_CPPFLAGS = -I. -I$(srcdir)/.. -I$(top_srcdir)/common/aicore 
-I$(srcdir)/../include -I$(top_srcdir)/utility -I$(top_srcdir)/common 
-I$(srcdir)/../gui-gtk $(CLIENT_CFLAGS)
 
-libagents_a_SOURCES =  \
+libagents_la_SOURCES = \
agents.c\
agents.h\
cma_core.c  \
diff -Nurd -X.diff_ignore freeciv/client/dummy.c freeciv/client/dummy.c
--- freeciv/client/dummy.c  1970-01-01 02:00:00.0 +0200
+++ freeciv/client/dummy.c  2009-01-08 10:33:45.0 +0200
@@ -0,0 +1,6 @@
+/*
+ * Binaries cannot be linked from libraries only.
+ * Some sources are required directly. This is
+ * dummy sourcefile.
+ *
+ */
diff -Nurd -X.diff_ignore freeciv/client/gui-ftwl/Makefile.am 
freeciv/client/gui-ftwl/Makefile.am
--- freeciv/client/gui-ftwl/Makefile.am 2008-10-27 04:14:02.0 +0200
+++ freeciv/client/gui-ftwl/Makefile.am 2009-01-08 10:33:45.0 +0200
@@ -1,11 +1,9 @@
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS = 
-
-noinst_LIBRARIES = libguiclient.a
+noinst_LTLIBRARIES = libguiclient.la
 AM_CPPFLAGS = -I. -I$(top_srcdir)/utility -I$(top_srcdir)/utility/ftwl 
-I$(top_srcdir)/common -I$(top_srcdir)/common/aicore -I$(srcdir)/.. 
-I$(srcdir)/../include $(CLIENT_CFLAGS)
 
-libguiclient_a_SOURCES = \
+libguiclient_la_SOURCES = \
canvas.c\
canvas.h\
chatline.c  \
diff -Nurd -X.diff_ignore freeciv/client/gui-gtk-2.0/Makefile.am 
freeciv/client/gui-gtk-2.0/Makefile.am
--- freeciv/client/gui-gtk-2.0/Makefile.am  2008-10-27 04:13:59.0 
+0200
+++ freeciv/client/gui-gtk-2.0/Makefile.am  2009-01-08 10:33:45.0 
+0200
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-noinst_LIBRARIES = libguiclient.a
+noinst_LTLIBRARIES = libguiclient.la
 AM_CPPFLAGS = -I. -I$(srcdir)/.. -I$(srcdir)/../include 
-I$(top_srcdir)/utility -I$(top_srcdir)/common -I$(top_srcdir)/common/aicore 
-I$(srcdir)/../agents $(CLIENT_CFLAGS) $(GGZ_GTK_INCLUDES)
 
 # The AM_CPPFLAGS -I. is so resources.c includes the locally generated 
@@ -16,9 +16,9 @@
echo '/*/'  
Freeciv.h
$(srcdir)/rc2c $(top_srcdir)/data/freeciv.rc-2.0  Freeciv.h
 
-libguiclient_a_DEPENDENCIES = rc2c
+libguiclient_la_DEPENDENCIES = rc2c
 
-libguiclient_a_SOURCES = \
+libguiclient_la_SOURCES = \
rc2c\
Freeciv.h   \
canvas.c\
diff -Nurd -X.diff_ignore freeciv/client/gui-sdl/Makefile.am 
freeciv/client/gui-sdl/Makefile.am
--- 

Re: [Freeciv-Dev] (PR#40177) [Patch] Shared common library

2009-01-07 Thread Marko Lindqvist

URL: http://bugs.freeciv.org/Ticket/Display.html?id=40177 

2008/11/10 Marko Lindqvist:

  About status of this ticket: Some windows compilations (SDL client,
 build with nls) fail with this patch.

 Fixed.

 Please test. I plan to commit this version if nobody reports problems.


 - ML

diff -Nurd -X.diff_ignore freeciv/ai/Makefile.am freeciv/ai/Makefile.am
--- freeciv/ai/Makefile.am  2008-10-27 04:13:32.0 +0200
+++ freeciv/ai/Makefile.am  2009-01-07 23:20:55.0 +0200
@@ -1,10 +1,10 @@
 ## Process this file with automake to produce Makefile.in
 
-noinst_LIBRARIES = libcivai.a
+noinst_LTLIBRARIES = libcivai.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 = \
+libcivai_la_SOURCES = \
advdomestic.c   \
advdomestic.h   \
advmilitary.c   \
diff -Nurd -X.diff_ignore freeciv/autogen.sh freeciv/autogen.sh
--- freeciv/autogen.sh  2008-10-27 04:14:13.0 +0200
+++ freeciv/autogen.sh  2009-01-07 23:20:55.0 +0200
@@ -238,6 +238,8 @@
 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
@@ -274,6 +276,12 @@
   echo $AUTOCONF failed
   exit 1
 }
+echo + running $LIBTOOLIZE ... 
+$LIBTOOLIZE -f || {
+  echo
+  echo $LIBTOOLIZE failed
+  exit 1
+}
 echo + running $AUTOMAKE ... 
 $AUTOMAKE -a -c || {
   echo
diff -Nurd -X.diff_ignore freeciv/client/agents/Makefile.am 
freeciv/client/agents/Makefile.am
--- freeciv/client/agents/Makefile.am   2008-10-27 04:13:58.0 +0200
+++ freeciv/client/agents/Makefile.am   2009-01-07 23:20:55.0 +0200
@@ -1,10 +1,10 @@
 ## Process this file with automake to produce Makefile.in
 
-noinst_LIBRARIES = libagents.a
+noinst_LTLIBRARIES = libagents.la
 
 AM_CPPFLAGS = -I. -I$(srcdir)/.. -I$(top_srcdir)/common/aicore 
-I$(srcdir)/../include -I$(top_srcdir)/utility -I$(top_srcdir)/common 
-I$(srcdir)/../gui-gtk $(CLIENT_CFLAGS)
 
-libagents_a_SOURCES =  \
+libagents_la_SOURCES = \
agents.c\
agents.h\
cma_core.c  \
diff -Nurd -X.diff_ignore freeciv/client/dummy.c freeciv/client/dummy.c
--- freeciv/client/dummy.c  1970-01-01 02:00:00.0 +0200
+++ freeciv/client/dummy.c  2009-01-07 23:20:55.0 +0200
@@ -0,0 +1,6 @@
+/*
+ * Binaries cannot be linked from libraries only.
+ * Some sources are required directly. This is
+ * dummy sourcefile.
+ *
+ */
diff -Nurd -X.diff_ignore freeciv/client/gui-ftwl/Makefile.am 
freeciv/client/gui-ftwl/Makefile.am
--- freeciv/client/gui-ftwl/Makefile.am 2008-10-27 04:14:02.0 +0200
+++ freeciv/client/gui-ftwl/Makefile.am 2009-01-07 23:20:55.0 +0200
@@ -1,11 +1,9 @@
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS = 
-
-noinst_LIBRARIES = libguiclient.a
+noinst_LTLIBRARIES = libguiclient.la
 AM_CPPFLAGS = -I. -I$(top_srcdir)/utility -I$(top_srcdir)/utility/ftwl 
-I$(top_srcdir)/common -I$(top_srcdir)/common/aicore -I$(srcdir)/.. 
-I$(srcdir)/../include $(CLIENT_CFLAGS)
 
-libguiclient_a_SOURCES = \
+libguiclient_la_SOURCES = \
canvas.c\
canvas.h\
chatline.c  \
diff -Nurd -X.diff_ignore freeciv/client/gui-gtk-2.0/Makefile.am 
freeciv/client/gui-gtk-2.0/Makefile.am
--- freeciv/client/gui-gtk-2.0/Makefile.am  2008-10-27 04:13:59.0 
+0200
+++ freeciv/client/gui-gtk-2.0/Makefile.am  2009-01-07 23:20:55.0 
+0200
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-noinst_LIBRARIES = libguiclient.a
+noinst_LTLIBRARIES = libguiclient.la
 AM_CPPFLAGS = -I. -I$(srcdir)/.. -I$(srcdir)/../include 
-I$(top_srcdir)/utility -I$(top_srcdir)/common -I$(top_srcdir)/common/aicore 
-I$(srcdir)/../agents $(CLIENT_CFLAGS) $(GGZ_GTK_INCLUDES)
 
 # The AM_CPPFLAGS -I. is so resources.c includes the locally generated 
@@ -16,9 +16,9 @@
echo '/*/'  
Freeciv.h
$(srcdir)/rc2c $(top_srcdir)/data/freeciv.rc-2.0  Freeciv.h
 
-libguiclient_a_DEPENDENCIES = rc2c
+libguiclient_la_DEPENDENCIES = rc2c
 
-libguiclient_a_SOURCES = \
+libguiclient_la_SOURCES = \
rc2c\
Freeciv.h   \
canvas.c\
diff -Nurd -X.diff_ignore freeciv/client/gui-sdl/Makefile.am 
freeciv/client/gui-sdl/Makefile.am
--- freeciv/client/gui-sdl/Makefile.am  2008-10-27 04:14:02.0 +0200
+++ freeciv/client/gui-sdl/Makefile.am  2009-01-07 23:20:55.0 +0200
@@ -1,10 +1,10 @@
 ## Process this file with automake to produce Makefile.in
 
-noinst_LIBRARIES = libguiclient.a
+noinst_LTLIBRARIES = libguiclient.la
 
 AM_CPPFLAGS = -I$(srcdir)/.. 

Re: [Freeciv-Dev] (PR#40177) [Patch] Shared common library

2008-11-10 Thread Marko Lindqvist

URL: http://bugs.freeciv.org/Ticket/Display.html?id=40177 

 About status of this ticket: Some windows compilations (SDL client,
build with nls) fail with this patch.


 - ML



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev