Apparently the default compiler on OS X and FreeBSD is now clang, and
it doesn't like our CHECK_VALUE_FITS() definition. So for now, just
don't specify -Werror when we detect clang.
Thanks to Alexander Barton <alex@barton.de>, Thomas Klausner
<tk@giga.or.at>, Sebastian Schumb <sebastian@sebastians-site.de>, and
Zoran Zaric <zz@zoranzaric.de> for reporting the problem.
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Alexander Barton <alex@barton.de>
OS:=$(shell uname | sed 's/[-_].*//')
-CFLAGS := -Wall -O2 -Werror $(PYINCLUDE) $(CFLAGS)
+
+ifeq ($(shell $(CC) --version | grep clang),)
+ CFLAGS := -Wall -Werror -O2 $(PYINCLUDE) $(CFLAGS)
+else # clang
+ CFLAGS := -Wall -O2 $(PYINCLUDE) $(CFLAGS)
+endif
+
SOEXT:=.so
ifeq ($(OS),CYGWIN)