--- CMakeLists.txt.orig	2011-03-16 20:21:07.000000000 -0400
+++ CMakeLists.txt	2013-03-27 15:33:37.000000000 -0400
@@ -62,14 +62,14 @@
   OFF)
   
 SET(ENABLE_ANSI_MODE OFF)
-IF(CMAKE_COMPILER_IS_GNUCXX)
+IF(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
   SET(ENABLE_ANSI_MODE ON)
   
   #exceptions:
   IF(MINGW OR CYGWIN)
     SET(ENABLE_ANSI_MODE OFF)
   ENDIF(MINGW OR CYGWIN)
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+ENDIF(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
 
 OPTION(ENABLE_ANSI_MODE
   "compile with -ansi flag"
@@ -109,7 +109,7 @@
 
 #check flags...
 INCLUDE (TestCXXAcceptsFlag)
-IF ( CMAKE_COMPILER_IS_GNUCC )
+IF ( CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" MATCHES "Clang" )
     CHECK_CXX_ACCEPTS_FLAG(-pg GccFlagPg)
     IF ( GccFlagPg )
         OPTION(ENABLE_GPROF
@@ -131,7 +131,7 @@
    IF( ENABLE_ANSI_MODE )
     SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi")
    ENDIF ( ENABLE_ANSI_MODE )
-ENDIF(CMAKE_COMPILER_IS_GNUCC) 
+ENDIF(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
 
 
 #Single output directory for building all executables and libraries.
@@ -163,7 +163,7 @@
   SET(BUILD_CONTRIBS_LIB 1)
 ENDIF ( BUILD_CONTRIBS )
 IF ( BUILD_CONTRIBS_LIB )
-  ADD_SUBDIRECTORY (src/contribs-lib EXCLUDE_FROM_ALL)
+  ADD_SUBDIRECTORY (src/contribs-lib)
 ENDIF ( BUILD_CONTRIBS_LIB )
 
 
