# Boost.Iostreams Library Build Jamfile # (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) # (C) Copyright 2004-2007 Jonathan Turkanis # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) # See http://www.boost.org/libs/iostreams for documentation. project /boost/iostreams : source-location ../src ; # The biggest trick in this Jamfile is to link to zlib and bzip2 when # needed. To configure that, a number of variables are used, which must # be set by user with 'path-constant' either in Boost's root Jamfile, or # in user-config.jam. # For each library with either link to existing binary, or build # a library from the sources. import modules ; import os ; import path ; import ac ; local debug = [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] ; local libraries-to-install = boost_iostreams ; for local v in NO_COMPRESSION NO_ZLIB NO_BZIP2 NO_LZMA NO_ZSTD { $(v) = [ modules.peek : $(v) ] ; } if $(NO_COMPRESSION) != 1 && $(NO_ZLIB) != 1 { using zlib : : boost_zlib @tag ; zlib-requirements = [ ac.check-library /zlib//zlib : /zlib//zlib zlib.cpp gzip.cpp ] ; if [ os.environ ZLIB_SOURCE ] { alias boost_zlib : /zlib//zlib ; libraries-to-install += boost_zlib ; } } else { if $(debug) { ECHO "notice: iostreams: not using zlib compression " ; } } if $(NO_COMPRESSION) != 1 && $(NO_BZIP2) != 1 { using bzip2 : : boost_bzip2 @tag ; bzip2-requirements = [ ac.check-library /bzip2//bzip2 : /bzip2//bzip2 bzip2.cpp ] ; if [ os.environ BZIP2_SOURCE ] { alias boost_bzip2 : /bzip2//bzip2 ; libraries-to-install += boost_bzip2 ; } } else { if $(debug) { ECHO "notice: iostreams: not using bzip compression " ; } } if $(NO_COMPRESSION) != 1 && $(NO_LZMA) != 1 { using lzma ; exe has_lzma_cputhreads : ../build/has_lzma_cputhreads.cpp /lzma//lzma ; explicit has_lzma_cputhreads ; lzma-requirements = [ ac.check-library /lzma//lzma : /lzma//lzma lzma.cpp ] [ check-target-builds has_lzma_cputhreads : : BOOST_IOSTREAMS_LZMA_NO_MULTITHREADED=1 ] ; } else { if $(debug) { ECHO "notice: iostreams: not using lzma compression " ; } } if $(NO_COMPRESSION) != 1 && $(NO_ZSTD) != 1 { using zstd ; zstd-requirements = [ ac.check-library /zstd//zstd : /zstd//zstd zstd.cpp ] ; } else { if $(debug) { ECHO "notice: iostreams: not using zstd compression " ; } } local sources = file_descriptor.cpp mapped_file.cpp ; lib boost_iostreams : $(sources) : shared:BOOST_IOSTREAMS_DYN_LINK=1 BOOST_IOSTREAMS_USE_DEPRECATED $(zlib-requirements) $(bzip2-requirements) $(lzma-requirements) $(zstd-requirements) : : shared:BOOST_IOSTREAMS_DYN_LINK=1 ; boost-install $(libraries-to-install) ;