1 # Boost.Iostreams Library Build Jamfile
3 # (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
4 # (C) Copyright 2004-2007 Jonathan Turkanis
5 # Distributed under the Boost Software License, Version 1.0. (See accompanying
6 # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
8 # See http://www.boost.org/libs/iostreams for documentation.
10 project /boost/iostreams : source-location ../src ;
12 # The biggest trick in this Jamfile is to link to zlib and bzip2 when
13 # needed. To configure that, a number of variables are used, which must
14 # be set by user with 'path-constant' either in Boost's root Jamfile, or
17 # For each library with either link to existing binary, or build
18 # a library from the sources.
24 local debug = [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] ;
26 local libraries-to-install = boost_iostreams ;
28 for local v in NO_COMPRESSION
34 $(v) = [ modules.peek : $(v) ] ;
37 if $(NO_COMPRESSION) != 1 && $(NO_ZLIB) != 1
39 using zlib : : <build-name>boost_zlib <tag>@tag ;
41 [ ac.check-library /zlib//zlib : <library>/zlib//zlib
42 <source>zlib.cpp <source>gzip.cpp ] ;
44 if [ os.environ ZLIB_SOURCE ]
46 alias boost_zlib : /zlib//zlib ;
47 libraries-to-install += boost_zlib ;
54 ECHO "notice: iostreams: not using zlib compression " ;
58 if $(NO_COMPRESSION) != 1 && $(NO_BZIP2) != 1
60 using bzip2 : : <build-name>boost_bzip2 <tag>@tag ;
62 [ ac.check-library /bzip2//bzip2 : <library>/bzip2//bzip2
65 if [ os.environ BZIP2_SOURCE ]
67 alias boost_bzip2 : /bzip2//bzip2 ;
68 libraries-to-install += boost_bzip2 ;
75 ECHO "notice: iostreams: not using bzip compression " ;
79 if $(NO_COMPRESSION) != 1 && $(NO_LZMA) != 1
83 exe has_lzma_cputhreads : ../build/has_lzma_cputhreads.cpp /lzma//lzma ;
84 explicit has_lzma_cputhreads ;
87 [ ac.check-library /lzma//lzma : <library>/lzma//lzma
89 [ check-target-builds has_lzma_cputhreads
90 : : <define>BOOST_IOSTREAMS_LZMA_NO_MULTITHREADED=1 ] ;
96 ECHO "notice: iostreams: not using lzma compression " ;
100 if $(NO_COMPRESSION) != 1 && $(NO_ZSTD) != 1
104 [ ac.check-library /zstd//zstd : <library>/zstd//zstd
111 ECHO "notice: iostreams: not using zstd compression " ;
115 local sources = file_descriptor.cpp mapped_file.cpp ;
119 : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
120 <define>BOOST_IOSTREAMS_USE_DEPRECATED
122 $(bzip2-requirements)
126 : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
129 boost-install $(libraries-to-install) ;