Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] (PR#2450) SDL client
Home

[Freeciv-Dev] (PR#2450) SDL client

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#2450) SDL client
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Thu, 28 Nov 2002 19:06:43 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Soon the SDL client will be ready for inclusion.

The attached patch provides (I think) all of the existing bootstrap
support.  You will also need to copy over client/gui-gtk and data/theme
from the freeciv-test repository.

TODO: configure.in support.

jason


Index: configure.ac
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.ac,v
retrieving revision 1.26
diff -u -r1.26 configure.ac
--- configure.ac        2002/11/14 19:06:32     1.26
+++ configure.ac        2002/11/29 03:04:21
@@ -346,6 +346,34 @@
     fi
   fi
 
+  dnl SDL-specific overrides
+  if test "$client" = sdl || test "$client" = yes ; then
+    AM_PATH_SDL(1.1.4, sdl_found="yes" , sdl_found="" , 
sdl_ttf_found="";sdl_image_found="")
+    if test "x$sdl_found" = "xyes"; then
+       LIBS="$SDL_LIBS"
+        AC_CHECK_LIB(SDL_image, IMG_Load, sdl_image_found="yes" )
+       if test "x$sdl_image_found" = "xyes"; then
+           AC_CHECK_LIB(SDL_ttf, TTF_OpenFont, sdl_ttf_found="yes" )           
    
+           if test "x$sdl_ttf_found" = "xyes"; then
+               LIBS=""
+               CLIENT_CFLAGS="$SDL_CFLAGS"
+               CLIENT_LIBS="$SDL_LIBS -lSDL_image -lSDL_ttf"
+               found_client=yes
+           elif test "$client" = "sdl"; then
+               AC_MSG_ERROR(" specified client 'sdl' not configurable [ 
SDL_ttf is needed ] ")
+           fi    
+       elif test "$client" = "sdl"; then
+           AC_MSG_ERROR(" specified client 'sdl' not configurable [ SDL_image 
is needed ] ")
+       fi
+    fi
+
+    if test "x$found_client" = "xyes"; then
+      client=sdl
+    elif test "$client" = "sdl"; then
+      AC_MSG_ERROR(" specified client 'sdl' not configurable [ SDL >=1.1.4 is 
needed ] ")
+    fi
+  fi
+
   dnl Xaw-specific overrides
   if test "$client" = xaw || test "$client" = yes ; then
     dnl Checks for X:
@@ -498,6 +526,7 @@
 AM_CONDITIONAL(ESD, test "x$ESD" = "xyes")
 AM_CONDITIONAL(SDL, test "x$SDL_mixer" = "xyes")
 AM_CONDITIONAL(WINMM, test "x$WINMM" = "xyes")
+AM_CONDITIONAL(CLIENT_GUI_SDL, test "$gui_sources" = "gui-sdl")
 AM_CONDITIONAL(CLIENT_GUI_GTK, test "$gui_sources" = "gui-gtk")
 AM_CONDITIONAL(CLIENT_GUI_GTK_2_0, test "$gui_sources" = "gui-gtk-2.0")
 AM_CONDITIONAL(CLIENT_GUI_XAW, test "$gui_sources" = "gui-xaw")
@@ -717,6 +746,7 @@
          client/Makefile 
          client/agents/Makefile
          client/include/Makefile 
+         client/gui-sdl/Makefile 
          client/gui-gtk/Makefile 
          client/gui-gtk-2.0/Makefile
          client/gui-xaw/Makefile 
Index: client/Makefile.am
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/Makefile.am,v
retrieving revision 1.44
diff -u -r1.44 Makefile.am
--- client/Makefile.am  2002/08/24 14:37:32     1.44
+++ client/Makefile.am  2002/11/29 03:04:21
@@ -4,6 +4,9 @@
 ##    SUBDIRS = @gui_sources@
 ## but that doesn't work properly for "make dist"
 
+if CLIENT_GUI_SDL
+GUI_SUBDIR = gui-sdl
+endif
 if CLIENT_GUI_GTK
 GUI_SUBDIR = gui-gtk
 endif

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