diff --git a/SConstruct b/SConstruct index 227cec8c1b2..4b55eff3e48 100644 --- a/SConstruct +++ b/SConstruct @@ -170,10 +170,10 @@ if env["prereqs"]: 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.") @@ -246,6 +246,9 @@ if env['python']: if env['sendfile']: env.Append(CPPDEFINES = "USE_SENDFILE") +if have_X: + env.Append(CPPDEFINES = "_X11") + if sys.platform != "win32": if env['prefsdir']: env.Append(CPPDEFINES = "PREFERENCES_DIR='\"%s\"'" % env['prefsdir'] ) @@ -291,7 +294,7 @@ try: 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") diff --git a/src/SConscript b/src/SConscript index a2742b3116c..bb6164350e8 100644 --- a/src/SConscript +++ b/src/SConscript @@ -218,7 +218,7 @@ wesnoth_editor_sources = Split(""" 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