1 # Copyright (c) 2010 Vladimir Prus.
2 # Copyright (c) 2013 Steven Watanabe
4 # Use, modification and distribution is subject to the Boost Software
5 # License Version 1.0. (See accompanying file LICENSE_1_0.txt or
6 # http://www.boost.org/LICENSE_1_0.txt)
8 # Supports the lzma library
10 # After 'using lzma', the following targets are available:
12 # /lzma//lzam -- The lzma library
17 import "class" : new ;
31 if --debug-configuration in [ modules.peek : ARGV ]
41 # A list of the options to use
44 # The requirements for the target
47 # Default configurations are only used when
48 # not yet configured. This option is
49 # deprecated. A configuration will be treated
50 # as a default when none of <include>, <search>,
51 # <name>, and <source> are present.
54 local caller = [ project.current ] ;
60 project.initialize $(__name__) ;
61 .project = [ project.current ] ;
65 local library-path = [ property.select <search> : $(options) ] ;
66 library-path = $(library-path:G=) ;
67 local include-path = [ property.select <include> : $(options) ] ;
68 include-path = $(include-path:G=) ;
69 local library-name = [ property.select <name> : $(options) ] ;
70 library-name = $(library-name:G=) ;
77 condition = [ property-set.create $(requirements) ] ;
78 condition = [ property-set.create [ $(condition).base ] ] ;
80 if $(.configured.$(condition))
86 ECHO "notice: [lzma] lzma is already configured" ;
91 errors.user-error "lzma is already configured" ;
99 ECHO "notice: [lzma] Using pre-installed library" ;
102 ECHO "notice: [lzma] Condition" [ $(condition).raw ] ;
106 local mt = [ new ac-library lzma : $(.project) : $(condition) :
107 $(include-path) : $(library-path) : $(library-name) ] ;
108 $(mt).set-header $(header) ;
109 $(mt).set-default-names $(names) ;
110 targets.main-target-alternative $(mt) ;
112 .configured.$(condition) = true ;