Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/iostreams/build/bzip2.jam @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 3.1 KB
Line 
1# Boost.Iostreams Library bzip2 Jamfile
2
3# (C) Copyright Jonathan Turkanis 2004
4# Distributed under the Boost Software License, Version 1.0. (See accompanying
5# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
6
7# See http://www.boost.org/libs/iostreams for documentation.
8
9# For use in conjunction with the bzip2 data compression library by
10# Jean-loup Gailly and Mark Adler. See http://www.bzip2.org/ to obtain bzip2
11# if it is not installed on your system, or if you wish to build it with
12# different compiler or linker options.
13         
14rule bzip2_config
15{
16    if $(NO_COMPRESSION)
17    {
18         NO_BZIP2 = 1 ;
19    }
20
21    if $(NT) && ! $(BZIP2_SOURCE) && ! $(BZIP2_INCLUDE)
22    {
23         ECHO ****************************************************** ;
24         ECHO Building Boost.Iostreams with bzip2 support disabled. ;
25         ECHO To enable bzip2, consult the Boost.Iostreams documentation ;
26         ECHO ****************************************************** ;   
27         NO_BZIP2 = 1 ;
28    }
29   
30    if ! $(NO_BZIP2)
31    {
32        local SOURCES = blocksort bzlib compress crctable
33                        decompress huffman randtable ;
34        BZIP2_INCLUDE ?= $(BZIP2_SOURCE) ;
35
36        # define BZIP2_BINARY
37        if ! $(BZIP2_SOURCE) && ! $(BZIP2_BINARY)
38        {
39            if $(NT) && ! [ MATCH (.*gcc.*) : $(TOOLS) ]
40            {
41                WINDOWS = 1 ;
42                BZIP2_BINARY = "libbz2" ;
43            }
44            else
45            {   
46                BZIP2_BINARY = "bz2" ;
47            }
48        }
49
50        # declare boost_bzip2 boost_bzip2
51        if $(BZIP2_SOURCE)
52        {
53            template bzip2_common
54                : # sources
55                $(BZIP2_SOURCE)/$(SOURCES).c
56                : # build requirements
57                [ common-names ]  # magic for install and auto-link features
58                <include>$(BZIP2_INCLUDE)
59                : # build variants
60                debug release
61            ;       
62
63            lib boost_bzip2
64                : # sources
65                <template>bzip2_common
66                : # build requirements
67                : # build variants
68                ;
69
70            dll boost_bzip2
71                : # sources
72                <template>bzip2_common
73                : # build requirements
74                <define>BZIP2_DLL=1 # tell source we're building dll's
75                <runtime-link>dynamic # build only for dynamic runtimes
76                : # build variants
77                ;
78               
79            install bzip2 lib
80                : <lib>boost_bzip2
81                ;   
82        }
83    }
84}
85
86bzip2_config ;
87
88template bzip2
89    : # sources
90      [ unless $(NO_BZIP2) : ../src/bzip2.cpp ]
91      [ cond $(BZIP2_SOURCE) : <lib>boost_bzip2 : ]
92    : # build requirements
93      [ unless $(NO_BZIP2) : <include>$(BZIP2_INCLUDE) ]
94      [ unless $(NO_BZIP2) OR $(BZIP2_SOURCE)
95        : <define>BOOST_BZIP2_BINARY=$(BZIP2_BINARY) ]
96      [ cond $(BZIP2_LIBPATH) : <library-path>$(BZIP2_LIBPATH) : ]
97      [ unless $(BZIP2_SOURCE) : <find-library>$(BZIP2_BINARY) : ]
98    : # build variants
99   ;         
100
101# end
Note: See TracBrowser for help on using the repository browser.