summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-03-15 03:25:44 +0200
committerVicent Marti <tanoku@gmail.com>2011-03-15 03:29:20 +0200
commitab6a3d3de5e869253c64c1329ff73c71c2b89209 (patch)
treeb086b9b387a7410594767df5623d8bf54554666e /wscript
parent1ee32c6dd98809e64b4178e0260dca648e287613 (diff)
downloadlibgit2-ab6a3d3de5e869253c64c1329ff73c71c2b89209.tar.gz
Add ZLib as a built-in dependency
I don't know if this is good or bad. This lets libgit2 compile cleanly on any platforms without any external dependencies, but adds a little bit of bloat... Let's test this out and see what happens.
Diffstat (limited to 'wscript')
-rw-r--r--wscript13
1 files changed, 6 insertions, 7 deletions
diff --git a/wscript b/wscript
index f9daca375..d791d932d 100644
--- a/wscript
+++ b/wscript
@@ -16,7 +16,7 @@ CFLAGS_WIN32_L = ['/RELEASE'] # used for /both/ debug and release builds.
# sets the module's checksum in the header.
CFLAGS_WIN32_L_DBG = ['/DEBUG']
-ALL_LIBS = ['z', 'crypto', 'pthread', 'sqlite3']
+ALL_LIBS = ['crypto', 'pthread', 'sqlite3']
def options(opt):
opt.load('compiler_c')
@@ -44,7 +44,6 @@ def configure(conf):
conf.load('compiler_c')
dbg = conf.options.debug
- zlib_name = 'z'
conf.env.CFLAGS = CFLAGS_UNIX + (CFLAGS_UNIX_DBG if dbg else [])
@@ -56,8 +55,7 @@ def configure(conf):
(CFLAGS_WIN32_DBG if dbg else CFLAGS_WIN32_RELEASE)
conf.env.LINKFLAGS += CFLAGS_WIN32_L + \
(CFLAGS_WIN32_L_DBG if dbg else [])
- conf.env.DEFINES += ['WIN32', '_DEBUG', '_LIB', 'ZLIB_WINAPI']
- zlib_name = 'zlibwapi'
+ conf.env.DEFINES += ['WIN32', '_DEBUG', '_LIB']
elif conf.env.CC_NAME == 'gcc':
conf.check_cc(lib='pthread', uselib_store='pthread')
@@ -65,8 +63,8 @@ def configure(conf):
else:
conf.env.PLATFORM = 'unix'
- # check for Z lib
- conf.check_cc(lib=zlib_name, uselib_store='z', install_path=None)
+ # Do not build ZLib with GZIP support
+ conf.env.DEFINES += ['NO_GZIP']
# check for sqlite3
if conf.options.use_sqlite and conf.check_cc(
@@ -139,6 +137,7 @@ def build_library(bld, build_type):
# src/win32/*.c
sources = sources + directory.ant_glob('src/%s/*.c' % bld.env.PLATFORM)
sources = sources + directory.ant_glob('src/backends/*.c')
+ sources = sources + directory.ant_glob('deps/zlib/*.c')
# SHA1 methods source
if bld.env.sha1 == "ppc":
@@ -153,7 +152,7 @@ def build_library(bld, build_type):
BUILD[build_type](
source=sources,
target='git2',
- includes=['src', 'include'],
+ includes=['src', 'include', 'deps/zlib'],
install_path='${LIBDIR}',
use=ALL_LIBS,
vnum=version,