summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2010-09-14 23:11:46 +0200
committerSergei Golubchik <sergii@pisem.net>2010-09-14 23:11:46 +0200
commit422c1366584b022617531d4dcfae6134213f10b8 (patch)
tree2942bbf90eab8eead0c4ea6f02dcc1897d4e51fe
parent50ffaf6d0f8b1ef4e8f4604d6526d3f758e9657b (diff)
downloadmariadb-git-422c1366584b022617531d4dcfae6134213f10b8.tar.gz
MYSQL_PLUGIN_WITHOUT() macro for plug.in
Using it in oqgraph/plug.in to fix bug#635633
-rw-r--r--config/ac-macros/plugins.m424
-rw-r--r--storage/oqgraph/plug.in2
2 files changed, 25 insertions, 1 deletions
diff --git a/config/ac-macros/plugins.m4 b/config/ac-macros/plugins.m4
index f74c4daba61..ab308a1cc1f 100644
--- a/config/ac-macros/plugins.m4
+++ b/config/ac-macros/plugins.m4
@@ -203,6 +203,30 @@ AC_DEFUN([_MYSQL_PLUGIN_DISABLED],[
dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_PLUGIN_WITHOUT
+dnl
+dnl SYNOPSIS
+dnl MYSQL_PLUGIN_WITHOUT([name])
+dnl
+dnl DESCRIPTION
+dnl Exclude the plugin from being built, as if --without-plugin-name
+dnl was specified.
+dnl If the plugin was selected manually by --with-plugin-name,
+dnl excluding it here will abort the configure script with an error,
+dnl otherwise plugin will be silently disabled.
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_PLUGIN_WITHOUT],[
+ MYSQL_REQUIRE_PLUGIN([$1])
+ if test "X[$with_plugin_]$1" = Xyes; then
+ AC_MSG_ERROR([Plugin $1 cannot be built])
+ else
+ [with_plugin_]$1=no
+ fi
+])
+
+dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_PLUGIN_DEPENDS
dnl
dnl SYNOPSIS
diff --git a/storage/oqgraph/plug.in b/storage/oqgraph/plug.in
index 6331dade3dd..405afed1f18 100644
--- a/storage/oqgraph/plug.in
+++ b/storage/oqgraph/plug.in
@@ -35,6 +35,6 @@ AC_PREPROC_IFELSE(
],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
- with_plugin_oqgraph=no])
+ MYSQL_PLUGIN_WITHOUT(oqgraph)])
AC_LANG_POP()