Author: loonycyborg
Date: Mon Jun 9 11:28:06 2008
New Revision: 27058
URL: http://svn.gna.org/viewcvs/wesnoth?rev=27058&view=rev
Log:
SCons recipe: added checks for poll and select; generate config.h
Modified:
trunk/SConstruct
trunk/src/wesconfig.h
Modified: trunk/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=27058&r1=27057&r2=27058&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Mon Jun 9 11:28:06 2008
@@ -152,7 +152,7 @@
sys.path.append("./scons")
from metasconf import init_metasconf
-conf = Configure(env, custom_tests = init_metasconf(env, ["cplusplus",
"python_devel", "sdl", "boost"]))
+conf = Configure(env, custom_tests = init_metasconf(env, ["cplusplus",
"python_devel", "sdl", "boost"]), config_h = "config.h")
if env["prereqs"]:
if env["gettextdir"]:
@@ -179,8 +179,12 @@
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.")
env['sendfile'] = False
- if sys.platform == "linux2":
- env['sendfile'] = conf.CheckCHeader('sys/sendfile.h', '<>') or
Warning("Can't find sendfile, disabling sendfile support.")
+ if env["PLATFORM"] == "posix":
+ conf.CheckCHeader("poll.h", "<>")
+ conf.CheckCHeader("sys/poll.h", "<>")
+ conf.CheckCHeader("sys/select.h", "<>")
+ if sys.platform == "linux2":
+ env['sendfile'] = conf.CheckCHeader('sys/sendfile.h', '<>') or
Warning("Can't find sendfile, disabling sendfile support.")
have_server_prereqs = conf.CheckSDL('SDL_net') or Warning("Server
prerequisites are not met. wesnothd and campaignd cannot be built.")
@@ -191,7 +195,7 @@
have_X = True
have_server_prereqs = True
-env.Append(CPPPATH = ["#/src"])
+env.Append(CPPPATH = ["#/src", "#/"])
boost_test_dyn_link = boost_auto_test = False
if 'test' in COMMAND_LINE_TARGETS:
@@ -215,7 +219,7 @@
# Link only on demand, so we don't need separate link lists for each binary
env.Append(LINKFLAGS = "-Wl,--as-needed")
-env.Replace(CPPDEFINES = [])
+env.Replace(CPPDEFINES = ["HAVE_CONFIG_H"])
if env['static']:
env.AppendUnique(LINKFLAGS = "-all-static")
Modified: trunk/src/wesconfig.h
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/wesconfig.h?rev=27058&r1=27057&r2=27058&view=diff
==============================================================================
--- trunk/src/wesconfig.h (original)
+++ trunk/src/wesconfig.h Mon Jun 9 11:28:06 2008
@@ -18,12 +18,12 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#else
-# define VERSION "1.5.0+svn"
-# define PACKAGE "wesnoth"
# ifndef LOCALEDIR
# define LOCALEDIR "translations"
# endif
#endif
+#define VERSION "1.5.0+svn"
+#define PACKAGE "wesnoth"
/**
* Some older savegames of Wesnoth cannot be loaded anymore,
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits