Boost logo

Boost-Commit :

From: grafikrobot_at_[hidden]
Date: 2007-11-22 15:34:08


Author: grafik
Date: 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
New Revision: 41306
URL: http://svn.boost.org/trac/boost/changeset/41306

Log:
Import Boost Build extensions from my local CVS tree.
Added:
   sandbox/tools/build_extensions/
   sandbox/tools/build_extensions/boost-build.jam (contents, props changed)
   sandbox/tools/build_extensions/build/
   sandbox/tools/build_extensions/build/build.jam (contents, props changed)
   sandbox/tools/build_extensions/doc/
   sandbox/tools/build_extensions/ext/
   sandbox/tools/build_extensions/ext/bass.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/boost.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/botan.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/expat.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/extension.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/freeimage.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/gif.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/gigabase.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/gtk.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/jpeg.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/libtiff.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/lua.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/mng.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/ogre.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/osg.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/png.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/tecla.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/tinyxml.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/windows-psdk.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/wxwidgets.jam (contents, props changed)
   sandbox/tools/build_extensions/ext/zlib.jam (contents, props changed)
   sandbox/tools/build_extensions/project-root.jam (contents, props changed)

Added: sandbox/tools/build_extensions/boost-build.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/boost-build.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,47 @@
+# Copyright Rene Rivera 2007.
+#
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# For instructions see Jamfile.v2, or "bjam --help".
+
+local rule if-has-file ( file + : dir * )
+{
+ local result ;
+ if $(dir)
+ {
+ result = [ GLOB $(dir) : $(file) ] ;
+ }
+ return $(result[1]:P) ;
+}
+
+#~ Attempts to find the Boost source tree...
+
+local boost-src = [ if-has-file configure :
+ [ MATCH --boost=(.*) : $(ARGV) ]
+ $(BOOST)
+ $(.boost-build-file:D)/../boost
+ ] ;
+
+#~ Attempts to find the Boost.Build files...
+
+local boost-build-src = [ if-has-file bootstrap.jam :
+ [ MATCH --boost-build=(.*) : $(ARGV) ]
+ $(BOOST_BUILD_PATH)
+ $(BOOST_BUILD)
+ $(boost-src)/tools/build/v2
+ ] ;
+
+#~ Set some common vars to refer to the Boost sources...
+
+BOOST ?= $(boost-src) ;
+BOOST_ROOT ?= $(boost-src) ;
+
+#~ Add the local extensions...
+
+BOOST_BUILD_PATH += $(.boost-build-file:D)/ext ;
+
+#~ And load up Boost.Build...
+
+boost-build $(boost-build-src) ;

Added: sandbox/tools/build_extensions/build/build.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/build/build.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,95 @@
+#~ Copyright 2006 Redshift Software, Inc.
+#~ Copyright 2007 Couch World Games Inc.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+import os ;
+import modules ;
+
+project build ;
+
+path-constant PACKAGES : [ MATCH --packages=(.*) : [ modules.peek : ARGV ] ] ;
+path-constant BOOST_ROOT(TRUNK) : [ modules.peek : BOOST_ROOT ] ;
+path-constant BOOST_ROOT(RELEASE) : [ MATCH --boost-release=(.*) : [ modules.peek : ARGV ] ] ;
+
+using zlib : 1.2.3 : $(PACKAGES)/zlib-1.2.3 : ;
+using gif : 4.1.4 : $(PACKAGES)/giflib-4.1.4 : ;
+using jpeg : 6b : $(PACKAGES)/jpeg-6b : ;
+using png : 1.2.12 : $(PACKAGES)/libpng-1.2.12 : ;
+using mng : 1.0.9 : $(PACKAGES)/libmng-1.0.9 : ;
+using libtiff : 3.8.2 : $(PACKAGES)/tiff-3.8.2 : ;
+#~ using freeimage : 3.9.1 : $(PACKAGES)/FreeImage391/FreeImage ;
+
+using expat : 2.0.0 : $(PACKAGES)/expat-2.0.0 : ;
+using tinyxml : 2.5.0 : $(PACKAGES)/TinyXml-2.5.0 : --enable-stl ;
+using lua : 5.1.1 : $(PACKAGES)/lua-5.1.1 ;
+using osg : 2.2 : $(PACKAGES)/OpenSceneGraph-2.2.0 ;
+
+#~ using botan : 1.4.12 : $(PACKAGES)/Botan-1.4.12 :
+ #~ --enable-adler32
+ #~ --enable-mdx
+ #~ --enable-md4
+ #~ --enable-md5
+ #~ --enable-isaac
+ #~ --enable-sha-256
+ #~ --enable-es-win32
+ #~ --enable-aes
+ #~ --enable-hmac
+ #~ ;
+#~ using boost : 1.33.1 : $(BOOST_ROOT(RELEASE)) :
+ #~ --with-interprocess=$(BOOST_ROOT(TRUNK)) ;
+#~ using gigabase : 3.56 : $(PACKAGES)/GigaBASE-3.56 ;
+#~ if [ os.on-unix ]
+#~ {
+ #~ using gtk : 2.0 : /usr :
+ #~ --with-glib=2.0
+ #~ --with-pango=1.0
+ #~ --with-atk=1.0
+ #~ ;
+ #~ using wxwidgets : 2.6.3 : $(PACKAGES)/wxWidgets-2.6.3 :
+ #~ --disable-metafile
+ #~ --disable-html
+ #~ --disable-xml
+ #~ --enable-stc
+ #~ --disable-statusbar_native
+ #~ --enable-no_exceptions
+ #~ --with-gtk=/ext/gtk//gtk/<gtk-version>2.0
+ #~ --with-gtk-version=2.4
+ #~ : <target-os>linux
+ #~ ;
+ #~ using tecla : 1.6.1 : $(PACKAGES)/libtecla-1.6.1 ;
+#~ }
+#~ else if [ os.on-windows ]
+#~ {
+ #~ using wxwidgets : 2.6.3 : $(PACKAGES)/wxWidgets-2.6.3 :
+ #~ --disable-metafile
+ #~ --disable-html
+ #~ --disable-xml
+ #~ --enable-stc
+ #~ --enable-generic
+ #~ --disable-statusbar_native
+ #~ --enable-no_exceptions
+ #~ : <target-os>windows
+ #~ ;
+#~ }
+
+build-project /ext/zlib ;
+build-project /ext/gif ;
+build-project /ext/png ;
+build-project /ext/jpeg ;
+build-project /ext/mng ;
+build-project /ext/libtiff ;
+#~ build-project /ext/freeimage ;
+
+build-project /ext/expat ;
+build-project /ext/tinyxml ;
+build-project /ext/lua ;
+build-project /ext/osg ;
+
+#~ build-project /ext/botan ;
+#~ build-project /ext/boost ;
+#~ build-project /ext/gigabase ;
+#~ if [ os.on-unix ] { build-project /ext/gtk ; }
+#~ build-project /ext/wx ;
+#~ if [ os.on-unix ] { build-project /ext/tecla ; }

Added: sandbox/tools/build_extensions/ext/bass.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/bass.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,57 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for BASS sound library <http://www.un4seen.com/bass.html>.
+### No configuration really possible with the BASS lib. So this only
+### declares the single Windows DLL target "/ext/bass//bass" for the
+### MSVC toolset. For other toolsets that support direct linking to the
+### DLL there is also a "/ext/bass//bass.dll" target (not tested).
+
+
+import property ;
+import project ;
+import feature ;
+
+project.extension bass ;
+
+feature.feature bass-version
+ :
+ : propagated optional implicit ;
+
+feature.feature bass-location
+ :
+ : free ;
+
+rule init ( version ? : location : options * )
+{
+ if $(version)
+ {
+ feature.extend bass-version : $(version) ;
+ }
+
+ local requirements =
+ <bass-version>$(version)
+ <bass-location>$(location)
+ <location-prefix>bass
+ ;
+
+ lib bass.dll
+ :
+ : $(requirements)
+ <file>$(location)/bass.dll
+ ;
+
+ lib bass
+ :
+ : $(requirements)
+ <toolset>msvc
+ <link>shared
+ <file>$(location)/c/bass.lib
+ <use>bass.dll
+ :
+ : <include>$(location)/c
+ <library>bass.dll
+ ;
+}

Added: sandbox/tools/build_extensions/ext/boost.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/boost.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,168 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for building Boost <http://www.boost.org/> externally.
+### Targets:
+### /ext/boost//boost
+### /ext/boost//thread
+### /ext/boost//regex
+### /ext/boost//interprocess
+
+import extension ;
+
+import property ;
+import project ;
+import feature ;
+import set ;
+import stage ;
+import common ;
+import path ;
+
+extension.declare boost ;
+
+feature.feature boost-interprocess : : free ;
+feature.feature boost-asio : : free ;
+
+rule boost-tag ( name : type ? : property-set )
+{
+ return [ common.format-name
+ boost_ <base> <toolset> <threading> <runtime> <version:boost-version>
+ : $(name) : $(type) : $(property-set) ] ;
+}
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements =
+ [ extension.define boost $(version) : $(location) : $(options) ]
+ <boost-version>$(version)
+ <boost-location>$(location)
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ #~ <warnings>off
+ ;
+ requirements = [ extension.refine boost $(version) : <tag>@boost-tag ] ;
+ local common-requirements =
+ <include>$(location)
+ ;
+
+ alias boost
+ :
+ : $(common-requirements)
+ $(requirements)
+ :
+ : $(common-requirements)
+ ;
+
+ lib thread
+ : [ set.difference
+ [ glob $(location)/libs/thread/src/*.cpp ]
+ :
+ [ glob $(location)/libs/thread/src/tss_null.cpp ]
+ ]
+ : $(requirements)
+ <location-prefix>thread
+ <use>boost
+ <threading>multi
+ <define>BOOST_THREAD_BUILD_DLL=1
+ <toolset>msvc:<cxxflags>/wd4275
+ <toolset>msvc:<cxxflags>/wd4251
+ :
+ : <threading>multi
+ <define>BOOST_THREAD_USE_DLL=1
+ ;
+
+ lib regex
+ : [ glob $(location)/libs/regex/src/*.cpp ]
+ : $(requirements)
+ <location-prefix>regex
+ <use>boost
+ <link>shared:<define>BOOST_REGEX_DYN_LINK=1
+ <toolset>msvc:<cxxflags>/wd4309
+ <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
+ :
+ :
+ ;
+
+ if <boost-interprocess> in $(requirements:G)
+ {
+ local i = [ property.select <boost-interprocess> : $(requirements) ] ;
+ if ! ( $(i:G=) in enable disable )
+ {
+ local i-location = [ path.make $(i:G=) ] ;
+ local i-files = [ path.glob-tree $(i-location)/boost/interprocess : *.hpp ] ;
+ local custom-files ;
+ for local i-file in $(i-files)
+ {
+ local custom-file = [ path.relative $(i-file) $(i-location) ] ;
+ make $(custom-file) : $(i-file) : common.copy
+ : $(requirements)
+ <location-prefix>interprocess
+ ;
+ custom-files += $(custom-file) ;
+ }
+ alias interprocess
+ :
+ : $(requirements)
+ <use>boost
+ <dependency>$(custom-files)
+ :
+ : $(common-requirements)
+ <dependency>$(custom-files)
+ <implicit-dependency>$(custom-files)
+ ;
+ }
+ else if $(i:G=) = enable
+ {
+ alias interprocess
+ :
+ : $(requirements)
+ <use>boost
+ :
+ :
+ ;
+ }
+ }
+
+ if <boost-asio> in $(requirements:G)
+ {
+ local i = [ property.select <boost-asio> : $(requirements) ] ;
+ if ! ( $(i:G=) in enable disable )
+ {
+ local i-location = [ path.make $(i:G=) ] ;
+ local i-files = [ path.glob-tree $(i-location)/boost/asio : *.hpp ] ;
+ local custom-files ;
+ for local i-file in $(i-files)
+ {
+ local custom-file = [ path.relative $(i-file) $(i-location) ] ;
+ make $(custom-file) : $(i-file) : common.copy
+ : $(requirements)
+ <location-prefix>asio
+ ;
+ custom-files += $(custom-file) ;
+ }
+ alias asio
+ :
+ : $(requirements)
+ <use>boost
+ <dependency>$(custom-files)
+ :
+ : $(common-requirements)
+ <dependency>$(custom-files)
+ <implicit-dependency>$(custom-files)
+ ;
+ }
+ else if $(i:G=) = enable
+ {
+ alias asio
+ :
+ : $(requirements)
+ <use>boost
+ :
+ :
+ ;
+ }
+ }
+}

Added: sandbox/tools/build_extensions/ext/botan.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/botan.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,715 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for building Botan library <http://botan.randombit.net/>.
+### Targets:
+### /ext/botan//botan
+
+import extension ;
+
+import property ;
+import project ;
+import feature ;
+import regex ;
+import stage ;
+import common ;
+import set ;
+import notfile ;
+
+extension.declare botan ;
+
+rule code ( name : class-name * : header-guard * : sources * : facade ? )
+{
+ class-name ?= [ regex.replace $(name:U) [-.] _ ] ;
+ header-guard ?= $(class-name[1]:U) ;
+
+ extension.option botan $(name) ;
+ .code.requirements +=
+ "<botan-$(name)>disable:<define>BOTAN_$(header-guard)_H__" ;
+ #~ .code.config.h +=
+ #~ "<botan-$(name)>disable:<>#define BOTAN_$(header-guard)_H__" ;
+ for local c in $(class-name)
+ {
+ .code.config.h +=
+ "<botan-$(name)>disable:<>namespace Botan { class $(c); }"
+ #~ "<botan-$(name)>disable:<>namespace Botan { struct $(c) { $(c)(...){} }; }"
+ ;
+ }
+ facade ?= Empty ;
+ .code.list.cpp +=
+ "<botan-$(name)>disable:<>#define $(class-name) Undefined<$(facade)Facade>"
+ ;
+ .code.sources.$(name) = $(sources) ;
+ .code.sources += $(sources) ;
+ .code += $(name) ;
+}
+
+rule algo ( name : class-name * : header-guard * : sources * : facade ? )
+{
+ code $(name) : $(class-name) : $(header-guard) : $(sources) : $(facade) ;
+}
+
+#~ Block ciphers...
+algo aes : AES AES_128 AES_192 AES_256 : AES : aes*.cpp : BlockCipher ;
+algo blowfish : Blowfish : : blowfish.cpp blfs_tab.cpp : BlockCipher ;
+algo cast : CAST_128 CAST_256 : CAST128 CAST256 : cast*.cpp : BlockCipher ;
+algo des : DES DESX TripleDES : DES : des*.cpp : BlockCipher ;
+algo gost : : : gost*.cpp : BlockCipher ;
+algo idea : : : idea.cpp : BlockCipher ;
+algo kasumi : : : kas*.cpp : BlockCipher ;
+algo luby-rackoff : LubyRackoff : LUBY_RACKOFF : lubyrack.cpp : BlockCipher ;
+algo mars : : : mars*.cpp : BlockCipher ;
+algo misty1 : : : mist*.cpp : BlockCipher ;
+algo rc2 : : : rc2.cpp : BlockCipher ;
+algo rc5 : : : rc5.cpp : BlockCipher ;
+algo rc6 : : : rc6.cpp : BlockCipher ;
+algo safer-sk : SAFER_SK : : safe*.cpp : BlockCipher ;
+algo seed : : : seed*.cpp : BlockCipher ;
+algo serpent : Serpent : : serpent.cpp : BlockCipher ;
+algo skipjack : Skipjack : : skipjack.cpp : BlockCipher ;
+algo square : Square : : sqr_tab.cpp square.cpp : BlockCipher ;
+algo tea : : : tea.cpp : BlockCipher ;
+algo twofish : Twofish : : two*.cpp : BlockCipher ;
+algo xtea : : : xtea.cpp : BlockCipher ;
+algo lion : Lion : : lion.cpp : BlockCipher ;
+
+#~ Stream ciphers...
+algo arc4 : ARC4 : : arc4.cpp : StreamCipher ;
+algo turing : Turing : : tur*.cpp : StreamCipher ;
+algo widerwake4+1-be : WiderWake_41_BE : WIDER_WAKE : wid_wake.cpp : StreamCipher ;
+algo isaac : : : isaac.cpp : StreamCipher ;
+algo seal-3.0-be : SEAL : : seal.cpp : StreamCipher ;
+
+#~ Hashes...
+algo adler32 : Adler32 : : adler32.cpp : HashFunction ;
+algo crc24 : : : crc24.cpp : HashFunction ;
+algo crc32 : : : crc32.cpp : HashFunction ;
+algo fork-256 : FORK_256 : : fork256.cpp : HashFunction ;
+algo has-160 : HAS_160 : : has160.cpp : HashFunction ;
+algo haval : : : haval.cpp : HashFunction ;
+algo mdx : MDx_HashFunction : MDX_BASE : mdx_hash.cpp : HashFunction ;
+algo md2 : : : md2.cpp : HashFunction ;
+algo md4 : : : md4.cpp : HashFunction ;
+algo md5 : : : md5.cpp : HashFunction ;
+algo ripemd-128 : RIPEMD_128 : : rmd128.cpp : HashFunction ;
+algo ripemd-160 : RIPEMD_160 : : rmd160.cpp : HashFunction ;
+algo sha-160 : SHA_160 : : sha160.cpp : HashFunction ;
+algo sha-256 : SHA_256 : : sha256.cpp : HashFunction ;
+algo sha-384-512 : SHA_384 SHA_512 : SHA_64BIT : sha_64.cpp : HashFunction ;
+algo tiger : Tiger : : tig*.cpp : HashFunction ;
+algo whirlpool : Whirlpool : : whrl*.cpp : HashFunction ;
+algo parallel : Parallel : PAR_HASH : par_hash.cpp : HashFunction ;
+
+#~ MACs...
+algo cmac : : : cmac.cpp : MessageAuthenticationCode ;
+algo hmac : : : hmac.cpp : MessageAuthenticationCode ;
+algo x9.19-mac : ANSI_X919_MAC : ANSI_X919_MAC : x919_mac.cpp : MessageAuthenticationCode ;
+
+#~ Key exchange...
+algo dh : : DIFFIE_HELLMAN : dh.cpp ;
+algo dsa : DSA_Operation : : dsa.cpp ;
+algo elgamal : : : elgamal.cpp ;
+algo pkcs :
+ EME EMSA MGF KDF NR_Operation ELG_Operation DH_Operation :
+ EME EMSA HASHID KDF KEYPAIR PK_LOOKUP MGF1 NYBERG_RUEPPEL PBE PBE_PKCS
+ PK_OPS PK_CORE PK_FILTERS PK_KEYS PK_KEY_FACTORY PUBKEY_UTIL
+ PKCS10 PKCS5 PKCS8 PUBKEY RSA RW
+ : def_ops.cpp eme1.cpp eme_pkcs.cpp emsa*.cpp get_enc.cpp get_pbe.cpp hash_id.cpp kdf.cpp
+ keypair.cpp look_pk.cpp mgf1.cpp nr.cpp pbes*.cpp pkcs*.cpp pk_*.cpp policy.cpp
+ prf_x942.cpp pubkey.cpp rsa.cpp rw.cpp ;
+algo pkcs5-pbkdf : PKCS5_PBKDF1 PKCS5_PBKDF2 : : : S2K ;
+
+#~ Certificates...
+algo asn1 :
+ IF_Operation :
+ ASN1 ASN1_OBJ ASN1_OID BER_DECODER DER_ENCODER IF_ALGO OIDS PEM
+ : asn1_*.cpp ber_*.cpp der_*.cpp if_algo.cpp oids.cpp pem.cpp ;
+algo x509 : :
+ CERT_STORE CRL_ENTRY X509_CA X509_CRL X509_PUBLIC_KEY X509_OBJECT
+ X509_CERTS X509_SELF X509_CERT_STORE
+ : certstore.cpp crl_ent.cpp x509*.cpp ;
+
+#~ ???...
+algo barrett : : : barrett.cpp ;
+#~ algo base64 : Base64_Encoder Base64_Decoder : BASE64 : base64.cpp charset.cpp ;
+algo mode : :
+ CBC CFB CTR CTS EAX ECB OFB MODEBASE
+ : cbc.cpp cfb.cpp ctr.cpp cts.cpp eax.cpp ecb.cpp ofb.cpp
+ modebase.cpp ;
+algo discrete-log : DL_Group : DL_ALGO DL_PARM : dl_*.cpp ;
+algo dlies : : : dlies.cpp ;
+algo fips-140 : : FIPS140 : fips140.cpp ;
+algo openpgp : OpenPGP_S2K : : openpgp.cpp pgp_s2k.cpp : S2K ;
+algo x931 : ANSI_X931_RNG : ANSI_X931_RNG : x931_rng.cpp ;
+algo blinder : Blinder : : blinding.cpp ;
+
+#~ Various code chunks...
+code policy : : POLICY_CONF : inifile.cpp conf.cpp ;
+code engine : Engine : ENGINE
+ : engine.cpp eng_base.cpp ;
+code default-engine : Default_Engine : DEFAULT_ENGINE
+ : def_alg.cpp def_ops.cpp def_mode.cpp ;
+code lookup : : NOTHING : lookup.cpp get_algo.cpp ;
+code algolist : : ALGOLIST ; #: algolist.cpp ;
+code filters : : FILTERS : filters.cpp ;
+
+rule mod ( name condition ? : def * : subdir ? : requirements * : usage * )
+{
+ def ?= [ regex.replace $(name:U) [-] _ ] ;
+ subdir ?= [ regex.replace $(name:L) [-] _ ] ;
+ .modules += $(name) ;
+ extension.option botan $(name) ;
+ if $(condition)
+ {
+ .module.config.h += "<botan-$(name)>enable,$(condition):<>#define BOTAN_EXT_$(def)" ;
+ }
+ else
+ {
+ .module.config.h += "<botan-$(name)>enable:<>#define BOTAN_EXT_$(def)" ;
+ }
+ .module.subdir.$(name) = $(subdir) ;
+ .module.requirements.$(name) = $(requirements) $(usage) ;
+ .module.usage.$(name) = $(usage) ;
+ .module.condition.$(name) = $(condition) ;
+}
+
+#~ Modules...
+mod alloc-mmap ;
+mod comp-bzip2 ;
+mod comp-zlib ;
+mod eng-aep : ENGINE_AEP ENTROPY_SRC_AEP ;
+mod eng-gmp : GNU_MP ;
+mod eng-ossl : OPENSSL ;
+mod es-beos : ENTROPY_SRC_BEOS ;
+mod es-capi : ENTROPY_SRC_CAPI ;
+mod es-egd : ENTROPY_SRC_EGD ;
+mod es-ftw : ENTROPY_SRC_FTW ;
+mod es-unix <target-os>linux : ENTROPY_SRC_UNIX ;
+mod es-win32 <target-os>windows : ENTROPY_SRC_WIN32 :
+ : : <target-os>windows:<find-shared-library>user32 ;
+mod fd-unix : PIPE_UNIXFD_IO ;
+mod ml-unix ;
+mod ml-win32 ;
+mod mod-qt : MUTEX_QT ;
+mod mp-asm64 ;
+mod mux-pthr : MUTEX_PTHREAD ;
+mod tm-hard : TIMER_HARDWARE ;
+mod tm-posix : TIMER_POSIX ;
+mod tm-unix : TIMER_UNIX ;
+mod tm-win32 : TIMER_WIN32 ;
+
+rule config_h ( targets * : sources * : properties * )
+{
+ local version = [ property.select <botan-version> : $(properties) ] ;
+ if ! [ property.select <architecture> : $(properties) ]
+ {
+ properties += [ property.evaluate-conditionals-in-context
+ <target-os>windows:<architecture>x86
+ <target-os>darwin:<architecture>power
+ <target-os>sgi:<architecture>mips32
+ : $(properties) ] ;
+ }
+ local config = [ property.evaluate-conditionals-in-context
+ "<architecture>x86:<>#define BOTAN_TARGET_ARCH_IS_IA32"
+ "<architecture>ia64:<>#define BOTAN_TARGET_ARCH_IS_IA64"
+ "<botan-mp-asm64>disable:<>#define BOTAN_MP_WORD_BITS 32"
+ "<botan-mp-asm64>enable:<>#define BOTAN_MP_WORD_BITS 64"
+ "<botan-policy>disable:<>
+#include <string>
+#include <vector>
+namespace Botan { namespace Config { namespace {
+ inline void load(const std::string&) {}
+ inline unsigned get_u32bit(const std::string&) { return 0; }
+ std::vector<std::string> get_list(const std::string&) { return std::vector<std::string>(); }
+ std::string get_string(const std::string&) { return \"\"; }
+} } }
+"
+
+ $(.module.config.h)
+ $(.code.config.h)
+ : $(properties) ] ;
+
+ VERSION on $(<) = [ regex.split $(version:G=) [.] ] ;
+ CONFIG on $(<) = $(config:G=) ;
+ NL on $(<) = "
+" ;
+}
+actions config_h
+{
+ @($(STDOUT):E=
+#ifndef BOTAN_CONFIG_H
+#define BOTAN_CONFIG_H
+
+#define BOTAN_VERSION_MAJOR $(VERSION[1])
+#define BOTAN_VERSION_MINOR $(VERSION[2])
+#define BOTAN_VERSION_PATCH $(VERSION[3])
+
+#define BOTAN_DEFAULT_BUFFER_SIZE 4096
+#define BOTAN_VECTOR_OVER_ALLOCATE 4
+#define BOTAN_GZIP_OS_CODE 255
+
+$(CONFIG:J=$(NL))
+
+namespace Botan { namespace {
+ template <typename B> struct Undefined;
+ struct EmptyFacade;
+ struct BlockCipherFacade;
+ struct StreamCipherFacade;
+ struct HashFunctionFacade;
+ struct MessageAuthenticationCodeFacade;
+ } }
+namespace Botan {
+ class Keyed_Filter;
+}
+
+#endif // BOTAN_CONFIG_H
+) > "$(<)"
+}
+
+actions autoinit_h
+{
+ @($(STDOUT):E=
+// Copyright Redshift Software, Inc. 2006.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+#ifndef com_redshift_software_sdk_botan_mods_autoinit_h
+#define com_redshift_software_sdk_botan_mods_autoinit_h
+
+#include <botan/init.h>
+#include <botan/rng.h>
+
+namespace Botan {
+ inline void initialize()
+ {
+ static Botan::LibraryInitializer init;
+ static bool seeded = false;
+ if (!seeded)
+ {
+ seeded = true;
+ Global_RNG::seed();
+ }
+ }
+}
+
+#endif
+) > "$(<)"
+}
+
+.algo.def = "
+namespace Botan { namespace {
+ template <typename B> struct Undefined : B {
+ inline Undefined()
+ { throw Algorithm_Not_Found(\"\"); }
+ template <typename A>
+ inline Undefined(A, ...)
+ { throw Algorithm_Not_Found(\"\"); }
+ };
+ struct EmptyFacade {
+ inline EmptyFacade() {}
+ };
+ struct BlockCipherFacade : BlockCipher {
+ inline BlockCipherFacade() : BlockCipher(0,0) {}
+ virtual std::string name() const { return \"\"; }
+ virtual void key(const byte[], u32bit) {}
+ virtual BlockCipher* clone() const { return 0; }
+ virtual void enc(const byte[], byte[]) const {}
+ virtual void dec(const byte[], byte[]) const {}
+ };
+ struct StreamCipherFacade : StreamCipher {
+ inline StreamCipherFacade() : StreamCipher(0) {}
+ virtual std::string name() const { return \"\"; }
+ virtual void key(const byte[], u32bit) {}
+ virtual StreamCipher* clone() const { return 0; }
+ virtual void cipher(const byte[], byte[], u32bit) {}
+ };
+ struct HashFunctionFacade : HashFunction {
+ inline HashFunctionFacade() : HashFunction(0) {}
+ virtual std::string name() const { return \"\"; }
+ virtual void add_data(const byte[], u32bit) {}
+ virtual void final_result(byte[]) {}
+ virtual HashFunction* clone() const { return 0; }
+ };
+ struct MessageAuthenticationCodeFacade : MessageAuthenticationCode {
+ inline MessageAuthenticationCodeFacade() : MessageAuthenticationCode(0,0) {}
+ virtual std::string name() const { return \"\"; }
+ virtual void add_data(const byte[], u32bit) {}
+ virtual void final_result(byte[]) {}
+ virtual MessageAuthenticationCode* clone() const { return 0; }
+ virtual void key(const byte[], u32bit) {}
+ };
+ struct S2KFacade : S2K {
+ inline S2KFacade() {}
+ virtual std::string name() const { return \"\"; }
+ virtual S2K* clone() const { return 0; }
+ virtual OctetString derive(u32bit, const std::string&, const byte[], u32bit, u32bit) const
+ { return OctetString() ; }
+ };
+} }
+" ;
+
+actions custom.cpp
+{
+ @($(STDOUT):E=
+#include <botan/config.h>
+#include <botan/exceptn.h>
+#include <botan/base.h>
+#include <botan/s2k.h>
+
+$(CONFIG:J=$(NL))
+
+#include$(_)"$(>[1])"
+
+) > "$(<)"
+}
+
+rule custom_cpp ( targets * : sources * : properties *
+ : conditional-config * : raw-config * )
+{
+ local config = [ property.evaluate-conditionals-in-context
+ $(conditional-config) : $(properties) ] $(raw-config) ;
+ CONFIG on $(<) = $(config:G=) ;
+ NL on $(<) = "
+" ;
+ _ on $(<) = " " ;
+ custom.cpp $(<) : $(>) ;
+}
+rule algolist_custom_cpp ( targets * : sources * : properties * )
+{
+ custom_cpp $(targets) : $(sources) : $(properties) : $(.code.list.cpp) : $(.algo.def) ;
+}
+rule init_custom_cpp ( targets * : sources * : properties * )
+{
+ custom_cpp $(targets) : $(sources) : $(properties) :
+ $(.code.list.cpp)
+ "<botan-fips-140>disable:<>
+namespace Botan { namespace {
+ struct FIPS140
+ {
+ static inline bool passes_self_tests() { return true; }
+ };
+} }
+namespace Botan { namespace Init {
+ inline void noop() {}
+ template <typename A0> inline void noop(A0) {}
+} }
+"
+ "<botan-x931>disable:<>
+#include <botan/randpool.h>
+#undef ANSI_X931_RNG
+#define ANSI_X931_RNG Randpool
+"
+ "<botan-discrete-log>disable:<>
+#define startup_dl_cache() noop()
+#define shutdown_dl_cache() noop()
+"
+ "<botan-policy>disable:<>
+#define add_default_oids() noop()
+#define add_default_aliases() noop()
+#define set_default_options() noop()
+#define startup_oids() noop()
+#define shutdown_oids() noop()
+#define startup_conf() noop()
+#define shutdown_conf() noop()
+"
+ "<botan-engine>disable:<>
+#define startup_engines() noop()
+#define shutdown_engines() noop()
+"
+ "<botan-lookup>disable:<>
+#define init_lookup_tables() noop()
+#define destroy_lookup_tables() noop()
+"
+ ;
+}
+rule minimal_engine_custom_cpp ( targets * : sources * : properties * )
+{
+ custom_cpp $(targets) : $(sources) : $(properties) :
+ "<botan-engine>disable:<>
+namespace Botan {
+ const BlockCipher * retrieve_block_cipher(const std::string &x) { return 0; }
+ const StreamCipher * retrieve_stream_cipher(const std::string &) { return 0; }
+ const HashFunction * retrieve_hash(const std::string &) { return 0; }
+ const MessageAuthenticationCode * retrieve_mac(const std::string &) { return 0; }
+}
+"
+ "<botan-engine>disable,<botan-barrett>enable:<>
+#include <botan/reducer.h>
+#include <botan/barrett.h>
+namespace Botan {
+ ModularReducer * get_reducer(const BigInt & n, bool) { return new BarrettReducer(n); }
+}
+"
+ ;
+}
+rule minimal_lookup_custom_cpp ( targets * : sources * : properties * )
+{
+ custom_cpp $(targets) : $(sources) : $(properties) :
+ "<botan-lookup>disable:<>
+namespace Botan {
+std::string deref_alias(const std::string & name) { return name; }
+}
+"
+ ;
+}
+rule minimal_get_algo_custom_cpp ( targets * : sources * : properties * )
+{
+ custom_cpp $(targets) : $(sources) : $(properties) :
+ "<botan-aes>enable:<> #include <botan/aes.h>"
+ "<botan-adler32>enable:<> #include <botan/adler32.h>"
+ "<botan-crc24>enable:<> #include <botan/crc24.h>"
+ "<botan-crc32>enable:<> #include <botan/crc32.h>"
+ "<botan-fork-256>enable:<> #include <botan/fork256.h>"
+ "<botan-has-160>enable:<> #include <botan/has160.h>"
+ "<botan-haval>enable:<> #include <botan/haval.h>"
+ "<botan-md2>enable:<> #include <botan/md2.h>"
+ "<botan-md4>enable:<> #include <botan/md4.h>"
+ "<botan-md5>enable:<> #include <botan/md5.h>"
+ "<botan-ripemd-128>enable:<> #include <botan/rmd128.h>"
+ "<botan-ripemd-160>enable:<> #include <botan/rmd160.h>"
+ "<botan-sha-160>enable:<> #include <botan/sha160.h>"
+ "<botan-sha-256>enable:<> #include <botan/sha256.h>"
+ "<botan-sha-384-512>enable:<> #include <botan/sha_64.h>"
+ "<botan-tiger>enable:<> #include <botan/tiger.h>"
+ "<botan-whirlpool>enable:<> #include <botan/whrlpool.h>"
+ "<botan-parallel>enable:<> #include <botan/par_hash.h>"
+ "<botan-cmac>enable:<> #include <botan/cmac.h>"
+ "<botan-hmac>enable:<> #include <botan/hmac.h>"
+ "<botan-x9.19-mac>enable:<> #include <botan/x919_mac.h>"
+
+ "<botan-lookup>disable:<>
+#include <botan/parsing.h>
+#include <botan/lookup.h>
+#include <memory>
+namespace {
+template <typename T> inline T * get_clone() {
+ return (new T); }
+template <typename T, typename A0> inline T * get_clone(A0 a0) {
+ return (new T(a0)); }
+template <typename T, typename A0, typename A1> inline T * get_clone(A0 a0, A1 a1) {
+ return (new T(a0,a1)); }
+}
+namespace Botan {
+BlockCipher * get_block_cipher(const std::string & name) {"
+ "<botan-aes>enable:<>
+ if (name == \"AES\") return get_clone<AES>();
+ if (name == \"AES-128\") return get_clone<AES_128>();
+ if (name == \"AES-192\") return get_clone<AES_192>();
+ if (name == \"AES-256\") return get_clone<AES_256>();"
+ "<botan-lookup>disable:<>
+ throw Algorithm_Not_Found(name); }
+
+StreamCipher * get_stream_cipher(const std::string & name) {
+ throw Algorithm_Not_Found(name); }
+
+HashFunction * get_hash(const std::string & name_) {
+ std::vector<std::string> names = parse_algorithm_name(name_);
+ if (!names.empty()) {
+ const std::string name = deref_alias(names[0]);"
+ "<botan-adler32>enable:<>
+ if (name == \"Adler32\") return get_clone<Adler32>();"
+ "<botan-crc24>enable:<>
+ if (name == \"CRC24\") return get_clone<CRC24>();"
+ "<botan-crc32>enable:<>
+ if (name == \"CRC32\") return get_clone<CRC32>();"
+ "<botan-fork-256>enable:<>
+ if (name == \"FORK-256\") return get_clone<FORK_256>();"
+ "<botan-has-160>enable:<>
+ if (name == \"HAS-160\") return get_clone<HAS_160>();"
+ "<botan-haval>enable:<>
+ if (name == \"HAVAL\") return get_clone<HAVAL>(32);"
+ "<botan-md2>enable:<>
+ if (name == \"MD2\") return get_clone<MD2>();"
+ "<botan-md4>enable:<>
+ if (name == \"MD4\") return get_clone<MD4>();"
+ "<botan-md5>enable:<>
+ if (name == \"MD5\") return get_clone<MD5>();"
+ "<botan-ripemd-128>enable:<>
+ if (name == \"RIPEMD-128\") return get_clone<RIPEMD_128>();"
+ "<botan-ripemd-160>enable:<>
+ if (name == \"RIPEMD-160\") return get_clone<RIPEMD_160>();"
+ "<botan-sha-160>enable:<>
+ if (name == \"SHA-160\") return get_clone<SHA_160>();"
+ "<botan-sha-256>enable:<>
+ if (name == \"SHA-256\") return get_clone<SHA_256>();"
+ "<botan-sha-384-512>enable:<>
+ if (name == \"SHA-384\") return get_clone<SHA_384>();
+ if (name == \"SHA-512\") return get_clone<SHA_512>();"
+ "<botan-tiger>enable:<>
+ if (name == \"Tiger\") return get_clone<Tiger>(24);"
+ "<botan-whirlpool>enable:<>
+ if (name == \"Whirlpool\") return get_clone<Whirlpool>();"
+ "<botan-parallel>enable:<>
+ if (name == \"Parallel\") return get_clone<Parallel>(names[1]);"
+ "<botan-lookup>disable:<>
+ }
+ throw Algorithm_Not_Found(name_); }
+
+MessageAuthenticationCode * get_mac(const std::string & name_) {
+ std::vector<std::string> names = parse_algorithm_name(name_);
+ if (!names.empty()) {
+ const std::string name = deref_alias(names[0]);"
+ "<botan-cmac>enable:<>
+ if (name == \"CMAC\") return get_clone<CMAC>(names[1]);"
+ "<botan-hmac>enable:<>
+ if (name == \"HMAC\") return get_clone<HMAC>(names[1]);"
+ "<botan-x9.19-mac>enable:<>
+ if (name == \"X9.19-MAC\") return get_clone<ANSI_X919_MAC>();"
+ "<botan-lookup>disable:<>
+ }
+ throw Algorithm_Not_Found(name_); }
+
+bool have_algorithm(const std::string & name) { return false; }
+bool have_block_cipher(const std::string & name) { return false; }
+bool have_stream_cipher(const std::string & name) { return false; }
+bool have_hash(const std::string & name) { return false; }
+bool have_mac(const std::string & name) { return false; }
+u32bit output_length_of(const std::string& name)
+{
+ const HashFunction* hash = get_hash(name);
+ if (hash) return hash->OUTPUT_LENGTH;
+ const MessageAuthenticationCode* mac = get_mac(name);
+ if (mac) return mac->OUTPUT_LENGTH;
+ throw Algorithm_Not_Found(name);
+}
+}
+"
+ ;
+}
+
+actions nothing { }
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements = [ extension.define botan $(version) : $(location) : $(options) ] ;
+ local common-requirements ;
+
+ make botan/config.h : : @config_h
+ : <botan-version>$(version)
+ <location-prefix>src
+ ;
+ explicit botan/config.h ;
+ common-requirements +=
+ <implicit-dependency>botan/config.h
+ <dependency>botan/config.h ;
+
+ make botan/autoinit.h : : @autoinit_h
+ : <botan-version>$(version)
+ <location-prefix>src
+ ;
+ explicit botan/autoinit.h ;
+ common-requirements +=
+ <implicit-dependency>botan/autoinit.h
+ <dependency>botan/autoinit.h ;
+
+ local custom-files = init algolist minimal_engine minimal_lookup minimal_get_algo ;
+ for local custom-file in $(custom-files)
+ {
+ make $(custom-file)_custom.cpp
+ : [ glob $(location)/src/$(custom-file).cpp ]
+ : @$(custom-file)_custom_cpp
+ : <botan-version>$(version)
+ <location-prefix>src
+ ;
+ explicit $(custom-file)_custom.cpp ;
+ requirements += <source>$(custom-file)_custom.cpp ;
+ }
+
+ local headers ;
+ local headers-requirements ;
+
+ for local m in $(.modules)
+ {
+ if <botan-$(m)>enable in $(requirements)
+ {
+ local cpp = [ glob $(location)/modules/$(.module.subdir.$(m))/*.cpp ] ;
+ local h = [ glob $(location)/modules/$(.module.subdir.$(m))/*.h ] ;
+ for local f in $(h)
+ {
+ make botan/$(f:D=) : $(f) : common.copy
+ : <botan-version>$(version)
+ <location-prefix>src
+ ;
+ explicit botan/$(f:D=) ;
+ }
+ headers += $(h:D=) ;
+ headers-requirements +=
+ <botan-$(m)>enable:<dependency>botan/$(h:D=) ;
+ if $(.module.condition.$(m))
+ {
+ requirements +=
+ <botan-$(m)>enable,$(.module.condition.$(m)):<source>$(cpp) ;
+ }
+ else
+ {
+ requirements +=
+ <botan-$(m)>enable:<source>$(cpp) ;
+ }
+ requirements += $(.module.requirements.$(m)) ;
+ common-requirements += $(.module.usage.$(m)) ;
+ }
+ }
+
+ for local c in $(.code)
+ {
+ if $(.code.sources.$(c))
+ {
+ local cpp = [ glob $(location)/src/$(.code.sources.$(c)) ] ;
+ requirements += <botan-$(c)>enable:<source>$(cpp) ;
+ }
+ }
+
+ requirements += $(.code.requirements) ;
+
+ for local f in
+ [ glob $(location)/include/*.h ]
+ {
+ if ! $(f:D=) in $(headers)
+ {
+ make botan/$(f:D=) : $(f) : common.copy
+ : <botan-version>$(version)
+ <location-prefix>src
+ ;
+ explicit botan/$(f:D=) ;
+ headers-requirements +=
+ <dependency>botan/$(f:D=) ;
+ }
+ }
+
+ local sources = [ set.difference
+ [ glob $(location)/src/*.cpp ] :
+ [ glob
+ $(location)/src/$(.code.sources)
+ $(location)/src/$(custom-files).cpp
+ ]
+ ] ;
+
+ lib botan
+ : $(sources)
+ : $(requirements)
+ $(common-requirements)
+ $(headers-requirements)
+ <botan-version>$(version)
+ <botan-location>$(location)
+ <location-prefix>botan
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ #~ ## turn on exception specification handling
+ #~ <toolset>msvc-8.0:<cxxflags>/d1ESrt
+ ## inherits via dominance
+ <toolset>msvc:<cxxflags>/wd4250
+ ## C++ exception specification ignored... blah, blah, crappy compiler.
+ <toolset>msvc:<cxxflags>/wd4290
+ ## Include some headers always, to resolve missing declarations.
+ <toolset>msvc:<cxxflags>/FIbotan/botan.h
+ <toolset>msvc:<cxxflags>/FIbotan/basefilt.h
+ ## Bare use of ULL constants without ULL postfix cause errors in gcc.
+ <toolset>gcc:<cxxflags>-fpermissive
+ :
+ : $(common-requirements)
+ $(headers-requirements)
+ ;
+}

Added: sandbox/tools/build_extensions/ext/expat.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/expat.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,115 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for building eXpat library <http://expat.sourceforge.net/>.
+### Targets:
+### /ext/expat//expat
+
+import extension ;
+
+
+
+import property ;
+import project ;
+import feature ;
+import common ;
+
+extension.declare expat ;
+
+rule config_h ( targets * : sources * : properties * )
+{
+ local define ;
+ local undef ;
+ switch [ property.select <target-os> : $(properties) ]
+ {
+ case *linux* :
+ define +=
+ HAVE_BCOPY HAVE_DLFCN_H HAVE_FCNTL_H HAVE_GETPAGESIZE HAVE_INTTYPES_H
+ HAVE_MEMMOVE HAVE_MEMORY_H HAVE_MMAP HAVE_STDINT_H HAVE_STDLIB_H
+ HAVE_STRINGS_H HAVE_STRING_H HAVE_SYS_STAT_H HAVE_SYS_TYPES_H
+ HAVE_UNISTD_H STDC_HEADERS XML_DTD XML_NS
+ ;
+ undef +=
+ WORDS_BIGENDIAN const off_t size_t
+ ;
+ BYTEORDER on $(<) = 1234 ;
+
+ case *windows* :
+ define +=
+ HAVE_DLFCN_H HAVE_FCNTL_H HAVE_INTTYPES_H
+ HAVE_MEMMOVE HAVE_MEMORY_H HAVE_STDINT_H HAVE_STDLIB_H
+ HAVE_STRINGS_H HAVE_STRING_H HAVE_SYS_STAT_H HAVE_SYS_TYPES_H
+ HAVE_UNISTD_H STDC_HEADERS XML_DTD XML_NS
+ ;
+ undef +=
+ HAVE_BCOPY HAVE_GETPAGESIZE HAVE_MMAP WORDS_BIGENDIAN const off_t size_t
+ ;
+ BYTEORDER on $(<) = 1234 ;
+ }
+ local version = [ property.select <expat-version> : $(properties) ] ;
+ VERSION on $(<) = $(version:G=) ;
+ CONFIG on $(<) =
+ "#define $(define) 1"
+ "#undef $(undef)" ;
+ NL on $(<) = "
+" ;
+}
+actions config_h
+{
+ @($(STDOUT):E=
+#ifndef EXPAT_CONFIG_H
+#define EXPAT_CONFIG_H
+
+#define PACKAGE_BUGREPORT "expat-bugs_at_[hidden]"
+#define PACKAGE_NAME "expat"
+#define PACKAGE_STRING "expat $(VERSION)"
+#define PACKAGE_TARNAME "expat"
+#define PACKAGE_VERSION "$(VERSION)"
+#define XML_CONTEXT_BYTES 1024
+#define BYTEORDER $(BYTEORDER)
+$(CONFIG:J=$(NL))
+
+#endif // EXPAT_CONFIG_H
+) > "$(<)"
+}
+
+rule init ( version ? : location : options * )
+{
+
+ version ?= default ;
+ local requirements = [ extension.define expat $(version) : $(location) : $(options) ] ;
+
+ make expat_config.h : : @config_h
+ : <expat-version>$(version)
+ <location-prefix>src
+ ;
+ explicit expat_config.h ;
+
+ lib expat
+ : $(location)/lib/xmlparse.c
+ $(location)/lib/xmltok.c
+ $(location)/lib/xmlrole.c
+ : $(requirements)
+ <expat-version>$(version)
+ <expat-location>$(location)
+ <include>$(location)/lib
+ <location-prefix>expat
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ <define>HAVE_EXPAT_CONFIG_H
+ <implicit-dependency>expat_config.h
+ <dependency>expat_config.h
+ #~ <link>shared:<define>EXPAT_EXPORTS
+ #~ <link>shared:<define>XML_BUILDING_EXPAT
+ <link>static
+ <link>static:<define>XML_STATIC
+ :
+ : <include>$(location)/lib
+ <define>HAVE_EXPAT_CONFIG_H
+ <implicit-dependency>expat_config.h
+ <dependency>expat_config.h
+ <link>static:<define>XML_STATIC
+ ;
+}

Added: sandbox/tools/build_extensions/ext/extension.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/extension.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,198 @@
+#~ Copyright Redshift Software, Inc. 2007.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+import feature ;
+import property ;
+import project ;
+import path ;
+import modules ;
+
+# Defines a Boost.Build extension project. Such extensions usually
+# contain library targets and features that can be used by many people.
+# Even though extensions are really projects, they can be initialize as
+# a module would be with the "using" (project.project-rules.using)
+# mechanism.
+rule declare ( extension + : options * : * )
+{
+ # The caller is a standalone module for the extension.
+ local mod = [ CALLER_MODULE ] ;
+
+#~ ECHO + *$(mod)* ;
+
+ modules.poke $(mod) : __extension__ : $(extension[1]) ;
+
+ # We need to do the rest within the extension module.
+ module $(mod)
+ {
+ import path ;
+ import project ;
+ import feature ;
+ import common ;
+
+ local ext = $(1[1]) ;
+ local ext-options = $(1[2-]) ;
+
+ # Find the root project.
+ local root-project = [ project.current ] ;
+ root-project = [ $(root-project).project-module ] ;
+ while
+ [ project.attribute $(root-project) parent-module ] &&
+ [ project.attribute $(root-project) parent-module ] != user-config
+ {
+ root-project = [ project.attribute $(root-project) parent-module ] ;
+ }
+
+ # Create the project data, and bring in the project rules
+ # into the module.
+ project.initialize $(__name__) :
+ [ path.join [ project.attribute $(root-project) location ] ext $(ext:L) ] ;
+
+ # Create the project itself, i.e. the attributes.
+ # All extensions are created in the "/ext" project space.
+ project /ext/$(ext) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ local attributes = [ project.attributes $(__name__) ] ;
+
+ # Inherit from the root project of whomever is defining us.
+ project.inherit-attributes $(__name__) : $(root-project) ;
+ $(attributes).set parent-module : $(root-project) : exact ;
+
+ # All exntensions get version and location features. The version
+ # feature is composed to include the options for the each extension
+ # version.
+ #~ feature.feature $(ext) : : optional ;
+ feature.feature $(ext)-version : : optional implicit composite ;
+ feature.feature $(ext)-location : : free ;
+
+ rule default-tag ( name : type ? : property-set )
+ {
+ return [ common.format-name
+ <base> <toolset> <threading> <runtime> <version:$(__extension__)-version>
+ : $(name) : $(type) : $(property-set) ] ;
+ }
+ }
+}
+
+rule option ( extension name : values * )
+{
+ values ?= disable enable ;
+ feature.feature $(extension)-$(name) : $(values) : propagated incidental optional ;
+ .options.$(extension) += $(extension)-$(name) ;
+}
+
+rule all-options ( extension )
+{
+ return $(.options.$(extension)) ;
+}
+
+rule define ( extension version ? : location : options * )
+{
+ version ?= default ;
+ location = [ path.make $(location) ] ;
+ #~ if ! [ feature.is-subvalue $(extension) : : version : $(version) ]
+ #~ {
+ feature.extend $(extension)-version : $(version) ;
+ #~ }
+ local requirements ;
+ for local opt in [ all-options $(extension) ]
+ {
+ local opt-default = [ feature.defaults <$(opt)> ] [ feature.values <$(opt)> ] ;
+ opt-default = $(opt-default[1]) ;
+ requirements += <$(opt)>$(opt-default) ;
+ }
+ local requirements =
+ [ option-requirements $(extension) : $(requirements) : $(options) ]
+ <$(extension)-location>$(location)
+ ;
+ feature.compose <$(extension)-version>$(version) : $(requirements) ;
+ return
+ $(requirements)
+ <tag>@default-tag
+ ;
+}
+
+rule refine ( extension version : refinements * )
+{
+ local requirements
+ = [ modules.peek feature : <$(extension)-version>$(version).components ] ;
+ local extra ;
+ if $(refinements)
+ {
+ for local r in $(refinements)
+ {
+ if $(r:G) in <use>
+ {
+ requirements += $(r) ;
+ }
+ else if $(r:G) in <tag>
+ {
+ extra += $(r) ;
+ requirements = [ property.change $(requirements) : $(r:G) ] ;
+ }
+ else
+ {
+ requirements = [ property.change $(requirements) : $(r:G) $(r:G=) ] ;
+ }
+ }
+ modules.poke feature
+ : <$(extension)-version>$(version).components
+ : $(requirements) ;
+ }
+ return $(requirements) $(extra) ;
+}
+
+#######################################################################
+
+local rule enable-prop ( extension : opt )
+{
+ local vals = [ MATCH "--([^-]+)-(.*)" : $(opt) ] ;
+ return <$(extension)-$(vals[2])>$(vals[1]) ;
+}
+#~ local rule enable-prop ( option )
+#~ {
+ #~ local vals = [ MATCH "--([^-]+)-([^=]+)[=]?(.*)" : $(option) ] ;
+ #~ if $(vals[2])
+ #~ {
+ #~ return <$(extension)-$(vals[1])>$(vals[2]) ;
+ #~ }
+ #~ else
+ #~ {
+ #~ return <$(extension)-$(vals[1])>enable ;
+ #~ }
+#~ }
+
+local rule with-prop ( extension : opt )
+{
+ local vals = [ MATCH "--with-([^=]+)[=]?(.*)" : $(opt) ] ;
+ if $(vals[2])
+ {
+ return <$(extension)-$(vals[1])>$(vals[2]) ;
+ }
+ else
+ {
+ return <$(extension)-$(vals[1])>enable ;
+ }
+}
+
+local rule option-requirements ( extension : requirements * : options * )
+{
+ for local opt in $(options)
+ {
+ switch $(opt)
+ {
+ case --enable-* :
+ requirements = [ property.refine $(requirements)
+ : [ enable-prop $(extension) : $(opt) ] ] ;
+
+ case --disable-* :
+ requirements = [ property.refine $(requirements)
+ : [ enable-prop $(extension) : $(opt) ] ] ;
+
+ case --with-* :
+ requirements = [ property.refine $(requirements)
+ : [ with-prop $(extension) : $(opt) ] ] ;
+ }
+ }
+ return $(requirements) ;
+}

Added: sandbox/tools/build_extensions/ext/freeimage.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/freeimage.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,187 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for building FreeImage library <http://freeimage.sourceforge.net/>.
+### Targets:
+### /ext/freeimage//freeimage
+
+import extension ;
+
+import property ;
+import project ;
+import feature ;
+import regex ;
+import stage ;
+import common ;
+import set ;
+
+extension.declare freeimage ;
+
+actions include_h
+{
+ @($(STDOUT):E=
+$(TEXT:J=$(NL))
+
+) > "$(<)"
+}
+
+rule include_h ( targets * : sources * : properties * )
+{
+ TEXT on $(<) = "
+#ifndef CUSTOM_$(<[1]:B:U)_H
+#define CUSTOM_$(<[1]:B:U)_H
+
+#include <$(<[1]:D=:G=)>
+
+#endif
+" ;
+ NL on $(<) = "
+" ;
+ _ on $(<) = " " ;
+}
+
+.file.includes.PluginG3.cpp = tiffiop.h ;
+.file.includes.PluginMNG.cpp = libmng.h ;
+.file.includes.PluginPNG.cpp = png.h ;
+.file.includes.PluginTIFF.cpp = tiffiop.h ;
+.file.includes.ZLibInterface.cpp = zlib.h zutil.h ;
+.file.includes.XTIFF.cpp = tiffiop.h ;
+.file.text.PluginMNG.cpp = "
+#define mng_initialize(a,b,c,d) (mng_initialize)(a,(mng_memalloc)b,(mng_memfree)c,d)
+#define mng_setcb_errorproc(a,b) (mng_setcb_errorproc)(a,(mng_errorproc)b)
+#define mng_setcb_openstream(a,b) (mng_setcb_openstream)(a,(mng_openstream)b)
+#define mng_setcb_closestream(a,b) (mng_setcb_closestream)(a,(mng_closestream)b)
+#define mng_setcb_readdata(a,b) (mng_setcb_readdata)(a,(mng_readdata)b)
+#define mng_setcb_processheader(a,b) (mng_setcb_processheader)(a,(mng_processheader)b)
+#define mng_setcb_getcanvasline(a,b) (mng_setcb_getcanvasline)(a,(mng_getcanvasline)b)
+#define mng_setcb_refresh(a,b) (mng_setcb_refresh)(a,(mng_refresh)b)
+#define mng_setcb_gettickcount(a,b) (mng_setcb_gettickcount)(a,(mng_gettickcount)b)
+#define mng_setcb_settimer(a,b) (mng_setcb_settimer)(a,(mng_settimer)b)
+" ;
+
+actions custom_cpp
+{
+ @($(STDOUT):E=
+$(TEXT:J=$(NL))
+#include "$(>[1])"
+) > "$(<)"
+}
+
+rule custom_cpp ( targets * : sources * : properties * )
+{
+ TEXT on $(<) = "
+#include \"$(.file.includes.$(targets[1]:G=:D=))\"
+$(.file.text.$(targets[1]:G=:D=):E=)
+" ;
+ NL on $(<) = "
+" ;
+ _ on $(<) = " " ;
+}
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements = [ extension.define freeimage $(version) : $(location) : $(options) ] ;
+ local common-requirements =
+ <include>$(location)/Source
+ ;
+
+ local header-requirements ;
+ for local f in
+ LibJPEG/jinclude.h
+ LibJPEG/jpeglib.h
+ LibJPEG/jerror.h
+ LibJPEG/transupp.h
+ {
+ make $(f)
+ : [ glob $(location)/Source/$(f) ]
+ : @include_h
+ : <freeimage-version>$(version)
+ <location-prefix>src
+ ;
+ explicit $(custom-file) ;
+ header-requirements +=
+ <implicit-dependency>$(f)
+ <dependency>$(f) ;
+ }
+
+ local custom-files =
+ FreeImage/PluginG3.cpp
+ FreeImage/PluginMNG.cpp
+ FreeImage/PluginPNG.cpp
+ FreeImage/PluginTIFF.cpp
+ FreeImage/ZLibInterface.cpp
+ Metadata/XTIFF.cpp
+ ;
+ for local custom-file in $(custom-files)
+ {
+ make $(custom-file)
+ : [ glob $(location)/Source/$(custom-file) ]
+ : @custom_cpp
+ : <freeimage-version>$(version)
+ <location-prefix>src
+ $(header-requirements)
+ ;
+ explicit $(custom-file) ;
+ requirements +=
+ <source>$(custom-file)
+ <dependency>$(custom-file) ;
+ }
+
+ for local custom-file in
+ FreeImage/PluginJPEG.cpp
+ Metadata/FreeImageTag.h
+ {
+ make $(custom-file) : $(location)/Source/$(custom-file)
+ : common.copy
+ : <freeimage-version>$(version)
+ <location-prefix>src
+ ;
+ explicit $(custom-file) ;
+ custom-files += $(custom-file) ;
+ requirements += <dependency>$(custom-file) ;
+ if $(custom-file:S) in .cpp
+ {
+ requirements += <source>$(custom-file) ;
+ }
+ }
+
+ local sources = [ set.difference
+ [ glob
+ $(location)/Source/FreeImage/*.cpp
+ $(location)/Source/FreeImageToolkit/*.cpp
+ $(location)/Source/Metadata/*.cpp ]
+ :
+ [ glob
+ $(location)/Source/$(custom-files)
+ $(location)/Source/FreeImageToolkit/JPEGTransform.cpp ]
+ ]
+ ;
+
+ lib freeimage
+ : $(sources)
+ /ext/zlib//z
+ /ext/jpeg//jpeg
+ /ext/png//png
+ /ext/mng//mng
+ /ext/libtiff//tiff
+ : $(requirements)
+ $(common-requirements)
+ <freeimage-version>$(version)
+ <freeimage-location>$(location)
+ <location-prefix>freeimage
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ <link>static:<define>FREEIMAGE_LIB=1
+ <link>shared:<define>FREEIMAGE_EXPORTS
+ #~ <use>/ext/zlib//z
+ #~ <use>/ext/jpeg//jpeg
+ #~ <use>/ext/png//png
+ #~ <use>/ext/mng//mng
+ #~ <use>/ext/libtiff//tiff
+ :
+ : $(common-requirements)
+ ;
+}

Added: sandbox/tools/build_extensions/ext/gif.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/gif.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,121 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for building giflib library <http://sourceforge.net/projects/libungif>.
+### Targets:
+### /ext/gif//gif
+
+import extension ;
+
+import property ;
+import project ;
+import feature ;
+import common ;
+
+extension.declare gif ;
+
+rule config_h ( targets * : sources * : properties * )
+{
+ local define ;
+ local undef ;
+ local other ;
+ switch [ property.select <target-os> : $(properties) ]
+ {
+ case *linux* :
+ define +=
+ HAVE_DLFCN_H HAVE_FCNTL_H HAVE_INTTYPES_H HAVE_MEMORY_H
+ HAVE_STDARG_H HAVE_STDINT_H HAVE_STDLIB_H HAVE_STRDUP HAVE_STRINGS_H
+ HAVE_STRING_H HAVE_SYS_STAT_H HAVE_SYS_TYPES_H HAVE_UNISTD_H
+ HAVE_VPRINTF PROTOTYPES STDC_HEADERS __PROTOTYPES
+ ;
+ undef +=
+ HAVE_BASETSD_H HAVE_DOPRNT HAVE_IO_H HAVE_LIBGL_S HAVE_LIBX11
+ HAVE_VARARGS_H SETVBUF_REVERSED
+ SIZEOF_UNSIGNED_INT SIZEOF_UNSIGNED_LONG X_DISPLAY_MISSING const
+ ;
+ other +=
+ "#define UINT32 u_int32_t"
+ ;
+
+ case *windows* :
+ define +=
+ HAVE_BASETSD_H HAVE_FCNTL_H HAVE_INTTYPES_H HAVE_IO_H HAVE_MEMORY_H
+ HAVE_STDARG_H HAVE_STDLIB_H HAVE_STRDUP HAVE_STRINGS_H
+ HAVE_STRING_H HAVE_SYS_STAT_H HAVE_SYS_TYPES_H
+ HAVE_VPRINTF PROTOTYPES STDC_HEADERS __PROTOTYPES
+ ;
+ undef +=
+ HAVE_DLFCN_H HAVE_DOPRNT HAVE_LIBGL_S HAVE_LIBX11 HAVE_UNISTD_H
+ HAVE_STDINT_H HAVE_VARARGS_H SETVBUF_REVERSED
+ SIZEOF_UNSIGNED_INT SIZEOF_UNSIGNED_LONG X_DISPLAY_MISSING const
+ ;
+ }
+ local version = [ property.select <gif-version> : $(properties) ] ;
+ VERSION on $(<) = $(version:G=) ;
+ CONFIG on $(<) =
+ "#define $(define) 1"
+ "#undef $(undef)"
+ $(other)
+ ;
+ NL on $(<) = "
+" ;
+}
+actions config_h
+{
+ @($(STDOUT):E=
+#ifndef GIFLIB_CONFIG_H
+#define GIFLIB_CONFIG_H
+
+#define PACKAGE "giflib"
+#define PACKAGE_BUGREPORT "abadger1999_at_[hidden]"
+#define PACKAGE_NAME "giflib"
+#define PACKAGE_STRING "giflib $(VERSION)"
+#define PACKAGE_TARNAME "giflib"
+#define PACKAGE_VERSION "$(VERSION)"
+$(CONFIG:J=$(NL))
+
+#endif // GIFLIB_CONFIG_H
+) > "$(<)"
+}
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements = [ extension.define gif $(version) : $(location) : $(options) ] ;
+
+ make config.h : : @config_h
+ : <gif-version>$(version)
+ <location-prefix>src
+ ;
+ explicit config.h ;
+
+ lib gif
+ : $(location)/lib/dev2gif.c
+ $(location)/lib/dgif_lib.c
+ $(location)/lib/egif_lib.c
+ $(location)/lib/gif_err.c
+ $(location)/lib/gif_font.c
+ $(location)/lib/gif_hash.c
+ $(location)/lib/gifalloc.c
+ $(location)/lib/qprintf.c
+ $(location)/lib/quantize.c
+ : $(requirements)
+ <gif-version>$(version)
+ <gif-location>$(location)
+ <include>$(location)
+ <location-prefix>gif
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ <define>HAVE_CONFIG_H
+ <implicit-dependency>config.h
+ <dependency>config.h
+ <warnings>off
+ <link>static
+ :
+ : <include>$(location)
+ <implicit-dependency>config.h
+ <dependency>config.h
+ ;
+}

Added: sandbox/tools/build_extensions/ext/gigabase.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/gigabase.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,119 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for GigaBASE object relational embeded database
+### <http://sourceforge.net/projects/gigabase>. Only one
+### target is declared here "/ext/gigabase//gigabase". All
+### options normally set in the config.h of GigaBASE are selectable
+### through features. And can be consifured when declaring through
+### the use of "--enable-*" and "--disable-*" options.
+###
+### NOTE: This onyl declares the core library, not the standalone
+### CLI server executable.
+
+import extension ;
+
+import property ;
+import project ;
+import feature ;
+import common ;
+
+extension.declare gigabase ;
+
+extension.option gigabase debug : none check trace ;
+
+extension.option gigabase pthreads : enable disable ;
+extension.option gigabase namespaces : enable disable ;
+extension.option gigabase secure-server : disable enable ;
+extension.option gigabase queue-manager : disable enable ;
+extension.option gigabase std-string : enable disable ;
+extension.option gigabase exception-on-error : enable disable ;
+
+extension.option gigabase autoincrement : enable disable ;
+extension.option gigabase clone-identifiers : disable enable ;
+extension.option gigabase rectangle-dimension : 2 ;
+extension.option gigabase coordinate-type : int double long float ;
+extension.option gigabase rectangle-area-type : db_int8 double ;
+extension.option gigabase set-null-dacl : disable enable ;
+extension.option gigabase int8-is-defined : disable enable ;
+extension.option gigabase mfc : disable enable ;
+extension.option gigabase atl : disable enable ;
+extension.option gigabase mfc-string : disable enable ;
+extension.option gigabase large-database-support : disable enable ;
+extension.option gigabase sparse-file : disable enable ;
+extension.option gigabase align-header : disable enable ;
+extension.option gigabase regex : disable enable ;
+extension.option gigabase sock-linger : disable enable ;
+
+extension.option gigabase replicator : disable enable ;
+extension.option gigabase wwwapi : disable enable ;
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements = [ extension.define gigabase $(version) : $(location) : $(options) ] ;
+ local common-requirements =
+ <include>$(location)
+ <define>__CONFIG_H__
+ <define>PACKAGE=\"gigabase\"
+ <define>VERSION=\"$(version)\"
+ <target-os>windows,<link>shared:<define>GIGABASE_DLL=1
+ <target-os>linux,<gigabase-pthreads>disable:<define>NO_PTHREADS=1
+ <target-os>linux,<threading>single:<define>NO_PTHREADS=1
+
+ <gigabase-debug>none:<define>GIGABASE_DEBUG=DEBUG_NONE
+ <gigabase-debug>check:<define>DEBUG=DEBUG_CHECK
+ <gigabase-debug>trace:<define>DEBUG=DEBUG_TRACE
+
+ <gigabase-namespaces>enable:<define>USE_NAMESPACES=1
+ <gigabase-secure-server>enable:<define>SECURE_SERVER=1
+ <gigabase-queue-manager>enable:<define>USE_QUEUE_MANAGER=1
+ <gigabase-std-string>enable:<define>USE_STD_STRING=1
+ <gigabase-exception-on-error>enable:<define>THROW_EXCEPTION_ON_ERROR=1
+
+ <gigabase-autoincrement>enable:<define>AUTOINCREMENT_SUPPORT=1
+ <gigabase-clone-identifiers>enable:<define>CLONE_IDENTIFIERS=1
+ <gigabase-rectangle-dimension>2:<define>RECTANGLE_DIMENSION=2
+ <gigabase-coordinate-type>int:<define>RECTANGLE_COORDINATE_TYPE=int
+ <gigabase-coordinate-type>double:<define>RECTANGLE_COORDINATE_TYPE=double
+ <gigabase-coordinate-type>long:<define>RECTANGLE_COORDINATE_TYPE=long
+ <gigabase-coordinate-type>float:<define>RECTANGLE_COORDINATE_TYPE=float
+ <gigabase-rectangle-area-type>db_int8:<define>RECTANGLE_AREA_TYPE=db_int8
+ <gigabase-rectangle-area-type>double:<define>RECTANGLE_AREA_TYPE=double
+ <gigabase-set-null-dacl>enable:<define>SET_NULL_DACL=1
+ <gigabase-int8-is-defined>enable:<define>INT8_IS_DEFINED=1
+ <gigabase-mfc>enable:<define>USE_MFC=1
+ <gigabase-atl>enable:<define>USE_ATL=1
+ <gigabase-mfc-string>enable:<define>USE_MFC_STRING=1
+ <gigabase-large-database-support>enable:<define>LARGE_DATABASE_SUPPORT=1
+ <gigabase-sparse-file>enable:<define>SPARSE_FILE_OPTIMIZATION=true
+ <gigabase-align-header>enable:<define>ALIGN_HEADER=true
+ <gigabase-regex>enable:<define>USE_REGEX=true
+ <gigabase-sock-linger>enable:<define>SOCK_LINGER=1
+ ;
+ local files =
+ class compiler database hashtab file symtab btree
+ rtree cursor query pagepool blob container
+ exception localcli sync
+ ;
+ location,$(version) = $(location) ;
+
+ lib gigabase
+ : $(location)/$(files).cpp
+ : $(requirements)
+ <gigabase-version>$(version)
+ <gigabase-location>$(location)
+ <location-prefix>gigabase
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ $(common-requirements)
+ <gigabase-replicator>enable:<source>$(location)/replicator.cpp
+ <gigabase-replicator>enable,<target-os>windows:<source>$(location)/w32sock.cpp
+ <gigabase-wwwapi>enable:<source>$(location)/wwwapi.cpp
+ <gigabase-wwwapi>enable,<target-os>windows:<source>$(location)/w32sock.cpp
+ :
+ : $(common-requirements)
+ ;
+}

Added: sandbox/tools/build_extensions/ext/gtk.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/gtk.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,75 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for using GTK library.
+
+import extension ;
+import property ;
+import path ;
+import feature ;
+
+extension.declare gtk ;
+
+feature.feature gtk-glib : : free ;
+feature.feature gtk-pango : : free ;
+feature.feature gtk-atk : : free ;
+
+local rule parent ( path ? )
+{
+ if $(path)
+ {
+ return [ path.parent $(path) ] ;
+ }
+}
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements = [ extension.define gtk $(version) : $(location) : $(options) ] ;
+ location = [ path.make $(location) ] ;
+
+ #~ ECHO *** $(requirements) ; EXIT 1 ;
+
+ local gtk-v = $(version) ;
+ local glib-v = [ feature.get-values <gtk-glib> : $(requirements) ] ;
+ local pango-v = [ feature.get-values <gtk-pango> : $(requirements) ] ;
+ local atk-v = [ feature.get-values <gtk-atk> : $(requirements) ] ;
+
+ local includes =
+ [ parent [ path.glob $(location)/include/glib-$(glib-v) : glib.h ] ]
+ [ parent [ path.glob $(location)/lib/glib-$(glib-v)/include : glibconfig.h ] ]
+ [ parent [ parent [ path.glob $(location)/include/gtk-$(gtk-v)/gtk : gtk.h ] ] ]
+ [ parent [ path.glob $(location)/lib/gtk-$(gtk-v)/include : gdkconfig.h ] ]
+ [ parent [ parent [ path.glob $(location)/include/pango-$(pango-v)/pango : pango.h ] ] ]
+ [ parent [ parent [ path.glob $(location)/include/atk-$(pango-v)/atk : atk.h ] ] ]
+ [ parent [ path.glob $(location)/include/cairo : cairo.h ] ]
+ ;
+ #~ ECHO +++ GTK: $(includes) ; EXIT ;
+
+ alias gtk
+ :
+ : $(requirements)
+ <gtk-version>$(version)
+ <gtk-location>$(location)
+ <find-shared-library>glib-$(glib-v)
+ <find-shared-library>gthread-$(glib-v)
+ <find-shared-library>gmodule-$(glib-v)
+ <find-shared-library>gobject-$(glib-v)
+ <find-shared-library>gtk-x11-$(gtk-v)
+ <find-shared-library>gdk-x11-$(gtk-v)
+ <find-shared-library>pango-$(pango-v)
+ <find-shared-library>atk-$(atk-v)
+ :
+ : <include>$(includes)
+ <find-shared-library>glib-$(glib-v)
+ <find-shared-library>gthread-$(glib-v)
+ <find-shared-library>gmodule-$(glib-v)
+ <find-shared-library>gobject-$(glib-v)
+ <find-shared-library>gtk-x11-$(gtk-v)
+ <find-shared-library>gdk-x11-$(gtk-v)
+ <find-shared-library>pango-$(pango-v)
+ <find-shared-library>atk-$(atk-v)
+ ;
+}

Added: sandbox/tools/build_extensions/ext/jpeg.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/jpeg.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,146 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for building jpeg library <http://www.ijg.org/>.
+### Targets:
+### /ext/jpeg//jpeg
+
+import extension ;
+
+import property ;
+import project ;
+import feature ;
+import common ;
+
+extension.declare jpeg ;
+
+rule config_h ( targets * : sources * : properties * )
+{
+ local define ;
+ local undef ;
+ local other ;
+ local version = [ property.select <jpeg-version> : $(properties) ] ;
+
+ define +=
+ HAVE_PROTOTYPES HAVE_UNSIGNED_CHAR HAVE_UNSIGNED_SHORT
+ HAVE_STDDEF_H HAVE_STDLIB_H
+ ;
+ undef +=
+ void const CHAR_IS_UNSIGNED
+ NEED_BSD_STRINGS NEED_SYS_TYPES_H NEED_FAR_POINTERS NEED_SHORT_EXTERNAL_NAMES
+ INCOMPLETE_TYPES_BROKEN
+ ;
+
+ VERSION on $(<) = $(version:G=) ;
+ CONFIG on $(<) =
+ "#define $(define) 1"
+ "#undef $(undef)"
+ $(other)
+ ;
+ NL on $(<) = "
+" ;
+}
+actions config_h
+{
+ @($(STDOUT):E=
+#ifndef JPEGLIB_CONFIG_H
+#define JPEGLIB_CONFIG_H
+
+$(CONFIG:J=$(NL))
+
+#ifdef JPEG_INTERNALS
+#undef RIGHT_SHIFT_IS_UNSIGNED
+#endif
+
+#ifdef JPEG_CJPEG_DJPEG
+#define BMP_SUPPORTED
+#define GIF_SUPPORTED
+#define PPM_SUPPORTED
+#undef RLE_SUPPORTED
+#define TARGA_SUPPORTED
+#undef TWO_FILE_COMMANDLINE
+#undef NEED_SIGNAL_CATCHER
+#undef DONT_USE_B_MODE
+#undef PROGRESS_REPORT
+#endif
+
+#endif // JPEGLIB_CONFIG_H
+) > "$(<)"
+}
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements = [ extension.define jpeg $(version) : $(location) : $(options) ] ;
+
+ make jconfig.h : : @config_h
+ : <jpeg-version>$(version)
+ <location-prefix>src
+ ;
+ explicit jconfig.h ;
+
+ lib jpeg
+ : $(location)/jcapimin.c
+ $(location)/jcapistd.c
+ $(location)/jccoefct.c
+ $(location)/jccolor.c
+ $(location)/jcdctmgr.c
+ $(location)/jchuff.c
+ $(location)/jcinit.c
+ $(location)/jcmainct.c
+ $(location)/jcmarker.c
+ $(location)/jcmaster.c
+ $(location)/jcomapi.c
+ $(location)/jcparam.c
+ $(location)/jcphuff.c
+ $(location)/jcprepct.c
+ $(location)/jcsample.c
+ $(location)/jctrans.c
+ $(location)/jdapimin.c
+ $(location)/jdapistd.c
+ $(location)/jdatadst.c
+ $(location)/jdatasrc.c
+ $(location)/jdcoefct.c
+ $(location)/jdcolor.c
+ $(location)/jddctmgr.c
+ $(location)/jdhuff.c
+ $(location)/jdinput.c
+ $(location)/jdmainct.c
+ $(location)/jdmarker.c
+ $(location)/jdmaster.c
+ $(location)/jdmerge.c
+ $(location)/jdphuff.c
+ $(location)/jdpostct.c
+ $(location)/jdsample.c
+ $(location)/jdtrans.c
+ $(location)/jerror.c
+ $(location)/jfdctflt.c
+ $(location)/jfdctfst.c
+ $(location)/jfdctint.c
+ $(location)/jidctflt.c
+ $(location)/jidctfst.c
+ $(location)/jidctint.c
+ $(location)/jidctred.c
+ $(location)/jquant1.c
+ $(location)/jquant2.c
+ $(location)/jutils.c
+ $(location)/jmemmgr.c
+ $(location)/jmemnobs.c
+ : $(requirements)
+ <jpeg-version>$(version)
+ <jpeg-location>$(location)
+ <include>$(location)
+ <location-prefix>jpeg
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ <implicit-dependency>jconfig.h
+ <dependency>jconfig.h
+ <link>static
+ :
+ : <include>$(location)
+ <implicit-dependency>jconfig.h
+ <dependency>jconfig.h
+ ;
+}

Added: sandbox/tools/build_extensions/ext/libtiff.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/libtiff.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,232 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for building libtiff library <http://www.libtiff.org/>.
+### Targets:
+### /ext/libtiff//tiff
+
+import extension ;
+
+import property ;
+import project ;
+import feature ;
+import common ;
+
+extension.declare libtiff ;
+
+extension.option libtiff ccit : enable disable ;
+extension.option libtiff jpeg-ycbr-subsampling : enable disable ;
+extension.option libtiff jpeg : enable disable ;
+extension.option libtiff logluv : enable disable ;
+extension.option libtiff lzw : enable disable ;
+extension.option libtiff mdi : enable disable ;
+extension.option libtiff next : enable disable ;
+extension.option libtiff packbits : enable disable ;
+extension.option libtiff pixarlog : enable disable ;
+extension.option libtiff subifd : enable disable ;
+extension.option libtiff thunder : enable disable ;
+extension.option libtiff zip : enable disable ;
+
+rule config_h ( targets * : sources * : properties * )
+{
+ local define ;
+ local undef ;
+ local other ;
+ switch [ property.select <target-os> : $(properties) ]
+ {
+ case *linux* :
+ define +=
+ HAVE_ASSERT_H HAVE_DLFCN_H HAVE_FCNTL_H HAVE_INTTYPES_H HAVE_MEMORY_H
+ HAVE_LIMITS_H HAVE_MALLOC_H HAVE_SEARCH_H HAVE_STDINT_H HAVE_STDLIB_H
+ HAVE_STRINGS_H HAVE_STRING_H HAVE_SYS_STAT_H HAVE_SYS_TIME_H
+ HAVE_SYS_TYPES_H HAVE_UNISTD_H
+ HAVE_LIBC HAVE_LIBM HAVE_IEEEFP
+ ;
+ undef +=
+ HAVE_APPLE_OPENGL_FRAMEWORK HAVE_FLOOR
+ HAVE_INT16 HAVE_INT32 HAVE_INT8 HAVE_ISASCII
+ HAVE_LFIND
+ HAVE_MEMMOVE HAVE_MEMSET HAVE_MMAP HAVE_POW
+ HAVE_PTHREAD HAVE_SQRT HAVE_STRCASECMP HAVE_STRCHR
+ HAVE_STRRCHR HAVE_STRSTR HAVE_STRTOL HAVE_STRTOUL
+ HAVE_WINDOWS_H
+ NO_MINUS_C_MINUS_O
+ PTHREAD_CREATE_JOINABLE SIZEOF_INT SIZEOF_LONG STDC_HEADERS
+ TIME_WITH_SYS_TIME TM_IN_SYS_TIME WORDS_BIGENDIAN X_DISPLAY_MISSING
+ _FILE_OFFSET_BITS _LARGE_FILES const off_t size_t
+ USE_WIN32_FILEIO HAVE_IO_H
+ ;
+ other +=
+ "
+#ifndef __cplusplus
+#undef inline
+#endif
+"
+ ;
+
+ case *windows* :
+ define +=
+ HAVE_ASSERT_H HAVE_FCNTL_H HAVE_IEEEFP HAVE_STRING_H HAVE_SYS_TYPES_H
+ HAVE_IO_H HAVE_SEARCH_H
+ USE_WIN32_FILEIO
+ ;
+ undef +=
+ HAVE_APPLE_OPENGL_FRAMEWORK
+ HAVE_DLFCN_H HAVE_FLOOR
+ HAVE_INT16 HAVE_INT32 HAVE_INT8 HAVE_INTTYPES_H HAVE_ISASCII
+ HAVE_LFIND HAVE_LIBC HAVE_LIBM HAVE_LIMITS_H HAVE_MALLOC_H
+ HAVE_MEMMOVE HAVE_MEMORY_H HAVE_MEMSET HAVE_MMAP HAVE_POW
+ HAVE_PTHREAD HAVE_SQRT HAVE_STDINT_H HAVE_STDLIB_H
+ HAVE_STRCASECMP HAVE_STRCHR HAVE_STRINGS_H
+ HAVE_STRRCHR HAVE_STRSTR HAVE_STRTOL HAVE_STRTOUL HAVE_SYS_STAT_H
+ HAVE_SYS_TIME_H HAVE_UNISTD_H HAVE_WINDOWS_H
+ NO_MINUS_C_MINUS_O
+ PTHREAD_CREATE_JOINABLE SIZEOF_INT SIZEOF_LONG STDC_HEADERS
+ TIME_WITH_SYS_TIME TM_IN_SYS_TIME WORDS_BIGENDIAN X_DISPLAY_MISSING
+ _FILE_OFFSET_BITS _LARGE_FILES const off_t size_t
+ ;
+ other +=
+ "#define lfind _lfind"
+ "
+#ifndef __cplusplus
+# ifndef inline
+# define inline __inline
+# endif
+#endif
+"
+ ;
+ }
+ if [ property.select <architecture> : $(properties) ]
+ in <architecture>x86 <architecture>ia64
+ {
+ other +=
+ "#define HOST_FILLORDER FILLORDER_LSB2MSB"
+ "#undef WORDS_BIGENDIAN"
+ ;
+ }
+ else
+ {
+ other +=
+ "#define HOST_FILLORDER FILLORDER_MSB2LSB"
+ "#define WORDS_BIGENDIAN"
+ ;
+ }
+ local version = [ property.select <libtiff-version> : $(properties) ] ;
+ VERSION on $(<) = $(version:G=) ;
+ CONFIG on $(<) =
+ "#define $(define) 1"
+ "#undef $(undef)"
+ $(other)
+ ;
+ NL on $(<) = "
+" ;
+}
+actions config_h
+{
+ @($(STDOUT):E=
+#ifndef LIBTIFF_CONFIG_H
+#define LIBTIFF_CONFIG_H
+
+#define PACKAGE "tiff"
+#define PACKAGE_BUGREPORT "tiff_at_[hidden]"
+#define PACKAGE_NAME "LibTIFF Software"
+#define PACKAGE_STRING "LibTIFF Software $(VERSION)"
+#define PACKAGE_TARNAME "tiff"
+#define PACKAGE_VERSION "$(VERSION)"
+#define SIZEOF_INT (sizeof(int))
+#define SIZEOF_LOG (sizeof(long))
+$(CONFIG:J=$(NL))
+
+#endif // LIBTIFF_CONFIG_H
+) > "$(<)"
+}
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements = [ extension.define libtiff $(version) : $(location) : $(options) ] ;
+
+ make tif_config.h : : @config_h
+ : <libtiff-version>$(version)
+ <location-prefix>src
+ ;
+ explicit tif_config.h ;
+
+ local common-requirements =
+ <libtiff-ccit>enable:<define>CCITT_SUPPORT=1
+ <libtiff-jpeg-ycbr-subsampling>enable:<define>CHECK_JPEG_YCBCR_SUBSAMPLING=1
+ <libtiff-jpeg>enable:<define>JPEG_SUPPORT=1
+ <libtiff-logluv>enable:<define>LOGLUV_SUPPORT=1
+ <libtiff-lzw>enable:<define>LZW_SUPPORT=1
+ <libtiff-mdi>enable:<define>MDI_SUPPORT=1
+ <libtiff-next>enable:<define>NEXT_SUPPORT=1
+ <libtiff-packbits>enable:<define>PACKBITS_SUPPORT=1
+ <libtiff-pixarlog>enable:<define>PIXARLOG_SUPPORT=1
+ <libtiff-subifd>enable:<define>SUBIFD_SUPPORT=1
+ <libtiff-thunder>enable:<define>THUNDER_SUPPORT=1
+ <libtiff-zip>enable:<define>ZIP_SUPPORT=1
+ ;
+
+ lib tiff
+ : $(location)/libtiff/tif_aux.c
+ $(location)/libtiff/tif_close.c
+ $(location)/libtiff/tif_codec.c
+ $(location)/libtiff/tif_compress.c
+ $(location)/libtiff/tif_color.c
+ $(location)/libtiff/tif_dir.c
+ $(location)/libtiff/tif_dirinfo.c
+ $(location)/libtiff/tif_dirread.c
+ $(location)/libtiff/tif_dirwrite.c
+ $(location)/libtiff/tif_dumpmode.c
+ $(location)/libtiff/tif_error.c
+ $(location)/libtiff/tif_extension.c
+ $(location)/libtiff/tif_fax3.c
+ $(location)/libtiff/tif_fax3sm.c
+ $(location)/libtiff/tif_flush.c
+ $(location)/libtiff/tif_getimage.c
+ $(location)/libtiff/tif_jpeg.c
+ $(location)/libtiff/tif_luv.c
+ $(location)/libtiff/tif_lzw.c
+ $(location)/libtiff/tif_next.c
+ $(location)/libtiff/tif_ojpeg.c
+ $(location)/libtiff/tif_open.c
+ $(location)/libtiff/tif_packbits.c
+ $(location)/libtiff/tif_pixarlog.c
+ $(location)/libtiff/tif_predict.c
+ $(location)/libtiff/tif_print.c
+ $(location)/libtiff/tif_read.c
+ $(location)/libtiff/tif_strip.c
+ $(location)/libtiff/tif_swab.c
+ $(location)/libtiff/tif_thunder.c
+ $(location)/libtiff/tif_tile.c
+ $(location)/libtiff/tif_version.c
+ $(location)/libtiff/tif_warning.c
+ $(location)/libtiff/tif_write.c
+ $(location)/libtiff/tif_zip.c
+ : <target-os>unix:<source>$(location)/libtiff/tif_unix.c
+ <target-os>windows:<source>$(location)/libtiff/tif_win32.c
+ <target-os>windows,<link>shared,<toolset>msvc:<def-file>$(location)/libtiff/libtiff.def
+ <target-os>windows,<link>shared,<toolset>msvc:<linkflags>/EXPORT:_TIFFDataSize
+ <libtiff-zip>enable:<library>/ext/zlib//z
+ <libtiff-jpeg>enable:<library>/ext/jpeg//jpeg
+ $(requirements)
+ <libtiff-version>$(version)
+ <libtiff-location>$(location)
+ <include>$(location)/libtiff
+ <location-prefix>libtiff
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ <define>TIF_PLATFORM_CONSOLE
+ <warnings>off
+ <implicit-dependency>tif_config.h
+ <dependency>tif_config.h
+ $(common-requirements)
+ :
+ : <include>$(location)/libtiff
+ <implicit-dependency>tif_config.h
+ <dependency>tif_config.h
+ $(common-requirements)
+ ;
+}

Added: sandbox/tools/build_extensions/ext/lua.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/lua.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,111 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for building Lua interpreter <http://www.lua.org/>.
+### Targets:
+### /ext/lua//luacore
+### /ext/lua//lualib
+### /ext/lua//luai (core+lib)
+### /ext/lua//lua
+### /ext/lua//luac
+
+import extension ;
+
+import property ;
+import project ;
+import feature ;
+import common ;
+
+extension.declare lua ;
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements =
+ [ extension.define lua $(version) : $(location) : $(options) ]
+ <lua-version>$(version)
+ <lua-location>$(location)
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ <location-prefix>lua
+ #~ <warnings>off
+ <target-os>windows,<link>shared:<define>LUA_BUILD_AS_DLL
+ <target-os>linux:<define>LUA_USE_LINUX
+ ;
+ local common-requirements =
+ <include>$(location)/src
+ ;
+
+ alias luacore
+ : $(location)/src/lapi.c
+ $(location)/src/lcode.c
+ $(location)/src/ldebug.c
+ $(location)/src/ldo.c
+ $(location)/src/ldump.c
+ $(location)/src/lfunc.c
+ $(location)/src/lgc.c
+ $(location)/src/llex.c
+ $(location)/src/lmem.c
+ $(location)/src/lobject.c
+ $(location)/src/lopcodes.c
+ $(location)/src/lparser.c
+ $(location)/src/lstate.c
+ $(location)/src/lstring.c
+ $(location)/src/ltable.c
+ $(location)/src/ltm.c
+ $(location)/src/lundump.c
+ $(location)/src/lvm.c
+ $(location)/src/lzio.c
+ : $(common-requirements)
+ $(requirements)
+ :
+ : $(common-requirements)
+ ;
+
+ alias lualib
+ : $(location)/src/lauxlib.c
+ $(location)/src/lbaselib.c
+ $(location)/src/ldblib.c
+ $(location)/src/liolib.c
+ $(location)/src/lmathlib.c
+ $(location)/src/loslib.c
+ $(location)/src/ltablib.c
+ $(location)/src/lstrlib.c
+ $(location)/src/loadlib.c
+ $(location)/src/linit.c
+ : $(common-requirements)
+ $(requirements)
+ :
+ : $(common-requirements)
+ ;
+
+ lib luai
+ : luacore
+ lualib
+ : $(common-requirements)
+ $(requirements)
+ :
+ : $(common-requirements)
+ ;
+
+ exe lua
+ : $(location)/src/lua.c
+ luai
+ : $(common-requirements)
+ $(requirements)
+ <target-os>linux:<find-shared-library>dl
+ <target-os>linux:<find-shared-library>readline
+ <target-os>linux:<find-shared-library>history
+ <target-os>linux:<find-shared-library>ncurses
+ ;
+
+ exe luac
+ : $(location)/src/luac.c
+ $(location)/src/print.c
+ luai/<link>static
+ : $(common-requirements)
+ $(requirements)
+ ;
+}

Added: sandbox/tools/build_extensions/ext/mng.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/mng.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,54 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for building MNG library <http://gjuyn.xs4all.nl/libmng>.
+### Targets:
+### /ext/mng//mng
+
+import extension ;
+
+import property ;
+import project ;
+import feature ;
+import common ;
+
+extension.declare mng ;
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements = [ extension.define mng $(version) : $(location) : $(options) ] ;
+
+ lib mng
+ : [ glob $(location)/libmng_*.c ]
+ /ext/zlib//z
+ /ext/jpeg//jpeg
+ : $(requirements)
+ <mng-version>$(version)
+ <mng-location>$(location)
+ <include>$(location)
+ <location-prefix>mng
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ <warnings>off
+ <define>MNG_SUPPORT_FULL
+ [ conditional <link>shared :
+ <define>MNG_BUILD_DLL
+ <define>MNG_BUILD_SO
+ <define>MNG_SKIP_ZLIB
+ <define>MNG_SKIP_LCMS
+ <define>MNG_SKIP_IJG6B
+ ]
+ :
+ : <include>$(location)
+ [ conditional <link>shared :
+ <define>MNG_USE_DLL
+ <define>MNG_USE_SO
+ <define>MNG_SKIP_ZLIB
+ <define>MNG_SKIP_LCMS
+ <define>MNG_SKIP_IJG6B
+ ]
+ ;
+}

Added: sandbox/tools/build_extensions/ext/ogre.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/ogre.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,304 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for Ogre3D rendering C++ engine <http://www.ogre3d.org>.
+
+import property ;
+import project ;
+import feature ;
+
+project.extension ogre ;
+
+feature.feature ogre-version
+ :
+ : propagated implicit ;
+
+feature.feature ogre-location
+ :
+ : free ;
+
+feature.feature ogre-opengl
+ : enable disable : propagated incidental ;
+feature.feature ogre-d3d9
+ : disable enable : propagated incidental ;
+feature.feature ogre-cg
+ : disable enable : propagated incidental ;
+
+feature.feature ogre-cegui
+ : disable enable : propagated incidental ;
+feature.feature ogre-bsp
+ : disable enable : propagated incidental ;
+feature.feature ogre-octree
+ : disable enable : propagated incidental ;
+feature.feature ogre-quake3
+ : disable enable : propagated incidental ;
+feature.feature ogre-terrain
+ : disable enable : propagated incidental ;
+
+ogre.hpp = "ogre.hpp" ;
+ogre.hpp.text = "
+#ifndef OGRE_HPP
+#define OGRE_HPP
+
+#if defined( _MSC_VER )
+#pragma warning( push )
+#endif
+
+// Disable the incredibly nasty Ogre memory manager.
+#define OGRE_DEBUG_MEMORY_MANAGER 0
+#include <Ogre.h>
+#include <OgreNoMemoryMacros.h>
+
+#if defined( _MSC_VER )
+#pragma warning( pop )
+#endif
+
+#endif
+" ;
+
+actions ogre_hpp
+{
+ @($(STDOUT):E=$(ogre.hpp.text)) > "$(<)"
+}
+
+local rule prop ( option )
+{
+ local vals = [ MATCH "--([^-]+)-([^=]+)[=]?(.*)" : $(option) ] ;
+ if $(vals[2])
+ {
+ return <ogre-$(vals[1])>$(vals[2]) ;
+ }
+ else
+ {
+ return <ogre-$(vals[1])>enable ;
+ }
+}
+
+rule init ( version ? : location : options * )
+{
+ if $(version)
+ {
+ feature.extend ogre-version : $(version) ;
+ }
+
+ local requirements ;
+ local usage-requirements ;
+
+ for local option in $(options)
+ {
+ switch $(option)
+ {
+ case --enable-* :
+ requirements = [ property.refine $(requirements) : [ prop $(option) ] ] ;
+ case --disable-* :
+ requirements = [ property.refine $(requirements) : [ prop $(option) ] ] ;
+ case --with-* :
+ requirements = [ property.refine $(requirements) : [ prop $(option) ] ] ;
+ }
+ }
+
+ requirements +=
+ <ogre-version>$(version)
+ <ogre-location>$(location)
+ <location-prefix>ogre
+ ;
+ usage-requirements +=
+ <include>$(location)/include
+ <ogre-cegui>enable:<include>$(location)/include/CEGUI
+ <ogre-bsp>enable:<include>$(location)/include/opt
+ <ogre-octree>enable:<include>$(location)/include/opt
+ <ogre-quake3>enable:<include>$(location)/include/opt
+ <ogre-terrain>enable:<include>$(location)/include/opt
+ <implicit-dependency>$(ogre.hpp)
+ <dependency>$(ogre.hpp)
+ ;
+
+ make $(ogre.hpp) : : @ogre_hpp
+ : <ogre-version>$(version)
+ <location-prefix>ogre/setup
+ ;
+ explicit $(ogre.hpp) ;
+
+ local libs-to-use ;
+ if ! <ogre-opengl>disable in $(requirements)
+ {
+ lib render-gl.dll : : $(requirements) <debug-symbols>on
+ <file>$(location)/bin/debug/RenderSystem_GL.dll ;
+ lib render-gl.dll : : $(requirements) <debug-symbols>off
+ <file>$(location)/bin/release/RenderSystem_GL.dll ;
+
+ alias opengl
+ :
+ : $(requirements)
+ <toolset>msvc
+ <target-os>windows
+ <link>shared
+ :
+ : $(usage-requirements)
+ <library>render-gl.dll
+ ;
+
+ libs-to-use += opengl ;
+ }
+ if <ogre-d3d9>enable in $(requirements)
+ {
+ lib render-d3d9.dll : : $(requirements) <debug-symbols>on
+ <file>$(location)/bin/debug/RenderSystem_Direct3D9.dll ;
+ lib render-d3d9.dll : : $(requirements) <debug-symbols>off
+ <file>$(location)/bin/release/RenderSystem_Direct3D9.dll ;
+
+ alias d3d9
+ :
+ : $(requirements)
+ <toolset>msvc
+ <target-os>windows
+ <link>shared
+ :
+ : $(usage-requirements)
+ <library>render-d3d9.dll
+ ;
+
+ libs-to-use += d3d9 ;
+ }
+ if <ogre-cg>enable in $(requirements)
+ {
+ }
+ if <ogre-cegui>enable in $(requirements)
+ {
+ lib cegui-renderer.dll : : $(requirements) <debug-symbols>on
+ <file>$(location)/bin/debug/OgreGUIRenderer_d.dll ;
+ lib cegui-base.dll : : $(requirements) <debug-symbols>on
+ <file>$(location)/bin/debug/CEGUIBase_d.dll ;
+ lib cegui-falagard-base.dll : : $(requirements) <debug-symbols>on
+ <file>$(location)/bin/debug/CEGUIFalagardBase_d.dll ;
+ lib cegui-tahares-look.dll : : $(requirements) <debug-symbols>on
+ <file>$(location)/bin/debug/CEGUITaharezLook_d.dll ;
+ lib cegui-windows-look.dll : : $(requirements) <debug-symbols>on
+ <file>$(location)/bin/debug/CEGUIWindowsLook_d.dll ;
+
+ lib cegui-base.dll : : $(requirements) <debug-symbols>off
+ <file>$(location)/bin/release/CEGUIBase.dll ;
+ lib cegui-falagard-base.dll : : $(requirements) <debug-symbols>off
+ <file>$(location)/bin/release/CEGUIFalagardBase.dll ;
+ lib cegui-tahares-look.dll : : $(requirements) <debug-symbols>off
+ <file>$(location)/bin/release/CEGUITaharezLook.dll ;
+ lib cegui-windows-look.dll : : $(requirements) <debug-symbols>off
+ <file>$(location)/bin/release/CEGUIWindowsLook.dll ;
+
+ lib cegui
+ :
+ : $(requirements)
+ <toolset>msvc
+ <target-os>windows
+ <link>shared
+ <debug-symbols>on
+ <file>$(location)/lib/CEGUIBase_d.lib
+ :
+ : $(usage-requirements)
+ <library>cegui-base.dll
+ <library>cegui-falagard-base.dll
+ <library>cegui-tahares-look.dll
+ <library>cegui-windows-look.dll
+ ;
+
+ lib cegui
+ :
+ : $(requirements)
+ <toolset>msvc
+ <target-os>windows
+ <link>shared
+ <debug-symbols>off
+ <file>$(location)/lib/CEGUIBase.lib
+ :
+ : $(usage-requirements)
+ <library>cegui-base.dll
+ <library>cegui-falagard-base.dll
+ <library>cegui-tahares-look.dll
+ <library>cegui-windows-look.dll
+ ;
+
+ libs-to-use += cegui ;
+ }
+ if <ogre-bsp>enable in $(requirements)
+ {
+ }
+ if <ogre-octree>enable in $(requirements)
+ {
+ }
+ if <ogre-quake3>enable in $(requirements)
+ {
+ }
+ if <ogre-terrain>enable in $(requirements)
+ {
+ }
+
+ lib devil.dll : : $(requirements) <debug-symbols>on
+ <file>$(location)/bin/debug/DevIL.dll ;
+ lib devil.dll : : $(requirements) <debug-symbols>off
+ <file>$(location)/bin/release/DevIL.dll ;
+
+ lib zlib1.dll : : $(requirements) <debug-symbols>on
+ <file>$(location)/bin/debug/zlib1.dll ;
+ lib zlib1.dll : : $(requirements) <debug-symbols>off
+ <file>$(location)/bin/release/zlib1.dll ;
+
+ lib ogre-main.dll : : $(requirements) <debug-symbols>on
+ <file>$(location)/bin/debug/OgreMain_d.dll ;
+ lib ogre-main.dll : : $(requirements) <debug-symbols>off
+ <file>$(location)/bin/release/OgreMain.dll ;
+
+ lib ogre-platform.dll : : $(requirements) <debug-symbols>on
+ <file>$(location)/bin/debug/OgrePlatform_d.dll ;
+ lib ogre-platform.dll : : $(requirements) <debug-symbols>off
+ <file>$(location)/bin/release/OgrePlatform.dll ;
+
+ lib ilu.dll : : $(requirements) <debug-symbols>on
+ <file>$(location)/bin/debug/ILU.dll ;
+ lib ilu.dll : : $(requirements) <debug-symbols>off
+ <file>$(location)/bin/release/ILU.dll ;
+
+ #~ lib ilut.dll : : $(requirements) <debug-symbols>on
+ #~ <file>$(location)/bin/debug/ILUT.dll ;
+ #~ lib ilut.dll : : $(requirements) <debug-symbols>off
+ #~ <file>$(location)/bin/release/ILUT.dll ;
+
+ #~ ECHO --- $(libs-to-use) ;
+
+ lib ogre
+ :
+ : $(requirements)
+ <toolset>msvc
+ <target-os>windows
+ <link>shared
+ <debug-symbols>on
+ <file>$(location)/lib/OgreMain_d.lib
+ <use>$(libs-to-use)
+ :
+ : $(usage-requirements)
+ <library>devil.dll
+ <library>zlib1.dll
+ <library>ilu.dll
+ <library>ogre-main.dll
+ <library>ogre-platform.dll
+ ;
+
+ lib ogre
+ :
+ : $(requirements)
+ <toolset>msvc
+ <target-os>windows
+ <link>shared
+ <debug-symbols>off
+ <file>$(location)/lib/OgreMain.lib
+ <use>$(libs-to-use)
+ :
+ : $(usage-requirements)
+ <library>devil.dll
+ <library>zlib1.dll
+ <library>ilu.dll
+ <library>ogre-main.dll
+ <library>ogre-platform.dll
+ ;
+}

Added: sandbox/tools/build_extensions/ext/osg.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/osg.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,311 @@
+#~ Copyright Redshift Software, Inc. 2007.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for OpenSceneGraph
+### <http://www.openscenegraph.org>.
+
+import extension ;
+
+#~ import property ;
+#~ import project ;
+#~ import feature ;
+#~ import common ;
+import set ;
+import path ;
+
+extension.declare osg ;
+
+extension.option osg matrix-type : double float ;
+extension.option osg plane-type : double float ;
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements =
+ [ extension.define osg $(version) : $(location) : $(options) ]
+ <link>static:<define>OSG_LIBRARY_STATIC
+ ;
+ local common-requirements =
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
+
+ <osg-version>$(version)
+ <osg-location>$(location)
+ <include>$(location)/include
+ <target-os>windows:<define>WIN32
+
+ <osg-matrix-type>float:<define>OSG_USE_FLOAT_MATRIX
+ <osg-plane-type>float:<define>OSG_USE_FLOAT_PLANE
+ ;
+
+ location,$(version) = $(location) ;
+
+ local rule conditional ( condition + : requirements * )
+ {
+ condition = $(condition:J=,) ;
+ if [ MATCH (:) : $(condition) ]
+ {
+ return $(condition)$(requirements) ;
+ }
+ else
+ {
+ return $(condition):$(requirements) ;
+ }
+ }
+
+ alias gl
+ :
+ :
+ :
+ : <target-os>windows:<find-shared-library>OpenGL32
+ <target-os>windows:<find-shared-library>GLU32
+ ;
+
+ lib openthreads
+ : [ glob $(location)/src/OpenThreads/common/*.cpp ]
+ : $(requirements) $(common-requirements)
+ <location-prefix>openthreads
+ <link>shared:<define>OT_LIBRARY
+ <link>static:<define>OT_LIBRARY_STATIC
+ <link>shared:<define>OPENTHREADS_EXPORTS
+ [ conditional <target-os>windows:<source> :
+ [ glob $(location)/src/OpenThreads/win32/*.cpp ] ]
+ :
+ : $(common-requirements)
+ ;
+ explicit openthreads ;
+
+ lib osg
+ : /ext/osg//openthreads /ext/osg//gl
+ [ set.difference
+ [ glob $(location)/src/osg/*.cpp ]
+ :
+ [ glob $(location)/src/osg/Matrix_implementation.cpp ]
+ ]
+ : $(requirements) $(common-requirements)
+ <location-prefix>osg
+ <link>shared:<define>OSG_LIBRARY
+ :
+ : $(common-requirements)
+ ;
+
+ lib osgDB
+ : /ext/osg//openthreads /ext/osg//gl
+ /ext/osg//osg
+ [ glob $(location)/src/osgDB/*.cpp ]
+ : $(requirements) $(common-requirements)
+ <location-prefix>osgDB
+ <link>shared:<define>OSGDB_LIBRARY
+ :
+ : $(common-requirements)
+ ;
+
+ lib osgUtil
+ : /ext/osg//openthreads /ext/osg//gl
+ /ext/osg//osg
+ [ glob $(location)/src/osgUtil/*.cpp ]
+ : $(requirements) $(common-requirements)
+ <location-prefix>osgUtil
+ <link>shared:<define>OSGUTIL_LIBRARY
+ :
+ : $(common-requirements)
+ ;
+
+ lib osgGA
+ : /ext/osg//openthreads /ext/osg//gl
+ /ext/osg//osg /ext/osg//osgDB /ext/osg//osgUtil
+ [ glob $(location)/src/osgGA/*.cpp ]
+ : $(requirements) $(common-requirements)
+ <location-prefix>osgGA
+ <link>shared:<define>OSGGA_LIBRARY
+ :
+ : $(common-requirements)
+ ;
+
+ lib osgText
+ : /ext/osg//openthreads /ext/osg//gl
+ /ext/osg//osg /ext/osg//osgDB
+ [ glob $(location)/src/osgText/*.cpp ]
+ : $(requirements) $(common-requirements)
+ <location-prefix>osgText
+ <link>shared:<define>OSGTEXT_LIBRARY
+ :
+ : $(common-requirements)
+ ;
+
+ lib osgManipulator
+ : /ext/osg//openthreads /ext/osg//gl
+ /ext/osg//osg /ext/osg//osgGA /ext/osg//osgUtil
+ [ glob $(location)/src/osgManipulator/*.cpp ]
+ : $(requirements) $(common-requirements)
+ <location-prefix>osgManipulator
+ <link>shared:<define>OSGMANIPULATOR_LIBRARY
+ :
+ : $(common-requirements)
+ ;
+
+ lib osgSim
+ : /ext/osg//openthreads /ext/osg//gl
+ /ext/osg//osg /ext/osg//osgDB /ext/osg//osgUtil /ext/osg//osgText
+ [ glob $(location)/src/osgSim/*.cpp ]
+ : $(requirements) $(common-requirements)
+ <location-prefix>osgSim
+ <link>shared:<define>OSGSIM_LIBRARY
+ :
+ : $(common-requirements)
+ ;
+
+ lib osgFX
+ : /ext/osg//openthreads /ext/osg//gl
+ /ext/osg//osg /ext/osg//osgDB /ext/osg//osgUtil
+ [ glob $(location)/src/osgFX/*.cpp ]
+ : $(requirements) $(common-requirements)
+ <location-prefix>osgFX
+ <link>shared:<define>OSGFX_LIBRARY
+ :
+ : $(common-requirements)
+ ;
+
+ lib osgParticle
+ : /ext/osg//openthreads /ext/osg//gl
+ /ext/osg//osg /ext/osg//osgDB /ext/osg//osgUtil
+ [ glob $(location)/src/osgParticle/*.cpp ]
+ : $(requirements) $(common-requirements)
+ <location-prefix>osgParticle
+ <link>shared:<define>OSGPARTICLE_LIBRARY
+ :
+ : $(common-requirements)
+ ;
+
+ lib osgShadow
+ : /ext/osg//openthreads /ext/osg//gl
+ /ext/osg//osg /ext/osg//osgDB /ext/osg//osgUtil
+ [ glob $(location)/src/osgShadow/*.cpp ]
+ : $(requirements) $(common-requirements)
+ <location-prefix>osgShadow
+ <link>shared:<define>OSGSHADOW_LIBRARY
+ :
+ : $(common-requirements)
+ ;
+
+ lib osgTerrain
+ : /ext/osg//openthreads /ext/osg//gl
+ /ext/osg//osg /ext/osg//osgDB /ext/osg//osgUtil
+ [ glob $(location)/src/osgTerrain/*.cpp ]
+ : $(requirements) $(common-requirements)
+ <location-prefix>osgTerrain
+ <link>shared:<define>OSGTERRAIN_LIBRARY
+ :
+ : $(common-requirements)
+ ;
+
+ lib osgViewer
+ : /ext/osg//openthreads /ext/osg//gl
+ /ext/osg//osg /ext/osg//osgDB /ext/osg//osgUtil /ext/osg//osgText /ext/osg//osgGA
+ [ set.difference
+ [ glob $(location)/src/osgViewer/*.cpp ]
+ :
+ [ glob
+ $(location)/src/osgViewer/*Win32.cpp
+ $(location)/src/osgViewer/*Carbon.cpp
+ $(location)/src/osgViewer/*X11.cpp ]
+ ]
+ : $(requirements) $(common-requirements)
+ <location-prefix>osgViewer
+ <link>shared:<define>OSGVIEWER_LIBRARY
+ [ conditional <target-os>windows:<source> :
+ [ glob $(location)/src/osgViewer/*Win32.cpp ] ]
+ [ conditional <target-os>macosx:<source> :
+ [ glob $(location)/src/osgViewer/*Carbon.cpp ] ]
+ [ conditional <target-os>linux:<source> :
+ [ glob $(location)/src/osgViewer/*X11.cpp ] ]
+ [ conditional <target-os>windows:<find-shared-library> : user32 gdi32 ]
+ :
+ : $(common-requirements)
+ ;
+
+ local rule lib-osgdb ( name src ? : * )
+ {
+ src ?= $(name) ;
+ name = osgdb_$(name) ;
+ return [ lib $(name)
+ :
+ /ext/osg//openthreads /ext/osg//gl
+ /ext/osg//osg /ext/osg//osgDB /ext/osg//osgUtil
+ [ glob $(location)/src/osgPlugins/$(src)/*.cpp ]
+ $(2)
+ :
+ $(requirements) $(common-requirements)
+ <location-prefix>plugin/$(name)
+ $(3)
+ : $(4)
+ : $(common-requirements)
+ $(5)
+ ] ;
+ }
+
+ #~ ############################################################
+ #~ #
+ #~ # NodeKit/Psudo loader plugins
+ #~ #
+ lib-osgdb osgfx osgFX : /ext/osg//osgFX ;
+ lib-osgdb osgparticle osgParticle : /ext/osg//osgParticle ;
+ lib-osgdb osgsim osgSim : /ext/osg//osgSim ;
+ lib-osgdb osgtext osgText : /ext/osg//osgText ;
+ lib-osgdb osgviewer osgViewer : /ext/osg//osgViewer ;
+ lib-osgdb osgshadow osgShadow : /ext/osg//osgShadow ;
+ lib-osgdb osgterrain osgTerrain : /ext/osg//osgTerrain ;
+ lib-osgdb osga ;
+ lib-osgdb rot ;
+ lib-osgdb scale ;
+ lib-osgdb trans ;
+ lib-osgdb normals ;
+ lib-osgdb net : :
+ <target-os>windows:<find-shared-library>wsock32 ;
+ #~ ############################################################
+ #~ #
+ #~ # Main native plugins
+ #~ #
+ lib-osgdb osg : /ext/osg//osgSim /ext/osg//osgFX /ext/osg//osgText ;
+ lib-osgdb ive : /ext/osg//osgSim /ext/osg//osgFX /ext/osg//osgText ;
+ #~ ############################################################
+ #~ #
+ #~ # Image plugins
+ lib-osgdb rgb ;
+ lib-osgdb bmp ;
+ lib-osgdb pnm ;
+ lib-osgdb dds ;
+ lib-osgdb tga ;
+ lib-osgdb hdr ;
+ lib-osgdb jpeg : /ext/jpeg//jpeg ;
+ lib-osgdb png : /ext/png//png ;
+ lib-osgdb tiff : /ext/libtiff//tiff ;
+ #~ ############################################################
+ #~ #
+ #~ # 3rd party 3d plugins
+ #~ #
+ lib-osgdb 3dc ;
+ lib-osgdb lwo : /ext/osg//osgFX ;
+ lib-osgdb x ;
+ lib-osgdb dw ;
+ lib-osgdb dxf ;
+ lib-osgdb openflight OpenFlight : /ext/osg//osgSim ;
+ lib-osgdb geo : /ext/osg//osgSim /ext/osg//osgText ;
+ lib-osgdb obj ;
+ lib-osgdb pic ;
+ lib-osgdb stl ;
+ lib-osgdb 3ds ;
+ lib-osgdb ac ;
+ lib-osgdb logo ;
+ lib-osgdb lws ;
+ lib-osgdb md2 ;
+ lib-osgdb osgtgz ;
+ lib-osgdb tgz ;
+ lib-osgdb txp : /ext/osg//osgSim /ext/osg//osgText :
+ <include>$(location)/src/osgPlugins/txp ;
+ lib-osgdb shp ;
+ lib-osgdb txf : /ext/osg//osgText ;
+ lib-osgdb zip : /ext/zlib//z ;
+}

Added: sandbox/tools/build_extensions/ext/png.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/png.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,45 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for building PNG library <http://www.libpng.org/>.
+### Targets:
+### /ext/png//png
+
+import extension ;
+
+import property ;
+import project ;
+import feature ;
+import common ;
+
+extension.declare png ;
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements = [ extension.define png $(version) : $(location) : $(options) ] ;
+
+ lib png
+ : [ glob $(location)/png*.c ]
+ /ext/zlib//z
+ : $(requirements)
+ <png-version>$(version)
+ <png-location>$(location)
+ <include>$(location)
+ <location-prefix>png
+ <target-os>windows,<link>shared:<define>PNG_BUILD_DLL
+ <define>PNG_iTXt_SUPPORTED
+
+ <toolset>msvc,<link>shared:<define>PNG_IMPEXP=__declspec(dllexport)
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ :
+ : <include>$(location)
+ <target-os>windows,<link>shared:<define>PNG_USE_DLL
+ <define>PNG_iTXt_SUPPORTED
+
+ <toolset>msvc,<link>shared:<define>PNG_IMPEXP=__declspec(dllimport)
+ ;
+}

Added: sandbox/tools/build_extensions/ext/tecla.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/tecla.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,81 @@
+#~ Copyright Redshift Software, Inc. 2007.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for building Tecla library <http://www.astro.caltech.edu/~mcs/tecla/index.html>.
+### Targets:
+### /ext/tecla//tecla
+
+import extension ;
+
+import property ;
+import project ;
+import feature ;
+import common ;
+import path ;
+
+extension.declare tecla ;
+
+local rule when-file ( file : yes : no * )
+{
+ if [ path.exists [ path.make $(file) ] ]
+ {
+ return $(yes) ;
+ }
+ else
+ {
+ return $(no) ;
+ }
+}
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements = [ extension.define tecla $(version) : $(location) : $(options) ] ;
+ requirements = [ extension.refine tecla $(version) :
+ [ when-file "/usr/include/stat.h" : <define>HAVE_SYS_STAT_H=1 ]
+ [ when-file "/usr/include/stdlib.h" : <define>HAVE_STDLIB_H=1 ]
+ [ when-file "/usr/include/string.h" : <define>HAVE_STRING_H=1 ]
+ [ when-file "/usr/include/memory.h" : <define>HAVE_MEMORY_H=1 ]
+ [ when-file "/usr/include/strings.h" : <define>HAVE_STRINGS_H=1 ]
+ [ when-file "/usr/include/inttypes.h" : <define>HAVE_INTTYPES_H=1 ]
+ [ when-file "/usr/include/stdint.h" : <define>HAVE_STDINT_H=1 ]
+ [ when-file "/usr/include/unistd.h" : <define>HAVE_UNISTD_H=1 ]
+ [ when-file "/usr/include/curses.h" : <define>HAVE_CURSES_H=1 ]
+ [ when-file "/usr/include/term.h" : <define>HAVE_TERM_H=1 ]
+ [ when-file "/usr/include/sys/select.h" : <define>HAVE_SYS_SELECT_H=1 ]
+
+ <target-os>linux:<define>USE_TERMINFO=1
+ <target-os>linux:<define>HAVE_SELECT=1
+ <target-os>linux:<define>HAVE_SYSV_PTY=1
+ ] ;
+
+ lib tecla
+ : $(location)/getline.c
+ $(location)/keytab.c
+ $(location)/freelist.c
+ $(location)/strngmem.c
+ $(location)/hash.c
+ $(location)/history.c
+ $(location)/direader.c
+ $(location)/homedir.c
+ $(location)/pathutil.c
+ $(location)/expand.c
+ $(location)/stringrp.c
+ $(location)/cplfile.c
+ $(location)/cplmatch.c
+ $(location)/pcache.c
+ $(location)/version.c
+ $(location)/chrqueue.c
+ $(location)/ioutil.c
+ $(location)/errmsg.c
+ : $(requirements)
+ <tecla-version>$(version)
+ <tecla-location>$(location)
+ <include>$(location)
+ <location-prefix>tecla
+ :
+ : <include>$(location)
+ ;
+}

Added: sandbox/tools/build_extensions/ext/tinyxml.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/tinyxml.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,49 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for building TinyXml library <http://www.grinninglizard.com/tinyxml/>.
+### Declares only one target "/ext/tinyxml//tinyxml". The only supported option
+### is to configure the use of STL by tinyxml. Fro example:
+###
+### using tinyxml : 2.5.0
+### : "C:/Development/TinyXML-2.5.0"
+### : --enable-stl
+### ;
+
+import extension ;
+
+import property ;
+import project ;
+import feature ;
+import common ;
+
+extension.declare tinyxml ;
+
+extension.option tinyxml stl : enable disable ;
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements = [ extension.define tinyxml $(version) : $(location) : $(options) ] ;
+
+ lib tinyxml
+ : $(location)/tinyxml.cpp
+ $(location)/tinyxmlparser.cpp
+ $(location)/tinyxmlerror.cpp
+ $(location)/tinystr.cpp
+ : $(requirements)
+ <tinyxml-version>$(version)
+ <tinyxml-stl>enable:<define>TIXML_USE_STL
+ <tinyxml-location>$(location)
+ <link>static
+ <include>$(location)
+ <location-prefix>tinyxml
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ :
+ : <include>$(location)
+ <tinyxml-stl>enable:<define>TIXML_USE_STL
+ ;
+}

Added: sandbox/tools/build_extensions/ext/windows-psdk.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/windows-psdk.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,83 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Minimal support for using the Windows Platform SDK with
+### BBv2 toolsets. Currently this only injects the needed
+### paths for finding the headers and libs. And hence is likely
+### to only work toolsets that don't come with *any* Win32
+### support, for example the Visual Studio C++ Express distribution.
+### To use declare the sdk in your user-config.jam with both
+### location and the toolsets you want it to apply to. For example:
+###
+### using windows-psdk : srv.2003.sp1
+### : "C:/Program Files/Microsoft Platform SDK"
+### : --toolset=msvc-8.0express ;
+###
+### More than one "--toolset=*" can be given and will be applied. The
+### version number is optional and currently not used.
+
+
+import property ;
+import project ;
+import feature ;
+import toolset : flags ;
+
+project.extension windows-psdk ;
+
+feature.feature windows-psdk-version
+ :
+ : propagated optional implicit ;
+
+feature.feature windows-psdk-location
+ :
+ : free ;
+
+local rule prop ( option )
+{
+ local vals = [ MATCH "--([^-]+)-([^=]+)[=]?(.*)" : $(option) ] ;
+ if $(vals[2])
+ {
+ return <windows-psdk-$(vals[1])>$(vals[2]) ;
+ }
+ else
+ {
+ return <windows-psdk-$(vals[1])>enable ;
+ }
+}
+
+rule init ( version ? : location : options * )
+{
+ if $(version)
+ {
+ feature.extend windows-psdk-version : $(version) ;
+ }
+
+ local requirements ;
+ local toolsets ;
+ for local option in $(options)
+ {
+ switch $(option)
+ {
+ case --enable-* :
+ requirements = [ property.refine $(requirements) : [ prop $(option) ] ] ;
+ case --disable-* :
+ requirements = [ property.refine $(requirements) : [ prop $(option) ] ] ;
+ case --toolset=* :
+ {
+ local toolset = [ MATCH "--toolset=(.*)" : $(option) ] ;
+ toolsets += $(toolset) ;
+ }
+ }
+ }
+
+ for local toolset in $(toolsets)
+ {
+ local tool = [ MATCH "([^-]+)" : $(toolset) ] ;
+ modules.call-in $(tool) :
+ toolset.flags $(tool) INCLUDES <toolset>$(toolset) : $(location)/Include ;
+ modules.call-in $(tool) :
+ toolset.flags $(tool) LINKPATH <toolset>$(toolset) : $(location)/Lib ;
+ }
+}

Added: sandbox/tools/build_extensions/ext/wxwidgets.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/wxwidgets.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,1361 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for bulding wxWidgets library <http://wxwidgets.org/>.
+### So far this only provides library targets for the multilib version
+### of the wxWidgets library. Initialization follow the same configure
+### options, or close to them, as are present if one uses the configure
+### script. For example:
+###
+### using wxwidgets
+### : 2.6.3
+### : $(DEVELOPMENT)/wxWidgets-2.6.3
+### : --disable-metafile
+### --disable-html
+### --disable-xml
+### ;
+###
+### One can declare multiple versions, and variants of the same version
+### just by declaring and changing the version (2.6.3 above) to differentiate
+### each. Specific version are selectable by using the "wx-version" feature.
+### Any of the source distributions will work with this and we adjust to
+### the specific set of files available in the sources. This works because
+### we directly read in the file.bkl build file to figure out the files
+### and check that against the real files in the sources. One drawback
+### of this approach is a slow startup as parsing and checking is a bit of work.
+###
+### Declared targets:
+###
+### (built in utility libs)
+### /ext/wxwidgets//regex
+### /ext/wxwidgets//zlib
+### /ext/wxwidgets//jpeg
+### /ext/wxwidgets//png
+### /ext/wxwidgets//expat
+###
+### (wx multilib style libs)
+### /ext/wxwidgets//base
+### /ext/wxwidgets//net
+### /ext/wxwidgets//core
+### /ext/wxwidgets//adv
+### /ext/wxwidgets//media
+### /ext/wxwidgets//odbc
+### /ext/wxwidgets//dbgrid
+### /ext/wxwidgets//html
+### /ext/wxwidgets//gl
+### /ext/wxwidgets//qa
+### /ext/wxwidgets//xml
+### /ext/wxwidgets//xrc
+###
+### Some targets will not be declared based on the configured options.
+###
+### Currently tested on:
+###
+### Windows: wx-platform=win32 wx-toolkit=msw
+###
+### NOTE: This support is *very* preliminary and even on Windows, the
+### system I'm using actively, some libs don't compile... Some because they
+### depend on external SDKs that I don't have.
+###
+### TODO:
+### - Declare the multilib target /ext/wxwidgets//all.
+### - Implement templates in BBv2 so clean up the declarations.
+### - Perhaps move the configured defs into the generated "setup.h". This
+### requires better/easier BBv2 support for generated files.
+### - Support the wxWidgets library names in addition to the Boost names.
+
+
+import extension ;
+
+import "class" : new ;
+import property ;
+import project ;
+import targets ;
+import feature ;
+import stage ;
+import regex ;
+import os ;
+import set ;
+import type ;
+import virtual-target ;
+import common ;
+
+extension.declare wx ;
+
+feature.feature wx-platform
+ : bsd macos macosx msdos os2 palmos unix win32
+ : propagated optional implicit ;
+
+feature.feature wx-toolkit
+ : cocoa gtk mac mgl microwin motif msw nanox pm x11 wince
+ : propagated optional implicit ;
+
+feature.feature wx-gtk-version
+ : 1.2 1.27 2.0 2.4
+ : propagated optional incidental ;
+
+feature.feature wx-gtk
+ :
+ : free ;
+
+~options =
+ gui* -monolithic -plugins
+ ##1
+ #~ -gtk2 -gpe
+ -universal
+ ##2
+ libpng libjpeg libxpm libmspack -libsdl -libgnomeprint -libhildon -opengl
+ ##3
+ regex zlib expat -dmalloc -odbc
+ ##4
+ shared optimize debug omf -stl
+ ##5
+ -debug_flag -debug_info -debug_gdb -debug_context -mem_tracing -profile
+ -no_rtti -no_exceptions -permissive -no_deps -universal_binary -memory_tracing
+ ##6
+ -compatibility_2_2 compatibility_2_4
+ ##7
+ rpath
+ ##8
+ intl config
+ ##9
+ url protocol protocol_ftp protocol_http protocol_file sockets ole dataobj
+ ##10
+ ipc
+ ##11
+ apple_ieee archive_streams stackwalker on_fatal_exception cmdline_parser
+ datetime debugreport dialup_manager dynlib_class dynamic_loader exceptions
+ ffile file filesystem fontmap fs_inet fs_zip geometry log longlong
+ mimetype unicode_mslu snglinst_checker std_iostream std_string stdpaths
+ stopwatch streams system_options textbuffer textfile timer
+ sound experimental_printf zipstream -mediactrl -unicode
+ ##12
+ threads
+ ##13
+ doc_view_architecture help ms_html_help html wxhtml_help xrc constraints
+ printing_architecture mdi mdi_architecture loggui logwindow log_dialog
+ webkit
+ ##14
+ postscript normalized_ps_fonts afm_for_postscript postscript_architecture_in_msw
+ ##15
+ prologio -resources
+ ##16
+ clipboard drag_and_drop metafile treelayout -win_metafiles_always
+ ##17
+ controls
+ accel button bmpbutton calendarctrl caret checkbox checklistbox choice
+ choicebook combobox datepickctrl -display gauge grid imaglist
+ listbook listbox listctrl notebook radiobox radiobtn sash
+ scrollbar slider spinbtn spinctrl splitter statbmp statbox
+ statline stattext tabdialog textctrl togglebtn
+ toolbar toolbar_native toolbar_simple treectrl tipwindow
+ popupwin
+ statusbar statusbar_native
+ ##18
+ commondlgs choicedlg colourdlg filedlg fontdlg dirdlg msgdlg numberdlg
+ splash tab_dialog textdlg startup_tips progressdlg wizarddlg
+ ##19
+ menus miniframe tooltips splines mousewheel validators busyinfo
+ joystick dragimage dc_cacheing -accessibility
+ ##20
+ palette image gif pcx pnm xpm ico_cur -iff
+ ##21
+ -crashreport -xml -wchar_t qa dbghelp
+
+ ## Contrib/other
+ -stc -generic
+ ;
+
+for local option in $(~options)
+{
+ if [ MATCH "^([-]).*" : $(option) ]
+ {
+ option = [ MATCH "^[-]([^*]*)([*]*)" : $(option) ] ;
+ extension.option wx $(option[1]) : disable enable ;
+ }
+ else
+ {
+ option = [ MATCH "^([^*]*)([*]*)" : $(option) ] ;
+ extension.option wx $(option[1]) : enable disable ;
+ }
+}
+
+local rule use-defs ( f : properties * )
+{
+ local result ;
+ for local val in $(~options)
+ {
+ val = [ MATCH "^[-]*([^*]*)([*]*)" : $(val) ] ;
+ if ! $(val[2]) && <wx-$(val[1]:L)>$(f) in $(properties)
+ {
+ result += wxUSE_$(val[1]:U) ;
+ }
+ }
+ return $(result) ;
+}
+
+setup.h = "wx/setup.h" ;
+rule setup_h ( targets * : sources * : properties * )
+{
+ local define-1 ;
+ local define-0 ;
+ local undef ;
+ local other ;
+ switch [ property.select <target-os> : $(properties) ]
+ {
+ case *linux* :
+ define-1 += wxUSE_UNIX HAVE_BOOL HAVE_CONST_CAST HAVE_CXA_DEMANGLE HAVE_DLOPEN
+ HAVE_ESD_H HAVE_EXPLICIT HAVE_FCNTL HAVE_FNMATCH HAVE_FNMATCH_H HAVE_FPUTWS
+ HAVE_FSEEKO HAVE_FSYNC HAVE_GETTIMEOFDAY HAVE_INET_ADDR HAVE_INET_ATON
+ HAVE_KNOWN_CDROM_INTERFACE HAVE_LANGINFO_H HAVE_LARGEFILE_SUPPORT HAVE_LOCALTIME
+ HAVE_MKSTEMP HAVE_NANOSLEEP HAVE_POLL HAVE_PTHREAD_ATTR_SETSTACKSIZE
+ HAVE_PTHREAD_CANCEL HAVE_PTHREAD_MUTEXATTR_T HAVE_PUTENV HAVE_PW_GECOS
+ HAVE_REINTERPRET_CAST HAVE_SCHED_H HAVE_SCHED_YIELD HAVE_SIGACTION HAVE_SNPRINTF
+ HAVE_SNPRINTF_DECL HAVE_SSIZE_T HAVE_STATFS HAVE_STATFS_DECL HAVE_STATIC_CAST
+ HAVE_STD_WSTRING HAVE_STRCASECMP_IN_STRING_H HAVE_STRPTIME HAVE_STRTOK_R
+ HAVE_SYS_SOUNDCARD_H HAVE_THREAD_PRIORITY_FUNCTIONS HAVE_TIMEGM HAVE_UNAME
+ HAVE_UNISTD_H HAVE_VA_COPY HAVE_VSNPRINTF HAVE_VSNPRINTF_DECL HAVE_WCHAR_H
+ HAVE_WCSLEN HAVE_WCSRTOMBS HAVE_X11_XKBLIB_H STDC_HEADERS
+ ;
+ #~ undef +=
+ #~ ;
+ other +=
+ "#define SIZEOF_CHAR 1"
+ "#define SIZEOF_WCHAR_T 4"
+ "#define SIZEOF_INT 4"
+ "#define SIZEOF_VOID_P 4"
+ "#define SIZEOF_LONG 4"
+ "#define SIZEOF_LONG_LONG 8"
+ "#define SIZEOF_SHORT 2"
+ "#define SIZEOF_SIZE_T 4"
+ "#define wxSIZE_T_IS_UINT 1"
+ "#define WX_TIMEZONE timezone"
+ "#define WX_SOCKLEN_T socklen_t"
+ "#define SOCKOPTLEN_T socklen_t"
+ "#define WX_STATFS_T struct statfs"
+ "#define wxTYPE_SA_HANDLER int"
+ ;
+
+ case *windows* :
+ #~ define-1 +=
+ #~ ;
+ #~ undef +=
+ #~ ;
+ #~ other +=
+ #~ ;
+ }
+ if [ property.select <architecture> : $(properties) ] in
+ sparc power mips1 mips2 mips3 mips4 mips32 mips32r2 mips64
+ {
+ define-1 += WORDS_BIGENDIAN ;
+ }
+ switch [ feature.get-values <wx-gtk-version> : $(properties) ]
+ {
+ case 1.2 : define-1 += __WXGTK12__ ;
+ case 1.27 : define-1 += __WXGTK12__ __WXGTK127__ ;
+ case 2.0 : define-1 += __WXGTK12__ __WXGTK127__ __WXGTK20__ ;
+ case 2.4 : define-1 += __WXGTK12__ __WXGTK127__ __WXGTK20__ __WXGTK24__ ;
+ }
+ local version = [ property.select <wx-version> : $(properties) ] ;
+ define-1 += [ use-defs enable : $(properties) ] ;
+ define-0 += [ use-defs disable : $(properties) ] ;
+ VERSION on $(<) = $(version:G=) ;
+ SETUP on $(<) =
+ "#define $(define-1) 1"
+ "#define $(define-0) 0"
+ "#undef $(undef)"
+ $(other) ;
+ NL on $(<) = "
+" ;
+}
+actions setup_h
+{
+ @($(STDOUT):E=
+#ifndef __WX_SETUP_H__
+#define __WX_SETUP_H__
+
+$(SETUP:J=$(NL))
+
+#endif
+) > "$(<)"
+}
+
+custom-generic-listctrl.cpp = "
+#include <wx/defs.h>
+#include <wx/event.h>
+#if wxUSE_LISTCTRL
+ extern WXDLLEXPORT_DATA(const wxChar*) wxListCtrlNameStr;
+ #undef DEFINE_EVENT_TYPE
+ #define DEFINE_EVENT_TYPE(x)
+ #include <generic/listctrl.cpp>
+#endif
+" ;
+actions custom-generic-listctrl.cpp
+{
+ @($(STDOUT):E=$(custom-generic-listctrl.cpp)) > "$(<)"
+}
+
+local rule when-option ( option : requirements * : result * )
+{
+#~ ECHO + when-option $(option) :: $(requirements) ;
+ result ?= true ;
+ if <wx-$(option)>enable in $(requirements)
+ {
+ return $(result) ;
+ }
+}
+
+local rule unless-option ( option : requirements * : result * )
+{
+#~ ECHO + unless-option $(option) :: $(requirements) ;
+ result ?= true ;
+ if <wx-$(option)>disable in $(requirements)
+ {
+ return $(result) ;
+ }
+}
+
+rule wx-tag ( name : type ? : property-set )
+{
+ if [ type.is-subtype $(type) LIB ]
+ {
+ return [ common.format-name
+ wx_ <property:wx-toolkit>_ <base> <toolset> <threading> <runtime> <version:wx-version>
+ : $(name) : $(type) : $(property-set) ] ;
+ }
+ else if [ type.is-subtype $(type) OBJ ]
+ {
+ local target = [ $(property-set).get <target> ] ;
+ local action = [ $(target).action ] ;
+ local sources = [ $(action).sources ] ;
+ local name ;
+ if [ path.is-rooted [ $(sources[1]).name ] ]
+ {
+ name = [ regex.split [ path.relative
+ [ $(sources[1]).name ]
+ [ $(property-set).get <wx-location> ]
+ ] "/" ] ;
+ }
+ else
+ {
+ name = [ $(sources[1]).name ] ;
+ }
+ return [ virtual-target.add-prefix-and-suffix
+ $(name:S=:J=,) : $(type) : $(property-set) ] ;
+ }
+}
+
+rule init ( version ? : location : options * : *requirements* * )
+{
+ import path ;
+ import print ;
+
+ version ?= default ;
+ location = [ path.make $(location) ] ;
+ local requirements = [ extension.define wx $(version) : $(location) : $(options) ] ;
+
+ #~ ECHO --- $(version) ::: $(requirements) ;
+
+ requirements = [ extension.refine wx $(version) :
+ [ unless-option xml : $(requirements) : <wx-xrc>disable ]
+ ] ;
+ requirements = [ extension.refine wx $(version) :
+ [ unless-option html : $(requirements) : <wx-wxhtml_help>disable ]
+ ] ;
+ requirements = [ extension.refine wx $(version) :
+ [ when-option xrc : $(requirements) : <wx-xml>enable ]
+ ] ;
+ requirements = [ extension.refine wx $(version) :
+ [ when-option xml : $(requirements) : <wx-wchar_t>enable ]
+ ] ;
+ requirements = [ extension.refine wx $(version) :
+ [ when-option expat : $(requirements) : <wx-wchar_t>enable ]
+ ] ;
+ requirements = [ extension.refine wx $(version) :
+ [ when-option dbghelp : $(requirements) : <wx-wchar_t>enable ]
+ ] ;
+ requirements = [ extension.refine wx $(version) :
+ [ when-option debug : $(requirements) :
+ <wx-debug_flag>enable <wx-debug_info>enable ]
+ ] ;
+
+ local gtk-lib = [ property.select <wx-gtk> : $(requirements) ] ;
+ if $(gtk-lib)
+ {
+ requirements = [ extension.refine wx $(version) : <use>$(gtk-lib:G=) ] ;
+ }
+
+ requirements = [ extension.refine wx $(version) : $(*requirements*) ] ;
+
+ requirements = [ extension.refine wx $(version) : <tag>@wx-tag ] ;
+
+ local files.bkl = [ new bakefile
+ $(version) : $(location) : $(location)/build/bakefiles/files.bkl ] ;
+ requirements += [ $(files.bkl).parse ] ;
+
+ #~ ECHO --- $(version) ::: $(requirements) ;
+ #~ EXIT ;
+
+ make $(setup.h) : : @setup_h
+ : <wx-version>$(version)
+ <wx-location>$(location)
+ <location-prefix>src
+ ;
+ explicit $(setup.h) ;
+ local setup-requirements =
+ <implicit-dependency>$(setup.h)
+ <dependency>$(setup.h)
+ ;
+
+ {
+ wx-lib regex $(version) : $(location) $(files.bkl)
+ : $(location)/src/regex/regcomp.c
+ $(location)/src/regex/regexec.c
+ $(location)/src/regex/regerror.c
+ $(location)/src/regex/regfree.c
+ : $(requirements)
+ $(setup-requirements)
+ <define>wxUSE_GUI=0
+ <define>_CRT_SECURE_NO_DEPRECATE
+ :
+ : <include>$(location)/src/regex
+ ;
+ explicit regex ;
+ wx-lib zlib $(version) : $(location) $(files.bkl)
+ : $(location)/src/zlib/adler32.c
+ $(location)/src/zlib/compress.c
+ $(location)/src/zlib/crc32.c
+ $(location)/src/zlib/gzio.c
+ $(location)/src/zlib/uncompr.c
+ $(location)/src/zlib/deflate.c
+ $(location)/src/zlib/trees.c
+ $(location)/src/zlib/zutil.c
+ $(location)/src/zlib/inflate.c
+ $(location)/src/zlib/infback.c
+ $(location)/src/zlib/inftrees.c
+ $(location)/src/zlib/inffast.c
+ : $(requirements)
+ <define>wxUSE_GUI=0
+ <define>_CRT_SECURE_NO_DEPRECATE
+ :
+ : <include>$(location)/src/zlib
+ ;
+ explicit zlib ;
+ wx-lib jpeg $(version) : $(location) $(files.bkl)
+ : $(location)/src/jpeg/jcomapi.c
+ $(location)/src/jpeg/jutils.c
+ $(location)/src/jpeg/jerror.c
+ $(location)/src/jpeg/jmemmgr.c
+ $(location)/src/jpeg/jmemnobs.c
+ $(location)/src/jpeg/jcapimin.c
+ $(location)/src/jpeg/jcapistd.c
+ $(location)/src/jpeg/jctrans.c
+ $(location)/src/jpeg/jcparam.c
+ $(location)/src/jpeg/jdatadst.c
+ $(location)/src/jpeg/jcinit.c
+ $(location)/src/jpeg/jcmaster.c
+ $(location)/src/jpeg/jcmarker.c
+ $(location)/src/jpeg/jcmainct.c
+ $(location)/src/jpeg/jcprepct.c
+ $(location)/src/jpeg/jccoefct.c
+ $(location)/src/jpeg/jccolor.c
+ $(location)/src/jpeg/jcsample.c
+ $(location)/src/jpeg/jchuff.c
+ $(location)/src/jpeg/jcphuff.c
+ $(location)/src/jpeg/jcdctmgr.c
+ $(location)/src/jpeg/jfdctfst.c
+ $(location)/src/jpeg/jfdctflt.c
+ $(location)/src/jpeg/jfdctint.c
+ $(location)/src/jpeg/jdapimin.c
+ $(location)/src/jpeg/jdapistd.c
+ $(location)/src/jpeg/jdtrans.c
+ $(location)/src/jpeg/jdatasrc.c
+ $(location)/src/jpeg/jdmaster.c
+ $(location)/src/jpeg/jdinput.c
+ $(location)/src/jpeg/jdmarker.c
+ $(location)/src/jpeg/jdhuff.c
+ $(location)/src/jpeg/jdphuff.c
+ $(location)/src/jpeg/jdmainct.c
+ $(location)/src/jpeg/jdcoefct.c
+ $(location)/src/jpeg/jdpostct.c
+ $(location)/src/jpeg/jddctmgr.c
+ $(location)/src/jpeg/jidctfst.c
+ $(location)/src/jpeg/jidctflt.c
+ $(location)/src/jpeg/jidctint.c
+ $(location)/src/jpeg/jidctred.c
+ $(location)/src/jpeg/jdsample.c
+ $(location)/src/jpeg/jdcolor.c
+ $(location)/src/jpeg/jquant1.c
+ $(location)/src/jpeg/jquant2.c
+ $(location)/src/jpeg/jdmerge.c
+ : $(requirements)
+ $(setup-requirements)
+ <define>wxUSE_GUI=0
+ <define>_CRT_SECURE_NO_DEPRECATE
+ :
+ : <include>$(location)/src/jpeg
+ ;
+ explicit jpeg ;
+ wx-lib png $(version) : $(location) $(files.bkl)
+ : $(location)/src/png/png.c
+ $(location)/src/png/pngerror.c
+ $(location)/src/png/pnggccrd.c
+ $(location)/src/png/pngget.c
+ $(location)/src/png/pngmem.c
+ $(location)/src/png/pngpread.c
+ $(location)/src/png/pngread.c
+ $(location)/src/png/pngrio.c
+ $(location)/src/png/pngrtran.c
+ $(location)/src/png/pngrutil.c
+ $(location)/src/png/pngset.c
+ $(location)/src/png/pngtrans.c
+ $(location)/src/png/pngvcrd.c
+ $(location)/src/png/pngwio.c
+ $(location)/src/png/pngwrite.c
+ $(location)/src/png/pngwtran.c
+ $(location)/src/png/pngwutil.c
+ : $(requirements)
+ <define>wxUSE_GUI=0
+ <include>$(location)/src/zlib
+ <define>_CRT_SECURE_NO_DEPRECATE
+ :
+ : <include>$(location)/src/png
+ <link>static:<library>zlib
+ ;
+ explicit png ;
+ wx-lib expat $(version) : $(location) $(files.bkl)
+ : $(location)/src/expat/lib/xmlparse.c
+ $(location)/src/expat/lib/xmlrole.c
+ $(location)/src/expat/lib/xmltok.c
+ : $(requirements)
+ <define>wxUSE_GUI=0
+ <define>_CRT_SECURE_NO_DEPRECATE
+ <wx-platform>os2:<define>OS2_32
+ :
+ : <include>$(location)/src/expat/lib
+ ;
+ explicit expat ;
+ }
+ {
+ wx-lib base $(version) : $(location) $(files.bkl)
+ : BASE_SRC BASE_AND_GUI_SRC
+ : $(requirements)
+ <define>wxUSE_GUI=0
+ $(setup-requirements)
+ <define>wxUSE_BASE=1
+ <link>shared:<define>WXMAKINGDLL_BASE
+ <wx-regex>enable:<library>regex/<link>static
+ <wx-zlib>enable:<library>zlib/<link>static
+ [ conditional <wx-platform>win32,<wx-debug>enable :
+ <find-shared-library>user32
+ <find-shared-library>advapi32
+ <find-shared-library>shell32 ]
+ :
+ :
+ $(setup-requirements)
+ <define>wxUSE_BASE=0
+ <link>shared:<define>WXUSINGDLL
+ [ conditional <wx-platform>win32,<wx-debug>enable :
+ <find-shared-library>user32
+ <find-shared-library>advapi32
+ <find-shared-library>shell32 ]
+ ;
+ }
+ {
+ wx-lib net $(version) : $(location) $(files.bkl)
+ : NET_SRC
+ : $(requirements)
+ <define>wxUSE_GUI=0
+ $(setup-requirements)
+ <link>shared:<define>WXMAKINGDLL_NET
+ <link>shared:<library>base
+ <wx-platform>win32:<find-shared-library>ws2_32
+ :
+ :
+ $(setup-requirements)
+ <wx-platform>win32:<find-shared-library>ws2_32
+ ;
+ }
+ if [ when-option gui : $(requirements) ]
+ {
+ make custom-generic-listctrl.cpp : : @custom-generic-listctrl.cpp
+ : <wx-version>$(version)
+ <wx-location>$(location)
+ <location-prefix>src
+ ;
+ explicit custom-generic-listctrl.cpp ;
+ obj custom-generic-listctrl
+ : custom-generic-listctrl.cpp
+ : $(requirements)
+ $(setup-requirements)
+ <wx-location>$(location)
+ <define>wxUSE_GUI=1
+ <link>shared:<define>WXMAKINGDLL_CORE
+ <implicit-dependency>custom-generic-listctrl.cpp
+ <include>$(location)/src
+ <location-prefix>core
+ <use>base
+ ;
+ explicit custom-generic-listctrl ;
+ wx-lib core $(version) : $(location) $(files.bkl)
+ : BASE_AND_GUI_SRC CORE_SRC
+ : $(requirements)
+ $(setup-requirements)
+ <define>wxUSE_GUI=1
+ <link>shared:<define>WXMAKINGDLL_CORE
+ <link>shared:<library>base
+ <wx-libjpeg>enable:<library>jpeg/<link>static
+ <wx-libpng>enable:<library>png/<link>static
+ [ conditional <wx-platform>win32,<wx-toolkit>msw :
+ <find-shared-library>gdi32
+ <find-shared-library>comctl32
+ <find-shared-library>comdlg32
+ <find-shared-library>shell32 ]
+ <wx-generic>enable:<source>$(location)/src/generic/imaglist.cpp
+ <wx-generic>enable:<source>custom-generic-listctrl
+ :
+ :
+ $(setup-requirements)
+ <define>wxUSE_GUI=1
+ [ conditional <wx-platform>win32,<wx-toolkit>msw :
+ <find-shared-library>gdi32
+ <find-shared-library>comctl32
+ <find-shared-library>comdlg32
+ <find-shared-library>shell32 ]
+ ;
+ }
+ if [ when-option gui : $(requirements) ]
+ {
+ wx-lib adv $(version) : $(location) $(files.bkl)
+ : ADVANCED_SRC PLUGIN_ADV_SRC
+ : $(requirements)
+ $(setup-requirements)
+ <define>wxUSE_GUI=1
+ <link>shared:<define>WXMAKINGDLL_ADV
+ <link>shared:<library>base
+ <link>shared:<library>core
+ <wx-platform>win32,<wx-toolkit>msw:<find-shared-library>shell32
+ <wx-platform>win32,<wx-toolkit>msw,<wx-joystick>enable:<find-shared-library>winmm
+ :
+ :
+ $(setup-requirements)
+ <wx-platform>win32,<wx-toolkit>msw:<find-shared-library>shell32
+ <wx-platform>win32,<wx-toolkit>msw,<wx-joystick>enable:<find-shared-library>winmm
+ ;
+ }
+ if [ when-option gui : $(requirements) ]
+ {
+ wx-lib media $(version) : $(location) $(files.bkl)
+ : MEDIA_SRC
+ : $(requirements)
+ $(setup-requirements)
+ <define>wxUSE_GUI=1
+ <link>shared:<define>WXMAKINGDLL_MEDIA
+ <link>shared:<library>base
+ <link>shared:<library>core
+ <wx-platform>win32,<wx-toolkit>msw:<find-shared-library>gdi32
+ :
+ :
+ $(setup-requirements)
+ <wx-platform>win32,<wx-toolkit>msw:<find-shared-library>gdi32
+ ;
+ }
+ if [ when-option odbc : $(requirements) ]
+ {
+ wx-lib odbc $(version) : $(location) $(files.bkl)
+ : ODBC_SRC
+ : $(requirements)
+ $(setup-requirements)
+ <define>wxUSE_GUI=0
+ <link>shared:<define>WXMAKINGDLL_ODBC
+ <link>shared:<library>base
+ :
+ :
+ $(setup-requirements)
+ ;
+ }
+ if [ when-option odbc : $(requirements) ] &&
+ [ when-option gui : $(requirements) ]
+ {
+ wx-lib dbgrid $(version) : $(location) $(files.bkl)
+ : DBGRID_SRC
+ : $(requirements)
+ $(setup-requirements)
+ <define>wxUSE_GUI=1
+ <link>shared:<define>WXMAKINGDLL_DBGRID
+ <link>shared:<library>base
+ <link>shared:<library>core
+ <link>shared:<library>adv
+ <link>shared:<library>odbc
+ [ conditional <wx-platform>win32 <wx-odbc>enable :
+ <find-shared-library>odbc32
+ <find-shared-library>ole32
+ <find-shared-library>oleaut32 ]
+ :
+ :
+ $(setup-requirements)
+ [ conditional <wx-platform>win32 <wx-odbc>enable :
+ <find-shared-library>odbc32
+ <find-shared-library>ole32
+ <find-shared-library>oleaut32 ]
+ ;
+ }
+ if [ when-option html : $(requirements) ] &&
+ [ when-option gui : $(requirements) ]
+ {
+ wx-lib html $(version) : $(location) $(files.bkl)
+ : HTML_SRC
+ : $(requirements)
+ $(setup-requirements)
+ <define>wxUSE_GUI=1
+ <link>shared:<define>WXMAKINGDLL_HTML
+ <link>shared:<library>base
+ <link>shared:<library>core
+ <wx-platform>win32,<wx-libmspack>enable:<find-shared-library>mspack
+ :
+ :
+ $(setup-requirements)
+ <wx-platform>win32,<wx-libmspack>enable:<find-shared-library>mspack
+ ;
+ }
+ if [ when-option opengl : $(requirements ] &&
+ [ when-option gui : $(requirements) ]
+ {
+ wx-lib gl $(version) : $(location) $(files.bkl)
+ : OPENGL_SRC
+ : $(requirements)
+ $(setup-requirements)
+ <define>wxUSE_GUI=1
+ <link>shared:<define>WXMAKINGDLL_GL
+ <wx-monolithic>disable,<link>shared:<library>base
+ <wx-monolithic>disable,<link>shared:<library>core
+ <wx-monolithic>enable,<link>shared:<library>mono
+ [ conditional <wx-platform>win32 <wx-opengl>enable :
+ <find-shared-library>opengl32
+ <find-shared-library>glu32 ]
+ [ conditional <wx-platform>macosx <wx-opengl>enable <toolset>darwin :
+ <framework>OpenGL
+ <framework>AGL ]
+ [ conditional <wx-platform>unix <wx-opengl>enable :
+ <find-shared-library>GL
+ <find-shared-library>GLU ]
+ [ conditional <wx-platform>bsd <wx-opengl>enable :
+ <find-shared-library>GL
+ <find-shared-library>GLU ]
+ :
+ :
+ $(setup-requirements)
+ [ conditional <wx-platform>win32 <wx-opengl>enable :
+ <find-shared-library>opengl32
+ <find-shared-library>glu32 ]
+ [ conditional <wx-platform>macosx <wx-opengl>enable <toolset>darwin :
+ <framework>OpenGL
+ <framework>AGL ]
+ [ conditional <wx-platform>unix <wx-opengl>enable :
+ <find-shared-library>GL
+ <find-shared-library>GLU ]
+ [ conditional <wx-platform>bsd <wx-opengl>enable :
+ <find-shared-library>GL
+ <find-shared-library>GLU ]
+ ;
+ }
+ if [ when-option qa : $(requirements) ] &&
+ [ when-option gui : $(requirements) ] &&
+ [ when-option xml : $(requirements) ]
+ {
+ wx-lib qa $(version) : $(location) $(files.bkl)
+ : QA_SRC
+ : $(requirements)
+ $(setup-requirements)
+ <define>wxUSE_GUI=1
+ <link>shared:<define>WXMAKINGDLL_QA
+ <link>shared:<library>base
+ <link>shared:<library>core
+ <link>shared:<library>xml
+ :
+ :
+ $(setup-requirements)
+ ;
+ }
+ if [ when-option xml : $(requirements) ]
+ {
+ wx-lib xml $(version) : $(location) $(files.bkl)
+ : XML_SRC
+ : $(requirements)
+ $(setup-requirements)
+ <define>wxUSE_GUI=0
+ <link>shared:<define>WXMAKINGDLL_XML
+ <link>shared:<library>base
+ <library>expat
+ :
+ :
+ $(setup-requirements)
+ ;
+ }
+ if [ when-option xrc : $(requirements) ] &&
+ [ when-option gui : $(requirements) ] &&
+ [ when-option xml : $(requirements) ]
+ {
+ wx-lib xrc $(version) : $(location) $(files.bkl)
+ : XRC_SRC
+ : $(requirements)
+ $(setup-requirements)
+ <define>wxUSE_GUI=1
+ <link>shared:<define>WXMAKINGDLL_XRC
+ <link>shared:<library>html
+ <link>shared:<library>adv
+ <link>shared:<library>core
+ <link>shared:<library>xml
+ <link>shared:<library>base
+ :
+ :
+ $(setup-requirements)
+ ;
+ }
+ if [ when-option gui : $(requirements) ] &&
+ [ when-option stc : $(requirements) ]
+ {
+ wx-lib stc $(version) : $(location) $(files.bkl)
+ : [ glob $(location)/contrib/src/stc/*.cpp ]
+ [ glob $(location)/contrib/src/stc/scintilla/src/*.cxx ]
+ : $(requirements)
+ $(setup-requirements)
+ <define>wxUSE_GUI=1
+ <define>_CRT_SECURE_NO_DEPRECATE
+ <define>__WX__
+ <define>SCI_LEXER
+ <define>LINK_LEXERS
+ <include>$(location)/contrib/include
+ <include>$(location)/contrib/src/stc/scintilla/include
+ <include>$(location)/contrib/src/stc/scintilla/src
+ <link>shared:<define>WXUSINGDLL
+ <link>shared:<define>WXMAKINGDLL_STC
+ <link>shared:<library>base
+ <link>shared:<library>core
+ [ conditional <wx-platform>win32,<wx-toolkit>msw :
+ <find-shared-library>gdi32 ]
+ :
+ :
+ $(setup-requirements)
+ <include>$(location)/contrib/include
+ [ conditional <wx-platform>win32,<wx-toolkit>msw :
+ <find-shared-library>gdi32 ]
+ ;
+ }
+}
+
+local rule wx-lib ( name version ? : location files : sources *
+ : requirements * : default-build * : usage-requirements * )
+{
+ targets.main-target-alternative [ new wx-target $(name) $(version)
+ : [ project.current ]
+ : LIB
+ : $(location) $(files)
+ : $(sources)
+ : $(requirements)
+ : $(default-build)
+ : $(usage-requirements)
+ ] ;
+}
+
+class wx-target : typed-target
+{
+ rule __init__ (
+ name version ?
+ : project
+ : type
+ : location files
+ : sources *
+ : requirements *
+ : default-build *
+ : usage-requirements *
+ )
+ {
+ #~ ECHO --- $(name) ;
+ self.location = $(location) ;
+ local bare-sources ;
+ local conditional-sources ;
+ for local src in $(sources)
+ {
+ local val = [ $(files).value $(src) : $(src) ] ;
+ for local v in $(val)
+ {
+ #~ ECHO --| " " $(v) ;
+ if $(v:G) { conditional-sources += $(v) ; }
+ else { bare-sources += $(v) ; }
+ }
+ }
+ requirements +=
+ <wx-version>$(version)
+ <wx-location>"$(location)"
+ <location-prefix>$(name)
+ <include>$(location)/include
+ [ platform ]
+ [ toolkit ]
+ [ configure ]
+ [ default-toolkit ]
+ ;
+ usage-requirements +=
+ <wx-version>$(version)
+ <include>$(location)/include
+ [ platform ]
+ [ toolkit ]
+ [ configure ]
+ [ default-toolkit ]
+ ;
+ sources
+ = [ targets.main-target-sources $(bare-sources) : $(name) ] ;
+ requirements
+ = [ targets.main-target-requirements
+ $(conditional-sources) $(requirements) : $(project) ] ;
+ default-build
+ = [ targets.main-target-default-build $(default-build) : $(project) ] ;
+ usage-requirements
+ = [ targets.main-target-usage-requirements
+ $(usage-requirements) : $(project) ] ;
+
+ typed-target.__init__ $(name)
+ : $(project) : $(type)
+ : $(sources)
+ : $(requirements)
+ : $(default-build)
+ : $(usage-requirements)
+ ;
+ }
+
+ rule platform ( )
+ {
+ return
+ <define>__WX__
+ <target-os>aix:<wx-platform>unix
+ <target-os>bsd:<wx-platform>bsd
+ <target-os>darwin:<wx-platform>macosx
+ <target-os>dos:<wx-platform>msdos
+ <target-os>emx:<wx-platform>os2
+ <target-os>freebsd:<wx-platform>bsd
+ <target-os>hpux:<wx-platform>unix
+ <target-os>linux:<wx-platform>unix
+ <target-os>netbsd:<wx-platform>unix
+ <target-os>openbsd:<wx-platform>unix
+ <target-os>os2:<wx-platform>os2
+ <target-os>osf:<wx-platform>unix
+ <target-os>sgi:<wx-platform>svr4
+ <target-os>solaris:<wx-platform>unix
+ <target-os>sun:<wx-platform>unix
+ <target-os>sunos:<wx-platform>bsd
+ <target-os>svr4:<wx-platform>unix
+ <target-os>sysv:<wx-platform>unix
+ <target-os>ultrix:<wx-platform>unix
+ <target-os>unixware:<wx-platform>unix
+ <target-os>vms:<wx-platform>unix
+ <target-os>windows:<wx-platform>win32
+
+ [ conditional <target-os>aix :
+ <define>__AIX__=1
+ <define>__SVR4__=1
+ <define>__SYSV__=1 ]
+ <target-os>bsd:<define>__BSD__=1
+ [ conditional <target-os>darwin :
+ <define>__BSD__=1
+ <define>__DARWIN__=1
+ #~ <define>TARGET_CARBON=1
+ ]
+ <target-os>dos:<define>__DOS__=1
+ [ conditional <target-os>emx :
+ <define>__EMX__=1
+ <define>__OS2__=1 ]
+ [ conditional <target-os>freebsd :
+ <define>__BSD__=1
+ <define>__FREEBSD__=1 ]
+ <target-os>hpux:<define>__HPUX__=1
+ <target-os>linux:<define>__LINUX__=1
+ <target-os>netbsd:<define>__NETBSD__=1
+ [ conditional <target-os>openbsd :
+ <define>__BSD__=1
+ <define>__OPENBSD__=1 ]
+ <target-os>os2:<define>__OS2__=1
+ [ conditional <target-os>osf :
+ <define>__ALPHA__=1
+ <define>__OSF__=1 ]
+ <target-os>sgi:<define>__SGI__=1
+ <target-os>sgi:<define>__SVR4__=1
+ [ conditional <target-os>solaris :
+ <define>__SUN__=1
+ <define>__SOLARIS__=1
+ <define>__SVR4__=1 ]
+ <target-os>sun:<define>__SUN__=1
+ [ conditional <target-os>sunos :
+ <define>__BSD__=1
+ <define>__SUN__=1
+ <define>__SUNOS__=1 ]
+ <target-os>svr4:<define>__SVR4__=1
+ [ conditional <target-os>sysv :
+ <define>__SVR4__=1
+ <define>__SYSV__=1 ]
+ <target-os>ultrix:<define>__ULTRIX__=1
+ <target-os>unixware:<define>__UNIXWARE__=1
+ <target-os>vms:<define>__VMS__=1
+ <target-os>windows:<define>__WINDOWS__=1
+ ;
+ }
+
+ rule toolkit ( )
+ {
+ return
+ <wx-toolkit>cocoa:<define>__WXCOCOA__
+ <wx-toolkit>gtk:<define>__WXGTK__
+ <wx-toolkit>mac:<define>__WXMAC__
+ <wx-toolkit>mgl:<define>__WXMGL__
+ <wx-toolkit>microwin:<define>__WXMICROWIN__
+ <wx-toolkit>motif:<define>__WXMOTIF__
+ <wx-toolkit>msw:<define>__WXMSW__
+ <wx-toolkit>nanox:<define>__WXNANOX__
+ <wx-toolkit>pm:<define>__WXPM__
+ <wx-toolkit>wince:<define>__WXWINCE__
+ ;
+ }
+
+ rule configure ( )
+ {
+ return
+ ## Configure settings...
+
+ <wx-debug_flag>enable:<define>__WXDEBUG__
+ [ conditional <wx-memory_tracing>enable :
+ <define>wxUSE_GLOBAL_MEMORY_OPERATORS=1
+ <define>wxUSE_DEBUG_NEW_ALWAYS=1 ]
+ <wx-dmalloc>enable:<find-shared-library>dmallocthcxx
+ <wx-config>enable:<define>wxUSE_CONFIG_NATIVE
+ <wx-metafile>enable:<define>wxUSE_ENH_METAFILE
+ <wx-statusbar_native>enable:<define>wxUSE_NATIVE_STATUSBAR=1
+ <wx-statusbar_native>disable:<define>wxUSE_NATIVE_STATUSBAR=0
+
+ <wx-platform>bsd:<define>WXWIN_OS_DESCRIPTION=BSD
+ <wx-platform>macosx:<define>WXWIN_OS_DESCRIPTION=MacOSX
+ <wx-platform>unix:<define>WXWIN_OS_DESCRIPTION=Unix
+ <wx-platform>win32:<define>WXWIN_OS_DESCRIPTION=Windows
+
+ <wx-compatibility_2_2>enable:<define>WXWIN_COMPATIBILITY_2_2=1
+ <wx-compatibility_2_2>disable:<define>WXWIN_COMPATIBILITY_2_2=0
+ <wx-compatibility_2_4>enable:<define>WXWIN_COMPATIBILITY_2_4=1
+ <wx-compatibility_2_4>disable:<define>WXWIN_COMPATIBILITY_2_4=0
+
+ <wx-toolkit>msw:<define>wxDIALOG_UNIT_COMPATIBILITY
+
+ [ conditional <wx-platform>win32 <wx-dataobj>enable :
+ <find-shared-library>ole32
+ <find-shared-library>oleaut32
+ <find-shared-library>rpcrt4 ]
+ [ conditional <wx-platform>win32 <wx-clipboard>enable :
+ <find-shared-library>ole32
+ <find-shared-library>oleaut32
+ <find-shared-library>rpcrt4 ]
+ [ conditional <wx-platform>win32 <wx-ole>enable :
+ <find-shared-library>ole32
+ <find-shared-library>oleaut32
+ <find-shared-library>rpcrt4 ]
+ [ conditional <wx-platform>win32 <wx-drag_and_drop>enable :
+ <find-shared-library>ole32
+ <find-shared-library>oleaut32
+ <find-shared-library>rpcrt4 ]
+
+ ## Windows settings...
+
+ <wx-platform>win32:<define>__WIN32__
+ <wx-platform>win32:<define>__WIN95__
+ #~ <wx-platform>win32:<define>__GNUWIN32__
+ <wx-platform>win32:<define>STRICT
+ <wx-platform>win32:<define>WINVER=0x0400
+ <wx-platform>win32:<find-shared-library>kernel32
+ <wx-platform>win32:<find-shared-library>user32
+
+ <wx-unicode>enable:<define>_GNU_SOURCE
+ <wx-threads>enable:<define>_GNU_SOURCE
+
+ <wx-opengl>enable:<define>wxUSE_GLCANVAS
+ ;
+ }
+
+ rule default-toolkit ( )
+ {
+ return
+ <target-os>aix:<wx-toolkit>motif
+ <target-os>hpux:<wx-toolkit>motif
+ <target-os>osf:<wx-toolkit>motif
+ <target-os>sgi:<wx-toolkit>motif
+ <target-os>solaris:<wx-toolkit>motif
+ <target-os>sun:<wx-toolkit>motif
+ <target-os>sunos:<wx-toolkit>motif
+ <target-os>sysv:<wx-toolkit>motif
+ <target-os>svr4:<wx-toolkit>motif
+ <wx-platform>bsd:<wx-toolkit>gtk
+ <wx-platform>macosx:<wx-toolkit>cocoa
+ <wx-platform>msdos:<wx-toolkit>mgl
+ <wx-platform>os2:<wx-toolkit>pm
+ <wx-platform>unix:<wx-toolkit>gtk
+ <wx-platform>win32:<wx-toolkit>msw
+ ;
+ }
+
+ rule conditional ( condition + : requirements * )
+ {
+ return $(condition:J=,):$(requirements) ;
+ }
+}
+
+rule bakefile_jam ( targets * : sources * : properties * )
+{
+ local self = [ property.select <wx-bakefile> : $(properties) ] ;
+ self = $(self:G=) ;
+ BKL_VARS on $(<) = [ $(self).cache-content ] ;
+}
+
+actions bakefile_jam
+{
+ @($(STDOUT):E=$(BKL_VARS:E=empty)) > "$(<)"
+}
+
+feature.feature wx-bakefile
+ :
+ : propagated implicit ;
+
+class bakefile
+{
+ import os ;
+ import path ;
+ import regex ;
+ import string ;
+
+ rule __init__ ( version ? : root : file )
+ {
+ self.version = $(version) ;
+ self.file = [ path.native $(file) ] ;
+ self.root = $(root) ;
+ self.vars = ;
+
+ local tmpdir ;
+ if ! $(tmpdir) && [ os.environ USERPROFILE ]
+ {
+ tmpdir = [ os.environ USERPROFILE ] "Local Settings" "Temp" ;
+ tmpdir = [ path.make $(tmpdir:J=/) ] ;
+ }
+ tmpdir ?= [ path.make $(TMPDIR) ] ;
+ self.cache = $(tmpdir)/wx-$(version:E=default)-$(self.file:B).jam ;
+
+ self.nl = "
+" ;
+ self.ws = "$(self.nl) " ;
+ self.%line = "[$(self.ws)]*([^$(self.nl)]*)[$(self.nl)]*(.*)" ;
+ self.%word = "[$(self.ws)]*([^$(self.ws)<]+)?(<[^>]+>)?(.*)" ;
+ self.%tag = "[^<]*[<]([^>$(self.ws)]+)[$(self.ws)]*(.*)" ;
+
+ modules.call-in wxwidgets : feature.extend wx-bakefile : $(__name__) ;
+ }
+
+ rule value ( var : default * )
+ {
+ if $(var) in $(self.vars)
+ {
+ return $(self.$(var)) ;
+ }
+ else
+ {
+ return $(default) ;
+ }
+ }
+
+ rule all-vars ( )
+ {
+ return $(self.vars) ;
+ }
+
+ rule cache-content ( )
+ {
+ local result = [ string.join "self.vars" "=" $(self.vars) ";" : " " ] ;
+ for local var in $(self.vars)
+ {
+ result += [ string.join "self.$(var)" "=" "\"$(self.$(var))\"" ";" : " " ] ;
+ }
+ return $(result:J=$(self.nl)) ;
+ }
+
+ rule match-first ( regex : text + )
+ {
+ local result = [ MATCH "$(regex)" : "$(text:J=)" ] ;
+ if $(result[1])
+ {
+ return "$(result[1])" "$(result[2-]:J= " ;
+ }
+ else
+ {
+ return "$(result[2])" "$(result[3-]:J= " ;
+ }
+ }
+
+ rule parse ( )
+ {
+ if [ path.exists [ path.native $(self.cache) ] ]
+ {
+ local cache = [ path.native $(self.cache) ] ;
+ include "$(cache)" ;
+ }
+ else
+ {
+ local content ;
+ if [ os.on-windows ]
+ {
+ content = [ COMMAND "TYPE $(self.file)" ] ;
+ }
+ else
+ {
+ content = [ COMMAND "cat $(self.file)" ] ;
+ }
+
+ while $(content)
+ {
+ local tag,rest = [ MATCH "$(self.%tag)" : "$(content)" ] ;
+ switch $(tag,rest[1])
+ {
+ case "?xml" :
+ tag,rest = [ MATCH "([?][>])[$(self.ws)]*(.*)" : "$(tag,rest[2])" ] ;
+
+ case "!--" :
+ tag,rest = [ MATCH "([-][-][>])[$(self.ws)]*(.*)" : "$(tag,rest[2])" ] ;
+
+ case "set" :
+ tag,rest = [ parse-set "$(tag,rest[2])" ] ;
+
+ case "if" :
+ tag,rest = [ MATCH "([^>]*)[>][$(self.ws)]*(.*)" : "$(tag,rest[2])" ] ;
+ }
+ content = "$(tag,rest[2])" ;
+ }
+
+ for local var in $(self.vars)
+ {
+ #~ ECHO --- $(var) ;
+ local new-value ;
+ for local val in $(self.$(var))
+ {
+ local condition ;
+ local path ;
+
+ local new-val = [ regex.split $(val) ":<source>" ] ;
+ if $(new-val[3])
+ {
+ condition = $(new-val[1--2]) ;
+ condition = $(condition:J=,):<source> ;
+ }
+ else if $(new-val[2])
+ {
+ condition = $(new-val[1]):<source> ;
+ }
+ local path = $(self.root)/$(new-val[-1]) ;
+ new-val = $(condition:E="")$(path) ;
+ #~ ECHO --| $(new-val) ;
+ if [ path.exists [ path.native $(path) ] ]
+ {
+ new-value += $(new-val) ;
+ }
+ }
+ self.$(var) = $(new-value) ;
+ }
+
+ make $(self.cache)
+ : $(self.file)
+ : @bakefile_jam
+ : <wx-version>$(self.version)
+ <wx-bakefile>$(__name__)
+ ;
+ }
+ return <use>$(self.cache) ;
+ }
+
+ rule parse-set ( content )
+ {
+ local tag,rest = [ match-first "([^>]*)[>][$(self.ws)]*(.*)" : "$(content)" ] ;
+
+ local var = [ match-first "var=\"([^\"]+)\"" : "$(tag,rest[1])" ] ;
+ local value = ;
+
+ local word,rest = [ match-first "$(self.%word)" : "$(tag,rest[2])" ] ;
+ local condition = "" ;
+ while $(word,rest[1])
+ {
+ switch "$(word,rest[1])"
+ {
+ case "<!--*" :
+ {
+ word,rest = [ match-first "[-][-][>]$(self.%word)" : "$(word,rest)" ] ;
+ }
+
+ case "</set>" :
+ {
+ tag,rest = "$(word,rest[1])" "$(word,rest[2-]:J )" ;
+ word,rest = ;
+ }
+
+ case "</if>" :
+ {
+ condition = "" ;
+ word,rest = [ match-first "$(self.%word)" : "$(word,rest[2-])" ] ;
+ }
+
+ case "<if*" :
+ {
+ word,rest = [ match-first "([^>]*)[>](.*)" : "$(word,rest)" ] ;
+ local cond = [ match-first "cond=\"([^\"]+)\"" : "$(word,rest[1])" ] ;
+ switch $(cond)
+ {
+ case "TOOLKIT==*" :
+ local toolkit = [ MATCH "'([^']+)'" : $(cond) ] ;
+ toolkit ?= _ ;
+ condition = <wx-toolkit>$(toolkit:L):<source> ;
+
+ case "PLATFORM_*=='1'" :
+ local platform = [ MATCH "PLATFORM_([^=]+)" : "$(cond)" ] ;
+ condition = <wx-platform>$(platform:L):<source> ;
+
+ case "USE_GUI=='1' and WXUNIV=='0'" :
+ condition = <wx-gui>enable,<wx-universal>disable:<source> ;
+
+ case "USE_GUI=='1' and WXUNIV=='1'" :
+ condition = <wx-gui>enable,<wx-universal>enable:<source> ;
+
+ case "WXUNIV=='0'" :
+ condition = <wx-universal>disable:<source> ;
+
+ case "WXUNIV=='1'" :
+ condition = <wx-universal>enable:<source> ;
+
+ case "USE_GUI=='0'" :
+ condition = <wx-gui>disable:<source> ;
+
+ case "USE_GUI=='1'" :
+ condition = <wx-gui>enable:<source> ;
+ }
+ word,rest = [ match-first "$(self.%word)" : "$(word,rest[2-])" ] ;
+ }
+
+ case "$\(*" :
+ {
+ local ref = [ MATCH "[$][(]([^)]+)[)]" : "$(word,rest[1])" ] ;
+ value += $(condition)$(self.$(ref)) ;
+ word,rest = [ match-first "$(self.%word)" : "$(word,rest[2-])" ] ;
+ }
+
+ case * :
+ {
+ value += $(condition)$(word,rest[1]) ;
+ word,rest = [ match-first "$(self.%word)" : "$(word,rest[2-])" ] ;
+ }
+ }
+ }
+ self.$(var) = $(value) ;
+ self.vars += $(var) ;
+
+ return "$(tag,rest)" ;
+ }
+}

Added: sandbox/tools/build_extensions/ext/zlib.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/ext/zlib.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,47 @@
+#~ Copyright Redshift Software, Inc. 2006.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+### Support for building Zlib library <http://www.zlib.net/>.
+### Targets:
+### /ext/zlib//z
+
+import extension ;
+
+import property ;
+import project ;
+import feature ;
+import common ;
+
+extension.declare zlib ;
+
+rule init ( version ? : location : options * )
+{
+ version ?= default ;
+ local requirements = [ extension.define zlib $(version) : $(location) : $(options) ] ;
+
+ lib z
+ : $(location)/adler32.c
+ $(location)/compress.c
+ $(location)/crc32.c
+ $(location)/deflate.c
+ $(location)/gzio.c
+ $(location)/inffast.c
+ $(location)/inflate.c
+ $(location)/inftrees.c
+ $(location)/trees.c
+ $(location)/uncompr.c
+ $(location)/zutil.c
+ : $(requirements)
+ <zlib-version>$(version)
+ <zlib-location>$(location)
+ <include>$(location)
+ <location-prefix>zlib
+ <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
+ <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
+ <link>shared:<define>ZLIB_DLL
+ :
+ : <include>$(location)
+ ;
+}

Added: sandbox/tools/build_extensions/project-root.jam
==============================================================================
--- (empty file)
+++ sandbox/tools/build_extensions/project-root.jam 2007-11-22 15:34:06 EST (Thu, 22 Nov 2007)
@@ -0,0 +1,13 @@
+#~ Copyright 2006 Redshift Software, Inc.
+#~ Distributed under the Boost Software License, Version 1.0.
+#~ (See accompanying file LICENSE_1_0.txt or copy at
+#~ http://www.boost.org/LICENSE_1_0.txt)
+
+ECHO "--- " ;
+ECHO "--- RUNNING BUILD IN:" ;
+ECHO "--- " [ PWD ] "..." ;
+ECHO "--- " ;
+
+project build-extensions
+ : build-dir bin
+ ;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk