summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rwxr-xr-xconfigure.ac11
-rw-r--r--src/Makefile.am4
3 files changed, 16 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 02035cd9a..3c962a6cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -114,6 +114,7 @@ build/makecheck5
build/makecheck6
build/clmake
build/bmakesnapshot
+build/checkplugin.so
# debian
debian/*
diff --git a/configure.ac b/configure.ac
index fda56bbce..5c4223679 100755
--- a/configure.ac
+++ b/configure.ac
@@ -378,6 +378,17 @@ esac],[cilkplus_enabled=false])
AM_CONDITIONAL(ENABLE_CILKPLUS, test x$cilkplus_enabled = xtrue)
+# Enable gcc check plugin
+AC_ARG_ENABLE(checkplugin,
+[ --enable-checkplugin Turn on gcc check plugin],
+[case "${enableval}" in
+ yes) checkplugin_enabled=true ;;
+ no) checkplugin_enabled=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-checkplugin) ;;
+esac],[checkplugin_enabled=false])
+
+AM_CONDITIONAL(ENABLE_CHECKPLUGIN, test x$checkplugin_enabled = xtrue)
+
AC_CONFIG_FILES([
manaplus.spec
Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index d5052ae55..896acfece 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,6 +13,10 @@ if ENABLE_PORTABLE
manaplus_CXXFLAGS += -DENABLE_PORTABLE
endif
+if ENABLE_CHECKPLUGIN
+manaplus_CXXFLAGS += -fplugin=../build/checkplugin.so -fplugin-arg-checkplugin-command=parse
+endif
+
if USE_OPENGL
manaplus_CXXFLAGS += -DUSE_OPENGL
endif