diff --git a/engine/wscript b/engine/wscript index ebc86351..6910e5f3 100644 --- a/engine/wscript +++ b/engine/wscript @@ -12,6 +12,7 @@ def options(opt): grp.add_option('--enable-stdin-input', action = 'store_true', dest = 'USE_SELECT', default = False, help = 'enable console input from stdin (always enabled for dedicated) [default: %default]') + grp.add_option('--fbdev', action = 'store_true', dest = 'FBDEV_SW', default = False, help = 'build fbdev-only software-only engine') grp.add_option('--disable-async-resolve', action = 'store_true', dest = 'NO_ASYNC_RESOLVE', default = False, @@ -19,6 +20,9 @@ def options(opt): grp.add_option('--enable-custom-swap', action = 'store_true', dest = 'CUSTOM_SWAP', default = False, help = 'enable custom swap allocator. For devices with no swap support') + grp.add_option('--enable-legacy-sdl', action = 'store_true', dest = 'SDL12', default = False, + help = 'enable using SDL1.2 instead of SDL2(not recommended) [default: %default') + opt.load('sdl2') def configure(conf): @@ -34,11 +38,15 @@ def configure(conf): conf.define('XASH_FBDEV', 1) conf.check_cc( lib = 'asound' ) conf.check_cc( lib = 'rt' ) + elif conf.options.SDL12: + conf.define('XASH_SDL', 12) + conf.check_cfg(package='sdl', args='--cflags --libs', uselib_store='SDL2' ) + conf.env.HAVE_SDL2 = True else: conf.load('sdl2') if not conf.env.HAVE_SDL2: conf.fatal('SDL2 not availiable! If you want to build dedicated server, specify --dedicated') - conf.define('XASH_SDL', 1) + conf.define('XASH_SDL', 2) if conf.options.USE_SELECT == None: conf.options.USE_SELECT = conf.options.DEDICATED