aboutsummaryrefslogtreecommitdiff
path: root/m4/gcc-plugin.m4
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-09-02 22:25:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-09-02 22:25:48 +0200
commit2088891f11ab7aa3f843239cebe06a2850117b0b (patch)
tree3d80655c14ab4bc8101af4bc56e9ac99105a56d3 /m4/gcc-plugin.m4
parent4eb47d2965ca832243ed80f4140c34cfbed96863 (diff)
Add automake build system support
Diffstat (limited to 'm4/gcc-plugin.m4')
-rw-r--r--m4/gcc-plugin.m428
1 files changed, 28 insertions, 0 deletions
diff --git a/m4/gcc-plugin.m4 b/m4/gcc-plugin.m4
new file mode 100644
index 0000000..d270ce0
--- /dev/null
+++ b/m4/gcc-plugin.m4
@@ -0,0 +1,28 @@
+dnl file : m4/gcc-plugin.m4
+dnl author : Boris Kolpackov <boris@codesynthesis.com>
+dnl copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+dnl license : GNU GPL v2; see accompanying LICENSE file
+dnl
+dnl GCC_PLUGIN
+dnl
+AC_DEFUN([GCC_PLUGIN], [
+gcc_plugin_support=no
+
+if test x"$GXX" != xyes; then
+ AC_MSG_ERROR([$CXX is not a GNU C++ compiler])
+fi
+
+AC_MSG_CHECKING([whether $CXX supports plugins])
+
+gcc_plugin_base=`$CXX -print-file-name=plugin 2>/dev/null`
+
+if test x"$gcc_plugin_base" = xplugin; then
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([$CXX does not support plugins; reconfigure GCC with --enable-plugin])
+else
+ AC_MSG_RESULT([yes])
+ gcc_plugin_support=yes
+fi
+
+CPPFLAGS="$CPPFLAGS -I$gcc_plugin_base/include"
+])dnl