diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 99 |
1 files changed, 51 insertions, 48 deletions
@@ -28,6 +28,7 @@ prefix=${prefix-/usr/local} | |||
28 | exec_prefix=${exec_prefix-'${prefix}'} | 28 | exec_prefix=${exec_prefix-'${prefix}'} |
29 | libdir=${libdir-'${exec_prefix}/lib'} | 29 | libdir=${libdir-'${exec_prefix}/lib'} |
30 | includedir=${includedir-'${prefix}/include'} | 30 | includedir=${includedir-'${prefix}/include'} |
31 | mandir=${mandir-'${prefix}/share/man'} | ||
31 | shared_ext='.so' | 32 | shared_ext='.so' |
32 | shared=0 | 33 | shared=0 |
33 | gcc=0 | 34 | gcc=0 |
@@ -78,8 +79,9 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then | |||
78 | CFLAGS="$cflags" | 79 | CFLAGS="$cflags" |
79 | case `(uname -s || echo unknown) 2>/dev/null` in | 80 | case `(uname -s || echo unknown) 2>/dev/null` in |
80 | Linux | linux) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};; | 81 | Linux | linux) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};; |
81 | QNX*) #This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 (alain.bonnefoy@icbt.com) | 82 | QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 |
82 | LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};; | 83 | # (alain.bonnefoy@icbt.com) |
84 | LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};; | ||
83 | HP-UX*) LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"} | 85 | HP-UX*) LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"} |
84 | shared_ext='.sl' | 86 | shared_ext='.sl' |
85 | SHAREDLIB='libz.sl';; | 87 | SHAREDLIB='libz.sl';; |
@@ -90,54 +92,54 @@ else | |||
90 | CC=${CC-cc} | 92 | CC=${CC-cc} |
91 | case `(uname -sr || echo unknown) 2>/dev/null` in | 93 | case `(uname -sr || echo unknown) 2>/dev/null` in |
92 | HP-UX*) SFLAGS=${CFLAGS-"-O +z"} | 94 | HP-UX*) SFLAGS=${CFLAGS-"-O +z"} |
93 | CFLAGS=${CFLAGS-"-O"} | 95 | CFLAGS=${CFLAGS-"-O"} |
94 | # LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"} | 96 | # LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"} |
95 | LDSHARED=${LDSHARED-"ld -b"} | 97 | LDSHARED=${LDSHARED-"ld -b"} |
96 | shared_ext='.sl' | 98 | shared_ext='.sl' |
97 | SHAREDLIB='libz.sl';; | 99 | SHAREDLIB='libz.sl';; |
98 | IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} | 100 | IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} |
99 | CFLAGS=${CFLAGS-"-ansi -O2"} | 101 | CFLAGS=${CFLAGS-"-ansi -O2"} |
100 | LDSHARED=${LDSHARED-"cc -shared"};; | 102 | LDSHARED=${LDSHARED-"cc -shared"};; |
101 | OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"} | 103 | OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"} |
102 | CFLAGS=${CFLAGS-"-O -std1"} | 104 | CFLAGS=${CFLAGS-"-O -std1"} |
103 | LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,$SHAREDLIB -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};; | 105 | LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,$SHAREDLIB -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};; |
104 | OSF1*) SFLAGS=${CFLAGS-"-O -std1"} | 106 | OSF1*) SFLAGS=${CFLAGS-"-O -std1"} |
105 | CFLAGS=${CFLAGS-"-O -std1"} | 107 | CFLAGS=${CFLAGS-"-O -std1"} |
106 | LDSHARED=${LDSHARED-"cc -shared"};; | 108 | LDSHARED=${LDSHARED-"cc -shared"};; |
107 | QNX*) SFLAGS=${CFLAGS-"-4 -O"} | 109 | QNX*) SFLAGS=${CFLAGS-"-4 -O"} |
108 | CFLAGS=${CFLAGS-"-4 -O"} | 110 | CFLAGS=${CFLAGS-"-4 -O"} |
109 | LDSHARED=${LDSHARED-"cc"} | 111 | LDSHARED=${LDSHARED-"cc"} |
110 | RANLIB=${RANLIB-"true"} | 112 | RANLIB=${RANLIB-"true"} |
111 | AR="cc -A";; | 113 | AR="cc -A";; |
112 | SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} | 114 | SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} |
113 | CFLAGS=${CFLAGS-"-O3"} | 115 | CFLAGS=${CFLAGS-"-O3"} |
114 | LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};; | 116 | LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};; |
115 | SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."} | 117 | SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."} |
116 | CFLAGS=${CFLAGS-"-fast -xcg89"} | 118 | CFLAGS=${CFLAGS-"-fast -xcg89"} |
117 | LDSHARED=${LDSHARED-"cc -G"};; | 119 | LDSHARED=${LDSHARED-"cc -G"};; |
118 | SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} | 120 | SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} |
119 | CFLAGS=${CFLAGS-"-O2"} | 121 | CFLAGS=${CFLAGS-"-O2"} |
120 | LDSHARED=${LDSHARED-"ld"};; | 122 | LDSHARED=${LDSHARED-"ld"};; |
121 | UNIX_System_V\ 4.2.0) | 123 | UNIX_System_V\ 4.2.0) |
122 | SFLAGS=${CFLAGS-"-KPIC -O"} | 124 | SFLAGS=${CFLAGS-"-KPIC -O"} |
123 | CFLAGS=${CFLAGS-"-O"} | 125 | CFLAGS=${CFLAGS-"-O"} |
124 | LDSHARED=${LDSHARED-"cc -G"};; | 126 | LDSHARED=${LDSHARED-"cc -G"};; |
125 | UNIX_SV\ 4.2MP) | 127 | UNIX_SV\ 4.2MP) |
126 | SFLAGS=${CFLAGS-"-Kconform_pic -O"} | 128 | SFLAGS=${CFLAGS-"-Kconform_pic -O"} |
127 | CFLAGS=${CFLAGS-"-O"} | 129 | CFLAGS=${CFLAGS-"-O"} |
128 | LDSHARED=${LDSHARED-"cc -G"};; | 130 | LDSHARED=${LDSHARED-"cc -G"};; |
129 | OpenUNIX\ 5) | 131 | OpenUNIX\ 5) |
130 | SFLAGS=${CFLAGS-"-KPIC -O"} | 132 | SFLAGS=${CFLAGS-"-KPIC -O"} |
131 | CFLAGS=${CFLAGS-"-O"} | 133 | CFLAGS=${CFLAGS-"-O"} |
132 | LDSHARED=${LDSHARED-"cc -G"};; | 134 | LDSHARED=${LDSHARED-"cc -G"};; |
133 | AIX*) # Courtesy of dbakker@arrayasolutions.com | 135 | AIX*) # Courtesy of dbakker@arrayasolutions.com |
134 | SFLAGS=${CFLAGS-"-O -qmaxmem=8192"} | 136 | SFLAGS=${CFLAGS-"-O -qmaxmem=8192"} |
135 | CFLAGS=${CFLAGS-"-O -qmaxmem=8192"} | 137 | CFLAGS=${CFLAGS-"-O -qmaxmem=8192"} |
136 | LDSHARED=${LDSHARED-"xlc -G"};; | 138 | LDSHARED=${LDSHARED-"xlc -G"};; |
137 | # send working options for other systems to support@gzip.org | 139 | # send working options for other systems to support@gzip.org |
138 | *) SFLAGS=${CFLAGS-"-O"} | 140 | *) SFLAGS=${CFLAGS-"-O"} |
139 | CFLAGS=${CFLAGS-"-O"} | 141 | CFLAGS=${CFLAGS-"-O"} |
140 | LDSHARED=${LDSHARED-"cc -shared"};; | 142 | LDSHARED=${LDSHARED-"cc -shared"};; |
141 | esac | 143 | esac |
142 | fi | 144 | fi |
143 | 145 | ||
@@ -150,10 +152,10 @@ if test $shared -eq 1; then | |||
150 | LIBS="$SHAREDLIB.$VER" | 152 | LIBS="$SHAREDLIB.$VER" |
151 | echo Building shared library $SHAREDLIB.$VER with $CC. | 153 | echo Building shared library $SHAREDLIB.$VER with $CC. |
152 | elif test -z "$old_cc" -a -z "$old_cflags"; then | 154 | elif test -z "$old_cc" -a -z "$old_cflags"; then |
153 | echo No shared library suppport. | 155 | echo No shared library support. |
154 | shared=0; | 156 | shared=0; |
155 | else | 157 | else |
156 | echo 'No shared library suppport; try without defining CC and CFLAGS' | 158 | echo 'No shared library support; try without defining CC and CFLAGS' |
157 | shared=0; | 159 | shared=0; |
158 | fi | 160 | fi |
159 | fi | 161 | fi |
@@ -182,7 +184,7 @@ cat > $test.c <<EOF | |||
182 | # define STDC | 184 | # define STDC |
183 | #endif | 185 | #endif |
184 | 186 | ||
185 | int main() | 187 | int main() |
186 | { | 188 | { |
187 | #ifndef STDC | 189 | #ifndef STDC |
188 | choke me | 190 | choke me |
@@ -215,7 +217,7 @@ int main() | |||
215 | return (mytest("Hello%d\n", 1)); | 217 | return (mytest("Hello%d\n", 1)); |
216 | } | 218 | } |
217 | EOF | 219 | EOF |
218 | 220 | ||
219 | if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | 221 | if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then |
220 | echo "Checking for vsnprintf() in stdio.h... Yes." | 222 | echo "Checking for vsnprintf() in stdio.h... Yes." |
221 | 223 | ||
@@ -273,7 +275,7 @@ int mytest(char *fmt, ...) | |||
273 | return 0; | 275 | return 0; |
274 | } | 276 | } |
275 | 277 | ||
276 | int main() | 278 | int main() |
277 | { | 279 | { |
278 | return (mytest("Hello%d\n", 1)); | 280 | return (mytest("Hello%d\n", 1)); |
279 | } | 281 | } |
@@ -296,7 +298,7 @@ else | |||
296 | #include <stdio.h> | 298 | #include <stdio.h> |
297 | #include <stdarg.h> | 299 | #include <stdarg.h> |
298 | 300 | ||
299 | int mytest() | 301 | int mytest() |
300 | { | 302 | { |
301 | char buf[20]; | 303 | char buf[20]; |
302 | 304 | ||
@@ -304,7 +306,7 @@ int mytest() | |||
304 | return 0; | 306 | return 0; |
305 | } | 307 | } |
306 | 308 | ||
307 | int main() | 309 | int main() |
308 | { | 310 | { |
309 | return (mytest()); | 311 | return (mytest()); |
310 | } | 312 | } |
@@ -326,7 +328,7 @@ int mytest(char *fmt, ...) | |||
326 | return 0; | 328 | return 0; |
327 | } | 329 | } |
328 | 330 | ||
329 | int main() | 331 | int main() |
330 | { | 332 | { |
331 | return (mytest()); | 333 | return (mytest()); |
332 | } | 334 | } |
@@ -352,7 +354,7 @@ EOF | |||
352 | #include <stdio.h> | 354 | #include <stdio.h> |
353 | #include <stdarg.h> | 355 | #include <stdarg.h> |
354 | 356 | ||
355 | int mytest(char *fmt, ...) | 357 | int mytest(char *fmt, ...) |
356 | { | 358 | { |
357 | int i; | 359 | int i; |
358 | char buf[20]; | 360 | char buf[20]; |
@@ -361,7 +363,7 @@ int mytest(char *fmt, ...) | |||
361 | return 0; | 363 | return 0; |
362 | } | 364 | } |
363 | 365 | ||
364 | int main() | 366 | int main() |
365 | { | 367 | { |
366 | return (mytest()); | 368 | return (mytest()); |
367 | } | 369 | } |
@@ -384,9 +386,9 @@ cat >$test.c <<EOF | |||
384 | int main() { return 0; } | 386 | int main() { return 0; } |
385 | EOF | 387 | EOF |
386 | if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | 388 | if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then |
387 | echo "Checking for errno.h... Yes." | 389 | echo "Checking for errno.h... Yes." |
388 | else | 390 | else |
389 | echo "Checking for errno.h... No." | 391 | echo "Checking for errno.h... No." |
390 | CFLAGS="$CFLAGS -DNO_ERRNO_H" | 392 | CFLAGS="$CFLAGS -DNO_ERRNO_H" |
391 | fi | 393 | fi |
392 | 394 | ||
@@ -395,7 +397,7 @@ cat > $test.c <<EOF | |||
395 | #include <sys/mman.h> | 397 | #include <sys/mman.h> |
396 | #include <sys/stat.h> | 398 | #include <sys/stat.h> |
397 | caddr_t hello() { | 399 | caddr_t hello() { |
398 | return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0); | 400 | return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0); |
399 | } | 401 | } |
400 | EOF | 402 | EOF |
401 | if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | 403 | if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then |
@@ -433,5 +435,6 @@ sed < Makefile.in " | |||
433 | /^exec_prefix *=/s%=.*%=$exec_prefix% | 435 | /^exec_prefix *=/s%=.*%=$exec_prefix% |
434 | /^libdir *=/s%=.*%=$libdir% | 436 | /^libdir *=/s%=.*%=$libdir% |
435 | /^includedir *=/s%=.*%=$includedir% | 437 | /^includedir *=/s%=.*%=$includedir% |
438 | /^mandir *=/s%=.*%=$mandir% | ||
436 | /^LDFLAGS *=/s%=.*%=$LDFLAGS% | 439 | /^LDFLAGS *=/s%=.*%=$LDFLAGS% |
437 | " > Makefile | 440 | " > Makefile |