aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--src/Makefile.am6
2 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 3cd4e0b..2e56b74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,8 +24,11 @@ LT_INIT
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CC_C99
+AC_PROG_GREP
AC_PROG_INSTALL
+AM_CONDITIONAL(CLANG, [$CXX --version | $GREP clang >/dev/null])
+
AC_CHECK_PROG(DATE, date, date)
if [[ x$DATE = x ]]; then
AC_MSG_ERROR([Required tool date not found!])
diff --git a/src/Makefile.am b/src/Makefile.am
index 50ef424..d068856 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,11 @@
include $(top_srcdir)/bootstrap.am
AM_CFLAGS = -Wall -std=c99
-AM_CXXFLAGS = -Wall -Wno-mismatched-tags -Wno-char-subscripts
+AM_CXXFLAGS = -Wall -Wno-char-subscripts
+if CLANG
+AM_CXXFLAGS += -Wno-mismatched-tags
+endif
+
AM_CPPFLAGS = -D'DEFAULT_SCITECOPATH="@DEFAULT_SCITECOPATH@"'
if NEED_COMPAT
AM_CPPFLAGS += -I@top_srcdir@/compat