diff --git a/libs/iostreams/build/Jamfile.v2 b/libs/iostreams/build/Jamfile.v2 index f998d72..3da99ea 100644 --- a/libs/iostreams/build/Jamfile.v2 +++ b/libs/iostreams/build/Jamfile.v2 @@ -2,6 +2,7 @@ # (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) # (C) Copyright 2004-2007 Jonathan Turkanis +# (C) Copyright 2013 Kohei Takahashi (flast at flast dot jp) # 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.) @@ -20,6 +21,7 @@ project /boost/iostreams : source-location ../src ; import modules ; import os ; import path ; +import project ; local debug = [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] ; for local v in NO_COMPRESSION @@ -131,6 +133,11 @@ rule create-library ( library-name : windows-name unix-name : sources + : requir } } +local here = [ modules.binding $(__name__) ] ; + +project.push-current [ project.current ] ; +project.load [ path.join [ path.make $(here:D) ] ../config ] ; +project.pop-current ; local sources = file_descriptor.cpp mapped_file.cpp ; local z = [ create-library zlib : zll z : adler32 compress @@ -140,7 +147,10 @@ local z = [ create-library zlib : zll z : adler32 compress if $(z) { - sources += boost_zlib zlib.cpp gzip.cpp ; + sources += [ alias has_zlib + : $(z) zlib.cpp gzip.cpp + : [ check-target-builds /boost/compression//has_zlib zlib : : no ] + ] ; } local bz2 = [ create-library bzip2 : libbz2 bz2 : @@ -149,7 +159,10 @@ local bz2 = [ create-library bzip2 : libbz2 bz2 : if $(bz2) { - sources += boost_bzip2 bzip2.cpp ; + sources += [ alias has_bzip2 + : $(bz2) bzip2.cpp + : [ check-target-builds /boost/compression//has_bzip2 bzip2 : : no ] + ] ; } lib boost_iostreams diff --git a/libs/iostreams/config/Jamfile.v2 b/libs/iostreams/config/Jamfile.v2 new file mode 100644 index 0000000..9534308 --- /dev/null +++ b/libs/iostreams/config/Jamfile.v2 @@ -0,0 +1,12 @@ +# Copyright (c) 2013 Kohei Takahashi (flast at flast dot jp) +# 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) + +project /boost/compression ; + +obj has_zlib : /boost/iostreams//boost_zlib zlib.cpp ; +obj has_bzip2 : /boost/iostreams//boost_bzip2 bzip2.cpp ; + +explicit has_zlib ; +explicit has_bzip2 ; diff --git a/libs/iostreams/config/bzip2.cpp b/libs/iostreams/config/bzip2.cpp new file mode 100644 index 0000000..d6e9e22 --- /dev/null +++ b/libs/iostreams/config/bzip2.cpp @@ -0,0 +1,8 @@ +// bzip2.cpp +// +// Copyright (c) 2013 Kohei Takahashi (flast at flast dot jp) +// 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) + +#include "bzlib.h" diff --git a/libs/iostreams/config/zlib.cpp b/libs/iostreams/config/zlib.cpp new file mode 100644 index 0000000..4801151 --- /dev/null +++ b/libs/iostreams/config/zlib.cpp @@ -0,0 +1,8 @@ +// zlib.cpp +// +// Copyright (c) 2013 Kohei Takahashi (flast at flast dot jp) +// 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) + +#include "zlib.h"