From: Un1q32 Date: Tue, 23 Apr 2024 23:54:05 +0000 (-0400) Subject: make darwin cross compilation possible X-Git-Tag: 2.2.0~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee618f6f19f546465b56e1c393f1d6cca13818f2;p=thirdparty%2Fzlib-ng.git make darwin cross compilation possible https://github.com/madler/zlib/pull/789 --- diff --git a/configure b/configure index 81e97c41..1c7a1ea4 100755 --- a/configure +++ b/configure @@ -471,7 +471,9 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then SHAREDTARGET=$SHAREDLIBV LDSHARED=${LDSHARED-"$cc"} LDSHAREDFLAGS="-dynamiclib -install_name @rpath/${SHAREDLIBM} -compatibility_version ${VER1} -current_version ${VER3}" - if libtool -V 2>&1 | grep Apple > /dev/null; then + if "${CROSS_PREFIX}libtool" -V 2>&1 | grep Apple > /dev/null; then + AR="${CROSS_PREFIX}libtool" + elif libtool -V 2>&1 | grep Apple > /dev/null; then AR="libtool" else AR="/usr/bin/libtool"