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
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
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
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
#
# intl
#
- print "Processing files in intl"
+ print "Processing files in intl..."
env.BuildDir('$BUILDDIR/intl', '$TOP_SRC_DIR/intl', duplicate = 0)
intlenv['CPPPATH'] += ['intl']
intlenv.Append(CCFLAGS = [
- r'-DLOCALEDIR=\"' + env['LOCALE_DIR'] + r'\"',
- r'-DLOCALE_ALIAS_PATH=\"' + env['LOCALE_DIR'] + r'\"',
- r'-DLIBDIR=\"' + env['TOP_SRC_DIR'] + r'/lib\"',
+ r'-DLOCALEDIR=\"' + env['LOCALE_DIR'].replace('\\', '\\\\') + r'\"',
+ r'-DLOCALE_ALIAS_PATH=\"' + env['LOCALE_DIR'].replace('\\', '\\\\') + r'\"',
+ r'-DLIBDIR=\"' + env['TOP_SRC_DIR'].replace('\\', '\\\\') + r'/lib\"',
'-DIN_LIBINTL',
'-DENABLE_RELOCATABLE=1',
'-DIN_LIBRARY',
- r'-DINSTALLDIR=\"' + env['PREFIX'] + r'/lib\"',
+ r'-DINSTALLDIR=\"' + env['PREFIX'].replace('\\', '\\\\') + r'/lib\"',
'-DNO_XMALLOC',
'-Dset_relocation_prefix=libintl_set_relocation_prefix',
'-Drelocate=libintl_relocate',
[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
#
# 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')
#
# src/mathed
#
- print "Processing files in src/mathed"
+ print "Processing files in src/mathed..."
mathed = env.StaticLibrary(
target = '$LOCALLIBPATH/mathed',
#
# src/insets
#
- print "Processing files in src/insets"
+ print "Processing files in src/insets..."
insets = env.StaticLibrary(
target = '$LOCALLIBPATH/insets',
#
# src/frontends
#
- print "Processing files in src/frontends"
+ print "Processing files in src/frontends..."
frontends = env.StaticLibrary(
target = '$LOCALLIBPATH/frontends',
#
# src/graphics
#
- print "Processing files in src/graphics"
+ print "Processing files in src/graphics..."
graphics = env.StaticLibrary(
target = '$LOCALLIBPATH/graphics',
#
# src/frontends/controllers
#
- print "Processing files in src/frontends/controllers"
+ print "Processing files in src/frontends/controllers..."
controllers = env.StaticLibrary(
target = '$LOCALLIBPATH/controllers',
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
elif frontend == 'qt4':
- print "Processing files in src/frontends/qt4"
+ print "Processing files in src/frontends/qt4..."
qt4env = env.Copy()
qt4env['QT_AUTOSCAN'] = 0
'$BUILDDIR/common/images',
'$BUILDDIR/common/frontends',
'$BUILDDIR/common/frontends/qt4',
- '$BUILDDIR/common/frontends/controllers',
- '$QT_INC_PATH',
- '$QT_INC_PATH/Qt',
- '$QT_INC_PATH/QtCore',
- '$QT_INC_PATH/QtGui']
+ '$BUILDDIR/common/frontends/controllers'
+ ]
)
# FIXME: replace by something from pkg_config
#
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
#
# tex2lyx
#
- print "Processing files in src/tex2lyx"
+ print "Processing files in src/tex2lyx..."
tex2lyx_env = env.Copy()
# the order is important here.
#
# src/
#
- print "Processing files in src"
+ print "Processing files in src..."
env.substFile('$BUILDDIR/common/version.C', '$TOP_SRC_DIR/src/version.C.in')
] +
env['BOOST_LIBRARIES'] +
env['EXTRA_LIBS'] +
- env['INTL_LIB'] +
+ env['INTL_LIBS'] +
env['SOCKET_LIBS'] +
env['SYSTEM_LIBS']
)
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
# 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']
if not fast_start:
if not env['ENABLE_NLS']:
- env['INTL_LIB'] = []
+ env['INTL_LIBS'] = []
env['INCLUDED_GETTEXT'] = False
else:
# check gettext libraries
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':
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']
#
]
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)
# HAVE_MKSTEMP
# HAVE_STRERROR
# HAVE_STD_COUNT
+ # HAVE_GETCWD
# Check functions
functions = [
char a[] = "hello";
return std::count(a, a+5, 'l');
}
-''')
+'''),
+ ('getcwd', 'HAVE_GETCWD', None),
]
# HAVE_ASPRINTF
# 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:
]
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
# 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)