diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2023-08-18 16:01:06 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2023-08-18 16:01:06 -0700 |
commit | 5dc7681ff1f78536386fb4fc7bd0edc7a83c9406 (patch) | |
tree | c09566a4c41b0b2288bbf0699744354ae0cf14d5 /configure | |
parent | 3a98b57e5543a58c61c51a060dea5b1bbfc14aac (diff) | |
download | zlib-5dc7681ff1f78536386fb4fc7bd0edc7a83c9406.tar.gz zlib-5dc7681ff1f78536386fb4fc7bd0edc7a83c9406.tar.bz2 zlib-5dc7681ff1f78536386fb4fc7bd0edc7a83c9406.zip |
Fix version numbering for Darwin shared library.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -44,7 +44,8 @@ STATICLIB=libz.a | |||
44 | 44 | ||
45 | # extract zlib version numbers from zlib.h | 45 | # extract zlib version numbers from zlib.h |
46 | VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < ${SRCDIR}zlib.h` | 46 | VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < ${SRCDIR}zlib.h` |
47 | VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h` | 47 | VERN=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\(\\.[0-9]\{1,\}\)\{1,\}\).*/\1/p'` |
48 | VER1=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\)\\..*/\1/p'` | ||
48 | 49 | ||
49 | # establish commands for library building | 50 | # establish commands for library building |
50 | if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then | 51 | if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then |
@@ -263,7 +264,7 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then | |||
263 | SHAREDLIB=libz$shared_ext | 264 | SHAREDLIB=libz$shared_ext |
264 | SHAREDLIBV=libz.$VER$shared_ext | 265 | SHAREDLIBV=libz.$VER$shared_ext |
265 | SHAREDLIBM=libz.$VER1$shared_ext | 266 | SHAREDLIBM=libz.$VER1$shared_ext |
266 | LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"} | 267 | LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VERN"} |
267 | if "${CROSS_PREFIX}libtool" -V 2>&1 | grep Apple > /dev/null; then | 268 | if "${CROSS_PREFIX}libtool" -V 2>&1 | grep Apple > /dev/null; then |
268 | AR="${CROSS_PREFIX}libtool" | 269 | AR="${CROSS_PREFIX}libtool" |
269 | elif libtool -V 2>&1 | grep Apple > /dev/null; then | 270 | elif libtool -V 2>&1 | grep Apple > /dev/null; then |