diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:23:14 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:23:14 -0700 |
commit | a2506218cd8c32416d0d15260834f3c23d910fc8 (patch) | |
tree | 25bbd63d92473c8ae02a27cce3fc7c04a6aba64a /configure | |
parent | b97ec631c6f7dd9cff2e3caf3b38e70b006e1b2d (diff) | |
download | zlib-a2506218cd8c32416d0d15260834f3c23d910fc8.tar.gz zlib-a2506218cd8c32416d0d15260834f3c23d910fc8.tar.bz2 zlib-a2506218cd8c32416d0d15260834f3c23d910fc8.zip |
zlib 1.2.0.8v1.2.0.8
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 48 |
1 files changed, 21 insertions, 27 deletions
@@ -53,6 +53,7 @@ case "$1" in | |||
53 | -l* | --l*) libdir="$2"; shift; shift;; | 53 | -l* | --l*) libdir="$2"; shift; shift;; |
54 | -i* | --i*) includedir="$2"; shift; shift;; | 54 | -i* | --i*) includedir="$2"; shift; shift;; |
55 | -s* | --s*) shared=1; shift;; | 55 | -s* | --s*) shared=1; shift;; |
56 | *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;; | ||
56 | esac | 57 | esac |
57 | done | 58 | done |
58 | 59 | ||
@@ -76,6 +77,8 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then | |||
76 | CFLAGS="$cflags" | 77 | CFLAGS="$cflags" |
77 | case `(uname -s || echo unknown) 2>/dev/null` in | 78 | case `(uname -s || echo unknown) 2>/dev/null` in |
78 | Linux | linux) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};; | 79 | Linux | linux) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};; |
80 | CYGWIN* | Cygwin* | cygwin* ) | ||
81 | EXE='.exe';; | ||
79 | QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 | 82 | QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 |
80 | # (alain.bonnefoy@icbt.com) | 83 | # (alain.bonnefoy@icbt.com) |
81 | LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};; | 84 | LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};; |
@@ -188,11 +191,8 @@ fi | |||
188 | 191 | ||
189 | cat > $test.c <<EOF | 192 | cat > $test.c <<EOF |
190 | #include <stdio.h> | 193 | #include <stdio.h> |
191 | #include <stdlib.h> | 194 | #include <stdarg.h> |
192 | 195 | #include "zconf.h" | |
193 | #if (defined(__MSDOS__) || defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)) && !defined(STDC) | ||
194 | # define STDC | ||
195 | #endif | ||
196 | 196 | ||
197 | int main() | 197 | int main() |
198 | { | 198 | { |
@@ -205,7 +205,7 @@ int main() | |||
205 | EOF | 205 | EOF |
206 | 206 | ||
207 | if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | 207 | if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then |
208 | echo "Checking whether to use vsnprintf() or snprintf()... using vsnprintf()" | 208 | echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()" |
209 | 209 | ||
210 | cat > $test.c <<EOF | 210 | cat > $test.c <<EOF |
211 | #include <stdio.h> | 211 | #include <stdio.h> |
@@ -228,7 +228,7 @@ int main() | |||
228 | } | 228 | } |
229 | EOF | 229 | EOF |
230 | 230 | ||
231 | if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | 231 | if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then |
232 | echo "Checking for vsnprintf() in stdio.h... Yes." | 232 | echo "Checking for vsnprintf() in stdio.h... Yes." |
233 | 233 | ||
234 | cat >$test.c <<EOF | 234 | cat >$test.c <<EOF |
@@ -237,14 +237,14 @@ EOF | |||
237 | 237 | ||
238 | int mytest(char *fmt, ...) | 238 | int mytest(char *fmt, ...) |
239 | { | 239 | { |
240 | int i; | 240 | int n; |
241 | char buf[20]; | 241 | char buf[20]; |
242 | va_list ap; | 242 | va_list ap; |
243 | 243 | ||
244 | va_start(ap, fmt); | 244 | va_start(ap, fmt); |
245 | i = vsnprintf(buf, sizeof(buf), fmt, ap); | 245 | n = vsnprintf(buf, sizeof(buf), fmt, ap); |
246 | va_end(ap); | 246 | va_end(ap); |
247 | return 0; | 247 | return n; |
248 | } | 248 | } |
249 | 249 | ||
250 | int main() | 250 | int main() |
@@ -275,14 +275,14 @@ EOF | |||
275 | 275 | ||
276 | int mytest(char *fmt, ...) | 276 | int mytest(char *fmt, ...) |
277 | { | 277 | { |
278 | int i; | 278 | int n; |
279 | char buf[20]; | 279 | char buf[20]; |
280 | va_list ap; | 280 | va_list ap; |
281 | 281 | ||
282 | va_start(ap, fmt); | 282 | va_start(ap, fmt); |
283 | i = vsprintf(buf, fmt, ap); | 283 | n = vsprintf(buf, fmt, ap); |
284 | va_end(ap); | 284 | va_end(ap); |
285 | return 0; | 285 | return n; |
286 | } | 286 | } |
287 | 287 | ||
288 | int main() | 288 | int main() |
@@ -302,11 +302,10 @@ EOF | |||
302 | fi | 302 | fi |
303 | fi | 303 | fi |
304 | else | 304 | else |
305 | echo "Checking whether to use vsnprintf() or snprintf()... using snprintf()" | 305 | echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()" |
306 | 306 | ||
307 | cat >$test.c <<EOF | 307 | cat >$test.c <<EOF |
308 | #include <stdio.h> | 308 | #include <stdio.h> |
309 | #include <stdarg.h> | ||
310 | 309 | ||
311 | int mytest() | 310 | int mytest() |
312 | { | 311 | { |
@@ -322,20 +321,17 @@ int main() | |||
322 | } | 321 | } |
323 | EOF | 322 | EOF |
324 | 323 | ||
325 | if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | 324 | if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then |
326 | echo "Checking for snprintf() in stdio.h... Yes." | 325 | echo "Checking for snprintf() in stdio.h... Yes." |
327 | 326 | ||
328 | cat >$test.c <<EOF | 327 | cat >$test.c <<EOF |
329 | #include <stdio.h> | 328 | #include <stdio.h> |
330 | #include <stdarg.h> | ||
331 | 329 | ||
332 | int mytest(char *fmt, ...) | 330 | int mytest() |
333 | { | 331 | { |
334 | int i; | ||
335 | char buf[20]; | 332 | char buf[20]; |
336 | 333 | ||
337 | i = snprintf(buf, sizeof(buf), "%s", "foo"); | 334 | return snprintf(buf, sizeof(buf), "%s", "foo"); |
338 | return 0; | ||
339 | } | 335 | } |
340 | 336 | ||
341 | int main() | 337 | int main() |
@@ -362,15 +358,12 @@ EOF | |||
362 | 358 | ||
363 | cat >$test.c <<EOF | 359 | cat >$test.c <<EOF |
364 | #include <stdio.h> | 360 | #include <stdio.h> |
365 | #include <stdarg.h> | ||
366 | 361 | ||
367 | int mytest(char *fmt, ...) | 362 | int mytest() |
368 | { | 363 | { |
369 | int i; | ||
370 | char buf[20]; | 364 | char buf[20]; |
371 | 365 | ||
372 | i = sprintf(buf, "%s", "foo"); | 366 | return sprintf(buf, "%s", "foo"); |
373 | return 0; | ||
374 | } | 367 | } |
375 | 368 | ||
376 | int main() | 369 | int main() |
@@ -428,7 +421,7 @@ case $CFLAGS in | |||
428 | fi;; | 421 | fi;; |
429 | esac | 422 | esac |
430 | 423 | ||
431 | rm -f $test.[co] $test$shared_ext | 424 | rm -f $test.[co] $test $test$shared_ext |
432 | 425 | ||
433 | # udpate Makefile | 426 | # udpate Makefile |
434 | sed < Makefile.in " | 427 | sed < Makefile.in " |
@@ -442,6 +435,7 @@ sed < Makefile.in " | |||
442 | /^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# | 435 | /^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# |
443 | /^AR *=/s#=.*#=$AR# | 436 | /^AR *=/s#=.*#=$AR# |
444 | /^RANLIB *=/s#=.*#=$RANLIB# | 437 | /^RANLIB *=/s#=.*#=$RANLIB# |
438 | /^EXE *=/s#=.*#=$EXE# | ||
445 | /^prefix *=/s#=.*#=$prefix# | 439 | /^prefix *=/s#=.*#=$prefix# |
446 | /^exec_prefix *=/s#=.*#=$exec_prefix# | 440 | /^exec_prefix *=/s#=.*#=$exec_prefix# |
447 | /^libdir *=/s#=.*#=$libdir# | 441 | /^libdir *=/s#=.*#=$libdir# |