$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r52380 - branches/release
From: ghost_at_[hidden]
Date: 2009-04-14 05:01:00
Author: vladimir_prus
Date: 2009-04-14 05:00:59 EDT (Tue, 14 Apr 2009)
New Revision: 52380
URL: http://svn.boost.org/trac/boost/changeset/52380
Log:
Merge from trunk.
Added:
   branches/release/bootstrap.bat
      - copied unchanged from r52379, /trunk/bootstrap.bat
   branches/release/bootstrap.sh
      - copied unchanged from r52379, /trunk/bootstrap.sh
Removed:
   branches/release/configure
Text files modified: 
   branches/release/Jamroot |   430 +++++++++++++++++++++++++++------------ 
   1 files changed, 294 insertions(+), 136 deletions(-)
Modified: branches/release/Jamroot
==============================================================================
--- branches/release/Jamroot	(original)
+++ branches/release/Jamroot	2009-04-14 05:00:59 EDT (Tue, 14 Apr 2009)
@@ -59,8 +59,8 @@
 #   --show-libraries        Displays the list of Boost libraries that require
 #                           build and installation steps, then exit.
 #
-#   --layout=<layout>       Determines whether to choose library names 
-#                           and header locations such that multiple 
+#   --layout=<layout>       Determines whether to choose library names
+#                           and header locations such that multiple
 #                           versions of Boost or multiple compilers can
 #                           be used on the same system.
 #
@@ -124,12 +124,15 @@
 import common ;
 import sequence ;
 import symlink ;
+import targets ;
+import project ;
 
 path-constant BOOST_ROOT : . ;
 constant BOOST_VERSION : 1.39.0 ;
 constant BOOST_JAMROOT_MODULE : $(__name__) ;
 
-local version-tag = [ MATCH "^([^.]+)[.]([^.]+)[.]([^.]+)" : $(BOOST_VERSION) ] ;
+local version-tag = [ MATCH "^([^.]+)[.]([^.]+)[.]([^.]+)" : $(BOOST_VERSION) ]
+    ;
 if $(version-tag[3]) = 0
 {
     version-tag = $(version-tag[1-2]) ;
@@ -137,101 +140,81 @@
 
 constant BOOST_VERSION_TAG : $(version-tag:J="_") ;
 
-# Option to choose how many variants to build. The default is "minimal",
-# which builds only the "release <threading>multi <link>shared" variant.
+# Option to choose how many variants to build. The default is "minimal".
 local build-type = [ MATCH "^--build-type=(.*)" : [ modules.peek : ARGV ] ] ;
 build-type ?= minimal ;
 if ! ( $(build-type) in minimal complete )
 {
-    build-type = minimal ;
-}
-
-# Specify the build variants keyed on the build-type.
-local default-build,minimal =
-    release
-    <threading>multi
-    <link>shared <link>static
-    <runtime-link>shared
-    ;
-local default-build,complete =
-    debug release
-    <threading>single <threading>multi
-    <link>shared <link>static
-    <runtime-link>shared <runtime-link>static
-    ;
-
-# Set the default build.
-local default-build = $(default-build,$(build-type)) ;
-
-# We only use the default build when building at the root to
-# avoid having it impact the default regression testing of "debug".
-# TODO: Consider having a "testing" build type instead of this check.
-if $(__file__:D) != ""
-{
-    default-build = debug ;
+    ECHO "The value of the --build-type option should be either 'complete' or 'minimal'" ;
+    EXIT ;
 }
 
-
 rule handle-static-runtime ( properties * )
-{    
-    # This property combination is dangerous.
-    # Ideally, we'd add constraint to default build,
-    # so that user can build with property combination
-    # by hand. But we don't have any 'constraint' mechanism
-    # for default-build, so disable such builds in requirements.
-    
-    # For CW, static runtime is needed so that
-    # std::locale works.
-    if <link>shared in $(properties)
-      && <runtime-link>static in $(properties)
-        && ! ( <toolset>cw in $(properties) )    
+{
+    # Using static runtime with shared libraries is impossible on Linux,
+    # and dangerous on Windows. Therefore, we disallow it. This might
+    # be drastic, but it was disabled for a while with nobody complaining.
+
+    # For CW, static runtime is needed so that std::locale works.
+    if <link>shared in $(properties) && <runtime-link>static in $(properties) &&
+        ! ( <toolset>cw in $(properties) )
     {
-        return <build>no ;
+        ECHO "error: link=shared together with runtime-link=static is not allowed" ;
+        ECHO "error: such property combination is either impossible " ;
+        ECHO "error: or too dangerious to be of any use" ;
+        EXIT ;
     }
 }
 
 
 project boost
     : requirements <include>.
-      # disable auto-linking for all targets here,
-      # primarily because it caused troubles with V2
+      # Disable auto-linking for all targets here, primarily because it caused
+      # troubles with V2.
       <define>BOOST_ALL_NO_LIB=1
-      # Used to encode variant in target name. See the
-      # 'tag' rule below.
+      # Used to encode variant in target name. See the 'tag' rule below.
       <tag>@$(__name__).tag
       <conditional>@handle-static-runtime
-            
+      # The standard library Sun compilers use by default has no chance
+      # of working with Boost. Override it.
+      <toolset>sun:<stdlib>sun-stlport
     : usage-requirements <include>.
     : build-dir bin.v2
-    : default-build $(default-build)
     ;
 
+
 # Setup convenient aliases for all libraries.
 
-all-libraries =
-    [ MATCH .*libs/(.*)/build/.* : [ glob libs/*/build/Jamfile.v2 ] [ glob libs/*/build/Jamfile ] ]
+all-libraries = [ MATCH .*libs/(.*)/build/.* : [ glob libs/*/build/Jamfile.v2 ]
+    [ glob libs/*/build/Jamfile ] ]
     ;
-    
-all-libraries = [ sequence.unique $(all-libraries) ] ;    
 
-# First, the complicated libraries: where the target name in
-# Jamfile is different from directory name.
-alias prg_exec_monitor : libs/test/build//boost_prg_exec_monitor ;
-alias test_exec_monitor : libs/test/build//boost_test_exec_monitor ;
-alias unit_test_framework : libs/test/build//boost_unit_test_framework ;
-alias bgl-vis : libs/graps/build//bgl-vis ;
-alias serialization : libs/serialization/build//boost_serialization ;
-alias wserialization : libs/serialization/build//boost_wserialization ;
+all-libraries = [ sequence.unique $(all-libraries) ] ;
+# The function_types library has a Jamfile, but it's used for maintenance
+# purposes, there's no library to build and install.
+all-libraries = [ set.difference $(all-libraries) : function_types ] ;
 
-explicit prg_exec_monitor test_exec_monitor unit_test_framework
-    bgl-vis serialization wserialization ;
 
+local rule explicit-alias ( id : targets + )
+{
+    alias $(id) : $(targets) ;
+    explicit $(id) ;
+}
+
+
+# First, the complicated libraries: where the target name in Jamfile is
+# different from its directory name.
+explicit-alias prg_exec_monitor : libs/test/build//boost_prg_exec_monitor ;
+explicit-alias test_exec_monitor : libs/test/build//boost_test_exec_monitor ;
+explicit-alias unit_test_framework : libs/test/build//boost_unit_test_framework ;
+explicit-alias bgl-vis : libs/graps/build//bgl-vis ;
+explicit-alias serialization : libs/serialization/build//boost_serialization ;
+explicit-alias wserialization : libs/serialization/build//boost_wserialization ;
 for local l in $(all-libraries)
 {
     if ! $(l) in test graph serialization
     {
-        alias $(l) : libs/$(l)/build//boost_$(l) ;
-        explicit $(l) ;
+        explicit-alias $(l) : libs/$(l)/build//boost_$(l) ;
     }
 }
 
@@ -240,14 +223,24 @@
 
 # Decides which libraries are to be installed by looking at --with-<library>
 # --without-<library> arguments. Returns the list of directories under "libs"
-# which must be built at installed.
+# which must be built and installed.
+#
 rule libraries-to-install ( existing-libraries * )
 {
    local argv = [ modules.peek : ARGV ] ;
    local with-parameter = [ MATCH --with-(.*) : $(argv) ] ;
    local without-parameter = [ MATCH --without-(.*) : $(argv) ] ;
+   
+   if ! $(with-parameter) && ! $(without-parameter)
+   {
+       # Nothing is specified on command line. See if maybe
+       # project-config.jam has some choices. 
+       local project-config-libs = [ modules.peek project-config : libraries ] ;
+       with-parameter = [ MATCH --with-(.*) : $(project-config-libs) ] ;
+       without-parameter = [ MATCH --without-(.*) : $(project-config-libs) ] ;
+   }
 
-   # Do some checks
+   # Do some checks.
    if $(with-parameter) && $(without-parameter)
    {
        ECHO "error: both --with-<library> and --without-<library> specified" ;
@@ -277,22 +270,25 @@
    }
 }
 
-# what kind of layout are we doing?
+
+# What kind of layout are we doing?
 layout = [ MATCH "^--layout=(.*)" : [ modules.peek : ARGV ] ] ;
 layout ?= versioned ;
 layout-$(layout) = true ;
 
-# possible stage only location
+
+# Possible stage only location.
 local stage-locate = [ MATCH "^--stagedir=(.*)" : [ modules.peek : ARGV ] ] ;
 stage-locate ?= stage ;
-
 path-constant BOOST_STAGE_LOCATE : $(stage-locate) ;
 
 
-# location of python
-local python-root = [ MATCH "^--with-python-root=(.*)" : [ modules.peek : ARGV ] ] ;
+# Python location.
+local python-root = [ MATCH "^--with-python-root=(.*)" : [ modules.peek : ARGV ]
+    ] ;
 PYTHON_ROOT ?= $(python-root) ;
 
+
 # Select the libraries to install.
 libraries = [ libraries-to-install $(all-libraries) ] ;
 
@@ -313,9 +309,11 @@
     constant BUILD_ID : [ regex.replace $(build-id) "[*\\/:.\"\' ]" "_" ] ;
 }
 
-# This rule is called by Boost.Build to determine the name of
-# target. We use it to encode build variant, compiler name and
-# boost version in the target name
+
+# This rule is called by Boost.Build to determine the name of target. We use it
+# to encode the build variant, compiler name and boost version in the target
+# name.
+#
 rule tag ( name : type ? : property-set )
 {
     if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
@@ -326,38 +324,54 @@
                 <base> <toolset> <threading> <runtime> -$(BOOST_VERSION_TAG)
                 -$(BUILD_ID)
                 : $(name) : $(type) : $(property-set) ] ;
-            
-            # Optionally add version suffix.
-            # On NT, library with version suffix won't be recognized
-            # by linkers. On CYGWIN, we get strage duplicate symbol
-            # errors when library is generated with version suffix.
-            # On OSX, version suffix is not needed -- the linker expets
-            # libFoo.1.2.3.dylib format.
-            # AIX linkers don't accept version suffixes either.
-            # Pgi compilers can't accept library with version suffix
+
+            # Optionally add version suffix. On NT, library with version suffix
+            # will not be recognized by linkers. On CYGWIN, we get strage
+            # duplicate symbol errors when library is generated with version
+            # suffix. On OSX, version suffix is not needed -- the linker expects
+            # the libFoo.1.2.3.dylib format. AIX linkers do not accept version
+            # suffixes either. Pgi compilers can not accept library with version
+            # suffix.
             if $(type) = SHARED_LIB &&
               ( ! ( [ $(property-set).get <target-os> ] in windows cygwin darwin aix ) &&
                 ! ( [ $(property-set).get <toolset> ] in pgi ) )
             {
                 result = $(result).$(BOOST_VERSION)  ;
             }
-            
+
             return $(result) ;
         }
         else
         {
-            return [ common.format-name
-                <base> <threading> <runtime> -$(BUILD_ID)
+            local result = [ common.format-name
+                <base> 
+                -$(BUILD_ID)
                 : $(name) : $(type) : $(property-set) ] ;
+
+            # Optionally add version suffix. On NT, library with version suffix
+            # will not be recognized by linkers. On CYGWIN, we get strage
+            # duplicate symbol errors when library is generated with version
+            # suffix. On OSX, version suffix is not needed -- the linker expects
+            # the libFoo.1.2.3.dylib format. AIX linkers do not accept version
+            # suffixes either. Pgi compilers can not accept library with version
+            # suffix.
+            if $(type) = SHARED_LIB &&
+              ( ! ( [ $(property-set).get <target-os> ] in windows cygwin darwin aix ) &&
+                ! ( [ $(property-set).get <toolset> ] in pgi ) )
+            {
+                result = $(result).$(BOOST_VERSION)  ;
+            }
+
+            return $(result) ;
         }
     }
 }
 
+
 # Install to system location.
 
-local install-requirements =
-    <install-source-root>boost
-    ;
+install-requirements = <install-source-root>$(BOOST_ROOT)/boost ;
+
 if $(layout-versioned)
 {
     install-requirements += <install-header-subdir>boost-$(BOOST_VERSION_TAG)/boost ;
@@ -383,35 +397,34 @@
     [ path.glob boost/tr1/tr1 : * : bcc32 sun CVS .svn ]
           ;
 
-# Complete install
+# Complete install.
 package.install install-proper
-    :   $(install-requirements) <install-no-version-symlinks>on
+    : $(install-requirements) <install-no-version-symlinks>on
     :
-    :   libs/$(libraries)/build
-    :   $(headers)
+    : libs/$(libraries)/build
+    : $(headers)
     ;
 explicit install-proper ;
 
 # Install just library.
 install stage-proper
-    :   libs/$(libraries)/build
-    :   <location>$(stage-locate)/lib
-        <install-dependencies>on <install-type>LIB 
-        <install-no-version-symlinks>on
+    : libs/$(libraries)/build
+    : <location>$(stage-locate)/lib
+      <install-dependencies>on <install-type>LIB
+      <install-no-version-symlinks>on
     ;
 explicit stage-proper ;
 
 
-if $(layout-versioned) 
-  && ( [ modules.peek : NT ] || [ modules.peek : UNIX ] )
+if $(layout-versioned) && ( [ modules.peek : NT ] || [ modules.peek : UNIX ] )
 {
     rule make-unversioned-links ( project name ? : property-set : sources * )
     {
         local result ;
         local filtered ;
-        local pattern ;        
+        local pattern ;
         local nt = [ modules.peek : NT ] ;
-        
+
         # Collect the libraries that have the version number in 'filtered'.
         for local s in $(sources)
         {
@@ -422,86 +435,230 @@
             }
             else
             {
-                m = [ MATCH "(.*[.]so[.0-9]+)" "(.*[.]dylib)" "(.*[.]a)" : [ $(s).name ] ] ;
-            }            
+                m = [ MATCH "(.*[.]so[.0-9]+)" "(.*[.]dylib)" "(.*[.]a)" :
+                    [ $(s).name ] ] ;
+            }
             if $(m)
             {
                 filtered += $(s) ;
             }
         }
-        
+
         # Create links without version.
         for local s in $(filtered)
         {
             local name = [ $(s).name ] ;
             local ea = [ $(s).action ] ;
             local ep = [ $(ea).properties ] ;
-            local a  = [
-              new non-scanning-action $(s) : symlink.ln : $(ep) ] ;
-            
+            local a  = [ new non-scanning-action $(s) : symlink.ln : $(ep) ] ;
+
             local noversion-file ;
             if $(nt)
             {
-                noversion-file = [ MATCH "(.*)-[0-9_]+([.]lib)" : $(name) ] ;
+                noversion-file = [ MATCH "(.*)-[0-9_]+(.*[.]lib)" : $(name) ] ;
             }
             else
             {
-                noversion-file = 
-                  [ MATCH "(.*)-[0-9_]+([.]so)[.0-9]*" : $(name) ] 
-                  [ MATCH "(.*)-[0-9_]+([.]dylib)" : $(name) ] 
-                  [ MATCH "(.*)-[0-9_]+([.]a)" : $(name) ] 
-                  [ MATCH "(.*)-[0-9_]+([.]dll[.]a)" : $(name) ] ;
+                noversion-file =
+                  [ MATCH "(.*)-[0-9_]+(.*[.]so)[.0-9]*" : $(name) ]
+                  [ MATCH "(.*)-[0-9_]+(.*[.]dylib)" : $(name) ]
+                  [ MATCH "(.*)-[0-9_]+(.*[.]a)" : $(name) ]
+                  [ MATCH "(.*)-[0-9_]+(.*[.]dll[.]a)" : $(name) ] ;
             }
-                        
-            local new-name = 
+
+            local new-name =
                $(noversion-file[1])$(noversion-file[2]) ;
             result += [ new file-target $(new-name) exact : [ $(s).type ] : $(project)
                     : $(a) ] ;
 
         }
         return $(result) ;
-    }    
-            
-    generate stage-unversioned : stage-proper : 
-      <generating-rule>@make-unversioned-links ;
+    }
+
+    generate stage-unversioned : stage-proper :
+        <generating-rule>@make-unversioned-links ;
     explicit stage-unversioned ;
-    
-    generate install-unversioned : install-proper : 
-      <generating-rule>@make-unversioned-links ;
+
+    generate install-unversioned : install-proper :
+        <generating-rule>@make-unversioned-links ;
     explicit install-unversioned ;
 }
 else
 {
-    # Create do-nothing aliases
+    # Create do-nothing aliases.
     alias stage-unversioned ;
     explicit stage-unversioned ;
     alias install-unversioned ;
     explicit install-unversioned ;
 }
 
-alias install : install-proper install-unversioned ;
-alias stage : stage-proper stage-unversioned ;
+# This is a special metatarget class that handles the --build-type=complete
+# option.
+class top-level-target : alias-target-class
+{
+    import modules ;
+    import errors ; 
+    
+    rule __init__ ( name : project : sources * : requirements *
+        : default-build * : usage-requirements * )
+    {
+        alias-target-class.__init__ $(name) : $(project) : $(sources) :
+            $(requirements) : $(default-build) : $(usage-requirements) ;
+        
+        local m = [ $(project).project-module ] ;
+        self.build-type = [ modules.peek $(m) : build-type ] ;
+        # On Linux, we build release variant by default, since few users will
+        # ever want to debug C++ Boost libraries, and there's no ABI
+        # incompatibility between debug and release variants. We build
+        # shared and static libraries since that's what most packages
+        # seem to provide (.so in libfoo and .a in libfoo-dev).
+        self.minimal-properties = [ property-set.create 
+            <variant>release <threading>multi <link>shared <link>static <runtime-link>shared ] ;
+        # On Windows, new IDE projects use:
+        #
+        #   runtime-link=dynamic, threading=multi, variant=(debug|release)
+        #
+        # and in addition, C++ Boost's autolink defaults to static linking.
+        self.minimal-properties-win = [ property-set.create 
+            <variant>debug <variant>release <threading>multi <link>static <runtime-link>shared ] ;
+
+        self.complete-properties = [ property-set.create
+            <variant>debug <variant>release
+            <threading>single <threading>multi
+            <link>shared <link>static
+            <runtime-link>shared <runtime-link>static ] ;
+    }
+    
+    rule generate ( property-set )
+    {
+        if $(self.build-type) = minimal
+        {
+            local expanded ;
+            
+            local os = [ $(property-set).get <target-os> ] ;
+            # Because we completely override parent's 'generate'
+            # we need to check for default value of feature ourself.
+            if ! $(os)
+            {
+                os = [ feature.defaults <target-os> ] ;
+                os = $(os:G=) ;
+            }
+            
+            if $(os) = windows
+            {                
+                expanded = [ targets.apply-default-build $(property-set)
+                  : $(self.minimal-properties-win) ] ;
+            }
+            else
+            {
+                expanded = [ targets.apply-default-build $(property-set)
+                  : $(self.minimal-properties) ] ;
+            }            
+            return [ build-multiple $(expanded) ] ;
+        }
+        else if $(self.build-type) = complete
+        {                                    
+            local expanded = [ targets.apply-default-build $(property-set)
+              : $(self.complete-properties) ] ;
+            
+            # Filter inappopriate combinations
+            local filtered ;
+            for local p in $(expanded)
+            {
+                # See comment in handle-static-runtime regarding this logic.
+                if [ $(p).get <link> ] = shared && [ $(p).get <runtime-link> ] = static
+                   && [ $(p).get <toolset> ] != cw
+                {
+                    # Skip this
+                }
+                else
+                {
+                    filtered += $(p) ;
+                }
+            }            
+            return [ build-multiple $(filtered) ] ;            
+        }
+        else
+        {
+            errors.error "Unknown build type" ; 
+        }               
+    }
+    
+    rule build-multiple ( property-sets * )
+    {
+        local usage-requirements = [ property-set.empty ] ;
+        local result ;
+        for local p in $(property-sets)
+        {
+            local r = [ alias-target-class.generate $(p) ] ;
+            if $(r)
+            {
+                usage-requirements = [ $(usage-requirements).add $(r[1]) ] ;
+                result += $(r[2-]) ;
+            }
+        }
+        return $(usage-requirements) [ sequence.unique $(result) ] ;
+    }
+    
+}
+
+targets.create-metatarget top-level-target : [ project.current ]
+  : install
+  : install-proper install-unversioned 
+  ;
+targets.create-metatarget top-level-target : [ project.current ]
+  : stage
+  : stage-proper stage-unversioned 
+  ;
+
 explicit install ;
 explicit stage ;
 
+stage-abs = [ path.native [ path.root $(stage-locate)/lib [ path.pwd ] ] ] ;
+
+# This target is built by default, and will forward to 'stage'
+# after producing some explanations.
+targets.create-metatarget top-level-target : [ project.current ]
+  : forward
+  : explain stage
+  ;
+
+
+message explain :
+"\nBuilding C++ Boost.
+
+After the build, the headers will be located at
+  
+    $(BOOST_ROOT)
+    
+The libraries will be located at  
+    
+    $(stage-abs)
+     
+Use 'bjam install --prefix=<path>' if you wish to install headers and 
+libraries to a different location and remove the source tree.\n\n"
+  ;
+
 
-# Just build the libraries, don't install them anywhere.
-# This is what happens with just "bjam --v2".
+# Just build the libraries, don't install them anywhere. This is what happens
+# with just "bjam --v2".
 alias build_all : libs/$(libraries)/build ;
 
-# This rule should be called from libraries' Jamfiles and will
-# create two targets, "install" and "stage", that will install
-# or stage that library. The --prefix option is respected, but
-# --with and --without options, naturally, are ignored.
+
+# This rule should be called from libraries' Jamfiles and will create two
+# targets, "install" and "stage", that will install or stage that library. The
+# --prefix option is respected, but --with and --without options, naturally, are
+# ignored.
 #
 # - libraries -- list of library targets to install.
+#
 rule boost-install ( libraries * )
 {
     package.install install
-        : <dependency>/boost//install-headers $(install-requirements)
+        : <dependency>/boost//install-proper-headers $(install-requirements)
         : # No binaries
         : $(libraries)
-        : # No headers, it's handled by the dependency
+        : # No headers, it is handled by the dependency.
     ;
 
     install stage : $(libraries) : <location>$(BOOST_STAGE_LOCATE) ;
@@ -515,6 +672,7 @@
     }
 }
 
+
 # Make project ids of all libraries known.
 for local l in $(all-libraries)
 {
Deleted: branches/release/configure
==============================================================================
--- branches/release/configure	2009-04-14 05:00:59 EDT (Tue, 14 Apr 2009)
+++ (empty file)
@@ -1,368 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2005, 2006 Douglas Gregor.
-# Copyright (C) 2006 The Trustees of Indiana University
-#
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
-
-# boostinspect:notab - Tabs are required for the Makefile.
-
-BJAM=""
-TOOLSET=""
-BJAM_CONFIG=""
-BUILD=""
-PREFIX=/usr/local
-EPREFIX=
-LIBDIR=
-INCLUDEDIR=
-LIBS=""
-PYTHON=python
-PYTHON_VERSION=
-PYTHON_ROOT=
-ICU_ROOT=
-
-# Internal flags
-flag_no_python=
-flag_icu=
-flag_show_libraries=
-
-for option
-do
-    case $option in
-
-    -help | --help | -h)
-      want_help=yes ;;
-
-    -prefix=* | --prefix=*)
-      PREFIX=`expr "x$option" : "x-*prefix=\(.*\)"`
-      ;;
-
-    -exec-prefix=* | --exec-prefix=*)
-      EPREFIX=`expr "x$option" : "x-*exec-prefix=\(.*\)"`
-      ;;
-
-    -libdir=* | --libdir=*)
-      LIBDIR=`expr "x$option" : "x-*libdir=\(.*\)"`
-      ;;
-
-    -includedir=* | --includedir=*)
-      INCLUDEDIR=`expr "x$option" : "x-*includedir=\(.*\)"`
-      ;;
-
-    -show-libraries | --show-libraries )
-      flag_show_libraries=yes
-      ;;
-
-    -with-bjam=* | --with-bjam=* )
-      BJAM=`expr "x$option" : "x-*with-bjam=\(.*\)"`
-      ;;
-
-    -with-icu | --with-icu )
-      flag_icu=yes
-      ;;
-
-    -with-icu=* | --with-icu=* )
-      flag_icu=yes
-      ICU_ROOT=`expr "x$option" : "x-*with-icu=\(.*\)"`
-      ;;
-
-    -without-icu | --without-icu )
-      flag_icu=no
-      ;;
-
-    -with-libraries=* | --with-libraries=* )
-      library_list=`expr "x$option" : "x-*with-libraries=\(.*\)"`
-      if test "$library_list" != "all"; then
-          old_IFS=$IFS
-          IFS=,
-          for library in $library_list
-          do
-              LIBS="$LIBS --with-$library"
-
-              if test $library = python; then
-                  requested_python=yes
-              fi
-          done
-          IFS=$old_IFS
-
-          if test "x$requested_python" != xyes; then
-              flag_no_python=yes
-          fi
-      fi
-      ;;
-
-    -without-libraries=* | --without-libraries=* )
-      library_list=`expr "x$option" : "x-*without-libraries=\(.*\)"`
-      old_IFS=$IFS
-      IFS=,
-      for library in $library_list
-      do
-          LIBS="$LIBS --without-$library"
-
-          if test $library = python; then
-              flag_no_python=yes
-          fi
-      done
-      IFS=$old_IFS
-      ;;
-
-    -with-python=* | --with-python=* )
-      PYTHON=`expr "x$option" : "x-*with-python=\(.*\)"`
-      ;;
-
-    -with-python-root=* | --with-python-root=* )
-      PYTHON_ROOT=`expr "x$option" : "x-*with-python-root=\(.*\)"`
-      ;;
-
-    -with-python-version=* | --with-python-version=* )
-      PYTHON_VERSION=`expr "x$option" : "x-*with-python-version=\(.*\)"`
-      ;;
-
-    -with-toolset=* | --with-toolset=* )
-      TOOLSET=`expr "x$option" : "x-*with-toolset=\(.*\)"`
-      ;;
-
-    -*)
-      { echo "error: unrecognized option: $option
-Try \`$0 --help' for more information." >&2
-      { (exit 1); exit 1; }; }
-      ;; 
-
-    esac
-done
-
-if test "x$want_help" = xyes; then
-  cat <<EOF
-\`configure' configures Boost to adapt to a few kinds of systems.
-
-Usage: $0 [OPTION]... 
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help                display this help and exit
-  --with-bjam=BJAM          use existing Boost.Jam executable (bjam)
-                            [automatically built]
-  --with-toolset=TOOLSET    use specific Boost.Build toolset
-                            [automatically detected]
-  --show-libraries          show the set of libraries that require build
-                            and installation steps (i.e., those libraries
-                            that can be used with --with-libraries or
-                            --without-libraries), then exit
-  --with-libraries=list     build only a particular set of libraries,
-                            describing using either a comma-separated list of
-                            library names or "all"
-                            [all]
-  --without-libraries=list  build all libraries except the ones listed []
-  --with-icu                enable Unicode/ICU support in Regex 
-                            [automatically detected]
-  --without-icu             disable Unicode/ICU support in Regex
-  --with-icu=DIR            specify the root of the ICU library installation
-                            and enable Unicode/ICU support in Regex
-                            [automatically detected]
-  --with-python=PYTHON      specify the Python executable [python]
-  --with-python-root=DIR    specify the root of the Python installation
-                            [automatically detected]
-  --with-python-version=X.Y specify the Python version as X.Y
-                            [automatically detected]
-
-Installation directories:
-  --prefix=PREFIX           install Boost into the given PREFIX
-                            [/usr/local]
-  --exec-prefix=EPREFIX     install Boost binaries into the given EPREFIX
-                            [PREFIX]
-
-More precise control over installation directories:
-  --libdir=DIR              install libraries here [EPREFIX/lib]
-  --includedir=DIR          install headers here [PREFIX/include]
-
-EOF
-fi
-test -n "$want_help" && exit 0
-
-# TBD: Determine where the script is located
-my_dir="."
-
-# Determine the toolset, if not already decided
-if test "x$TOOLSET" = x; then
-  guessed_toolset=`$my_dir/tools/jam/src/build.sh --guess-toolset`
-  case $guessed_toolset in
-    acc | darwin | gcc | como | mipspro | pathscale | pgi | qcc | vacpp )
-    TOOLSET=$guessed_toolset
-    ;;
-    
-    intel-* )
-    TOOLSET=intel
-    ;;
-    
-    mingw )
-    TOOLSET=gcc
-    ;;
-    
-    sun* )
-    TOOLSET=sun
-    ;;
-    
-    * )
-    # Not supported by Boost.Build
-    ;;
-  esac
-fi
-
-rm -f config.log
-
-# Build bjam
-if test "x$BJAM" = x; then
-  echo -n "Building Boost.Jam with toolset $TOOLSET... "
-  pwd=`pwd`
-  cd "$my_dir/tools/jam/src" && ./build.sh "$TOOLSET" > config.log 2>&1
-  cd $pwd
-  arch=`cd $my_dir/tools/jam/src && ./bootstrap/jam0 -d0 -f build.jam --toolset=$TOOLSET --toolset-root= --show-locate-target && cd ..`
-  BJAM="$my_dir/tools/jam/src/$arch/bjam"
-  echo "tools/jam/src/$arch/bjam"
-fi
-
-# TBD: Turn BJAM into an absolute path
-
-# If there is a list of libraries 
-if test "x$flag_show_libraries" = xyes; then
-  libraries=`$BJAM -d0 --show-libraries`
-  cat <<EOF
-
-The following Boost libraries have portions that require a separate build
-and installation step. Any library not listed here can be used by including
-the headers only.
-
-The Boost libraries requiring separate building and installation are:
-EOF
-  for lib in $libraries
-  do
-    echo "         $lib"
-  done
-  exit 0
-fi
-
-# Setup paths
-if test "x$EPREFIX" = x; then
-  EPREFIX="\$(prefix)"
-fi
-
-if test "x$LIBDIR" = x; then
-  LIBDIR="\$(exec_prefix)/lib"
-fi
-
-if test "x$INCLUDEDIR" = x; then
-  INCLUDEDIR="\$(prefix)/include"
-fi
-
-# Find Python
-if test "x$flag_no_python" = x; then
-  result=`$PYTHON -c "exit" > /dev/null 2>&1`
-  if [ "$?" -ne "0" ]; then
-    flag_no_python=yes
-  fi
-fi
-
-if test "x$flag_no_python" = x; then
-    if test "x$PYTHON_VERSION" = x; then
-        echo -n "Detecting Python version... "
-        PYTHON_VERSION=`$PYTHON -c "import sys; print (\"%d.%d\" % (sys.version_info[0], sys.version_info[1]))"`
-        echo $PYTHON_VERSION
-    fi
-
-    if test "x$PYTHON_ROOT" = x; then
-        echo -n "Detecting Python root... "
-        PYTHON_ROOT=`$PYTHON -c "import sys; print sys.prefix"`
-        echo $PYTHON_ROOT
-    fi    
-fi
-
-# Configure ICU
-echo -n "Unicode/ICU support for Boost.Regex?... "
-if test "x$flag_icu" != xno; then
-  if test "x$ICU_ROOT" = x; then
-    COMMON_ICU_PATHS="/usr /usr/local /sw"
-    for p in $COMMON_ICU_PATHS; do
-      if test -r $p/include/unicode/utypes.h; then
-        ICU_ROOT=$p
-      fi
-    done
-  
-    if test "x$ICU_ROOT" = x; then
-      echo "not found."
-    else      
-      BJAM_CONFIG="$BJAM_CONFIG -sICU_PATH=$ICU_ROOT"
-      echo "$ICU_ROOT"
-    fi
-  else
-    BJAM_CONFIG="$BJAM_CONFIG -sICU_PATH=$ICU_ROOT"
-    echo "$ICU_ROOT"
-  fi
-else
-  echo "disabled."
-fi
-
-# Backup the user's existing user-config.jam
-JAM_CONFIG_OUT="user-config.jam"
-if test -r "user-config.jam"; then
-  counter=1
- 
-  while test -r "user-config.jam.$counter"; do
-    counter=`expr $counter + 1`
-  done
-
-  echo "Backing up existing Boost.Build configuration in user-config.jam.$counter"
-  mv "user-config.jam" "user-config.jam.$counter"
-fi
-
-# Generate user-config.jam
-echo "Generating Boost.Build configuration in user-config.jam..."
-cat > user-config.jam <<EOF
-# Boost.Build Configuration
-# Automatically generated by Boost configure 
-
-# Compiler configuration
-using $TOOLSET ; 
-EOF
-
-#  - Python configuration
-if test "x$flag_no_python" = x; then
-  cat >> user-config.jam <<EOF
-
-# Python configuration
-using python : $PYTHON_VERSION : $PYTHON_ROOT ;
-EOF
-fi
-
-# Generate the Makefile
-echo "Generating Makefile..."
-cat > Makefile <<EOF
-BJAM=$BJAM
-BJAM_CONFIG=$BJAM_CONFIG
-prefix=$PREFIX
-exec_prefix=$EPREFIX
-libdir=$LIBDIR
-includedir=$INCLUDEDIR
-LIBS=$LIBS
-
-all: .dummy
-	@echo "\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS)"
-	@\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS) || \\
-	echo "Not all Boost libraries built properly."
-
-clean: .dummy
-	rm -rf bin.v2
-
-distclean: clean
-	rm -rf Makefile config.log
-
-check: .dummy
-	@cd status && ../\$(BJAM) \$(BJAM_CONFIG) --user-config=../user-config.jam || echo "Some Boost regression tests failed. This is normal for many compilers."
-
-install: .dummy
-	@echo "\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam --prefix=\$(prefix) --exec-prefix=\$(exec_prefix) --libdir=\$(libdir) --includedir=\$(includedir) \$(LIBS) install"
-	@\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam --prefix=\$(prefix) --exec-prefix=\$(exec_prefix) --libdir=\$(libdir) --includedir=\$(includedir) \$(LIBS) install || echo "Not all Boost libraries built properly."
-
-.dummy:
-
-EOF