mail[Wesnoth-commits] r25228 - in /trunk: SConstruct configure.ac


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by esr on March 28, 2008 - 12:23:
Author: esr
Date: Fri Mar 28 12:22:59 2008
New Revision: 25228

URL: http://svn.gna.org/viewcvs/wesnoth?rev=25228&view=rev
Log:
Improve the quality of the SDL checks in SConstruct.

Modified:
    trunk/SConstruct
    trunk/configure.ac

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=25228&r1=25227&r2=25228&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Fri Mar 28 12:22:59 2008
@@ -2,6 +2,7 @@
 # SCons build description for the Wesnoth project
 #
 import os, sys, commands, shutil
+from SCons.Script import *
 
 #
 # Build-control options
@@ -83,9 +84,6 @@
      context.Result( ret )
      return ret
 
-# vi: syntax=python:et:ts=4
-from os.path import join
-from SCons.Script import *
 
 def CheckSDL(context, sdl_lib = "SDL", require_version = None):
     if require_version:
@@ -146,9 +144,26 @@
      print 'pkg-config >= 0.15.0 not found.'
      Exit(1)
 
-# FIXME: It would be good to check for SDL_ttf >= 2.0.8 here
 if not conf.CheckSDL(require_version = '1.2.7'):
      print 'SDL >= 1.2.7 not found.'
+     Exit(1)
+#if conf.CheckSDL("SDL_ttf", require_version = "2.0.8"):
+#     print 'SDL_ttf >= 2.0.8 not found.'
+#     Exit(1)
+
+if not conf.TryLink('''
+    #include <SDL_mixer.h>
+    #include <stdlib.h>
+
+    int main(int argc, char **argv)
+    {
+       Mix_Music* music = Mix_LoadMUS("data/core/music/main_menu.ogg");
+       if (music == NULL)
+           exit(1);
+       exit(0);
+    }
+''', ".c"):
+     print "No Ogg Vorbis support in SDL!"
      Exit(1)
 
 #
@@ -828,12 +843,6 @@
 env.AlwaysBuild(sanity_check)
 env.Precious(sanity_check)
 
-#
-# Known problems:
-#
-# 1. We don't check for Ogg Vorbis support in SDL_mixer
-# FIXME tags other problems
-#
 # To do:
 #
 # 1. Documentation formatting and man-page installation

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/configure.ac?rev=25228&r1=25227&r2=25228&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Mar 28 12:22:59 2008
@@ -837,7 +837,6 @@
 #######################################################################
 # Check for OGG support in SDL_mixer                                  #
 #######################################################################
-# *** Not yet covered by scons recipe
 
 if test -e "data/core/music/main_menu.ogg" ; then
     AC_LANG([C])




Related Messages


Powered by MHonArc, Updated Fri Mar 28 12:41:32 2008