mail[Wesnoth-commits] r27006 - in /trunk: SConstruct src/SConscript


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

Header


Content

Posted by loonycyborg on June 05, 2008 - 22:41:
Author: loonycyborg
Date: Thu Jun  5 22:41:16 2008
New Revision: 27006

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27006&view=rev
Log:
SCons recipe: pass -D_X11 if X server headers are found.

Modified:
    trunk/SConstruct
    trunk/src/SConscript

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=27006&r1=27005&r2=27006&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Thu Jun  5 22:41:16 2008
@@ -170,10 +170,10 @@
         conf.CheckSDL("SDL_image", require_version = '1.2.0') and \
         conf.CheckOgg() or Warning("Client prerequisites are not met. 
wesnoth, wesnoth_editor, cutter and exploder cannot be built.")
 
-    if env["PLATFORM"] == "win32":
-        have_X = True
-    else:
-        have_X = conf.CheckLib('X11') or Warning("wesnoth_editor cannot be 
built.")
+    have_X = False
+    if env["PLATFORM"] != "win32":
+        have_X = conf.CheckLib('X11')
+
     if env['fribidi']:
         env['fribidi'] = conf.CheckLibWithHeader('fribidi', 
'fribidi/fribidi.h', 'C', 'fribidi_utf8_to_unicode(NULL,0,NULL);') or 
Warning("Can't find libfribidi, disabling freebidi support.")
 
@@ -245,6 +245,9 @@
 
 if env['sendfile']:
     env.Append(CPPDEFINES = "USE_SENDFILE")
+
+if have_X:
+    env.Append(CPPDEFINES = "_X11")
 
 if sys.platform != "win32":
     if env['prefsdir']:
@@ -291,7 +294,7 @@
 except:
     env["svnrev"] = ""
 
-Export(Split("env have_client_prereqs have_X have_server_prereqs"))
+Export(Split("env have_client_prereqs have_server_prereqs"))
 SConscript(dirs = Split("po doc packaging/windows"))
 
 binaries = Split("wesnoth wesnoth_editor wesnothd cutter exploder campaignd 
test")

Modified: trunk/src/SConscript
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/SConscript?rev=27006&r1=27005&r2=27006&view=diff
==============================================================================
--- trunk/src/SConscript (original)
+++ trunk/src/SConscript Thu Jun  5 22:41:16 2008
@@ -218,7 +218,7 @@
     editor/editor_undo.cpp
     animated_editor.cpp
     """)
-if have_client_prereqs and have_X:
+if have_client_prereqs:
     wesnoth_editor = env.Program("wesnoth_editor", wesnoth_editor_sources + 
[libwesnoth_core, libwesnoth_sdl, libwesnoth] + wesnoth_editor_res)
 else:
     wesnoth_editor = None




Related Messages


Powered by MHonArc, Updated Thu Jun 05 23:21:15 2008