Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/iostreams/build/zlib.jam @ 35

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

updated boost from 1_33_1 to 1_34_1

File size: 3.0 KB
Line 
1# Boost.Iostreams Library zlib 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 zlib data compression library by
10# Jean-loup Gailly and Mark Adler. See http://www.zlib.org/ to obtain zlib
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 zlib_config
15{
16    if $(NO_COMPRESSION)
17    {
18         NO_ZLIB = 1 ;
19    }
20
21    if $(NT) && ! $(ZLIB_SOURCE) && ! $(ZLIB_INCLUDE)
22    {
23         ECHO ****************************************************** ;
24         ECHO Building Boost.Iostreams with zlib and gzip support disabled. ;
25         ECHO To enable zlib and gzip, consult the Boost.Iostreams documentation ;
26         ECHO ****************************************************** ;   
27         NO_ZLIB = 1 ;
28    }
29   
30    if ! $(NO_ZLIB)
31    {
32        local SOURCES = adler32 compress crc32 deflate inffast 
33                        inflate inftrees trees uncompr zutil ;
34        ZLIB_INCLUDE ?= $(ZLIB_SOURCE) ;
35
36        # define ZLIB_BINARY
37        if ! $(ZLIB_SOURCE) && ! $(ZLIB_BINARY)
38        {
39            if $(NT) && ! [ MATCH (.*gcc.*) : $(TOOLS) ]
40            {
41                ZLIB_BINARY = "zdll" ;
42            }
43            else
44            {
45                ZLIB_BINARY = "z" ;
46            }
47        }
48
49        # declare boost_zlib boost_zlib
50        if $(ZLIB_SOURCE)
51        {
52            template zlib_common
53                : # sources
54                  $(ZLIB_SOURCE)/$(SOURCES).c
55                : # build requirements
56                  [ common-names ]  # magic for install and auto-link features
57                  <include>$(ZLIB_INCLUDE)
58                : # build variants
59                  debug release
60            ;       
61
62            lib boost_zlib
63                : # sources
64                  <template>zlib_common
65                : # build requirements
66                : # build variants
67                ;
68
69            dll boost_zlib
70                : # sources
71                  <template>zlib_common
72                : # build requirements
73                  <define>ZLIB_DLL=1 # tell source we're building dll's
74                  <runtime-link>dynamic # build only for dynamic runtimes
75                : # build variants
76                ;
77               
78            install zlib lib
79                : <lib>boost_zlib
80                ;   
81        }
82    }
83}
84
85zlib_config ;
86
87template zlib
88    : # sources
89      [ unless $(NO_ZLIB) : ../src/zlib.cpp ]
90      [ cond $(ZLIB_SOURCE) : <lib>boost_zlib : ]
91    : # build requirements
92      [ unless $(NO_ZLIB) : <include>$(ZLIB_INCLUDE) ]
93      [ unless $(NO_ZLIB) OR $(ZLIB_SOURCE)
94        : <define>BOOST_ZLIB_BINARY=$(ZLIB_BINARY) ]
95      [ cond $(ZLIB_LIBPATH) : <library-path>$(ZLIB_LIBPATH) : ]
96      [ unless $(ZLIB_SOURCE) : <find-library>$(ZLIB_BINARY) : ]
97    : # build variants
98   ;         
99
100# end
Note: See TracBrowser for help on using the repository browser.