[gegl] Prefer clang as the compiler on OSX >= 10.7
- From: Daniel Sabo <daniels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Prefer clang as the compiler on OSX >= 10.7
- Date: Thu, 10 Oct 2013 12:23:49 +0000 (UTC)
commit becdbd5d70b9b8a51d60954d79b5c67a4294e9f4
Author: Daniel Sabo <DanielSabo gmail com>
Date: Thu Oct 10 05:18:19 2013 -0700
Prefer clang as the compiler on OSX >= 10.7
configure.ac | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index bfc3115..f567090 100644
--- a/configure.ac
+++ b/configure.ac
@@ -132,16 +132,40 @@ AC_SUBST(LUA_REQUIRED_VERSION)
dnl ==========================================================================
+AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([1.11 no-define dist-bzip2 no-dist-gzip -Wno-portability])
dnl Initialize maintainer mode
AM_MAINTAINER_MODE([enable])
-
###############
# Generic stuff
###############
+dnl Prefer clang on OSX, because GCC isn't updated
+
+case "$build_os" in
+ darwin10.* | darwin9.* | darwin8.*)
+ ;;
+ darwin*)
+ prefered_cc="clang"
+ prefered_cxx="clang++"
+ ;;
+ *)
+ ;;
+esac
+
+if test -z "$CC" && test -n "$prefered_cc"; then
+ AC_MSG_NOTICE([setting CC to $prefered_cc for $build_os])
+ CC=$prefered_cc
+fi
+
+if test -z "$CXX" && test -n "$prefered_cc"; then
+ AC_MSG_NOTICE([setting CXX to $prefered_cxx for $build_os])
+ CXX=$prefered_cxx
+fi
+
dnl Checks for programs.
+
AC_PROG_CC
AC_PROG_CC_C99
AC_PROG_CXX
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]