diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:34:38 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:34:38 -0700 |
commit | f4498bea2865325dce71189af47a047529229f22 (patch) | |
tree | 06278f21d1bcf0f0860ff792af1cb376b1331231 /configure | |
parent | 7147f24cd7b27dd95f6e841851a111cb311a9c07 (diff) | |
download | zlib-f4498bea2865325dce71189af47a047529229f22.tar.gz zlib-f4498bea2865325dce71189af47a047529229f22.tar.bz2 zlib-f4498bea2865325dce71189af47a047529229f22.zip |
zlib 1.2.4.3v1.2.4.3
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 34 |
1 files changed, 29 insertions, 5 deletions
@@ -13,11 +13,21 @@ | |||
13 | # If you have problems, try without defining CC and CFLAGS before reporting | 13 | # If you have problems, try without defining CC and CFLAGS before reporting |
14 | # an error. | 14 | # an error. |
15 | 15 | ||
16 | # make sure we are running under a compatible shell (stolen from ffmpeg and libnfo) | 16 | # make sure we are running under a compatible shell (stolen from ffmpeg and libnfo, |
17 | # except their's wasn't portable enough due to ! usage, so this is better) | ||
17 | if test "0$ZLIB_CONFIGURE_EXEC" -lt 1; then | 18 | if test "0$ZLIB_CONFIGURE_EXEC" -lt 1; then |
18 | unset foo | 19 | unset foo |
19 | (: ${foo%%bar}) 2>/dev/null && ! (: ${foo?}) 2>/dev/null | 20 | try=0 |
21 | (: ${foo%%bar}) 2>/dev/null | ||
20 | if test "$?" -ne 0; then | 22 | if test "$?" -ne 0; then |
23 | try=1 | ||
24 | else | ||
25 | (: ${foo?}) 2>/dev/null | ||
26 | if test "$?" -eq 0; then | ||
27 | try=1 | ||
28 | fi | ||
29 | fi | ||
30 | if test "$try" -eq 1; then | ||
21 | ZLIB_CONFIGURE_EXEC=1 | 31 | ZLIB_CONFIGURE_EXEC=1 |
22 | export ZLIB_CONFIGURE_EXEC | 32 | export ZLIB_CONFIGURE_EXEC |
23 | type "bash" > /dev/null 2>&1 && exec bash "$0" "$@" | 33 | type "bash" > /dev/null 2>&1 && exec bash "$0" "$@" |
@@ -29,6 +39,7 @@ if test "0$ZLIB_CONFIGURE_EXEC" -lt 1; then | |||
29 | # exit 1 | 39 | # exit 1 |
30 | # we could give up here, but go ahead and give their old sh a try | 40 | # we could give up here, but go ahead and give their old sh a try |
31 | fi | 41 | fi |
42 | unset try | ||
32 | fi | 43 | fi |
33 | 44 | ||
34 | if [ -n "${CHOST}" ]; then | 45 | if [ -n "${CHOST}" ]; then |
@@ -42,10 +53,22 @@ VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` | |||
42 | VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h` | 53 | VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h` |
43 | VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` | 54 | VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` |
44 | VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` | 55 | VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` |
45 | AR=${AR-"${CROSS_PREFIX}ar"} | 56 | if [ -x "${CROSS_PREFIX}ar" ]; then |
57 | AR=${AR-"${CROSS_PREFIX}ar"} | ||
58 | else | ||
59 | AR=${AR-"ar"} | ||
60 | fi | ||
46 | AR_RC="${AR} rc" | 61 | AR_RC="${AR} rc" |
47 | RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"} | 62 | if [ -x "${CROSS_PREFIX}ranlib" ]; then |
48 | NM=${NM-"nm"} | 63 | RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"} |
64 | else | ||
65 | RANLIB=${RANLIB-"ranlib"} | ||
66 | fi | ||
67 | if [ -x "${CROSS_PREFIX}nm" ]; then | ||
68 | NM=${NM-"${CROSS_PREFIX}nm"} | ||
69 | else | ||
70 | NM=${NM-"nm"} | ||
71 | fi | ||
49 | LDCONFIG=${LDCONFIG-"ldconfig"} | 72 | LDCONFIG=${LDCONFIG-"ldconfig"} |
50 | LDSHAREDLIBC="${LDSHAREDLIBC-"-lc"}" | 73 | LDSHAREDLIBC="${LDSHAREDLIBC-"-lc"}" |
51 | prefix=${prefix-/usr/local} | 74 | prefix=${prefix-/usr/local} |
@@ -121,6 +144,7 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then | |||
121 | CYGWIN* | Cygwin* | cygwin* | OS/2*) | 144 | CYGWIN* | Cygwin* | cygwin* | OS/2*) |
122 | EXE='.exe' ;; | 145 | EXE='.exe' ;; |
123 | MINGW*) | 146 | MINGW*) |
147 | LDSHARED=${LDSHARED-"$cc -shared"} | ||
124 | LDSHAREDLIBC="" | 148 | LDSHAREDLIBC="" |
125 | EXE='.exe' ;; | 149 | EXE='.exe' ;; |
126 | QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 | 150 | QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 |