# (C) Copyright David Abrahams 2001. Permission to copy, use,
# modify, sell and distribute this software is granted provided this
# copyright notice appears in all copies. This software is provided
# "as is" without express or implied warranty, and with no claim as
# to its suitability for any purpose.

# Profiling feature support by Toon Knapen <toon@si-lab.com>.
feature profiling : off on ;

feature struct-alignment : auto 1 2 4 8 16 ;
feature eh-model : default fast msvc ; # metrowerks only

feature threading : single multi ;

feature runtime-link : dynamic static ;
feature runtime-build : debug release ;

feature optimization : off speed space ;
feature inlining : off on full ;
feature debug-symbols : on off : ;
free-feature user-interface : console gui ;

feature wide-character-support : on off ;
feature exception-handling : on off ;
feature rtti : on off ;

free-feature cflags ;
free-feature linkflags ;
free-feature cxxflags ;
free-feature define ; # <define>PYTHON=foo
free-feature undef ; # <undef>PYTHON=foo
path-feature "include" ; # <include>../foo/bar/mumble
path-feature library-path ;
dependency-feature library-file ;
free-feature find-library ;
path-feature sysinclude ; # <sysinclude>/fu/man/chu
free-feature arflags ;

# Can the target participate in a shared library?
feature shared-linkable : false true ;

gLINK_COMPATIBLE = <shared-linkable>true <target-type> ;
gALWAYS_RELEVANT = <target-type> ;

##### Requirements by target type #####
gTARGET_TYPE_REQUIREMENTS(DLL) = <shared-linkable>true ;

##### Variant definitions ####
COMMON_PROPERTIES ?= 
    <struct-alignment>auto
    <eh-model>default
    <threading>single
    <user-interface>console
    <wide-character-support>on
    <exception-handling>on
    <rtti>on
    <user-interface>console
    <shared-linkable>false
    
    # Borland link lines will need work to find the right libraries for unicode
    # support - see borland-tools.jam 
    <borland><wide-character-support>off
    ;
    
variant common :
    $(COMMON_PROPERTIES)
    <profiling>off
    ;
    
variant debug : common :
    <debug-symbols>on
    <runtime-build>debug
    <optimization>off
    <inlining>off
    ;

if $(NT)    
{
    variant debug-python : debug :
      <define>BOOST_DEBUG_PYTHON
      <define>_DEBUG
      <gcc><define>Py_DEBUG
      ;
}
else
{
    variant debug-python : debug :
      <define>BOOST_DEBUG_PYTHON
      <define>Py_DEBUG
      ;
    
}

variant release : common :
    <debug-symbols>off
    <runtime-build>release
    <optimization>speed
    <inlining>full
    <define>NDEBUG
    ;

# Profiling variant by Toon Knapen <toon@si-lab.com>
variant profile : release :
    <profiling>on
    ;

