mirror of
https://github.com/boostorg/iostreams.git
synced 2026-02-21 15:12:25 +00:00
101 lines
3.0 KiB
Plaintext
Executable File
101 lines
3.0 KiB
Plaintext
Executable File
# Boost.Iostreams Library zlib 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 zlib data compression library by
|
|
# Jean-loup Gailly and Mark Adler. See http://www.zlib.org/ to obtain zlib
|
|
# if it is not installed on your system, or if you wish to build it with
|
|
# different compiler or linker options.
|
|
|
|
rule zlib_config
|
|
{
|
|
if $(NO_COMPESSION)
|
|
{
|
|
NO_ZLIB = 1 ;
|
|
}
|
|
|
|
if $(NT) && ! $(ZLIB_SOURCE) && ! $(ZLIB_INCLUDE)
|
|
{
|
|
ECHO ****************************************************** ;
|
|
ECHO Building Boost.Iostreams with zlib and gzip support disabled. ;
|
|
ECHO To enable zlib and gzip, consult the Boost.Iostreams documentation ;
|
|
ECHO ****************************************************** ;
|
|
NO_ZLIB = 1 ;
|
|
}
|
|
|
|
if ! $(NO_ZLIB)
|
|
{
|
|
local SOURCES = adler32 compress crc32 deflate inffast
|
|
inflate inftrees trees uncompr zutil ;
|
|
ZLIB_INCLUDE ?= $(ZLIB_SOURCE) ;
|
|
|
|
# define ZLIB_BINARY
|
|
if ! $(ZLIB_SOURCE) && ! $(ZLIB_BINARY)
|
|
{
|
|
if $(NT) && ! [ MATCH (.*gcc.*) : $(TOOLS) ]
|
|
{
|
|
ZLIB_BINARY = "zdll" ;
|
|
}
|
|
else
|
|
{
|
|
ZLIB_BINARY = "z" ;
|
|
}
|
|
}
|
|
|
|
# declare boost_zlib boost_zlib
|
|
if $(ZLIB_SOURCE)
|
|
{
|
|
template zlib_common
|
|
: # sources
|
|
$(ZLIB_SOURCE)/$(SOURCES).c
|
|
: # build requirements
|
|
[ common-names ] # magic for install and auto-link features
|
|
<include>$(ZLIB_INCLUDE)
|
|
: # build variants
|
|
debug release
|
|
;
|
|
|
|
lib boost_zlib
|
|
: # sources
|
|
<template>zlib_common
|
|
: # build requirements
|
|
: # build variants
|
|
;
|
|
|
|
dll boost_zlib
|
|
: # sources
|
|
<template>zlib_common
|
|
: # build requirements
|
|
<define>ZLIB_DLL=1 # tell source we're building dll's
|
|
<runtime-link>dynamic # build only for dynamic runtimes
|
|
: # build variants
|
|
;
|
|
|
|
install zlib lib
|
|
: <lib>boost_zlib
|
|
;
|
|
}
|
|
}
|
|
}
|
|
|
|
zlib_config ;
|
|
|
|
template zlib
|
|
: # sources
|
|
[ unless $(NO_ZLIB) : ../src/zlib.cpp ]
|
|
[ cond $(ZLIB_SOURCE) : <lib>boost_zlib : ]
|
|
: # build requirements
|
|
[ unless $(NO_ZLIB) : <include>$(ZLIB_INCLUDE) ]
|
|
[ unless $(NO_ZLIB) OR $(ZLIB_SOURCE)
|
|
: <define>BOOST_ZLIB_BINARY=$(ZLIB_BINARY) ]
|
|
[ cond $(ZLIB_LIBPATH) : <library-path>$(ZLIB_LIBPATH) : ]
|
|
[ unless $(ZLIB_SOURCE) : <find-library>$(ZLIB_BINARY) : ]
|
|
: # build variants
|
|
;
|
|
|
|
# end
|