1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
--- zlib-1.2.11/configure.orig 2016-12-31 13:06:40.000000000 -0500
+++ zlib-1.2.11/configure 2017-07-22 11:25:12.000000000 -0400
@@ -30,12 +30,6 @@
SRCDIR="$SRCDIR/"
fi
-# set command prefix for cross-compilation
-if [ -n "${CHOST}" ]; then
- uname="`echo "${CHOST}" | sed -e 's/^[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)-.*$/\1/'`"
- CROSS_PREFIX="${CHOST}-"
-fi
-
# destination name for static library
STATICLIB=libz.a
@@ -45,28 +39,6 @@
VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h`
VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h`
-# establish commands for library building
-if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
- AR=${AR-"${CROSS_PREFIX}ar"}
- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
-else
- AR=${AR-"ar"}
- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
-fi
-ARFLAGS=${ARFLAGS-"rc"}
-if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
- RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
- test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log
-else
- RANLIB=${RANLIB-"ranlib"}
-fi
-if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
- NM=${NM-"${CROSS_PREFIX}nm"}
- test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log
-else
- NM=${NM-"nm"}
-fi
-
# set defaults before processing command line options
LDCONFIG=${LDCONFIG-"ldconfig"}
LDSHAREDLIBC="${LDSHAREDLIBC--lc}"
@@ -206,49 +178,7 @@
if test -z "$uname"; then
uname=`(uname -s || echo unknown) 2>/dev/null`
fi
- case "$uname" in
- Linux* | linux* | GNU | GNU/* | solaris*)
- LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;;
- *BSD | *bsd* | DragonFly)
- LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"}
- LDCONFIG="ldconfig -m" ;;
- CYGWIN* | Cygwin* | cygwin* | OS/2*)
- EXE='.exe' ;;
- MINGW* | mingw*)
-# temporary bypass
- rm -f $test.[co] $test $test$shared_ext
- echo "Please use win32/Makefile.gcc instead." | tee -a configure.log
- leave 1
- LDSHARED=${LDSHARED-"$cc -shared"}
- LDSHAREDLIBC=""
- EXE='.exe' ;;
- QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
- # (alain.bonnefoy@icbt.com)
- LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;;
- HP-UX*)
- LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
- case `(uname -m || echo unknown) 2>/dev/null` in
- ia64)
- shared_ext='.so'
- SHAREDLIB='libz.so' ;;
- *)
- shared_ext='.sl'
- SHAREDLIB='libz.sl' ;;
- esac ;;
- Darwin* | darwin*)
- shared_ext='.dylib'
- SHAREDLIB=libz$shared_ext
- SHAREDLIBV=libz.$VER$shared_ext
- SHAREDLIBM=libz.$VER1$shared_ext
- LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"}
- if libtool -V 2>&1 | grep Apple > /dev/null; then
- AR="libtool"
- else
- AR="/usr/bin/libtool"
- fi
- ARFLAGS="-o" ;;
- *) LDSHARED=${LDSHARED-"$cc -shared"} ;;
- esac
+ LDSHARED=${LDSHARED-"$cc"}
else
# find system name and corresponding cc options
CC=${CC-cc}
@@ -918,4 +848,4 @@
" > zlib.pc
# done
-leave 0
+leave 0
\ No newline at end of file
|