Revision: 107458 https://trac.macports.org/changeset/107458 Author: jeremyhu@macports.org Date: 2013-06-29 14:08:49 -0700 (Sat, 29 Jun 2013) Log Message: ----------- zlib: configure should notice that clang is gcc-like (#39523) Modified Paths: -------------- trunk/dports/archivers/zlib/Portfile Added Paths: ----------- trunk/dports/archivers/zlib/files/ trunk/dports/archivers/zlib/files/patch-configure-clang.diff Modified: trunk/dports/archivers/zlib/Portfile =================================================================== --- trunk/dports/archivers/zlib/Portfile 2013-06-29 20:51:14 UTC (rev 107457) +++ trunk/dports/archivers/zlib/Portfile 2013-06-29 21:08:49 UTC (rev 107458) @@ -25,6 +25,9 @@ checksums rmd160 2675993cab2db4a1eb69beb885c118e87bf86c64 \ sha256 831df043236df8e9a7667b9e3bb37e1fcb1220a0f163b6de2626774b9590d057 +patchfiles patch-configure-clang.diff +patch.pre_args -p1 + minimum_xcodeversions {8 2.4.1 9 3.1} configure.universal_args Added: trunk/dports/archivers/zlib/files/patch-configure-clang.diff =================================================================== --- trunk/dports/archivers/zlib/files/patch-configure-clang.diff (rev 0) +++ trunk/dports/archivers/zlib/files/patch-configure-clang.diff 2013-06-29 21:08:49 UTC (rev 107458) @@ -0,0 +1,33 @@ +From 8a4e86305a0ed5cf3b0f0cd7338c77a4b564f486 Mon Sep 17 00:00:00 2001 +From: Daniel Dunbar <daniel@zuster.org> +Date: Mon, 24 Jun 2013 16:02:55 -0700 +Subject: [PATCH] Fix detection of "gcc"-likeness for use with LLVM/Clang. + + - When CC does not include "gcc" or "clang" explicitly in the name, + then configure will check the "$CC -v" output to see if the + compiler is gcc-like. In such cases it should also recognize the + presence of "clang" as indicating a gcc-like compiler. + + - This fixes problems when using Clang as the default compiler "/usr/bin/cc" on + Darwin, because otherwise the configure logic does not properly compute the + shared library extension, etc. + +--- + configure | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure b/configure +index b77a8a8..54f33f7 100755 +--- a/configure ++++ b/configure +@@ -159,6 +159,7 @@ case "$cc" in + esac + case `$cc -v 2>&1` in + *gcc*) gcc=1 ;; ++ *clang*) gcc=1 ;; + esac + + show $cc -c $test.c +-- +1.8.2.1 (Apple Git-45) +