diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-10-07 01:57:07 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-10-07 02:11:56 -0700 |
commit | f442c1e89e99ae5a0068a2d32e7284c2623f09fd (patch) | |
tree | 1bc659f486af707673c36916c4d75ef7f517dece /configure | |
parent | 518ad0177ae2f1aaefc49285b3536a6bd8d9973c (diff) | |
download | zlib-f442c1e89e99ae5a0068a2d32e7284c2623f09fd.tar.gz zlib-f442c1e89e99ae5a0068a2d32e7284c2623f09fd.tar.bz2 zlib-f442c1e89e99ae5a0068a2d32e7284c2623f09fd.zip |
Add a ./config --solo option to make zlib subset with no libary use
A common request has been the ability to compile zlib to require no
other libraries. This --solo option provides that ability. The price
is that the gz*, compress*, and uncompress functions are eliminated,
and that the user must provide memory allocation and free routines to
deflate and inflate when initializing.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -54,11 +54,14 @@ includedir=${includedir-'${prefix}/include'} | |||
54 | mandir=${mandir-'${prefix}/share/man'} | 54 | mandir=${mandir-'${prefix}/share/man'} |
55 | shared_ext='.so' | 55 | shared_ext='.so' |
56 | shared=1 | 56 | shared=1 |
57 | solo=0 | ||
57 | zprefix=0 | 58 | zprefix=0 |
58 | build64=0 | 59 | build64=0 |
59 | gcc=0 | 60 | gcc=0 |
60 | old_cc="$CC" | 61 | old_cc="$CC" |
61 | old_cflags="$CFLAGS" | 62 | old_cflags="$CFLAGS" |
63 | OBJC='$(OBJZ) $(OBJG)' | ||
64 | PIC_OBJC='$(PIC_OBJZ) $(PIC_OBJG)' | ||
62 | 65 | ||
63 | while test $# -ge 1 | 66 | while test $# -ge 1 |
64 | do | 67 | do |
@@ -81,6 +84,7 @@ case "$1" in | |||
81 | -i* | --includedir) includedir="$2"; shift; shift ;; | 84 | -i* | --includedir) includedir="$2"; shift; shift ;; |
82 | -s* | --shared | --enable-shared) shared=1; shift ;; | 85 | -s* | --shared | --enable-shared) shared=1; shift ;; |
83 | -t | --static) shared=0; shift ;; | 86 | -t | --static) shared=0; shift ;; |
87 | --solo) solo=1; shift ;; | ||
84 | -z* | --zprefix) zprefix=1; shift ;; | 88 | -z* | --zprefix) zprefix=1; shift ;; |
85 | -6* | --64) build64=1; shift ;; | 89 | -6* | --64) build64=1; shift ;; |
86 | -a*=* | --archs=*) ARCHS=`echo $1 | sed 's/.*=//'`; shift ;; | 90 | -a*=* | --archs=*) ARCHS=`echo $1 | sed 's/.*=//'`; shift ;; |
@@ -331,6 +335,16 @@ if test $zprefix -eq 1; then | |||
331 | echo "Using z_ prefix on all symbols." | 335 | echo "Using z_ prefix on all symbols." |
332 | fi | 336 | fi |
333 | 337 | ||
338 | if test $solo -eq 1; then | ||
339 | sed '/#define ZCONF_H/a\ | ||
340 | #define Z_SOLO | ||
341 | |||
342 | ' < zconf.h > zconf.temp.h | ||
343 | mv zconf.temp.h zconf.h | ||
344 | OBJC='$(OBJZ)' | ||
345 | PIC_OBJC='$(PIC_OBJZ)' | ||
346 | fi | ||
347 | |||
334 | cat > $test.c <<EOF | 348 | cat > $test.c <<EOF |
335 | #include <stdio.h> | 349 | #include <stdio.h> |
336 | #include <stdarg.h> | 350 | #include <stdarg.h> |
@@ -589,6 +603,8 @@ sed < Makefile.in " | |||
589 | /^sharedlibdir *=/s#=.*#=$sharedlibdir# | 603 | /^sharedlibdir *=/s#=.*#=$sharedlibdir# |
590 | /^includedir *=/s#=.*#=$includedir# | 604 | /^includedir *=/s#=.*#=$includedir# |
591 | /^mandir *=/s#=.*#=$mandir# | 605 | /^mandir *=/s#=.*#=$mandir# |
606 | /^OBJC *=/s#=.*#= $OBJC# | ||
607 | /^PIC_OBJC *=/s#=.*#= $PIC_OBJC# | ||
592 | /^all: */s#:.*#: $ALL# | 608 | /^all: */s#:.*#: $ALL# |
593 | /^test: */s#:.*#: $TEST# | 609 | /^test: */s#:.*#: $TEST# |
594 | " > Makefile | 610 | " > Makefile |