Please test the attached patch. I changed the names of included
boost_* and intl to included_boost_* and included_intl, just to be
safe. Other changes are trivial.

Bo
Index: development/scons/SConscript
===================================================================
--- development/scons/SConscript	(revision 13892)
+++ development/scons/SConscript	(working copy)
@@ -29,7 +29,7 @@
   print 'Processing files in boost/libs/filesystem/src...'
 
   filesystem = boostenv.StaticLibrary(
-    target = '$LOCALLIBPATH/boost_filesystem',
+    target = '$LOCALLIBPATH/included_boost_filesystem',
     source = ["$BUILDDIR/boost/filesystem/src/%s" % x for x in Split('''
       convenience.cpp
       exception.cpp
@@ -41,7 +41,7 @@
   print 'Processing files in boost/libs/regex/src...'
 
   regex = boostenv.StaticLibrary(
-    target = '$LOCALLIBPATH/boost_regex',
+    target = '$LOCALLIBPATH/included_boost_regex',
     source = ["$BUILDDIR/boost/regex/src/%s" % x for x in Split('''
       cpp_regex_traits.cpp
       c_regex_traits.cpp
@@ -58,7 +58,7 @@
   print 'Processing files in boost/libs/signals/src...'
 
   signals = boostenv.StaticLibrary(
-    target = '$LOCALLIBPATH/boost_signals',
+    target = '$LOCALLIBPATH/included_boost_signals',
     source = ["$BUILDDIR/boost/signals/src/%s" % x for x in Split('''
       connection.cpp
       named_slot_map.cpp
@@ -71,7 +71,7 @@
   print 'Processing files in boost/libs/iostreams/src...'
 
   iostreams = boostenv.StaticLibrary(
-    target = '$LOCALLIBPATH/boost_iostreams',
+    target = '$LOCALLIBPATH/included_boost_iostreams',
     source = ["$BUILDDIR/boost/iostreams/src/%s" % x for x in Split('''
       file_descriptor.cpp
       mapped_file.cpp
@@ -88,7 +88,7 @@
   # 
   # intl
   # 
-  print "Processing files in intl"
+  print "Processing files in intl..."
 
   env.BuildDir('$BUILDDIR/intl', '$TOP_SRC_DIR/intl', duplicate = 0)
 
@@ -119,7 +119,7 @@
       [Copy('$TARGET', '$SOURCE')])
   
   intl = intlenv.StaticLibrary(
-    target = '$LOCALLIBPATH/intl',
+    target = '$LOCALLIBPATH/included_intl',
     LIBS = ['c'],
     source = ["$BUILDDIR/intl/%s" % x for x in Split('''
       bindtextdom.c
@@ -160,7 +160,7 @@
   #
   # src/support
   #
-  print "Processing files in src/support"
+  print "Processing files in src/support..."
 
   env.substFile('$BUILDDIR/common/support/package.C', '$TOP_SRC_DIR/src/support/package.C.in')
 
@@ -204,7 +204,7 @@
   #
   # src/mathed
   #
-  print "Processing files in src/mathed"
+  print "Processing files in src/mathed..."
 
   mathed = env.StaticLibrary(
     target = '$LOCALLIBPATH/mathed',
@@ -290,7 +290,7 @@
   #
   # src/insets
   #
-  print "Processing files in src/insets"
+  print "Processing files in src/insets..."
 
   insets = env.StaticLibrary(
     target = '$LOCALLIBPATH/insets',
@@ -353,7 +353,7 @@
   #
   # src/frontends
   #
-  print "Processing files in src/frontends"
+  print "Processing files in src/frontends..."
 
   frontends = env.StaticLibrary(
     target = '$LOCALLIBPATH/frontends',
@@ -376,7 +376,7 @@
   #
   # src/graphics
   #
-  print "Processing files in src/graphics"
+  print "Processing files in src/graphics..."
 
   graphics = env.StaticLibrary(
     target = '$LOCALLIBPATH/graphics',
@@ -401,7 +401,7 @@
   #
   # src/frontends/controllers
   #
-  print "Processing files in src/frontends/controllers"
+  print "Processing files in src/frontends/controllers..."
 
   controllers = env.StaticLibrary(
     target = '$LOCALLIBPATH/controllers',
@@ -475,7 +475,7 @@
 
 
 if frontend == 'qt3':
-  print "Processing files in src/frontends/qt3"
+  print "Processing files in src/frontends/qt3..."
 
   qt3env = env.Copy()
   # disable auto scan to speed up non build time
@@ -704,7 +704,7 @@
 
 
 elif frontend == 'qt4':
-  print "Processing files in src/frontends/qt4"
+  print "Processing files in src/frontends/qt4..."
 
   qt4env = env.Copy()
   qt4env['QT_AUTOSCAN'] = 0
@@ -963,12 +963,12 @@
   #
   env.BuildDir('$BUILDDIR/common', '$TOP_SRC_DIR/src', duplicate = 0)
 
-  print "Processing files in src/client"
+  print "Processing files in src/client..."
 
   if env['HAVE_FCNTL']:
     client = env.Program(
       target = '$BUILDDIR/common/client/lyxclient',
-      LIBS = ['supports'] + env['INTL_LIB'] + env['SYSTEM_LIBS'] + 
+      LIBS = ['supports'] + env['INTL_LIBS'] + env['SYSTEM_LIBS'] + 
         env['SOCKET_LIBS'] + env['BOOST_LIBRARIES'],
       source = ["$BUILDDIR/common/client/%s" % x for x in Split('''
         boost.C
@@ -989,7 +989,7 @@
   #
   # tex2lyx
   #
-  print "Processing files in src/tex2lyx"
+  print "Processing files in src/tex2lyx..."
 
   tex2lyx_env = env.Copy()
   # the order is important here.
@@ -1034,7 +1034,7 @@
   #
   # src/
   #
-  print "Processing files in src"
+  print "Processing files in src..."
 
   env.substFile('$BUILDDIR/common/version.C', '$TOP_SRC_DIR/src/version.C.in')
 
@@ -1192,7 +1192,7 @@
       ] +
       env['BOOST_LIBRARIES'] +
       env['EXTRA_LIBS'] +
-      env['INTL_LIB'] + 
+      env['INTL_LIBS'] + 
       env['SOCKET_LIBS'] +
       env['SYSTEM_LIBS']
   )
Index: development/scons/SConstruct
===================================================================
--- development/scons/SConstruct	(revision 13892)
+++ development/scons/SConstruct	(working copy)
@@ -361,11 +361,17 @@
 def getEnvVariable(env, name):
   # first try command line argument (override environment settings)
   if ARGUMENTS.has_key(name) and ARGUMENTS[name].strip() != '':
-    env[name] = ARGUMENTS[name]
+    # multiple options may be passed like "-02 -g"
+    env[name] = ARGUMENTS[name].split()
+    # it does not seem necessary, but it is safer to change ['a'] back to 'a'
+    if len(env[name]) == 1:
+      env[name] = env[name][0]
   # then use environment default
   elif os.environ.has_key(name) and os.environ[name].strip() != '':
-    env[name] = os.environ[name]
     print "Acquiring varaible %s from system environment: %s" % (name, env[name])
+    env[name] = os.environ[name].split()
+    if len(env[name]) == 1:
+      env[name] = env[name][0]
   # finally, env['CC'] etc is set to the default values of Options.
   # and env['CPP'] etc does not exist
 
@@ -570,8 +576,8 @@
   # now, auto and succ = false, or boost=included
   if not succ:
     # we do not need to set LIBPATH now.
-    env['BOOST_LIBRARIES'] = ['boost_signals', 'boost_regex',
-      'boost_filesystem', 'boost_iostreams']
+    env['BOOST_LIBRARIES'] = ['included_boost_signals', 'included_boost_regex',
+      'included_boost_filesystem', 'included_boost_iostreams']
     env['INCLUDED_BOOST'] = True
   env_cache['BOOST_LIBRARIES'] = env['BOOST_LIBRARIES']
   env_cache['INCLUDED_BOOST'] = env['INCLUDED_BOOST']
@@ -585,7 +591,7 @@
 
 if not fast_start:
   if not env['ENABLE_NLS']:
-    env['INTL_LIB'] = []
+    env['INTL_LIBS'] = []
     env['INCLUDED_GETTEXT'] = False
   else:
     # check gettext libraries
@@ -595,6 +601,7 @@
     if gettext_opt in ['auto', 'system']:
       if conf.CheckLib('intl'):
         env['INCLUDED_GETTEXT'] = False
+        env['INTL_LIBS'] = ['intl']
         succ = True
       else: # no found
         if gettext_opt == 'system':
@@ -606,11 +613,14 @@
     if not succ:
       # we do not need to set LIBPATH now.
       env['INCLUDED_GETTEXT'] = True
-    env['INTL_LIB'] = ['intl']
+      env['INTL_LIBS'] = ['included_intl']
+    if platform_name == 'win32':
+      # for functions AddFontResouceA, RemoveFontResourceA
+      env['INTL_LIBS'].append('gdi32')
   env_cache['INCLUDED_GETTEXT'] = env['INCLUDED_GETTEXT']
-  env_cache['INTL_LIB'] = env['INTL_LIB']
+  env_cache['INTL_LIBS'] = env['INTL_LIBS']
 else:
-  env['INTL_LIB'] = env_cache['INTL_LIB']
+  env['INTL_LIBS'] = env_cache['INTL_LIBS']
   env['INCLUDED_GETTEXT'] = env_cache['INCLUDED_GETTEXT']
 
 #
@@ -672,6 +682,7 @@
   ]
 
   for header in headers:
+    utils.addToConfig("/* Define to 1 if you have the <%s> header file. */" % header[0], TOP_SRC_DIR, newline=1)
     if (header[2] == 'c' and conf.CheckCHeader(header[0])) or \
       (header[2] == 'cxx' and conf.CheckCXXHeader(header[0])):
       utils.addToConfig('#define %s 1' % header[1], TOP_SRC_DIR)
@@ -695,6 +706,7 @@
   # HAVE_MKSTEMP
   # HAVE_STRERROR
   # HAVE_STD_COUNT
+  # HAVE_GETCWD
 
   # Check functions
   functions = [
@@ -721,7 +733,8 @@
   char a[] = "hello";
   return std::count(a, a+5, 'l');
 }
-''')
+'''),
+    ('getcwd', 'HAVE_GETCWD', None),
   ]
 
   # HAVE_ASPRINTF
@@ -731,6 +744,7 @@
   # HAVE_FCNTL
   
   for func in functions:
+    utils.addToConfig("/* Define to 1 if you have the `%s' function. */" % func[0], TOP_SRC_DIR, newline=1)
     if conf.CheckFunc(func[0], header=func[2]):
       utils.addToConfig('#define %s 1' % func[1], TOP_SRC_DIR)
     else:
@@ -745,6 +759,7 @@
   ]
 
   for func in env_functions:
+    utils.addToConfig("/* Define to 1 if you have the `%s' function. */" % func[0], TOP_SRC_DIR, newline=1)
     if conf.CheckFunc(func[0]):
       utils.addToConfig('#define %s 1' % func[1], TOP_SRC_DIR)
       env[func[1]] = 1
@@ -755,17 +770,20 @@
   # HAVE_INTMAX_T
   # HAVE_INTTYPES_H_WITH_UINTMAX 
   # HAVE_DECL_ISTREAMBUF_ITERATOR
+  utils.addToConfig("/* Define to 1 if you have the `intmax_t' type. */", TOP_SRC_DIR, newline=1)
   if conf.CheckType('intmax_t', includes='#include <stdint.h>') or \
     conf.CheckType('intmax_t', includes='#include <inttypes.h>'):
     utils.addToConfig('#define HAVE_INTMAX_T 1', TOP_SRC_DIR)
   else:
     utils.addToConfig('/* #undef HAVE_INTMAX_T */', TOP_SRC_DIR)
 
+  utils.addToConfig("/* Define to 1 if you have the `uintmax_t' type. */", TOP_SRC_DIR, newline=1)
   if conf.CheckType('uintmax_t', includes='#include <inttypes.h>'):
     utils.addToConfig('#define HAVE_INTTYPES_H_WITH_UINTMAX  1', TOP_SRC_DIR)
   else:
     utils.addToConfig('/* #undef HAVE_INTTYPES_H_WITH_UINTMAX  */', TOP_SRC_DIR)
     
+  utils.addToConfig("/* Define to 1 if you have the `istreambug_iterator' type. */", TOP_SRC_DIR, newline=1)
   if conf.CheckType('std::istreambuf_iterator<std::istream>', 
     includes='#include <streambuf>\n#include <istream>'):
     utils.addToConfig('#define HAVE_DECL_ISTREAMBUF_ITERATOR 1', TOP_SRC_DIR)
Index: development/scons/scons_utils.py
===================================================================
--- development/scons/scons_utils.py	(revision 13892)
+++ development/scons/scons_utils.py	(working copy)
@@ -108,13 +108,13 @@
 '''
 
 
-def addToConfig(lines, top_src_dir):
+def addToConfig(lines, top_src_dir, newline=2):
   ''' utility function: shortcut for appending lines to outfile
     add newline at the end of lines.
   '''
   global config_content
   if lines.strip() != '':
-    config_content += lines + '\n\n'
+    config_content += lines + '\n'*newline
 
 
 def endConfigH(top_src_dir):

Reply via email to