/pidgin/main: 3a12f041d9b1: Clang: better configure.ac recognition

Tomasz Wasilczyk twasilczyk at pidgin.im
Fri Oct 4 17:50:42 EDT 2013


Changeset: 3a12f041d9b188bba4ad78cf6911144b4336e4f5
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2013-10-04 23:50 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/3a12f041d9b1

Description:

Clang: better configure.ac recognition

diffstat:

 configure.ac |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (18 lines):

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1490,7 +1490,13 @@ AC_SUBST(CFLAGS)
 
 AC_PATH_PROG(pidginpath, pidgin)
 
-if test "${CC: -6}" = "/clang" -o "$CC" = "clang"; then
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
+	#if !defined(__clang__)
+	#error
+	#endif
+])], have_clang=yes, have_clang=no)
+
+if test "x$have_clang" = "xyes"; then
 	AC_DEFINE([HAVE_CLANG], [1], [Define to 1 if you compile with clang.])
 	GLIB_LIBS=`echo $GLIB_LIBS | $sedpath 's/-pthread/-lpthread/'`
 



More information about the Commits mailing list