aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:34:38 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:34:38 -0700
commitf4498bea2865325dce71189af47a047529229f22 (patch)
tree06278f21d1bcf0f0860ff792af1cb376b1331231 /configure
parent7147f24cd7b27dd95f6e841851a111cb311a9c07 (diff)
downloadzlib-f4498bea2865325dce71189af47a047529229f22.tar.gz
zlib-f4498bea2865325dce71189af47a047529229f22.tar.bz2
zlib-f4498bea2865325dce71189af47a047529229f22.zip
zlib 1.2.4.3v1.2.4.3
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure34
1 files changed, 29 insertions, 5 deletions
diff --git a/configure b/configure
index 577cba7..7ff484b 100755
--- a/configure
+++ b/configure
@@ -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)
17if test "0$ZLIB_CONFIGURE_EXEC" -lt 1; then 18if 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
32fi 43fi
33 44
34if [ -n "${CHOST}" ]; then 45if [ -n "${CHOST}" ]; then
@@ -42,10 +53,22 @@ VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
42VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h` 53VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h`
43VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` 54VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
44VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` 55VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
45AR=${AR-"${CROSS_PREFIX}ar"} 56if [ -x "${CROSS_PREFIX}ar" ]; then
57 AR=${AR-"${CROSS_PREFIX}ar"}
58else
59 AR=${AR-"ar"}
60fi
46AR_RC="${AR} rc" 61AR_RC="${AR} rc"
47RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"} 62if [ -x "${CROSS_PREFIX}ranlib" ]; then
48NM=${NM-"nm"} 63 RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
64else
65 RANLIB=${RANLIB-"ranlib"}
66fi
67if [ -x "${CROSS_PREFIX}nm" ]; then
68 NM=${NM-"${CROSS_PREFIX}nm"}
69else
70 NM=${NM-"nm"}
71fi
49LDCONFIG=${LDCONFIG-"ldconfig"} 72LDCONFIG=${LDCONFIG-"ldconfig"}
50LDSHAREDLIBC="${LDSHAREDLIBC-"-lc"}" 73LDSHAREDLIBC="${LDSHAREDLIBC-"-lc"}"
51prefix=${prefix-/usr/local} 74prefix=${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