Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: (PR#2541) Problems to compile the SDL for BeOS
Home

[Freeciv-Dev] Re: (PR#2541) Problems to compile the SDL for BeOS

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bernd.korz@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2541) Problems to compile the SDL for BeOS
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Wed, 11 Dec 2002 01:11:28 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Wed, 2002-12-11 at 03:27, Bernd Korz via RT wrote:

> /boot/home/Entwicklung/Sourcecodes/freeCIV/freeciv/client/gui-sdl/gui_iconv.
> c:276: undefined reference to `libiconv_close'

I believe this patch solves the lib problems for both server and
client.  But I don't know if this is the "proper" way to do it.  Per?

jason


Index: configure.ac
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.ac,v
retrieving revision 1.28
diff -u -r1.28 configure.ac
--- configure.ac        2002/12/09 17:46:47     1.28
+++ configure.ac        2002/12/11 09:01:15
@@ -521,6 +521,9 @@
         AC_CHECK_LIB(socket, connect, SERVER_LIBS="-lsocket $SERVER_LIBS")
     fi
 
+    dnl Some systems (e.g., BeOS) need this lib
+    AC_CHECK_LIB(bind, gethostbyaddr, SERVER_LIBS="-lbind $SERVER_LIBS")
+
     dnl Readline library and header files.
     FC_HAS_READLINE()
 
Index: configure.in
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.in,v
retrieving revision 1.206
diff -u -r1.206 configure.in
--- configure.in        2002/12/09 17:46:48     1.206
+++ configure.in        2002/12/11 09:01:15
@@ -515,6 +515,9 @@
         AC_CHECK_LIB(socket, connect, SERVER_LIBS="-lsocket $SERVER_LIBS")
     fi
 
+    dnl Some systems (e.g., BeOS) need this lib
+    AC_CHECK_LIB(bind, gethostbyaddr, SERVER_LIBS="-lbind $SERVER_LIBS")
+
     dnl Readline library and header files.
     FC_HAS_READLINE()
 
Index: m4/sdl-client.m4
===================================================================
RCS file: /home/freeciv/CVS/freeciv/m4/sdl-client.m4,v
retrieving revision 1.2
diff -u -r1.2 sdl-client.m4
--- m4/sdl-client.m4    2002/12/01 22:43:24     1.2
+++ m4/sdl-client.m4    2002/12/11 09:01:16
@@ -49,6 +49,16 @@
 
     if test "$found_client" = yes; then
       client=sdl
+
+      dnl Check for libiconv (which is usually included in glibc, but may
+      dnl be distributed separately).
+      AC_CHECK_LIB(iconv, libiconv_open, CLIENT_LIBS="-liconv $CLIENT_LIBS")
+
+      dnl Check for some other libraries - needed under BeOS for instance.
+      dnl These should perhaps be checked for in all cases?
+      AC_CHECK_LIB(socket, connect, CLIENT_LIBS="-lsocket $CLIENT_LIBS")
+      AC_CHECK_LIB(bind, gethostbyaddr, CLIENT_LIBS="-lbind $CLIENT_LIBS")
+
     elif test "$client" = "sdl"; then
       AC_MSG_ERROR([specified client 'sdl' not configurable (SDL >= 1.1.4 is 
needed)])
     fi

[Prev in Thread] Current Thread [Next in Thread]