From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- src/boost/libs/iostreams/build/Jamfile.v2 | 129 +++++++++++++++++++++ .../libs/iostreams/build/has_lzma_cputhreads.cpp | 10 ++ 2 files changed, 139 insertions(+) create mode 100644 src/boost/libs/iostreams/build/Jamfile.v2 create mode 100644 src/boost/libs/iostreams/build/has_lzma_cputhreads.cpp (limited to 'src/boost/libs/iostreams/build') diff --git a/src/boost/libs/iostreams/build/Jamfile.v2 b/src/boost/libs/iostreams/build/Jamfile.v2 new file mode 100644 index 00000000..7ea8a968 --- /dev/null +++ b/src/boost/libs/iostreams/build/Jamfile.v2 @@ -0,0 +1,129 @@ +# 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) ; diff --git a/src/boost/libs/iostreams/build/has_lzma_cputhreads.cpp b/src/boost/libs/iostreams/build/has_lzma_cputhreads.cpp new file mode 100644 index 00000000..7b5a4ccd --- /dev/null +++ b/src/boost/libs/iostreams/build/has_lzma_cputhreads.cpp @@ -0,0 +1,10 @@ +// Copyright 2019 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +#include + +int main() +{ + return lzma_cputhreads(); +} -- cgit v1.2.3