From cd43719f9600dfc72261ca40a59606ef7b92a2c6 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Mon, 18 Dec 2006 15:30:50 +0000 Subject: [PATCH] Scons: load qt4 module with debug=False when the debug library is not available; modify boost/check warning message git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16323 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/scons/SConstruct | 6 +++++- development/scons/scons_utils.py | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/development/scons/SConstruct b/development/scons/SConstruct index cd8d509ed9..10293e0434 100644 --- a/development/scons/SConstruct +++ b/development/scons/SConstruct @@ -697,13 +697,17 @@ if frontend == 'qt4': if mode == 'debug' and use_vc and \ conf.CheckLibWithHeader('QtCored4', 'QtGui/QApplication', 'c++', 'QApplication qapp();'): qt_lib_suffix = 'd4' + use_qt_debug_libs = True else: qt_lib_suffix = '4' + use_qt_debug_libs = False else: if mode == 'debug' and conf.CheckLibWithHeader('QtCore_debug', 'QtGui/QApplication', 'c++', 'QApplication qapp();'): qt_lib_suffix = '_debug' + use_qt_debug_libs = True else: qt_lib_suffix = '' + use_qt_debug_libs = False frontend_libs = [x + qt_lib_suffix for x in qt_libs] qtcore_lib = ['QtCore' + qt_lib_suffix] @@ -1699,7 +1703,7 @@ if build_qt4: # process .C file!!! (add to cxx_suffixes ) # qt4env.Tool('qt4', [scons_dir]) - qt4env.EnableQt4Modules(qt_libs, debug = (mode == 'debug')) + qt4env.EnableQt4Modules(qt_libs, debug = (mode == 'debug' and use_qt_debug_libs)) qt4env['QT4_AUTOSCAN'] = 0 qt4env['QT4_UICDECLFLAGS'] = '-tr lyx::qt_' diff --git a/development/scons/scons_utils.py b/development/scons/scons_utils.py index 1e9cde59fb..168e4baf4f 100644 --- a/development/scons/scons_utils.py +++ b/development/scons/scons_utils.py @@ -196,8 +196,11 @@ def checkBoostLibraries(conf, libs, lib_paths, inc_paths, versions, isDebug): for ver in versions: lib_files += filter(lambda x: re.search('libboost_%s-\w+-mt-([^dgy]+-)*%s.a' % (lib, ver), x), files) if len(lib_files) == 0: - print 'Warning: Can not find an appropriate boost library in %s.' % path - print 'Allowed versions are ', ', '.join(versions) + if isDebug: + print 'Failed to find the debug version of boost', ' or '.join(versions) + else: + print 'Failed to find the release version of boost', ' or '.join(versions) + # use alternative libraries for ver in versions: lib_files += filter(lambda x: re.search('libboost_%s-[\w-]+%s.a' % (lib, ver), x), files) if len(lib_files) > 0: @@ -205,6 +208,8 @@ def checkBoostLibraries(conf, libs, lib_paths, inc_paths, versions, isDebug): if len(lib_files) > 0: # get xxx-gcc-1_33_1 from /usr/local/lib/libboost_xxx-gcc-1_33_1.a lib_names.append(lib_files[0].split(os.sep)[-1][3:-2]) + else: + break if len(lib_names) == len(libs): found_lib = True lib_path = path -- 2.39.2