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)

