On Tue, May 09, 2006 at 04:44:47PM -0500, Bo Peng wrote: > Now, I think I can claim that scons is *basically* working. It is > already a straight 'scons' for linux, mingw and cygwin.
And now solaris, too. I start liking this scons thing ;-) Please, attached find a patch fixing compilation with aiksaurus and some other small thing. Please, have a look at version.C.in as there are a couple of strings ("@PACKAGE_VERSION@" and "@VERSION_INFO@") that are not substituted when generating version.C. -- Enrico
Index: SConstruct =================================================================== --- SConstruct (revision 13821) +++ SConstruct (working copy) @@ -117,17 +117,19 @@ if os.name == 'nt': default_with_x = False spell_checker = 'auto' # FIXME: I need to know what exactly is boost_posix + # EF: It indicates to boost which API to use (posix or windows). + # If not specified, boost tries to figure out by itself, but it may fail. boost_posix = False packaging_method = 'windows' elif os.name == 'posix' and sys.platform != 'cygwin': - platform_name = 'linux' + platform_name = sys.platform default_frontend = 'qt3' # try to use system boost/gettext libraries default_boost_opt = 'auto' default_gettext_opt = 'auto' default_pch_opt = False default_with_x = True - boost_posix = False + boost_posix = True packaging_method = 'posix' elif os.name == 'posix' and sys.platform == 'cygwin': platform_name = 'cygwin' @@ -147,7 +149,7 @@ elif os.name == 'darwin': default_gettext_opt = 'included' default_pch_opt = False default_with_x = False - boost_posix = False + boost_posix = True packaging_method = 'msc' else: # unsupported system platform_name = 'others' @@ -249,9 +251,9 @@ opts.AddOptions( allowed_values = ('aspell', 'pspell', 'ispell', 'auto') ), # environment variable can be set as options ('CC', '$CC', 'gcc'), - ('CPP', '$CPP', 'gcc'), + ('CPP', '$CPP', 'gcc -E'), ('CXX', '$CXX', 'g++'), - ('CXXCPP', '$CXXCPP', 'g++'), + ('CXXCPP', '$CXXCPP', 'g++ -E'), ('CCFLAGS', '$CCFLAGS', ''), ('CPPFLAGS', '$CPPFLAGS', ''), ('CPPPATH', '$CPPPATH', ''), @@ -609,9 +611,16 @@ for val in values: env['EXTRA_LIBS'] = [] +# HAVE_LIBAIKSAURUS # AIKSAURUS_H_LOCATION if conf.CheckLib('Aiksaurus'): - utils.addToConfig("#define AIKSAURUS_H_LOCATION") + utils.addToConfig("#define HAVE_LIBAIKSAURUS 1") + if (conf.CheckCXXHeader("Aiksaurus.h")): + utils.addToConfig("#define AIKSAURUS_H_LOCATION <Aiksaurus.h>") + elif (conf.CheckCXXHeader("Aiksaurus/Aiksaurus.h")): + utils.addToConfig("#define AIKSAURUS_H_LOCATION <Aiksaurus/Aiksaurus.h>") + else: + utils.addToConfig("#define AIKSAURUS_H_LOCATION") env['EXTRA_LIBS'].append('Aiksaurus') # USE_ASPELL @@ -624,18 +633,21 @@ spell_detected = False if spell_engine in ['auto', 'aspell'] and \ conf.CheckLib('aspell'): utils.addToConfig('#define USE_ASPELL 1') - env['EXTRA_LIBS'].appnend('aspell') + env['USE_ASPELL'] = True + env['EXTRA_LIBS'].append('aspell') spell_detected = True elif spell_engine in ['auto', 'pspell'] and \ conf.CheckLib('pspell'): utils.addToConfig('#define USE_PSPELL 1') - env['EXTRA_LIBS'].appnend('pspell') + env['USE_PSPELL'] = True + env['EXTRA_LIBS'].append('pspell') spell_detected = True elif spell_engine in ['auto', 'ispell'] and \ conf.CheckLib('ispell'): utils.addToConfig('#define USE_ISPELL 1') - env['EXTRA_LIBS'].appnend('ispell') - spell_detected = False + env['USE_ISPELL'] = True + env['EXTRA_LIBS'].append('ispell') + spell_detected = True if not spell_detected: # FIXME: can lyx work without an spell engine