libs/iostreams/build/bzip2.jam
# Boost.Iostreams Library bzip2 Jamfile # (C) Copyright Jonathan Turkanis 2004 # 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. # For use in conjunction with the bzip2 data compression library by # Jean-loup Gailly and Mark Adler. See http://www.bzip2.org/ to obtain bzip2 # if it is not installed on your system, or if you wish to build it with # different compiler or linker options. rule bzip2_config { if $(NO_COMPRESSION) { NO_BZIP2 = 1 ; } if $(NT) && ! $(BZIP2_SOURCE) && ! $(BZIP2_INCLUDE) { ECHO ****************************************************** ; ECHO Building Boost.Iostreams with bzip2 support disabled. ; ECHO To enable bzip2, consult the Boost.Iostreams documentation ; ECHO ****************************************************** ; NO_BZIP2 = 1 ; } if ! $(NO_BZIP2) { local SOURCES = blocksort bzlib compress crctable decompress huffman randtable ; BZIP2_INCLUDE ?= $(BZIP2_SOURCE) ; # define BZIP2_BINARY if ! $(BZIP2_SOURCE) && ! $(BZIP2_BINARY) { if $(NT) && ! [ MATCH (.*gcc.*) : $(TOOLS) ] { WINDOWS = 1 ; BZIP2_BINARY = "libbz2" ; } else { BZIP2_BINARY = "bz2" ; } } # declare boost_bzip2 boost_bzip2 if $(BZIP2_SOURCE) { template bzip2_common : # sources $(BZIP2_SOURCE)/$(SOURCES).c : # build requirements [ common-names ] # magic for install and auto-link features <include>$(BZIP2_INCLUDE) : # build variants debug release ; lib boost_bzip2 : # sources <template>bzip2_common : # build requirements : # build variants ; dll boost_bzip2 : # sources <template>bzip2_common : # build requirements <define>BZIP2_DLL=1 # tell source we're building dll's <runtime-link>dynamic # build only for dynamic runtimes : # build variants ; install bzip2 lib : <lib>boost_bzip2 ; } } } bzip2_config ; template bzip2 : # sources [ unless $(NO_BZIP2) : ../src/bzip2.cpp ] [ cond $(BZIP2_SOURCE) : <lib>boost_bzip2 : ] : # build requirements [ unless $(NO_BZIP2) : <include>$(BZIP2_INCLUDE) ] [ unless $(NO_BZIP2) OR $(BZIP2_SOURCE) : <define>BOOST_BZIP2_BINARY=$(BZIP2_BINARY) ] [ cond $(BZIP2_LIBPATH) : <library-path>$(BZIP2_LIBPATH) : ] [ unless $(BZIP2_SOURCE) : <find-library>$(BZIP2_BINARY) : ] : # build variants ; # end