]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
make darwin cross compilation possible
authorUn1q32 <joey.t.reinhart@gmail.com>
Tue, 23 Apr 2024 23:54:05 +0000 (19:54 -0400)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 6 May 2024 08:03:57 +0000 (10:03 +0200)
https://github.com/madler/zlib/pull/789

configure

index 81e97c416aec1b351c4d2f4ad80857e9aa3bc410..1c7a1ea4db8b8071b3cfa66d6f5a5521d3921099 100755 (executable)
--- 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"