|
7ef7284…
|
drh
|
1 |
#!/bin/sh |
|
7ef7284…
|
drh
|
2 |
# configure script for zlib. |
|
7ef7284…
|
drh
|
3 |
# |
|
7ef7284…
|
drh
|
4 |
# Normally configure builds both a static and a shared library. |
|
7ef7284…
|
drh
|
5 |
# If you want to build just a static library, use: ./configure --static |
|
7ef7284…
|
drh
|
6 |
# |
|
7ef7284…
|
drh
|
7 |
# To impose specific compiler or flags or install directory, use for example: |
|
7ef7284…
|
drh
|
8 |
# prefix=$HOME CC=cc CFLAGS="-O4" ./configure |
|
7ef7284…
|
drh
|
9 |
# or for csh/tcsh users: |
|
7ef7284…
|
drh
|
10 |
# (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure) |
|
7ef7284…
|
drh
|
11 |
|
|
7ef7284…
|
drh
|
12 |
# Incorrect settings of CC or CFLAGS may prevent creating a shared library. |
|
7ef7284…
|
drh
|
13 |
# If you have problems, try without defining CC and CFLAGS before reporting |
|
7ef7284…
|
drh
|
14 |
# an error. |
|
7ef7284…
|
drh
|
15 |
|
|
7ef7284…
|
drh
|
16 |
# start off configure.log |
|
7ef7284…
|
drh
|
17 |
echo -------------------- >> configure.log |
|
7ef7284…
|
drh
|
18 |
echo $0 $* >> configure.log |
|
7ef7284…
|
drh
|
19 |
date >> configure.log |
|
7ef7284…
|
drh
|
20 |
|
|
e38d5e1…
|
jan.nijtmans
|
21 |
# get source directory |
|
e38d5e1…
|
jan.nijtmans
|
22 |
SRCDIR=`dirname $0` |
|
e38d5e1…
|
jan.nijtmans
|
23 |
if test $SRCDIR = "."; then |
|
e38d5e1…
|
jan.nijtmans
|
24 |
ZINC="" |
|
e38d5e1…
|
jan.nijtmans
|
25 |
ZINCOUT="-I." |
|
e38d5e1…
|
jan.nijtmans
|
26 |
SRCDIR="" |
|
e38d5e1…
|
jan.nijtmans
|
27 |
else |
|
64ce68d…
|
drh
|
28 |
ZINC='-I. -include zconf.h' |
|
e38d5e1…
|
jan.nijtmans
|
29 |
ZINCOUT='-I. -I$(SRCDIR)' |
|
e38d5e1…
|
jan.nijtmans
|
30 |
SRCDIR="$SRCDIR/" |
|
e38d5e1…
|
jan.nijtmans
|
31 |
fi |
|
e38d5e1…
|
jan.nijtmans
|
32 |
|
|
7ef7284…
|
drh
|
33 |
# set command prefix for cross-compilation |
|
7ef7284…
|
drh
|
34 |
if [ -n "${CHOST}" ]; then |
|
a9e589c…
|
florian
|
35 |
uname=${CHOST} |
|
a9e589c…
|
florian
|
36 |
mname=${CHOST} |
|
7ef7284…
|
drh
|
37 |
CROSS_PREFIX="${CHOST}-" |
|
a9e589c…
|
florian
|
38 |
else |
|
a9e589c…
|
florian
|
39 |
mname=`(uname -a || echo unknown) 2>/dev/null` |
|
7ef7284…
|
drh
|
40 |
fi |
|
7ef7284…
|
drh
|
41 |
|
|
7ef7284…
|
drh
|
42 |
# destination name for static library |
|
7ef7284…
|
drh
|
43 |
STATICLIB=libz.a |
|
7ef7284…
|
drh
|
44 |
|
|
7ef7284…
|
drh
|
45 |
# extract zlib version numbers from zlib.h |
|
e38d5e1…
|
jan.nijtmans
|
46 |
VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < ${SRCDIR}zlib.h` |
|
64ce68d…
|
drh
|
47 |
VER3=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\(\\.[0-9]\{1,\}\)\{1,2\}\).*/\1/p'` |
|
64ce68d…
|
drh
|
48 |
VER1=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\)\\..*/\1/p'` |
|
7ef7284…
|
drh
|
49 |
|
|
7ef7284…
|
drh
|
50 |
# establish commands for library building |
|
7ef7284…
|
drh
|
51 |
if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then |
|
7ef7284…
|
drh
|
52 |
AR=${AR-"${CROSS_PREFIX}ar"} |
|
7ef7284…
|
drh
|
53 |
test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log |
|
7ef7284…
|
drh
|
54 |
else |
|
7ef7284…
|
drh
|
55 |
AR=${AR-"ar"} |
|
7ef7284…
|
drh
|
56 |
test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log |
|
7ef7284…
|
drh
|
57 |
fi |
|
7ef7284…
|
drh
|
58 |
ARFLAGS=${ARFLAGS-"rc"} |
|
7ef7284…
|
drh
|
59 |
if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then |
|
7ef7284…
|
drh
|
60 |
RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"} |
|
7ef7284…
|
drh
|
61 |
test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log |
|
7ef7284…
|
drh
|
62 |
else |
|
7ef7284…
|
drh
|
63 |
RANLIB=${RANLIB-"ranlib"} |
|
7ef7284…
|
drh
|
64 |
fi |
|
7ef7284…
|
drh
|
65 |
if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then |
|
7ef7284…
|
drh
|
66 |
NM=${NM-"${CROSS_PREFIX}nm"} |
|
7ef7284…
|
drh
|
67 |
test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log |
|
7ef7284…
|
drh
|
68 |
else |
|
7ef7284…
|
drh
|
69 |
NM=${NM-"nm"} |
|
7ef7284…
|
drh
|
70 |
fi |
|
7ef7284…
|
drh
|
71 |
|
|
7ef7284…
|
drh
|
72 |
# set defaults before processing command line options |
|
7ef7284…
|
drh
|
73 |
LDCONFIG=${LDCONFIG-"ldconfig"} |
|
7ef7284…
|
drh
|
74 |
LDSHAREDLIBC="${LDSHAREDLIBC--lc}" |
|
7ef7284…
|
drh
|
75 |
ARCHS= |
|
7ef7284…
|
drh
|
76 |
prefix=${prefix-/usr/local} |
|
7ef7284…
|
drh
|
77 |
exec_prefix=${exec_prefix-'${prefix}'} |
|
7ef7284…
|
drh
|
78 |
libdir=${libdir-'${exec_prefix}/lib'} |
|
7ef7284…
|
drh
|
79 |
sharedlibdir=${sharedlibdir-'${libdir}'} |
|
7ef7284…
|
drh
|
80 |
includedir=${includedir-'${prefix}/include'} |
|
7ef7284…
|
drh
|
81 |
mandir=${mandir-'${prefix}/share/man'} |
|
7ef7284…
|
drh
|
82 |
shared_ext='.so' |
|
7ef7284…
|
drh
|
83 |
shared=1 |
|
7ef7284…
|
drh
|
84 |
solo=0 |
|
7ef7284…
|
drh
|
85 |
cover=0 |
|
7ef7284…
|
drh
|
86 |
zprefix=0 |
|
bb4776e…
|
jan.nijtmans
|
87 |
zconst=0 |
|
7ef7284…
|
drh
|
88 |
build64=0 |
|
7ef7284…
|
drh
|
89 |
gcc=0 |
|
6ea30fb…
|
florian
|
90 |
clang=0 |
|
e38d5e1…
|
jan.nijtmans
|
91 |
warn=0 |
|
e38d5e1…
|
jan.nijtmans
|
92 |
debug=0 |
|
f1f1d6c…
|
drh
|
93 |
address=0 |
|
f1f1d6c…
|
drh
|
94 |
memory=0 |
|
6ea30fb…
|
florian
|
95 |
undefined=0 |
|
6ea30fb…
|
florian
|
96 |
insecure=0 |
|
6ea30fb…
|
florian
|
97 |
unknown=0 |
|
6ea30fb…
|
florian
|
98 |
enable_crcvx=1 |
|
7ef7284…
|
drh
|
99 |
old_cc="$CC" |
|
7ef7284…
|
drh
|
100 |
old_cflags="$CFLAGS" |
|
7ef7284…
|
drh
|
101 |
OBJC='$(OBJZ) $(OBJG)' |
|
7ef7284…
|
drh
|
102 |
PIC_OBJC='$(PIC_OBJZ) $(PIC_OBJG)' |
|
bb4776e…
|
jan.nijtmans
|
103 |
|
|
bb4776e…
|
jan.nijtmans
|
104 |
# leave this script, optionally in a bad way |
|
bb4776e…
|
jan.nijtmans
|
105 |
leave() |
|
bb4776e…
|
jan.nijtmans
|
106 |
{ |
|
bb4776e…
|
jan.nijtmans
|
107 |
if test "$*" != "0"; then |
|
bb4776e…
|
jan.nijtmans
|
108 |
echo "** $0 aborting." | tee -a configure.log |
|
bb4776e…
|
jan.nijtmans
|
109 |
fi |
|
f1f1d6c…
|
drh
|
110 |
rm -rf $test.[co] $test $test$shared_ext $test.gcno $test.dSYM ./--version |
|
bb4776e…
|
jan.nijtmans
|
111 |
echo -------------------- >> configure.log |
|
bb4776e…
|
jan.nijtmans
|
112 |
echo >> configure.log |
|
bb4776e…
|
jan.nijtmans
|
113 |
echo >> configure.log |
|
bb4776e…
|
jan.nijtmans
|
114 |
exit $1 |
|
bb4776e…
|
jan.nijtmans
|
115 |
} |
|
7ef7284…
|
drh
|
116 |
|
|
7ef7284…
|
drh
|
117 |
# process command line options |
|
7ef7284…
|
drh
|
118 |
while test $# -ge 1 |
|
7ef7284…
|
drh
|
119 |
do |
|
7ef7284…
|
drh
|
120 |
case "$1" in |
|
7ef7284…
|
drh
|
121 |
-h* | --help) |
|
7ef7284…
|
drh
|
122 |
echo 'usage:' | tee -a configure.log |
|
bb4776e…
|
jan.nijtmans
|
123 |
echo ' configure [--const] [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]' | tee -a configure.log |
|
6ea30fb…
|
florian
|
124 |
echo ' [--insecure] [--static] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]' | tee -a configure.log |
|
6ea30fb…
|
florian
|
125 |
echo ' [--includedir=INCLUDEDIR] [--mandir=MANDIR]' | tee -a configure.log |
|
6ea30fb…
|
florian
|
126 |
echo ' [--archs="-arch i386 -arch x86_64"] [--disable-crcvx]' | tee -a configure.log |
|
7ef7284…
|
drh
|
127 |
exit 0 ;; |
|
6ea30fb…
|
florian
|
128 |
-p*=* | --prefix=*) prefix=`echo $1 | sed 's/[^=]*=//'`; shift ;; |
|
6ea30fb…
|
florian
|
129 |
-e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[^=]*=//'`; shift ;; |
|
6ea30fb…
|
florian
|
130 |
-l*=* | --libdir=*) libdir=`echo $1 | sed 's/[^=]*=//'`; shift ;; |
|
6ea30fb…
|
florian
|
131 |
--sharedlibdir=*) sharedlibdir=`echo $1 | sed 's/[^=]*=//'`; shift ;; |
|
6ea30fb…
|
florian
|
132 |
-i*=* | --includedir=*) includedir=`echo $1 | sed 's/[^=]*=//'`;shift ;; |
|
6ea30fb…
|
florian
|
133 |
-m*=* | --mandir=*) mandir=`echo $1 | sed 's/[^=]*=//'`;shift ;; |
|
6ea30fb…
|
florian
|
134 |
-u*=* | --uname=*) uname=`echo $1 | sed 's/[^=]*=//'`;shift ;; |
|
7ef7284…
|
drh
|
135 |
-p* | --prefix) prefix="$2"; shift; shift ;; |
|
7ef7284…
|
drh
|
136 |
-e* | --eprefix) exec_prefix="$2"; shift; shift ;; |
|
7ef7284…
|
drh
|
137 |
-l* | --libdir) libdir="$2"; shift; shift ;; |
|
6ea30fb…
|
florian
|
138 |
--sharedlibdir) sharedlibdir="$2"; shift; shift ;; |
|
7ef7284…
|
drh
|
139 |
-i* | --includedir) includedir="$2"; shift; shift ;; |
|
6ea30fb…
|
florian
|
140 |
-m* | --mandir) mandir="$2"; shift; shift ;; |
|
6ea30fb…
|
florian
|
141 |
-u* | --uname) uname="$2"; shift; shift ;; |
|
7ef7284…
|
drh
|
142 |
-s* | --shared | --enable-shared) shared=1; shift ;; |
|
6ea30fb…
|
florian
|
143 |
-t | --static | --disable-shared) shared=0; shift ;; |
|
7ef7284…
|
drh
|
144 |
--solo) solo=1; shift ;; |
|
7ef7284…
|
drh
|
145 |
--cover) cover=1; shift ;; |
|
7ef7284…
|
drh
|
146 |
-z* | --zprefix) zprefix=1; shift ;; |
|
7ef7284…
|
drh
|
147 |
-6* | --64) build64=1; shift ;; |
|
6ea30fb…
|
florian
|
148 |
-a*=* | --archs=*) ARCHS=`echo $1 | sed 's/[^=]*=//'`; shift ;; |
|
6ea30fb…
|
florian
|
149 |
-a* | --archs) ARCHS="$2"; shift; shift ;; |
|
7ef7284…
|
drh
|
150 |
--sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;; |
|
7ef7284…
|
drh
|
151 |
--localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;; |
|
bb4776e…
|
jan.nijtmans
|
152 |
-c* | --const) zconst=1; shift ;; |
|
6ea30fb…
|
florian
|
153 |
-w* | --warn) warn=$((warn + 1)); shift ;; |
|
e38d5e1…
|
jan.nijtmans
|
154 |
-d* | --debug) debug=1; shift ;; |
|
f1f1d6c…
|
drh
|
155 |
--sanitize) address=1; shift ;; |
|
f1f1d6c…
|
drh
|
156 |
--address) address=1; shift ;; |
|
f1f1d6c…
|
drh
|
157 |
--memory) memory=1; shift ;; |
|
6ea30fb…
|
florian
|
158 |
--undefined) undefined=1; shift ;; |
|
6ea30fb…
|
florian
|
159 |
--insecure) insecure=1; shift ;; |
|
6ea30fb…
|
florian
|
160 |
--disable-crcvx) enable_crcvx=0; shift ;; |
|
6ea30fb…
|
florian
|
161 |
*) unknown=1; echo "unknown option ignored: $1" | tee -a configure.log; shift;; |
|
7ef7284…
|
drh
|
162 |
esac |
|
7ef7284…
|
drh
|
163 |
done |
|
6ea30fb…
|
florian
|
164 |
if test $unknown -eq 1; then |
|
6ea30fb…
|
florian
|
165 |
echo "$0 --help for help" | tee -a configure.log |
|
6ea30fb…
|
florian
|
166 |
fi |
|
7ef7284…
|
drh
|
167 |
|
|
bb4776e…
|
jan.nijtmans
|
168 |
# temporary file name |
|
7ef7284…
|
drh
|
169 |
test=ztest$$ |
|
7ef7284…
|
drh
|
170 |
|
|
bb4776e…
|
jan.nijtmans
|
171 |
# put arguments in log, also put test file in log if used in arguments |
|
7ef7284…
|
drh
|
172 |
show() |
|
7ef7284…
|
drh
|
173 |
{ |
|
7ef7284…
|
drh
|
174 |
case "$*" in |
|
7ef7284…
|
drh
|
175 |
*$test.c*) |
|
7ef7284…
|
drh
|
176 |
echo === $test.c === >> configure.log |
|
7ef7284…
|
drh
|
177 |
cat $test.c >> configure.log |
|
7ef7284…
|
drh
|
178 |
echo === >> configure.log;; |
|
7ef7284…
|
drh
|
179 |
esac |
|
7ef7284…
|
drh
|
180 |
echo $* >> configure.log |
|
7ef7284…
|
drh
|
181 |
} |
|
7ef7284…
|
drh
|
182 |
|
|
7ef7284…
|
drh
|
183 |
# check for gcc vs. cc and set compile and link flags based on the system identified by uname |
|
7ef7284…
|
drh
|
184 |
cat > $test.c <<EOF |
|
7ef7284…
|
drh
|
185 |
extern int getchar(); |
|
7ef7284…
|
drh
|
186 |
int hello() {return getchar();} |
|
7ef7284…
|
drh
|
187 |
EOF |
|
7ef7284…
|
drh
|
188 |
|
|
adb9e8e…
|
drh
|
189 |
if test -z "$CC"; then |
|
adb9e8e…
|
drh
|
190 |
echo Checking for ${CROSS_PREFIX}gcc... | tee -a configure.log |
|
adb9e8e…
|
drh
|
191 |
if ${CROSS_PREFIX}gcc -v >/dev/null 2>&1; then |
|
adb9e8e…
|
drh
|
192 |
cc=${CROSS_PREFIX}gcc |
|
adb9e8e…
|
drh
|
193 |
else |
|
adb9e8e…
|
drh
|
194 |
cc=${CROSS_PREFIX}cc |
|
adb9e8e…
|
drh
|
195 |
fi |
|
a9e589c…
|
florian
|
196 |
else |
|
a9e589c…
|
florian
|
197 |
cc=${CC} |
|
adb9e8e…
|
drh
|
198 |
fi |
|
a9e589c…
|
florian
|
199 |
|
|
7ef7284…
|
drh
|
200 |
case "$cc" in |
|
6ea30fb…
|
florian
|
201 |
*gcc*) gcc=1 |
|
6ea30fb…
|
florian
|
202 |
GCOV="gcov" ;; |
|
6ea30fb…
|
florian
|
203 |
*clang*) gcc=1 |
|
6ea30fb…
|
florian
|
204 |
clang=1 ;; |
|
7ef7284…
|
drh
|
205 |
esac |
|
7ef7284…
|
drh
|
206 |
case `$cc -v 2>&1` in |
|
6ea30fb…
|
florian
|
207 |
*gcc*) gcc=1 |
|
6ea30fb…
|
florian
|
208 |
GCOV="gcov" ;; |
|
6ea30fb…
|
florian
|
209 |
*clang*) gcc=1 |
|
6ea30fb…
|
florian
|
210 |
clang=1 ;; |
|
7ef7284…
|
drh
|
211 |
esac |
|
6ea30fb…
|
florian
|
212 |
|
|
6ea30fb…
|
florian
|
213 |
if test $cover -eq 1; then |
|
6ea30fb…
|
florian
|
214 |
if test "$clang" -eq 1; then |
|
6ea30fb…
|
florian
|
215 |
if test "$cc" = "clang"; then |
|
6ea30fb…
|
florian
|
216 |
if command -v llvm-cov >/dev/null 2>&1; then |
|
6ea30fb…
|
florian
|
217 |
GCOV="llvm-cov" |
|
6ea30fb…
|
florian
|
218 |
LLVM_GCOV_FLAG="gcov" |
|
6ea30fb…
|
florian
|
219 |
GCOV="llvm-cov" |
|
6ea30fb…
|
florian
|
220 |
LLVM_GCOV_FLAG="gcov" |
|
6ea30fb…
|
florian
|
221 |
echo "Using ${GCOV} for coverage" |
|
6ea30fb…
|
florian
|
222 |
else |
|
6ea30fb…
|
florian
|
223 |
cover=0 |
|
6ea30fb…
|
florian
|
224 |
GCOV="" |
|
6ea30fb…
|
florian
|
225 |
LLVM_GCOV_FLAG="" |
|
6ea30fb…
|
florian
|
226 |
echo "Deactivating cover as no suitable gcov can be found" |
|
6ea30fb…
|
florian
|
227 |
fi |
|
6ea30fb…
|
florian
|
228 |
else |
|
6ea30fb…
|
florian
|
229 |
clangV=`echo "$cc" | sed -e 's/^.*-//'` |
|
6ea30fb…
|
florian
|
230 |
if command -v llvm-cov-${clangV} >/dev/null 2>&1; then |
|
6ea30fb…
|
florian
|
231 |
GCOV="llvm-cov-${clangV}" |
|
6ea30fb…
|
florian
|
232 |
LLVM_GCOV_FLAG="gcov" |
|
6ea30fb…
|
florian
|
233 |
echo "Using ${GCOV} for coverage" |
|
6ea30fb…
|
florian
|
234 |
else |
|
6ea30fb…
|
florian
|
235 |
cover=0 |
|
6ea30fb…
|
florian
|
236 |
GCOV="" |
|
6ea30fb…
|
florian
|
237 |
LLVM_GCOV_FLAG="" |
|
6ea30fb…
|
florian
|
238 |
echo "Deactivating cover as no suitable gcov can be found" |
|
6ea30fb…
|
florian
|
239 |
fi |
|
6ea30fb…
|
florian
|
240 |
fi |
|
6ea30fb…
|
florian
|
241 |
fi |
|
6ea30fb…
|
florian
|
242 |
fi |
|
bb4776e…
|
jan.nijtmans
|
243 |
|
|
bb4776e…
|
jan.nijtmans
|
244 |
show $cc -c $test.c |
|
bb4776e…
|
jan.nijtmans
|
245 |
if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then |
|
7ef7284…
|
drh
|
246 |
echo ... using gcc >> configure.log |
|
7ef7284…
|
drh
|
247 |
CC="$cc" |
|
6ea30fb…
|
florian
|
248 |
CFLAGS="${CFLAGS--O3} -fPIC" |
|
6ea30fb…
|
florian
|
249 |
SFLAGS="${CFLAGS--O3}" |
|
e38d5e1…
|
jan.nijtmans
|
250 |
if test "$ARCHS"; then |
|
e38d5e1…
|
jan.nijtmans
|
251 |
CFLAGS="${CFLAGS} ${ARCHS}" |
|
6ea30fb…
|
florian
|
252 |
SFLAGS="${SFLAGS} ${ARCHS}" |
|
e38d5e1…
|
jan.nijtmans
|
253 |
LDFLAGS="${LDFLAGS} ${ARCHS}" |
|
e38d5e1…
|
jan.nijtmans
|
254 |
fi |
|
7ef7284…
|
drh
|
255 |
if test $build64 -eq 1; then |
|
7ef7284…
|
drh
|
256 |
CFLAGS="${CFLAGS} -m64" |
|
7ef7284…
|
drh
|
257 |
SFLAGS="${SFLAGS} -m64" |
|
7ef7284…
|
drh
|
258 |
fi |
|
6ea30fb…
|
florian
|
259 |
if test "$warn" -ge 1; then |
|
6ea30fb…
|
florian
|
260 |
CFLAGS="${CFLAGS} -Wall -Wextra" |
|
6ea30fb…
|
florian
|
261 |
if test "$warn" -ge 2; then |
|
6ea30fb…
|
florian
|
262 |
CFLAGS="${CFLAGS} -Wconversion -Wshadow -Wundef" |
|
6ea30fb…
|
florian
|
263 |
fi |
|
6ea30fb…
|
florian
|
264 |
fi |
|
6ea30fb…
|
florian
|
265 |
if test "$zconst" -eq 1; then |
|
6ea30fb…
|
florian
|
266 |
if test "$warn" -ge 1; then |
|
6ea30fb…
|
florian
|
267 |
CFLAGS="${CFLAGS} -Wcast-qual" |
|
f1f1d6c…
|
drh
|
268 |
fi |
|
6ea30fb…
|
florian
|
269 |
CFLAGS="${CFLAGS} -DZLIB_CONST" |
|
f1f1d6c…
|
drh
|
270 |
fi |
|
f1f1d6c…
|
drh
|
271 |
if test $address -eq 1; then |
|
f1f1d6c…
|
drh
|
272 |
CFLAGS="${CFLAGS} -g -fsanitize=address -fno-omit-frame-pointer" |
|
f1f1d6c…
|
drh
|
273 |
fi |
|
f1f1d6c…
|
drh
|
274 |
if test $memory -eq 1; then |
|
f1f1d6c…
|
drh
|
275 |
CFLAGS="${CFLAGS} -g -fsanitize=memory -fno-omit-frame-pointer" |
|
6ea30fb…
|
florian
|
276 |
fi |
|
6ea30fb…
|
florian
|
277 |
if test $undefined -eq 1; then |
|
6ea30fb…
|
florian
|
278 |
CFLAGS="${CFLAGS} -g -fsanitize=undefined -fno-omit-frame-pointer" |
|
6ea30fb…
|
florian
|
279 |
fi |
|
6ea30fb…
|
florian
|
280 |
if test $insecure -eq 1; then |
|
6ea30fb…
|
florian
|
281 |
CFLAGS="${CFLAGS} -DZLIB_INSECURE" |
|
6ea30fb…
|
florian
|
282 |
SFLAGS="${SFLAGS} -DZLIB_INSECURE" |
|
e38d5e1…
|
jan.nijtmans
|
283 |
fi |
|
e38d5e1…
|
jan.nijtmans
|
284 |
if test $debug -eq 1; then |
|
e38d5e1…
|
jan.nijtmans
|
285 |
CFLAGS="${CFLAGS} -DZLIB_DEBUG" |
|
e38d5e1…
|
jan.nijtmans
|
286 |
SFLAGS="${SFLAGS} -DZLIB_DEBUG" |
|
7ef7284…
|
drh
|
287 |
fi |
|
7ef7284…
|
drh
|
288 |
if test -z "$uname"; then |
|
7ef7284…
|
drh
|
289 |
uname=`(uname -s || echo unknown) 2>/dev/null` |
|
7ef7284…
|
drh
|
290 |
fi |
|
7ef7284…
|
drh
|
291 |
case "$uname" in |
|
6ea30fb…
|
florian
|
292 |
Linux* | linux* | *-linux* | GNU | GNU/* | solaris* | Haiku) |
|
a9e589c…
|
florian
|
293 |
case "$mname" in |
|
a9e589c…
|
florian
|
294 |
*sparc*) |
|
a9e589c…
|
florian
|
295 |
LDFLAGS="${LDFLAGS} -Wl,--no-warn-rwx-segments" ;; |
|
a9e589c…
|
florian
|
296 |
esac |
|
e38d5e1…
|
jan.nijtmans
|
297 |
LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;; |
|
7ef7284…
|
drh
|
298 |
*BSD | *bsd* | DragonFly) |
|
e38d5e1…
|
jan.nijtmans
|
299 |
LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} |
|
7ef7284…
|
drh
|
300 |
LDCONFIG="ldconfig -m" ;; |
|
a9e589c…
|
florian
|
301 |
CYGWIN* | Cygwin* | cygwin* | *-cygwin* | OS/2*) |
|
7ef7284…
|
drh
|
302 |
EXE='.exe' ;; |
|
a9e589c…
|
florian
|
303 |
MINGW* | mingw* | *-mingw*) |
|
7ef7284…
|
drh
|
304 |
rm -f $test.[co] $test $test$shared_ext |
|
a9e589c…
|
florian
|
305 |
echo "If this doesn't work for you, try win32/Makefile.gcc." | tee -a configure.log |
|
7ef7284…
|
drh
|
306 |
LDSHARED=${LDSHARED-"$cc -shared"} |
|
7ef7284…
|
drh
|
307 |
LDSHAREDLIBC="" |
|
7ef7284…
|
drh
|
308 |
EXE='.exe' ;; |
|
a9e589c…
|
florian
|
309 |
QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 |
|
a9e589c…
|
florian
|
310 |
# ([email protected]) |
|
a9e589c…
|
florian
|
311 |
LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;; |
|
7ef7284…
|
drh
|
312 |
HP-UX*) |
|
a9e589c…
|
florian
|
313 |
LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"} |
|
a9e589c…
|
florian
|
314 |
case `(uname -m || echo unknown) 2>/dev/null` in |
|
a9e589c…
|
florian
|
315 |
ia64) |
|
a9e589c…
|
florian
|
316 |
shared_ext='.so' |
|
a9e589c…
|
florian
|
317 |
SHAREDLIB='libz.so' ;; |
|
a9e589c…
|
florian
|
318 |
*) |
|
a9e589c…
|
florian
|
319 |
shared_ext='.sl' |
|
a9e589c…
|
florian
|
320 |
SHAREDLIB='libz.sl' ;; |
|
a9e589c…
|
florian
|
321 |
esac ;; |
|
a9e589c…
|
florian
|
322 |
AIX*) |
|
6ea30fb…
|
florian
|
323 |
LDSHARED=${LDSHARED-"$cc -shared"} |
|
a9e589c…
|
florian
|
324 |
LDFLAGS="${LDFLAGS} -Wl,-brtl" ;; |
|
a9e589c…
|
florian
|
325 |
Darwin* | darwin* | *-darwin*) |
|
a9e589c…
|
florian
|
326 |
shared_ext='.dylib' |
|
a9e589c…
|
florian
|
327 |
SHAREDLIB=libz$shared_ext |
|
a9e589c…
|
florian
|
328 |
SHAREDLIBV=libz.$VER$shared_ext |
|
a9e589c…
|
florian
|
329 |
SHAREDLIBM=libz.$VER1$shared_ext |
|
64ce68d…
|
drh
|
330 |
LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"} |
|
f1f1d6c…
|
drh
|
331 |
if "${CROSS_PREFIX}libtool" -V 2>&1 | grep Apple > /dev/null; then |
|
f1f1d6c…
|
drh
|
332 |
AR="${CROSS_PREFIX}libtool" |
|
f1f1d6c…
|
drh
|
333 |
elif libtool -V 2>&1 | grep Apple > /dev/null; then |
|
a9e589c…
|
florian
|
334 |
AR="libtool" |
|
a9e589c…
|
florian
|
335 |
else |
|
a9e589c…
|
florian
|
336 |
AR="/usr/bin/libtool" |
|
a9e589c…
|
florian
|
337 |
fi |
|
a9e589c…
|
florian
|
338 |
ARFLAGS="-o" ;; |
|
a9e589c…
|
florian
|
339 |
*) |
|
a9e589c…
|
florian
|
340 |
LDSHARED=${LDSHARED-"$cc -shared"} ;; |
|
7ef7284…
|
drh
|
341 |
esac |
|
7ef7284…
|
drh
|
342 |
else |
|
7ef7284…
|
drh
|
343 |
# find system name and corresponding cc options |
|
7ef7284…
|
drh
|
344 |
CC=${CC-cc} |
|
7ef7284…
|
drh
|
345 |
gcc=0 |
|
7ef7284…
|
drh
|
346 |
echo ... using $CC >> configure.log |
|
7ef7284…
|
drh
|
347 |
if test -z "$uname"; then |
|
7ef7284…
|
drh
|
348 |
uname=`(uname -sr || echo unknown) 2>/dev/null` |
|
7ef7284…
|
drh
|
349 |
fi |
|
7ef7284…
|
drh
|
350 |
case "$uname" in |
|
7ef7284…
|
drh
|
351 |
HP-UX*) SFLAGS=${CFLAGS-"-O +z"} |
|
7ef7284…
|
drh
|
352 |
CFLAGS=${CFLAGS-"-O"} |
|
7ef7284…
|
drh
|
353 |
# LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"} |
|
7ef7284…
|
drh
|
354 |
LDSHARED=${LDSHARED-"ld -b"} |
|
7ef7284…
|
drh
|
355 |
case `(uname -m || echo unknown) 2>/dev/null` in |
|
7ef7284…
|
drh
|
356 |
ia64) |
|
7ef7284…
|
drh
|
357 |
shared_ext='.so' |
|
7ef7284…
|
drh
|
358 |
SHAREDLIB='libz.so' ;; |
|
7ef7284…
|
drh
|
359 |
*) |
|
7ef7284…
|
drh
|
360 |
shared_ext='.sl' |
|
7ef7284…
|
drh
|
361 |
SHAREDLIB='libz.sl' ;; |
|
7ef7284…
|
drh
|
362 |
esac ;; |
|
7ef7284…
|
drh
|
363 |
IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} |
|
7ef7284…
|
drh
|
364 |
CFLAGS=${CFLAGS-"-ansi -O2"} |
|
7ef7284…
|
drh
|
365 |
LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;; |
|
7ef7284…
|
drh
|
366 |
OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"} |
|
7ef7284…
|
drh
|
367 |
CFLAGS=${CFLAGS-"-O -std1"} |
|
7ef7284…
|
drh
|
368 |
LDFLAGS="${LDFLAGS} -Wl,-rpath,." |
|
7ef7284…
|
drh
|
369 |
LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"} ;; |
|
7ef7284…
|
drh
|
370 |
OSF1*) SFLAGS=${CFLAGS-"-O -std1"} |
|
7ef7284…
|
drh
|
371 |
CFLAGS=${CFLAGS-"-O -std1"} |
|
7ef7284…
|
drh
|
372 |
LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;; |
|
7ef7284…
|
drh
|
373 |
QNX*) SFLAGS=${CFLAGS-"-4 -O"} |
|
7ef7284…
|
drh
|
374 |
CFLAGS=${CFLAGS-"-4 -O"} |
|
7ef7284…
|
drh
|
375 |
LDSHARED=${LDSHARED-"cc"} |
|
7ef7284…
|
drh
|
376 |
RANLIB=${RANLIB-"true"} |
|
7ef7284…
|
drh
|
377 |
AR="cc" |
|
7ef7284…
|
drh
|
378 |
ARFLAGS="-A" ;; |
|
7ef7284…
|
drh
|
379 |
SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} |
|
7ef7284…
|
drh
|
380 |
CFLAGS=${CFLAGS-"-O3"} |
|
7ef7284…
|
drh
|
381 |
LDSHARED=${LDSHARED-"cc -dy -KPIC -G"} ;; |
|
7ef7284…
|
drh
|
382 |
SunOS\ 5* | solaris*) |
|
7ef7284…
|
drh
|
383 |
LDSHARED=${LDSHARED-"cc -G -h libz$shared_ext.$VER1"} |
|
7ef7284…
|
drh
|
384 |
SFLAGS=${CFLAGS-"-fast -KPIC"} |
|
7ef7284…
|
drh
|
385 |
CFLAGS=${CFLAGS-"-fast"} |
|
7ef7284…
|
drh
|
386 |
if test $build64 -eq 1; then |
|
7ef7284…
|
drh
|
387 |
# old versions of SunPRO/Workshop/Studio don't support -m64, |
|
7ef7284…
|
drh
|
388 |
# but newer ones do. Check for it. |
|
7ef7284…
|
drh
|
389 |
flag64=`$CC -flags | egrep -- '^-m64'` |
|
7ef7284…
|
drh
|
390 |
if test x"$flag64" != x"" ; then |
|
7ef7284…
|
drh
|
391 |
CFLAGS="${CFLAGS} -m64" |
|
7ef7284…
|
drh
|
392 |
SFLAGS="${SFLAGS} -m64" |
|
7ef7284…
|
drh
|
393 |
else |
|
7ef7284…
|
drh
|
394 |
case `(uname -m || echo unknown) 2>/dev/null` in |
|
7ef7284…
|
drh
|
395 |
i86*) |
|
7ef7284…
|
drh
|
396 |
SFLAGS="$SFLAGS -xarch=amd64" |
|
7ef7284…
|
drh
|
397 |
CFLAGS="$CFLAGS -xarch=amd64" ;; |
|
7ef7284…
|
drh
|
398 |
*) |
|
7ef7284…
|
drh
|
399 |
SFLAGS="$SFLAGS -xarch=v9" |
|
7ef7284…
|
drh
|
400 |
CFLAGS="$CFLAGS -xarch=v9" ;; |
|
7ef7284…
|
drh
|
401 |
esac |
|
7ef7284…
|
drh
|
402 |
fi |
|
7ef7284…
|
drh
|
403 |
fi |
|
e38d5e1…
|
jan.nijtmans
|
404 |
if test -n "$ZINC"; then |
|
e38d5e1…
|
jan.nijtmans
|
405 |
ZINC='-I- -I. -I$(SRCDIR)' |
|
e38d5e1…
|
jan.nijtmans
|
406 |
fi |
|
7ef7284…
|
drh
|
407 |
;; |
|
7ef7284…
|
drh
|
408 |
SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} |
|
7ef7284…
|
drh
|
409 |
CFLAGS=${CFLAGS-"-O2"} |
|
7ef7284…
|
drh
|
410 |
LDSHARED=${LDSHARED-"ld"} ;; |
|
7ef7284…
|
drh
|
411 |
SunStudio\ 9*) SFLAGS=${CFLAGS-"-fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"} |
|
7ef7284…
|
drh
|
412 |
CFLAGS=${CFLAGS-"-fast -xtarget=ultra3 -xarch=v9b"} |
|
7ef7284…
|
drh
|
413 |
LDSHARED=${LDSHARED-"cc -xarch=v9b"} ;; |
|
7ef7284…
|
drh
|
414 |
UNIX_System_V\ 4.2.0) |
|
7ef7284…
|
drh
|
415 |
SFLAGS=${CFLAGS-"-KPIC -O"} |
|
7ef7284…
|
drh
|
416 |
CFLAGS=${CFLAGS-"-O"} |
|
7ef7284…
|
drh
|
417 |
LDSHARED=${LDSHARED-"cc -G"} ;; |
|
7ef7284…
|
drh
|
418 |
UNIX_SV\ 4.2MP) |
|
7ef7284…
|
drh
|
419 |
SFLAGS=${CFLAGS-"-Kconform_pic -O"} |
|
7ef7284…
|
drh
|
420 |
CFLAGS=${CFLAGS-"-O"} |
|
7ef7284…
|
drh
|
421 |
LDSHARED=${LDSHARED-"cc -G"} ;; |
|
7ef7284…
|
drh
|
422 |
OpenUNIX\ 5) |
|
7ef7284…
|
drh
|
423 |
SFLAGS=${CFLAGS-"-KPIC -O"} |
|
7ef7284…
|
drh
|
424 |
CFLAGS=${CFLAGS-"-O"} |
|
7ef7284…
|
drh
|
425 |
LDSHARED=${LDSHARED-"cc -G"} ;; |
|
7ef7284…
|
drh
|
426 |
AIX*) # Courtesy of [email protected] |
|
7ef7284…
|
drh
|
427 |
SFLAGS=${CFLAGS-"-O -qmaxmem=8192"} |
|
7ef7284…
|
drh
|
428 |
CFLAGS=${CFLAGS-"-O -qmaxmem=8192"} |
|
6ea30fb…
|
florian
|
429 |
LDSHARED=${LDSHARED-"xlc -G"} |
|
6ea30fb…
|
florian
|
430 |
if test $build64 -eq 1; then |
|
6ea30fb…
|
florian
|
431 |
CFLAGS="${CFLAGS} -q64" |
|
6ea30fb…
|
florian
|
432 |
SFLAGS="${SFLAGS} -q64" |
|
6ea30fb…
|
florian
|
433 |
ARFLAGS="-X64 ${ARFLAGS}" |
|
6ea30fb…
|
florian
|
434 |
fi ;; |
|
7ef7284…
|
drh
|
435 |
# send working options for other systems to [email protected] |
|
7ef7284…
|
drh
|
436 |
*) SFLAGS=${CFLAGS-"-O"} |
|
7ef7284…
|
drh
|
437 |
CFLAGS=${CFLAGS-"-O"} |
|
7ef7284…
|
drh
|
438 |
LDSHARED=${LDSHARED-"cc -shared"} ;; |
|
7ef7284…
|
drh
|
439 |
esac |
|
7ef7284…
|
drh
|
440 |
fi |
|
7ef7284…
|
drh
|
441 |
|
|
7ef7284…
|
drh
|
442 |
# destination names for shared library if not defined above |
|
7ef7284…
|
drh
|
443 |
SHAREDLIB=${SHAREDLIB-"libz$shared_ext"} |
|
7ef7284…
|
drh
|
444 |
SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"} |
|
7ef7284…
|
drh
|
445 |
SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"} |
|
7ef7284…
|
drh
|
446 |
|
|
7ef7284…
|
drh
|
447 |
echo >> configure.log |
|
7ef7284…
|
drh
|
448 |
|
|
bb4776e…
|
jan.nijtmans
|
449 |
# define functions for testing compiler and library characteristics and logging the results |
|
bb4776e…
|
jan.nijtmans
|
450 |
|
|
bb4776e…
|
jan.nijtmans
|
451 |
cat > $test.c <<EOF |
|
bb4776e…
|
jan.nijtmans
|
452 |
#error error |
|
bb4776e…
|
jan.nijtmans
|
453 |
EOF |
|
bb4776e…
|
jan.nijtmans
|
454 |
if ($CC -c $CFLAGS $test.c) 2>/dev/null; then |
|
bb4776e…
|
jan.nijtmans
|
455 |
try() |
|
bb4776e…
|
jan.nijtmans
|
456 |
{ |
|
bb4776e…
|
jan.nijtmans
|
457 |
show $* |
|
bb4776e…
|
jan.nijtmans
|
458 |
test "`( $* ) 2>&1 | tee -a configure.log`" = "" |
|
bb4776e…
|
jan.nijtmans
|
459 |
} |
|
bb4776e…
|
jan.nijtmans
|
460 |
echo - using any output from compiler to indicate an error >> configure.log |
|
bb4776e…
|
jan.nijtmans
|
461 |
else |
|
e38d5e1…
|
jan.nijtmans
|
462 |
try() |
|
e38d5e1…
|
jan.nijtmans
|
463 |
{ |
|
e38d5e1…
|
jan.nijtmans
|
464 |
show $* |
|
adb9e8e…
|
drh
|
465 |
got=`( $* ) 2>&1` |
|
e38d5e1…
|
jan.nijtmans
|
466 |
ret=$? |
|
adb9e8e…
|
drh
|
467 |
if test "$got" != ""; then |
|
adb9e8e…
|
drh
|
468 |
printf "%s\n" "$got" >> configure.log |
|
adb9e8e…
|
drh
|
469 |
fi |
|
e38d5e1…
|
jan.nijtmans
|
470 |
if test $ret -ne 0; then |
|
e38d5e1…
|
jan.nijtmans
|
471 |
echo "(exit code "$ret")" >> configure.log |
|
e38d5e1…
|
jan.nijtmans
|
472 |
fi |
|
e38d5e1…
|
jan.nijtmans
|
473 |
return $ret |
|
e38d5e1…
|
jan.nijtmans
|
474 |
} |
|
bb4776e…
|
jan.nijtmans
|
475 |
fi |
|
bb4776e…
|
jan.nijtmans
|
476 |
|
|
bb4776e…
|
jan.nijtmans
|
477 |
tryboth() |
|
bb4776e…
|
jan.nijtmans
|
478 |
{ |
|
bb4776e…
|
jan.nijtmans
|
479 |
show $* |
|
bb4776e…
|
jan.nijtmans
|
480 |
got=`( $* ) 2>&1` |
|
bb4776e…
|
jan.nijtmans
|
481 |
ret=$? |
|
adb9e8e…
|
drh
|
482 |
if test "$got" != ""; then |
|
adb9e8e…
|
drh
|
483 |
printf "%s\n" "$got" >> configure.log |
|
adb9e8e…
|
drh
|
484 |
fi |
|
bb4776e…
|
jan.nijtmans
|
485 |
if test $ret -ne 0; then |
|
adb9e8e…
|
drh
|
486 |
echo "(exit code "$ret")" >> configure.log |
|
bb4776e…
|
jan.nijtmans
|
487 |
return $ret |
|
bb4776e…
|
jan.nijtmans
|
488 |
fi |
|
bb4776e…
|
jan.nijtmans
|
489 |
test "$got" = "" |
|
bb4776e…
|
jan.nijtmans
|
490 |
} |
|
bb4776e…
|
jan.nijtmans
|
491 |
|
|
bb4776e…
|
jan.nijtmans
|
492 |
cat > $test.c << EOF |
|
bb4776e…
|
jan.nijtmans
|
493 |
int foo() { return 0; } |
|
bb4776e…
|
jan.nijtmans
|
494 |
EOF |
|
6ea30fb…
|
florian
|
495 |
echo "Checking for compiler..." >> configure.log |
|
6ea30fb…
|
florian
|
496 |
if try $CC -c $test.c; then |
|
6ea30fb…
|
florian
|
497 |
: |
|
6ea30fb…
|
florian
|
498 |
else |
|
6ea30fb…
|
florian
|
499 |
echo "Missing or broken C compiler." | tee -a configure.log |
|
6ea30fb…
|
florian
|
500 |
leave 1 |
|
6ea30fb…
|
florian
|
501 |
fi |
|
bb4776e…
|
jan.nijtmans
|
502 |
echo "Checking for obsessive-compulsive compiler options..." >> configure.log |
|
bb4776e…
|
jan.nijtmans
|
503 |
if try $CC -c $CFLAGS $test.c; then |
|
bb4776e…
|
jan.nijtmans
|
504 |
: |
|
bb4776e…
|
jan.nijtmans
|
505 |
else |
|
bb4776e…
|
jan.nijtmans
|
506 |
echo "Compiler error reporting is too harsh for $0 (perhaps remove -Werror)." | tee -a configure.log |
|
bb4776e…
|
jan.nijtmans
|
507 |
leave 1 |
|
bb4776e…
|
jan.nijtmans
|
508 |
fi |
|
bb4776e…
|
jan.nijtmans
|
509 |
|
|
bb4776e…
|
jan.nijtmans
|
510 |
echo >> configure.log |
|
bb4776e…
|
jan.nijtmans
|
511 |
|
|
7ef7284…
|
drh
|
512 |
# see if shared library build supported |
|
bb4776e…
|
jan.nijtmans
|
513 |
cat > $test.c <<EOF |
|
bb4776e…
|
jan.nijtmans
|
514 |
extern int getchar(); |
|
bb4776e…
|
jan.nijtmans
|
515 |
int hello() {return getchar();} |
|
bb4776e…
|
jan.nijtmans
|
516 |
EOF |
|
7ef7284…
|
drh
|
517 |
if test $shared -eq 1; then |
|
7ef7284…
|
drh
|
518 |
echo Checking for shared library support... | tee -a configure.log |
|
7ef7284…
|
drh
|
519 |
# we must test in two steps (cc then ld), required at least on SunOS 4.x |
|
64ce68d…
|
drh
|
520 |
if try $CC -c $SFLAGS $test.c && |
|
6ea30fb…
|
florian
|
521 |
try $LDSHARED $SFLAGS $LDFLAGS -o $test$shared_ext $test.o; then |
|
7ef7284…
|
drh
|
522 |
echo Building shared library $SHAREDLIBV with $CC. | tee -a configure.log |
|
7ef7284…
|
drh
|
523 |
elif test -z "$old_cc" -a -z "$old_cflags"; then |
|
7ef7284…
|
drh
|
524 |
echo No shared library support. | tee -a configure.log |
|
7ef7284…
|
drh
|
525 |
shared=0; |
|
7ef7284…
|
drh
|
526 |
else |
|
7ef7284…
|
drh
|
527 |
echo 'No shared library support; try without defining CC and CFLAGS' | tee -a configure.log |
|
7ef7284…
|
drh
|
528 |
shared=0; |
|
7ef7284…
|
drh
|
529 |
fi |
|
7ef7284…
|
drh
|
530 |
fi |
|
7ef7284…
|
drh
|
531 |
if test $shared -eq 0; then |
|
7ef7284…
|
drh
|
532 |
LDSHARED="$CC" |
|
7ef7284…
|
drh
|
533 |
ALL="static" |
|
7ef7284…
|
drh
|
534 |
TEST="all teststatic" |
|
7ef7284…
|
drh
|
535 |
SHAREDLIB="" |
|
7ef7284…
|
drh
|
536 |
SHAREDLIBV="" |
|
7ef7284…
|
drh
|
537 |
SHAREDLIBM="" |
|
7ef7284…
|
drh
|
538 |
echo Building static library $STATICLIB version $VER with $CC. | tee -a configure.log |
|
7ef7284…
|
drh
|
539 |
else |
|
7ef7284…
|
drh
|
540 |
ALL="static shared" |
|
7ef7284…
|
drh
|
541 |
TEST="all teststatic testshared" |
|
7ef7284…
|
drh
|
542 |
fi |
|
7ef7284…
|
drh
|
543 |
|
|
e38d5e1…
|
jan.nijtmans
|
544 |
echo >> configure.log |
|
e38d5e1…
|
jan.nijtmans
|
545 |
|
|
e38d5e1…
|
jan.nijtmans
|
546 |
# check for size_t |
|
e38d5e1…
|
jan.nijtmans
|
547 |
cat > $test.c <<EOF |
|
e38d5e1…
|
jan.nijtmans
|
548 |
#include <stdio.h> |
|
e38d5e1…
|
jan.nijtmans
|
549 |
#include <stdlib.h> |
|
e38d5e1…
|
jan.nijtmans
|
550 |
size_t dummy = 0; |
|
e38d5e1…
|
jan.nijtmans
|
551 |
EOF |
|
e38d5e1…
|
jan.nijtmans
|
552 |
if try $CC -c $CFLAGS $test.c; then |
|
e38d5e1…
|
jan.nijtmans
|
553 |
echo "Checking for size_t... Yes." | tee -a configure.log |
|
e38d5e1…
|
jan.nijtmans
|
554 |
else |
|
e38d5e1…
|
jan.nijtmans
|
555 |
echo "Checking for size_t... No." | tee -a configure.log |
|
adb9e8e…
|
drh
|
556 |
# find a size_t integer type |
|
adb9e8e…
|
drh
|
557 |
# check for long long |
|
adb9e8e…
|
drh
|
558 |
cat > $test.c << EOF |
|
e38d5e1…
|
jan.nijtmans
|
559 |
long long dummy = 0; |
|
e38d5e1…
|
jan.nijtmans
|
560 |
EOF |
|
e38d5e1…
|
jan.nijtmans
|
561 |
if try $CC -c $CFLAGS $test.c; then |
|
e38d5e1…
|
jan.nijtmans
|
562 |
echo "Checking for long long... Yes." | tee -a configure.log |
|
e38d5e1…
|
jan.nijtmans
|
563 |
cat > $test.c <<EOF |
|
e38d5e1…
|
jan.nijtmans
|
564 |
#include <stdio.h> |
|
e38d5e1…
|
jan.nijtmans
|
565 |
int main(void) { |
|
e38d5e1…
|
jan.nijtmans
|
566 |
if (sizeof(void *) <= sizeof(int)) puts("int"); |
|
e38d5e1…
|
jan.nijtmans
|
567 |
else if (sizeof(void *) <= sizeof(long)) puts("long"); |
|
e38d5e1…
|
jan.nijtmans
|
568 |
else puts("z_longlong"); |
|
e38d5e1…
|
jan.nijtmans
|
569 |
return 0; |
|
e38d5e1…
|
jan.nijtmans
|
570 |
} |
|
e38d5e1…
|
jan.nijtmans
|
571 |
EOF |
|
e38d5e1…
|
jan.nijtmans
|
572 |
else |
|
e38d5e1…
|
jan.nijtmans
|
573 |
echo "Checking for long long... No." | tee -a configure.log |
|
e38d5e1…
|
jan.nijtmans
|
574 |
cat > $test.c <<EOF |
|
e38d5e1…
|
jan.nijtmans
|
575 |
#include <stdio.h> |
|
e38d5e1…
|
jan.nijtmans
|
576 |
int main(void) { |
|
e38d5e1…
|
jan.nijtmans
|
577 |
if (sizeof(void *) <= sizeof(int)) puts("int"); |
|
e38d5e1…
|
jan.nijtmans
|
578 |
else puts("long"); |
|
e38d5e1…
|
jan.nijtmans
|
579 |
return 0; |
|
e38d5e1…
|
jan.nijtmans
|
580 |
} |
|
e38d5e1…
|
jan.nijtmans
|
581 |
EOF |
|
e38d5e1…
|
jan.nijtmans
|
582 |
fi |
|
6ea30fb…
|
florian
|
583 |
if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then |
|
e38d5e1…
|
jan.nijtmans
|
584 |
sizet=`./$test` |
|
e38d5e1…
|
jan.nijtmans
|
585 |
echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log |
|
adb9e8e…
|
drh
|
586 |
CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}" |
|
adb9e8e…
|
drh
|
587 |
SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}" |
|
e38d5e1…
|
jan.nijtmans
|
588 |
else |
|
adb9e8e…
|
drh
|
589 |
echo "Checking for a pointer-size integer type... not found." | tee -a configure.log |
|
adb9e8e…
|
drh
|
590 |
fi |
|
e38d5e1…
|
jan.nijtmans
|
591 |
fi |
|
7ef7284…
|
drh
|
592 |
|
|
7ef7284…
|
drh
|
593 |
echo >> configure.log |
|
7ef7284…
|
drh
|
594 |
|
|
7ef7284…
|
drh
|
595 |
# check for large file support, and if none, check for fseeko() |
|
7ef7284…
|
drh
|
596 |
cat > $test.c <<EOF |
|
7ef7284…
|
drh
|
597 |
#include <sys/types.h> |
|
7ef7284…
|
drh
|
598 |
off64_t dummy = 0; |
|
7ef7284…
|
drh
|
599 |
EOF |
|
7ef7284…
|
drh
|
600 |
if try $CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c; then |
|
7ef7284…
|
drh
|
601 |
CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1" |
|
7ef7284…
|
drh
|
602 |
SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1" |
|
7ef7284…
|
drh
|
603 |
ALL="${ALL} all64" |
|
7ef7284…
|
drh
|
604 |
TEST="${TEST} test64" |
|
7ef7284…
|
drh
|
605 |
echo "Checking for off64_t... Yes." | tee -a configure.log |
|
7ef7284…
|
drh
|
606 |
echo "Checking for fseeko... Yes." | tee -a configure.log |
|
7ef7284…
|
drh
|
607 |
else |
|
7ef7284…
|
drh
|
608 |
echo "Checking for off64_t... No." | tee -a configure.log |
|
7ef7284…
|
drh
|
609 |
echo >> configure.log |
|
7ef7284…
|
drh
|
610 |
cat > $test.c <<EOF |
|
7ef7284…
|
drh
|
611 |
#include <stdio.h> |
|
7ef7284…
|
drh
|
612 |
int main(void) { |
|
7ef7284…
|
drh
|
613 |
fseeko(NULL, 0, 0); |
|
7ef7284…
|
drh
|
614 |
return 0; |
|
7ef7284…
|
drh
|
615 |
} |
|
7ef7284…
|
drh
|
616 |
EOF |
|
6ea30fb…
|
florian
|
617 |
if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then |
|
7ef7284…
|
drh
|
618 |
echo "Checking for fseeko... Yes." | tee -a configure.log |
|
7ef7284…
|
drh
|
619 |
else |
|
7ef7284…
|
drh
|
620 |
CFLAGS="${CFLAGS} -DNO_FSEEKO" |
|
7ef7284…
|
drh
|
621 |
SFLAGS="${SFLAGS} -DNO_FSEEKO" |
|
7ef7284…
|
drh
|
622 |
echo "Checking for fseeko... No." | tee -a configure.log |
|
7ef7284…
|
drh
|
623 |
fi |
|
7ef7284…
|
drh
|
624 |
fi |
|
7ef7284…
|
drh
|
625 |
|
|
7ef7284…
|
drh
|
626 |
echo >> configure.log |
|
7ef7284…
|
drh
|
627 |
|
|
7ef7284…
|
drh
|
628 |
# check for strerror() for use by gz* functions |
|
7ef7284…
|
drh
|
629 |
cat > $test.c <<EOF |
|
7ef7284…
|
drh
|
630 |
#include <string.h> |
|
7ef7284…
|
drh
|
631 |
#include <errno.h> |
|
7ef7284…
|
drh
|
632 |
int main() { return strlen(strerror(errno)); } |
|
7ef7284…
|
drh
|
633 |
EOF |
|
6ea30fb…
|
florian
|
634 |
if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then |
|
7ef7284…
|
drh
|
635 |
echo "Checking for strerror... Yes." | tee -a configure.log |
|
7ef7284…
|
drh
|
636 |
else |
|
7ef7284…
|
drh
|
637 |
CFLAGS="${CFLAGS} -DNO_STRERROR" |
|
7ef7284…
|
drh
|
638 |
SFLAGS="${SFLAGS} -DNO_STRERROR" |
|
7ef7284…
|
drh
|
639 |
echo "Checking for strerror... No." | tee -a configure.log |
|
7ef7284…
|
drh
|
640 |
fi |
|
7ef7284…
|
drh
|
641 |
|
|
7ef7284…
|
drh
|
642 |
# copy clean zconf.h for subsequent edits |
|
e38d5e1…
|
jan.nijtmans
|
643 |
cp -p ${SRCDIR}zconf.h.in zconf.h |
|
7ef7284…
|
drh
|
644 |
|
|
7ef7284…
|
drh
|
645 |
echo >> configure.log |
|
7ef7284…
|
drh
|
646 |
|
|
7ef7284…
|
drh
|
647 |
# check for unistd.h and save result in zconf.h |
|
7ef7284…
|
drh
|
648 |
cat > $test.c <<EOF |
|
7ef7284…
|
drh
|
649 |
#include <unistd.h> |
|
7ef7284…
|
drh
|
650 |
int main() { return 0; } |
|
7ef7284…
|
drh
|
651 |
EOF |
|
7ef7284…
|
drh
|
652 |
if try $CC -c $CFLAGS $test.c; then |
|
6ea30fb…
|
florian
|
653 |
sed < zconf.h "/^#if HAVE_UNISTD_H-0.* may be/s/ HAVE_UNISTD_H-0\(.*\) may be/ 1\1 was/" > zconf.temp.h |
|
7ef7284…
|
drh
|
654 |
mv zconf.temp.h zconf.h |
|
7ef7284…
|
drh
|
655 |
echo "Checking for unistd.h... Yes." | tee -a configure.log |
|
7ef7284…
|
drh
|
656 |
else |
|
7ef7284…
|
drh
|
657 |
echo "Checking for unistd.h... No." | tee -a configure.log |
|
7ef7284…
|
drh
|
658 |
fi |
|
7ef7284…
|
drh
|
659 |
|
|
7ef7284…
|
drh
|
660 |
echo >> configure.log |
|
7ef7284…
|
drh
|
661 |
|
|
7ef7284…
|
drh
|
662 |
# check for stdarg.h and save result in zconf.h |
|
7ef7284…
|
drh
|
663 |
cat > $test.c <<EOF |
|
7ef7284…
|
drh
|
664 |
#include <stdarg.h> |
|
7ef7284…
|
drh
|
665 |
int main() { return 0; } |
|
7ef7284…
|
drh
|
666 |
EOF |
|
7ef7284…
|
drh
|
667 |
if try $CC -c $CFLAGS $test.c; then |
|
6ea30fb…
|
florian
|
668 |
sed < zconf.h "/^#if HAVE_STDARG_H-0.* may be/s/ HAVE_STDARG_H-0\(.*\) may be/ 1\1 was/" > zconf.temp.h |
|
7ef7284…
|
drh
|
669 |
mv zconf.temp.h zconf.h |
|
7ef7284…
|
drh
|
670 |
echo "Checking for stdarg.h... Yes." | tee -a configure.log |
|
7ef7284…
|
drh
|
671 |
else |
|
7ef7284…
|
drh
|
672 |
echo "Checking for stdarg.h... No." | tee -a configure.log |
|
7ef7284…
|
drh
|
673 |
fi |
|
7ef7284…
|
drh
|
674 |
|
|
7ef7284…
|
drh
|
675 |
# if the z_ prefix was requested, save that in zconf.h |
|
7ef7284…
|
drh
|
676 |
if test $zprefix -eq 1; then |
|
7ef7284…
|
drh
|
677 |
sed < zconf.h "/#ifdef Z_PREFIX.* may be/s/def Z_PREFIX\(.*\) may be/ 1\1 was/" > zconf.temp.h |
|
7ef7284…
|
drh
|
678 |
mv zconf.temp.h zconf.h |
|
7ef7284…
|
drh
|
679 |
echo >> configure.log |
|
7ef7284…
|
drh
|
680 |
echo "Using z_ prefix on all symbols." | tee -a configure.log |
|
7ef7284…
|
drh
|
681 |
fi |
|
7ef7284…
|
drh
|
682 |
|
|
7ef7284…
|
drh
|
683 |
# if --solo compilation was requested, save that in zconf.h and remove gz stuff from object lists |
|
7ef7284…
|
drh
|
684 |
if test $solo -eq 1; then |
|
7ef7284…
|
drh
|
685 |
sed '/#define ZCONF_H/a\ |
|
7ef7284…
|
drh
|
686 |
#define Z_SOLO |
|
7ef7284…
|
drh
|
687 |
|
|
7ef7284…
|
drh
|
688 |
' < zconf.h > zconf.temp.h |
|
7ef7284…
|
drh
|
689 |
mv zconf.temp.h zconf.h |
|
7ef7284…
|
drh
|
690 |
OBJC='$(OBJZ)' |
|
7ef7284…
|
drh
|
691 |
PIC_OBJC='$(PIC_OBJZ)' |
|
7ef7284…
|
drh
|
692 |
fi |
|
7ef7284…
|
drh
|
693 |
|
|
7ef7284…
|
drh
|
694 |
# if code coverage testing was requested, use older gcc if defined, e.g. "gcc-4.2" on Mac OS X |
|
7ef7284…
|
drh
|
695 |
if test $cover -eq 1; then |
|
7ef7284…
|
drh
|
696 |
if test -n "$GCC_CLASSIC"; then |
|
7ef7284…
|
drh
|
697 |
CC=$GCC_CLASSIC |
|
7ef7284…
|
drh
|
698 |
fi |
|
7ef7284…
|
drh
|
699 |
fi |
|
7ef7284…
|
drh
|
700 |
|
|
7ef7284…
|
drh
|
701 |
echo >> configure.log |
|
7ef7284…
|
drh
|
702 |
|
|
7ef7284…
|
drh
|
703 |
# conduct a series of tests to resolve eight possible cases of using "vs" or "s" printf functions |
|
7ef7284…
|
drh
|
704 |
# (using stdarg or not), with or without "n" (proving size of buffer), and with or without a |
|
7ef7284…
|
drh
|
705 |
# return value. The most secure result is vsnprintf() with a return value. snprintf() with a |
|
7ef7284…
|
drh
|
706 |
# return value is secure as well, but then gzprintf() will be limited to 20 arguments. |
|
7ef7284…
|
drh
|
707 |
cat > $test.c <<EOF |
|
7ef7284…
|
drh
|
708 |
#include <stdio.h> |
|
7ef7284…
|
drh
|
709 |
#include <stdarg.h> |
|
7ef7284…
|
drh
|
710 |
#include "zconf.h" |
|
7ef7284…
|
drh
|
711 |
int main() |
|
7ef7284…
|
drh
|
712 |
{ |
|
7ef7284…
|
drh
|
713 |
#ifndef STDC |
|
7ef7284…
|
drh
|
714 |
choke me |
|
7ef7284…
|
drh
|
715 |
#endif |
|
7ef7284…
|
drh
|
716 |
return 0; |
|
7ef7284…
|
drh
|
717 |
} |
|
7ef7284…
|
drh
|
718 |
EOF |
|
7ef7284…
|
drh
|
719 |
if try $CC -c $CFLAGS $test.c; then |
|
7ef7284…
|
drh
|
720 |
echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()." | tee -a configure.log |
|
7ef7284…
|
drh
|
721 |
|
|
7ef7284…
|
drh
|
722 |
echo >> configure.log |
|
7ef7284…
|
drh
|
723 |
cat > $test.c <<EOF |
|
7ef7284…
|
drh
|
724 |
#include <stdio.h> |
|
7ef7284…
|
drh
|
725 |
#include <stdarg.h> |
|
7ef7284…
|
drh
|
726 |
int mytest(const char *fmt, ...) |
|
7ef7284…
|
drh
|
727 |
{ |
|
7ef7284…
|
drh
|
728 |
char buf[20]; |
|
7ef7284…
|
drh
|
729 |
va_list ap; |
|
7ef7284…
|
drh
|
730 |
va_start(ap, fmt); |
|
7ef7284…
|
drh
|
731 |
vsnprintf(buf, sizeof(buf), fmt, ap); |
|
7ef7284…
|
drh
|
732 |
va_end(ap); |
|
7ef7284…
|
drh
|
733 |
return 0; |
|
7ef7284…
|
drh
|
734 |
} |
|
7ef7284…
|
drh
|
735 |
int main() |
|
7ef7284…
|
drh
|
736 |
{ |
|
7ef7284…
|
drh
|
737 |
return (mytest("Hello%d\n", 1)); |
|
7ef7284…
|
drh
|
738 |
} |
|
7ef7284…
|
drh
|
739 |
EOF |
|
6ea30fb…
|
florian
|
740 |
if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then |
|
7ef7284…
|
drh
|
741 |
echo "Checking for vsnprintf() in stdio.h... Yes." | tee -a configure.log |
|
7ef7284…
|
drh
|
742 |
|
|
7ef7284…
|
drh
|
743 |
echo >> configure.log |
|
7ef7284…
|
drh
|
744 |
cat >$test.c <<EOF |
|
7ef7284…
|
drh
|
745 |
#include <stdio.h> |
|
7ef7284…
|
drh
|
746 |
#include <stdarg.h> |
|
7ef7284…
|
drh
|
747 |
int mytest(const char *fmt, ...) |
|
7ef7284…
|
drh
|
748 |
{ |
|
7ef7284…
|
drh
|
749 |
int n; |
|
7ef7284…
|
drh
|
750 |
char buf[20]; |
|
7ef7284…
|
drh
|
751 |
va_list ap; |
|
7ef7284…
|
drh
|
752 |
va_start(ap, fmt); |
|
7ef7284…
|
drh
|
753 |
n = vsnprintf(buf, sizeof(buf), fmt, ap); |
|
7ef7284…
|
drh
|
754 |
va_end(ap); |
|
7ef7284…
|
drh
|
755 |
return n; |
|
7ef7284…
|
drh
|
756 |
} |
|
7ef7284…
|
drh
|
757 |
int main() |
|
7ef7284…
|
drh
|
758 |
{ |
|
7ef7284…
|
drh
|
759 |
return (mytest("Hello%d\n", 1)); |
|
7ef7284…
|
drh
|
760 |
} |
|
7ef7284…
|
drh
|
761 |
EOF |
|
7ef7284…
|
drh
|
762 |
|
|
7ef7284…
|
drh
|
763 |
if try $CC -c $CFLAGS $test.c; then |
|
7ef7284…
|
drh
|
764 |
echo "Checking for return value of vsnprintf()... Yes." | tee -a configure.log |
|
7ef7284…
|
drh
|
765 |
else |
|
7ef7284…
|
drh
|
766 |
CFLAGS="$CFLAGS -DHAS_vsnprintf_void" |
|
7ef7284…
|
drh
|
767 |
SFLAGS="$SFLAGS -DHAS_vsnprintf_void" |
|
7ef7284…
|
drh
|
768 |
echo "Checking for return value of vsnprintf()... No." | tee -a configure.log |
|
7ef7284…
|
drh
|
769 |
echo " WARNING: apparently vsnprintf() does not return a value. zlib" | tee -a configure.log |
|
7ef7284…
|
drh
|
770 |
echo " can build but will be open to possible string-format security" | tee -a configure.log |
|
7ef7284…
|
drh
|
771 |
echo " vulnerabilities." | tee -a configure.log |
|
7ef7284…
|
drh
|
772 |
fi |
|
7ef7284…
|
drh
|
773 |
else |
|
7ef7284…
|
drh
|
774 |
CFLAGS="$CFLAGS -DNO_vsnprintf" |
|
7ef7284…
|
drh
|
775 |
SFLAGS="$SFLAGS -DNO_vsnprintf" |
|
7ef7284…
|
drh
|
776 |
echo "Checking for vsnprintf() in stdio.h... No." | tee -a configure.log |
|
7ef7284…
|
drh
|
777 |
echo " WARNING: vsnprintf() not found, falling back to vsprintf(). zlib" | tee -a configure.log |
|
7ef7284…
|
drh
|
778 |
echo " can build but will be open to possible buffer-overflow security" | tee -a configure.log |
|
7ef7284…
|
drh
|
779 |
echo " vulnerabilities." | tee -a configure.log |
|
6ea30fb…
|
florian
|
780 |
if test $insecure -ne 1; then |
|
6ea30fb…
|
florian
|
781 |
echo " The --insecure option must be provided to ./configure in order to" | tee -a configure.log |
|
6ea30fb…
|
florian
|
782 |
echo " compile using the insecure vsprintf() function." | tee -a configure.log |
|
6ea30fb…
|
florian
|
783 |
fi |
|
7ef7284…
|
drh
|
784 |
echo >> configure.log |
|
7ef7284…
|
drh
|
785 |
cat >$test.c <<EOF |
|
7ef7284…
|
drh
|
786 |
#include <stdio.h> |
|
7ef7284…
|
drh
|
787 |
#include <stdarg.h> |
|
7ef7284…
|
drh
|
788 |
int mytest(const char *fmt, ...) |
|
7ef7284…
|
drh
|
789 |
{ |
|
7ef7284…
|
drh
|
790 |
int n; |
|
7ef7284…
|
drh
|
791 |
char buf[20]; |
|
7ef7284…
|
drh
|
792 |
va_list ap; |
|
7ef7284…
|
drh
|
793 |
va_start(ap, fmt); |
|
7ef7284…
|
drh
|
794 |
n = vsprintf(buf, fmt, ap); |
|
7ef7284…
|
drh
|
795 |
va_end(ap); |
|
7ef7284…
|
drh
|
796 |
return n; |
|
7ef7284…
|
drh
|
797 |
} |
|
7ef7284…
|
drh
|
798 |
int main() |
|
7ef7284…
|
drh
|
799 |
{ |
|
7ef7284…
|
drh
|
800 |
return (mytest("Hello%d\n", 1)); |
|
7ef7284…
|
drh
|
801 |
} |
|
7ef7284…
|
drh
|
802 |
EOF |
|
7ef7284…
|
drh
|
803 |
|
|
7ef7284…
|
drh
|
804 |
if try $CC -c $CFLAGS $test.c; then |
|
7ef7284…
|
drh
|
805 |
echo "Checking for return value of vsprintf()... Yes." | tee -a configure.log |
|
7ef7284…
|
drh
|
806 |
else |
|
7ef7284…
|
drh
|
807 |
CFLAGS="$CFLAGS -DHAS_vsprintf_void" |
|
7ef7284…
|
drh
|
808 |
SFLAGS="$SFLAGS -DHAS_vsprintf_void" |
|
7ef7284…
|
drh
|
809 |
echo "Checking for return value of vsprintf()... No." | tee -a configure.log |
|
7ef7284…
|
drh
|
810 |
echo " WARNING: apparently vsprintf() does not return a value. zlib" | tee -a configure.log |
|
7ef7284…
|
drh
|
811 |
echo " can build but will be open to possible string-format security" | tee -a configure.log |
|
7ef7284…
|
drh
|
812 |
echo " vulnerabilities." | tee -a configure.log |
|
7ef7284…
|
drh
|
813 |
fi |
|
7ef7284…
|
drh
|
814 |
fi |
|
7ef7284…
|
drh
|
815 |
else |
|
7ef7284…
|
drh
|
816 |
echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()." | tee -a configure.log |
|
7ef7284…
|
drh
|
817 |
|
|
7ef7284…
|
drh
|
818 |
echo >> configure.log |
|
7ef7284…
|
drh
|
819 |
cat >$test.c <<EOF |
|
7ef7284…
|
drh
|
820 |
#include <stdio.h> |
|
7ef7284…
|
drh
|
821 |
int mytest() |
|
7ef7284…
|
drh
|
822 |
{ |
|
7ef7284…
|
drh
|
823 |
char buf[20]; |
|
7ef7284…
|
drh
|
824 |
snprintf(buf, sizeof(buf), "%s", "foo"); |
|
7ef7284…
|
drh
|
825 |
return 0; |
|
7ef7284…
|
drh
|
826 |
} |
|
7ef7284…
|
drh
|
827 |
int main() |
|
7ef7284…
|
drh
|
828 |
{ |
|
7ef7284…
|
drh
|
829 |
return (mytest()); |
|
7ef7284…
|
drh
|
830 |
} |
|
7ef7284…
|
drh
|
831 |
EOF |
|
7ef7284…
|
drh
|
832 |
|
|
6ea30fb…
|
florian
|
833 |
if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then |
|
7ef7284…
|
drh
|
834 |
echo "Checking for snprintf() in stdio.h... Yes." | tee -a configure.log |
|
7ef7284…
|
drh
|
835 |
|
|
7ef7284…
|
drh
|
836 |
echo >> configure.log |
|
7ef7284…
|
drh
|
837 |
cat >$test.c <<EOF |
|
7ef7284…
|
drh
|
838 |
#include <stdio.h> |
|
7ef7284…
|
drh
|
839 |
int mytest() |
|
7ef7284…
|
drh
|
840 |
{ |
|
7ef7284…
|
drh
|
841 |
char buf[20]; |
|
7ef7284…
|
drh
|
842 |
return snprintf(buf, sizeof(buf), "%s", "foo"); |
|
7ef7284…
|
drh
|
843 |
} |
|
7ef7284…
|
drh
|
844 |
int main() |
|
7ef7284…
|
drh
|
845 |
{ |
|
7ef7284…
|
drh
|
846 |
return (mytest()); |
|
7ef7284…
|
drh
|
847 |
} |
|
7ef7284…
|
drh
|
848 |
EOF |
|
7ef7284…
|
drh
|
849 |
|
|
7ef7284…
|
drh
|
850 |
if try $CC -c $CFLAGS $test.c; then |
|
7ef7284…
|
drh
|
851 |
echo "Checking for return value of snprintf()... Yes." | tee -a configure.log |
|
7ef7284…
|
drh
|
852 |
else |
|
7ef7284…
|
drh
|
853 |
CFLAGS="$CFLAGS -DHAS_snprintf_void" |
|
7ef7284…
|
drh
|
854 |
SFLAGS="$SFLAGS -DHAS_snprintf_void" |
|
7ef7284…
|
drh
|
855 |
echo "Checking for return value of snprintf()... No." | tee -a configure.log |
|
7ef7284…
|
drh
|
856 |
echo " WARNING: apparently snprintf() does not return a value. zlib" | tee -a configure.log |
|
7ef7284…
|
drh
|
857 |
echo " can build but will be open to possible string-format security" | tee -a configure.log |
|
7ef7284…
|
drh
|
858 |
echo " vulnerabilities." | tee -a configure.log |
|
7ef7284…
|
drh
|
859 |
fi |
|
7ef7284…
|
drh
|
860 |
else |
|
7ef7284…
|
drh
|
861 |
CFLAGS="$CFLAGS -DNO_snprintf" |
|
7ef7284…
|
drh
|
862 |
SFLAGS="$SFLAGS -DNO_snprintf" |
|
7ef7284…
|
drh
|
863 |
echo "Checking for snprintf() in stdio.h... No." | tee -a configure.log |
|
7ef7284…
|
drh
|
864 |
echo " WARNING: snprintf() not found, falling back to sprintf(). zlib" | tee -a configure.log |
|
7ef7284…
|
drh
|
865 |
echo " can build but will be open to possible buffer-overflow security" | tee -a configure.log |
|
7ef7284…
|
drh
|
866 |
echo " vulnerabilities." | tee -a configure.log |
|
6ea30fb…
|
florian
|
867 |
if test $insecure -ne 1; then |
|
6ea30fb…
|
florian
|
868 |
echo " The --insecure option must be provided to ./configure in order to" | tee -a configure.log |
|
6ea30fb…
|
florian
|
869 |
echo " compile using the insecure sprintf() function." | tee -a configure.log |
|
6ea30fb…
|
florian
|
870 |
fi |
|
7ef7284…
|
drh
|
871 |
echo >> configure.log |
|
7ef7284…
|
drh
|
872 |
cat >$test.c <<EOF |
|
7ef7284…
|
drh
|
873 |
#include <stdio.h> |
|
7ef7284…
|
drh
|
874 |
int mytest() |
|
7ef7284…
|
drh
|
875 |
{ |
|
7ef7284…
|
drh
|
876 |
char buf[20]; |
|
7ef7284…
|
drh
|
877 |
return sprintf(buf, "%s", "foo"); |
|
7ef7284…
|
drh
|
878 |
} |
|
7ef7284…
|
drh
|
879 |
int main() |
|
7ef7284…
|
drh
|
880 |
{ |
|
7ef7284…
|
drh
|
881 |
return (mytest()); |
|
7ef7284…
|
drh
|
882 |
} |
|
7ef7284…
|
drh
|
883 |
EOF |
|
7ef7284…
|
drh
|
884 |
|
|
7ef7284…
|
drh
|
885 |
if try $CC -c $CFLAGS $test.c; then |
|
7ef7284…
|
drh
|
886 |
echo "Checking for return value of sprintf()... Yes." | tee -a configure.log |
|
7ef7284…
|
drh
|
887 |
else |
|
7ef7284…
|
drh
|
888 |
CFLAGS="$CFLAGS -DHAS_sprintf_void" |
|
7ef7284…
|
drh
|
889 |
SFLAGS="$SFLAGS -DHAS_sprintf_void" |
|
7ef7284…
|
drh
|
890 |
echo "Checking for return value of sprintf()... No." | tee -a configure.log |
|
7ef7284…
|
drh
|
891 |
echo " WARNING: apparently sprintf() does not return a value. zlib" | tee -a configure.log |
|
7ef7284…
|
drh
|
892 |
echo " can build but will be open to possible string-format security" | tee -a configure.log |
|
7ef7284…
|
drh
|
893 |
echo " vulnerabilities." | tee -a configure.log |
|
7ef7284…
|
drh
|
894 |
fi |
|
7ef7284…
|
drh
|
895 |
fi |
|
7ef7284…
|
drh
|
896 |
fi |
|
7ef7284…
|
drh
|
897 |
|
|
7ef7284…
|
drh
|
898 |
# see if we can hide zlib internal symbols that are linked between separate source files |
|
7ef7284…
|
drh
|
899 |
if test "$gcc" -eq 1; then |
|
7ef7284…
|
drh
|
900 |
echo >> configure.log |
|
7ef7284…
|
drh
|
901 |
cat > $test.c <<EOF |
|
7ef7284…
|
drh
|
902 |
#define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) |
|
7ef7284…
|
drh
|
903 |
int ZLIB_INTERNAL foo; |
|
7ef7284…
|
drh
|
904 |
int main() |
|
7ef7284…
|
drh
|
905 |
{ |
|
7ef7284…
|
drh
|
906 |
return 0; |
|
7ef7284…
|
drh
|
907 |
} |
|
7ef7284…
|
drh
|
908 |
EOF |
|
7ef7284…
|
drh
|
909 |
if tryboth $CC -c $CFLAGS $test.c; then |
|
7ef7284…
|
drh
|
910 |
CFLAGS="$CFLAGS -DHAVE_HIDDEN" |
|
7ef7284…
|
drh
|
911 |
SFLAGS="$SFLAGS -DHAVE_HIDDEN" |
|
7ef7284…
|
drh
|
912 |
echo "Checking for attribute(visibility) support... Yes." | tee -a configure.log |
|
7ef7284…
|
drh
|
913 |
else |
|
7ef7284…
|
drh
|
914 |
echo "Checking for attribute(visibility) support... No." | tee -a configure.log |
|
7ef7284…
|
drh
|
915 |
fi |
|
7ef7284…
|
drh
|
916 |
fi |
|
7ef7284…
|
drh
|
917 |
|
|
6ea30fb…
|
florian
|
918 |
# check for ibm s390x build |
|
6ea30fb…
|
florian
|
919 |
HAVE_S390X=0 |
|
6ea30fb…
|
florian
|
920 |
cat > $test.c << EOF |
|
6ea30fb…
|
florian
|
921 |
#ifndef __s390x__ |
|
6ea30fb…
|
florian
|
922 |
#error |
|
6ea30fb…
|
florian
|
923 |
#endif |
|
6ea30fb…
|
florian
|
924 |
EOF |
|
6ea30fb…
|
florian
|
925 |
if try $CC -c $CFLAGS $test.c; then |
|
6ea30fb…
|
florian
|
926 |
echo "Checking for s390x build ... Yes." | tee -a configure.log |
|
6ea30fb…
|
florian
|
927 |
HAVE_S390X=1 |
|
6ea30fb…
|
florian
|
928 |
else |
|
6ea30fb…
|
florian
|
929 |
echo "Checking for s390x build ... No." | tee -a configure.log |
|
6ea30fb…
|
florian
|
930 |
fi |
|
6ea30fb…
|
florian
|
931 |
|
|
6ea30fb…
|
florian
|
932 |
# check for ibm s390x vx vector extensions |
|
6ea30fb…
|
florian
|
933 |
HAVE_S390X_VX=0 |
|
6ea30fb…
|
florian
|
934 |
if test $HAVE_S390X -eq 1 && test $enable_crcvx -eq 1 ; then |
|
6ea30fb…
|
florian
|
935 |
# preset the compiler specific flags |
|
6ea30fb…
|
florian
|
936 |
if test $clang -eq 1; then |
|
6ea30fb…
|
florian
|
937 |
VGFMAFLAG=-fzvector |
|
6ea30fb…
|
florian
|
938 |
else |
|
6ea30fb…
|
florian
|
939 |
VGFMAFLAG=-mzarch |
|
6ea30fb…
|
florian
|
940 |
fi |
|
6ea30fb…
|
florian
|
941 |
|
|
6ea30fb…
|
florian
|
942 |
cat > $test.c <<EOF |
|
6ea30fb…
|
florian
|
943 |
#ifndef __s390x__ |
|
6ea30fb…
|
florian
|
944 |
#error |
|
6ea30fb…
|
florian
|
945 |
#endif |
|
6ea30fb…
|
florian
|
946 |
#include <vecintrin.h> |
|
6ea30fb…
|
florian
|
947 |
int main(void) { |
|
6ea30fb…
|
florian
|
948 |
unsigned long long a __attribute__((vector_size(16))) = { 0 }; |
|
6ea30fb…
|
florian
|
949 |
unsigned long long b __attribute__((vector_size(16))) = { 0 }; |
|
6ea30fb…
|
florian
|
950 |
unsigned char c __attribute__((vector_size(16))) = { 0 }; |
|
6ea30fb…
|
florian
|
951 |
c = vec_gfmsum_accum_128(a, b, c); |
|
6ea30fb…
|
florian
|
952 |
return c[0]; |
|
6ea30fb…
|
florian
|
953 |
} |
|
6ea30fb…
|
florian
|
954 |
EOF |
|
6ea30fb…
|
florian
|
955 |
|
|
6ea30fb…
|
florian
|
956 |
# cflags already contains a valid march |
|
6ea30fb…
|
florian
|
957 |
if try $CC -c $CFLAGS $VGFMAFLAG $test.c; then |
|
6ea30fb…
|
florian
|
958 |
echo "Checking for s390x vx vector extension ... Yes." | tee -a configure.log |
|
6ea30fb…
|
florian
|
959 |
HAVE_S390X_VX=1 |
|
6ea30fb…
|
florian
|
960 |
# or set march for our compile units |
|
6ea30fb…
|
florian
|
961 |
elif try $CC -c $CFLAGS $VGFMAFLAG -march=z13 $test.c; then |
|
6ea30fb…
|
florian
|
962 |
echo "Checking for s390x vx vector extension (march=z13) ... Yes." | tee -a configure.log |
|
6ea30fb…
|
florian
|
963 |
HAVE_S390X_VX=1 |
|
6ea30fb…
|
florian
|
964 |
VGFMAFLAG="$VGFMAFLAG -march=z13" |
|
6ea30fb…
|
florian
|
965 |
# else we are not on s390x |
|
6ea30fb…
|
florian
|
966 |
else |
|
6ea30fb…
|
florian
|
967 |
echo "Checking for s390x vx vector extension ... No." | tee -a configure.log |
|
6ea30fb…
|
florian
|
968 |
fi |
|
6ea30fb…
|
florian
|
969 |
|
|
6ea30fb…
|
florian
|
970 |
# prepare compiling for s390x |
|
6ea30fb…
|
florian
|
971 |
if test $HAVE_S390X_VX -eq 1; then |
|
6ea30fb…
|
florian
|
972 |
CFLAGS="$CFLAGS -DHAVE_S390X_VX" |
|
6ea30fb…
|
florian
|
973 |
SFLAGS="$SFLAGS -DHAVE_S390X_VX" |
|
6ea30fb…
|
florian
|
974 |
OBJC="$OBJC crc32_vx.o" |
|
6ea30fb…
|
florian
|
975 |
PIC_OBJC="$PIC_OBJC crc32_vx.lo" |
|
6ea30fb…
|
florian
|
976 |
else |
|
6ea30fb…
|
florian
|
977 |
# target has no vx extension |
|
6ea30fb…
|
florian
|
978 |
VGFMAFLAG="" |
|
6ea30fb…
|
florian
|
979 |
fi |
|
6ea30fb…
|
florian
|
980 |
fi |
|
6ea30fb…
|
florian
|
981 |
|
|
7ef7284…
|
drh
|
982 |
# show the results in the log |
|
7ef7284…
|
drh
|
983 |
echo >> configure.log |
|
7ef7284…
|
drh
|
984 |
echo ALL = $ALL >> configure.log |
|
7ef7284…
|
drh
|
985 |
echo AR = $AR >> configure.log |
|
7ef7284…
|
drh
|
986 |
echo ARFLAGS = $ARFLAGS >> configure.log |
|
7ef7284…
|
drh
|
987 |
echo CC = $CC >> configure.log |
|
7ef7284…
|
drh
|
988 |
echo CFLAGS = $CFLAGS >> configure.log |
|
7ef7284…
|
drh
|
989 |
echo CPP = $CPP >> configure.log |
|
7ef7284…
|
drh
|
990 |
echo EXE = $EXE >> configure.log |
|
7ef7284…
|
drh
|
991 |
echo LDCONFIG = $LDCONFIG >> configure.log |
|
7ef7284…
|
drh
|
992 |
echo LDFLAGS = $LDFLAGS >> configure.log |
|
7ef7284…
|
drh
|
993 |
echo LDSHARED = $LDSHARED >> configure.log |
|
7ef7284…
|
drh
|
994 |
echo LDSHAREDLIBC = $LDSHAREDLIBC >> configure.log |
|
7ef7284…
|
drh
|
995 |
echo OBJC = $OBJC >> configure.log |
|
7ef7284…
|
drh
|
996 |
echo PIC_OBJC = $PIC_OBJC >> configure.log |
|
7ef7284…
|
drh
|
997 |
echo RANLIB = $RANLIB >> configure.log |
|
7ef7284…
|
drh
|
998 |
echo SFLAGS = $SFLAGS >> configure.log |
|
7ef7284…
|
drh
|
999 |
echo SHAREDLIB = $SHAREDLIB >> configure.log |
|
7ef7284…
|
drh
|
1000 |
echo SHAREDLIBM = $SHAREDLIBM >> configure.log |
|
7ef7284…
|
drh
|
1001 |
echo SHAREDLIBV = $SHAREDLIBV >> configure.log |
|
7ef7284…
|
drh
|
1002 |
echo STATICLIB = $STATICLIB >> configure.log |
|
7ef7284…
|
drh
|
1003 |
echo TEST = $TEST >> configure.log |
|
7ef7284…
|
drh
|
1004 |
echo VER = $VER >> configure.log |
|
e38d5e1…
|
jan.nijtmans
|
1005 |
echo SRCDIR = $SRCDIR >> configure.log |
|
7ef7284…
|
drh
|
1006 |
echo exec_prefix = $exec_prefix >> configure.log |
|
7ef7284…
|
drh
|
1007 |
echo includedir = $includedir >> configure.log |
|
7ef7284…
|
drh
|
1008 |
echo libdir = $libdir >> configure.log |
|
7ef7284…
|
drh
|
1009 |
echo mandir = $mandir >> configure.log |
|
7ef7284…
|
drh
|
1010 |
echo prefix = $prefix >> configure.log |
|
7ef7284…
|
drh
|
1011 |
echo sharedlibdir = $sharedlibdir >> configure.log |
|
7ef7284…
|
drh
|
1012 |
echo uname = $uname >> configure.log |
|
6ea30fb…
|
florian
|
1013 |
echo HAVE_S390X = $HAVE_S390X >> configure.log |
|
6ea30fb…
|
florian
|
1014 |
echo HAVE_S390X_VX = $HAVE_S390X_VX >> configure.log |
|
6ea30fb…
|
florian
|
1015 |
echo VGFMAFLAG = $VGFMAFLAG >> configure.log |
|
7ef7284…
|
drh
|
1016 |
|
|
f1f1d6c…
|
drh
|
1017 |
# update Makefile with the configure results |
|
e38d5e1…
|
jan.nijtmans
|
1018 |
sed < ${SRCDIR}Makefile.in " |
|
7ef7284…
|
drh
|
1019 |
/^CC *=/s#=.*#=$CC# |
|
6ea30fb…
|
florian
|
1020 |
/^GCOV *=/s#=.*#=$GCOV# |
|
6ea30fb…
|
florian
|
1021 |
/^LLVM_GCOV_FLAG *=/s#=.*#=$LLVM_GCOV_FLAG# |
|
7ef7284…
|
drh
|
1022 |
/^CFLAGS *=/s#=.*#=$CFLAGS# |
|
7ef7284…
|
drh
|
1023 |
/^SFLAGS *=/s#=.*#=$SFLAGS# |
|
7ef7284…
|
drh
|
1024 |
/^LDFLAGS *=/s#=.*#=$LDFLAGS# |
|
7ef7284…
|
drh
|
1025 |
/^LDSHARED *=/s#=.*#=$LDSHARED# |
|
7ef7284…
|
drh
|
1026 |
/^CPP *=/s#=.*#=$CPP# |
|
7ef7284…
|
drh
|
1027 |
/^STATICLIB *=/s#=.*#=$STATICLIB# |
|
7ef7284…
|
drh
|
1028 |
/^SHAREDLIB *=/s#=.*#=$SHAREDLIB# |
|
7ef7284…
|
drh
|
1029 |
/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# |
|
7ef7284…
|
drh
|
1030 |
/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# |
|
7ef7284…
|
drh
|
1031 |
/^AR *=/s#=.*#=$AR# |
|
7ef7284…
|
drh
|
1032 |
/^ARFLAGS *=/s#=.*#=$ARFLAGS# |
|
7ef7284…
|
drh
|
1033 |
/^RANLIB *=/s#=.*#=$RANLIB# |
|
7ef7284…
|
drh
|
1034 |
/^LDCONFIG *=/s#=.*#=$LDCONFIG# |
|
7ef7284…
|
drh
|
1035 |
/^LDSHAREDLIBC *=/s#=.*#=$LDSHAREDLIBC# |
|
7ef7284…
|
drh
|
1036 |
/^EXE *=/s#=.*#=$EXE# |
|
e38d5e1…
|
jan.nijtmans
|
1037 |
/^SRCDIR *=/s#=.*#=$SRCDIR# |
|
e38d5e1…
|
jan.nijtmans
|
1038 |
/^ZINC *=/s#=.*#=$ZINC# |
|
e38d5e1…
|
jan.nijtmans
|
1039 |
/^ZINCOUT *=/s#=.*#=$ZINCOUT# |
|
7ef7284…
|
drh
|
1040 |
/^prefix *=/s#=.*#=$prefix# |
|
7ef7284…
|
drh
|
1041 |
/^exec_prefix *=/s#=.*#=$exec_prefix# |
|
7ef7284…
|
drh
|
1042 |
/^libdir *=/s#=.*#=$libdir# |
|
7ef7284…
|
drh
|
1043 |
/^sharedlibdir *=/s#=.*#=$sharedlibdir# |
|
7ef7284…
|
drh
|
1044 |
/^includedir *=/s#=.*#=$includedir# |
|
7ef7284…
|
drh
|
1045 |
/^mandir *=/s#=.*#=$mandir# |
|
7ef7284…
|
drh
|
1046 |
/^OBJC *=/s#=.*#= $OBJC# |
|
7ef7284…
|
drh
|
1047 |
/^PIC_OBJC *=/s#=.*#= $PIC_OBJC# |
|
7ef7284…
|
drh
|
1048 |
/^all: */s#:.*#: $ALL# |
|
7ef7284…
|
drh
|
1049 |
/^test: */s#:.*#: $TEST# |
|
7ef7284…
|
drh
|
1050 |
" > Makefile |
|
7ef7284…
|
drh
|
1051 |
|
|
7ef7284…
|
drh
|
1052 |
# create zlib.pc with the configure results |
|
e38d5e1…
|
jan.nijtmans
|
1053 |
sed < ${SRCDIR}zlib.pc.in " |
|
7ef7284…
|
drh
|
1054 |
/^CC *=/s#=.*#=$CC# |
|
7ef7284…
|
drh
|
1055 |
/^CFLAGS *=/s#=.*#=$CFLAGS# |
|
7ef7284…
|
drh
|
1056 |
/^CPP *=/s#=.*#=$CPP# |
|
7ef7284…
|
drh
|
1057 |
/^LDSHARED *=/s#=.*#=$LDSHARED# |
|
7ef7284…
|
drh
|
1058 |
/^STATICLIB *=/s#=.*#=$STATICLIB# |
|
7ef7284…
|
drh
|
1059 |
/^SHAREDLIB *=/s#=.*#=$SHAREDLIB# |
|
7ef7284…
|
drh
|
1060 |
/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# |
|
7ef7284…
|
drh
|
1061 |
/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# |
|
7ef7284…
|
drh
|
1062 |
/^AR *=/s#=.*#=$AR# |
|
7ef7284…
|
drh
|
1063 |
/^ARFLAGS *=/s#=.*#=$ARFLAGS# |
|
7ef7284…
|
drh
|
1064 |
/^RANLIB *=/s#=.*#=$RANLIB# |
|
7ef7284…
|
drh
|
1065 |
/^EXE *=/s#=.*#=$EXE# |
|
7ef7284…
|
drh
|
1066 |
/^prefix *=/s#=.*#=$prefix# |
|
7ef7284…
|
drh
|
1067 |
/^exec_prefix *=/s#=.*#=$exec_prefix# |
|
7ef7284…
|
drh
|
1068 |
/^libdir *=/s#=.*#=$libdir# |
|
7ef7284…
|
drh
|
1069 |
/^sharedlibdir *=/s#=.*#=$sharedlibdir# |
|
7ef7284…
|
drh
|
1070 |
/^includedir *=/s#=.*#=$includedir# |
|
7ef7284…
|
drh
|
1071 |
/^mandir *=/s#=.*#=$mandir# |
|
7ef7284…
|
drh
|
1072 |
/^LDFLAGS *=/s#=.*#=$LDFLAGS# |
|
7ef7284…
|
drh
|
1073 |
" | sed -e " |
|
7ef7284…
|
drh
|
1074 |
s/\@VERSION\@/$VER/g; |
|
7ef7284…
|
drh
|
1075 |
" > zlib.pc |
|
bb4776e…
|
jan.nijtmans
|
1076 |
|
|
bb4776e…
|
jan.nijtmans
|
1077 |
# done |
|
bb4776e…
|
jan.nijtmans
|
1078 |
leave 0 |