summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorunknown <acurtis@xiphis.org>2006-05-01 22:45:31 -0700
committerunknown <acurtis@xiphis.org>2006-05-01 22:45:31 -0700
commitb0efe477fbec37c273098bc85263b195544f2edc (patch)
treec54f50741a391458499e36ae02a2103f5717f07e /config
parentfb2c04a15f6bb4a837e312019e18f881d43bbdd8 (diff)
parentfa15fbf34738550527b6b102960b7d9750fd959d (diff)
downloadmariadb-git-b0efe477fbec37c273098bc85263b195544f2edc.tar.gz
Merge xiphis.org:/home/antony/work2/mysql-5.1
into xiphis.org:/home/antony/work2/wl3201-post-review.2 BitKeeper/etc/ignore: auto-union configure.in: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/handler.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_yacc.yy: Auto merged storage/archive/ha_archive.cc: Auto merged storage/archive/ha_archive.h: Auto merged
Diffstat (limited to 'config')
-rw-r--r--config/ac-macros/ha_archive.m429
-rw-r--r--config/ac-macros/ha_berkeley.m418
-rw-r--r--config/ac-macros/ha_blackhole.m429
-rw-r--r--config/ac-macros/ha_example.m430
-rw-r--r--config/ac-macros/ha_federated.m429
-rw-r--r--config/ac-macros/ha_innodb.m477
-rw-r--r--config/ac-macros/ha_ndbcluster.m47
-rw-r--r--config/ac-macros/ha_partition.m433
-rw-r--r--config/ac-macros/ha_tina.m429
-rw-r--r--config/ac-macros/misc.m48
-rw-r--r--config/ac-macros/plugins.m4715
-rw-r--r--config/ac-macros/storage.m455
12 files changed, 727 insertions, 332 deletions
diff --git a/config/ac-macros/ha_archive.m4 b/config/ac-macros/ha_archive.m4
deleted file mode 100644
index 2d2558ea600..00000000000
--- a/config/ac-macros/ha_archive.m4
+++ /dev/null
@@ -1,29 +0,0 @@
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_ARCHIVEDB
-dnl Sets HAVE_ARCHIVE_DB if --with-archive-storage-engine is used
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([MYSQL_CHECK_ARCHIVEDB], [
- AC_ARG_WITH([archive-storage-engine],
- [
- --with-archive-storage-engine
- Enable the Archive Storage Engine],
- [archivedb="$withval"],
- [archivedb=no])
- AC_MSG_CHECKING([for archive storage engine])
-
- case "$archivedb" in
- yes )
- AC_DEFINE([HAVE_ARCHIVE_DB], [1], [Builds Archive Storage Engine])
- AC_MSG_RESULT([yes])
- [archivedb=yes]
- ;;
- * )
- AC_MSG_RESULT([no])
- [archivedb=no]
- ;;
- esac
-
-])
-dnl ---------------------------------------------------------------------------
-dnl END OF MYSQL_CHECK_ARCHIVE SECTION
-dnl ---------------------------------------------------------------------------
diff --git a/config/ac-macros/ha_berkeley.m4 b/config/ac-macros/ha_berkeley.m4
index 183a622dfc9..c7d99bd8e03 100644
--- a/config/ac-macros/ha_berkeley.m4
+++ b/config/ac-macros/ha_berkeley.m4
@@ -8,23 +8,20 @@ dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_SETUP_BERKELEY_DB], [
AC_ARG_WITH([berkeley-db],
- [
- --with-berkeley-db[=DIR]
- Use BerkeleyDB located in DIR],
+ AS_HELP_STRING([--with-berkeley-db[[[[[=DIR]]]]]],
+ [Use BerkeleyDB located in DIR]),
[bdb="$withval"],
[bdb=yes])
AC_ARG_WITH([berkeley-db-includes],
- [
- --with-berkeley-db-includes=DIR
- Find Berkeley DB headers in DIR],
+ AS_HELP_STRING([--with-berkeley-db-includes=DIR],
+ [Find Berkeley DB headers in DIR]),
[bdb_includes="$withval"],
[bdb_includes=default])
AC_ARG_WITH([berkeley-db-libs],
- [
- --with-berkeley-db-libs=DIR
- Find Berkeley DB libraries in DIR],
+ AS_HELP_STRING([--with-berkeley-db-libs=DIR],
+ [Find Berkeley DB libraries in DIR]),
[bdb_libs="$withval"],
[bdb_libs=default])
@@ -120,12 +117,9 @@ AC_DEFUN([MYSQL_SETUP_BERKELEY_DB], [
sh $rel_srcdir/$bdb/dist/configure $bdb_conf_flags) || \
AC_MSG_ERROR([could not configure Berkeley DB])
- mysql_se_libs="$mysql_se_libs $bdb_libs_with_path"
-
AC_SUBST(bdb_includes)
AC_SUBST(bdb_libs)
AC_SUBST(bdb_libs_with_path)
- AC_CONFIG_FILES(storage/bdb/Makefile)
])
AC_DEFUN([MYSQL_CHECK_INSTALLED_BDB], [
diff --git a/config/ac-macros/ha_blackhole.m4 b/config/ac-macros/ha_blackhole.m4
deleted file mode 100644
index cc4d360f5a8..00000000000
--- a/config/ac-macros/ha_blackhole.m4
+++ /dev/null
@@ -1,29 +0,0 @@
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_BLACKHOLEDB
-dnl Sets HAVE_BLACKHOLE_DB if --with-blackhole-storage-engine is used
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([MYSQL_CHECK_BLACKHOLEDB], [
- AC_ARG_WITH([blackhole-storage-engine],
- [
- --with-blackhole-storage-engine
- Enable the Blackhole Storage Engine],
- [blackholedb="$withval"],
- [blackholedb=no])
- AC_MSG_CHECKING([for blackhole storage engine])
-
- case "$blackholedb" in
- yes )
- AC_DEFINE([HAVE_BLACKHOLE_DB], [1], [Builds Blackhole Storage Engine])
- AC_MSG_RESULT([yes])
- [blackholedb=yes]
- ;;
- * )
- AC_MSG_RESULT([no])
- [blackholedb=no]
- ;;
- esac
-
-])
-dnl ---------------------------------------------------------------------------
-dnl END OF MYSQL_CHECK_BLACKHOLE SECTION
-dnl ---------------------------------------------------------------------------
diff --git a/config/ac-macros/ha_example.m4 b/config/ac-macros/ha_example.m4
deleted file mode 100644
index f8067931ce6..00000000000
--- a/config/ac-macros/ha_example.m4
+++ /dev/null
@@ -1,30 +0,0 @@
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_EXAMPLEDB
-dnl Sets HAVE_EXAMPLE_DB if --with-example-storage-engine is used
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([MYSQL_CHECK_EXAMPLEDB], [
- AC_ARG_WITH([example-storage-engine],
- [
- --with-example-storage-engine
- Enable the Example Storage Engine],
- [exampledb="$withval"],
- [exampledb=no])
- AC_MSG_CHECKING([for example storage engine])
-
- case "$exampledb" in
- yes )
- AC_DEFINE([HAVE_EXAMPLE_DB], [1], [Builds Example DB])
- AC_MSG_RESULT([yes])
- [exampledb=yes]
- ;;
- * )
- AC_MSG_RESULT([no])
- [exampledb=no]
- ;;
- esac
-
-])
-dnl ---------------------------------------------------------------------------
-dnl END OF MYSQL_CHECK_EXAMPLE SECTION
-dnl ---------------------------------------------------------------------------
-
diff --git a/config/ac-macros/ha_federated.m4 b/config/ac-macros/ha_federated.m4
deleted file mode 100644
index 5c991f31666..00000000000
--- a/config/ac-macros/ha_federated.m4
+++ /dev/null
@@ -1,29 +0,0 @@
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_FEDERATED
-dnl Sets HAVE_FEDERATED if --with-federated-storage-engine is used
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([MYSQL_CHECK_FEDERATED], [
- AC_ARG_WITH([federated-storage-engine],
- [
- --with-federated-storage-engine
- Enable the MySQL Federated Storage Engine],
- [federateddb="$withval"],
- [federateddb=no])
- AC_MSG_CHECKING([for MySQL federated storage engine])
-
- case "$federateddb" in
- yes )
- AC_DEFINE([HAVE_FEDERATED_DB], [1], [Define to enable Federated Handler])
- AC_MSG_RESULT([yes])
- [federateddb=yes]
- ;;
- * )
- AC_MSG_RESULT([no])
- [federateddb=no]
- ;;
- esac
-
-])
-dnl ---------------------------------------------------------------------------
-dnl END OF MYSQL_CHECK_FEDERATED SECTION
-dnl ---------------------------------------------------------------------------
diff --git a/config/ac-macros/ha_innodb.m4 b/config/ac-macros/ha_innodb.m4
deleted file mode 100644
index 287b77c8851..00000000000
--- a/config/ac-macros/ha_innodb.m4
+++ /dev/null
@@ -1,77 +0,0 @@
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_INNODB
-dnl Sets HAVE_INNOBASE_DB if --with-innodb is used
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_CHECK_INNODB], [
- AC_ARG_WITH([innodb],
- [
- --without-innodb Do not include the InnoDB table handler],
- [innodb="$withval"],
- [innodb=yes])
-
- AC_MSG_CHECKING([for Innodb])
-
- have_innodb=no
- innodb_includes=
- innodb_libs=
- case "$innodb" in
- yes )
- AC_MSG_RESULT([Using Innodb])
- AC_DEFINE([HAVE_INNOBASE_DB], [1], [Using Innobase DB])
- have_innodb="yes"
- innodb_includes="-I\$(top_builddir)/innobase/include"
- innodb_system_libs=""
-dnl Some libs are listed several times, in order for gcc to sort out
-dnl circular references.
- innodb_libs="\
- \$(top_builddir)/storage/innobase/usr/libusr.a\
- \$(top_builddir)/storage/innobase/srv/libsrv.a\
- \$(top_builddir)/storage/innobase/dict/libdict.a\
- \$(top_builddir)/storage/innobase/que/libque.a\
- \$(top_builddir)/storage/innobase/srv/libsrv.a\
- \$(top_builddir)/storage/innobase/ibuf/libibuf.a\
- \$(top_builddir)/storage/innobase/row/librow.a\
- \$(top_builddir)/storage/innobase/pars/libpars.a\
- \$(top_builddir)/storage/innobase/btr/libbtr.a\
- \$(top_builddir)/storage/innobase/trx/libtrx.a\
- \$(top_builddir)/storage/innobase/read/libread.a\
- \$(top_builddir)/storage/innobase/usr/libusr.a\
- \$(top_builddir)/storage/innobase/buf/libbuf.a\
- \$(top_builddir)/storage/innobase/ibuf/libibuf.a\
- \$(top_builddir)/storage/innobase/eval/libeval.a\
- \$(top_builddir)/storage/innobase/log/liblog.a\
- \$(top_builddir)/storage/innobase/fsp/libfsp.a\
- \$(top_builddir)/storage/innobase/fut/libfut.a\
- \$(top_builddir)/storage/innobase/fil/libfil.a\
- \$(top_builddir)/storage/innobase/lock/liblock.a\
- \$(top_builddir)/storage/innobase/mtr/libmtr.a\
- \$(top_builddir)/storage/innobase/page/libpage.a\
- \$(top_builddir)/storage/innobase/rem/librem.a\
- \$(top_builddir)/storage/innobase/thr/libthr.a\
- \$(top_builddir)/storage/innobase/sync/libsync.a\
- \$(top_builddir)/storage/innobase/data/libdata.a\
- \$(top_builddir)/storage/innobase/mach/libmach.a\
- \$(top_builddir)/storage/innobase/ha/libha.a\
- \$(top_builddir)/storage/innobase/dyn/libdyn.a\
- \$(top_builddir)/storage/innobase/mem/libmem.a\
- \$(top_builddir)/storage/innobase/sync/libsync.a\
- \$(top_builddir)/storage/innobase/ut/libut.a\
- \$(top_builddir)/storage/innobase/os/libos.a\
- \$(top_builddir)/storage/innobase/ut/libut.a"
-
- AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"])
- ;;
- * )
- AC_MSG_RESULT([Not using Innodb])
- ;;
- esac
-
- AC_SUBST(innodb_includes)
- AC_SUBST(innodb_libs)
- AC_SUBST(innodb_system_libs)
-])
-
-dnl ---------------------------------------------------------------------------
-dnl END OF MYSQL_CHECK_INNODB SECTION
-dnl ---------------------------------------------------------------------------
diff --git a/config/ac-macros/ha_ndbcluster.m4 b/config/ac-macros/ha_ndbcluster.m4
index 8e839d8fee9..aee445f8d58 100644
--- a/config/ac-macros/ha_ndbcluster.m4
+++ b/config/ac-macros/ha_ndbcluster.m4
@@ -191,7 +191,6 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
ndbcluster_libs="\$(top_builddir)/storage/ndb/src/.libs/libndbclient.a"
ndbcluster_system_libs=""
ndb_mgmclient_libs="\$(top_builddir)/storage/ndb/src/mgmclient/libndbmgmclient.la"
- mysql_se_objs="$mysql_se_objs ha_ndbcluster_binlog.o"
MYSQL_CHECK_NDB_OPTIONS
NDBCLUSTER_WORKAROUNDS
@@ -282,9 +281,6 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
ndb_bin_am_ldflags=""
fi
- mysql_se_libs="$mysql_se_libs $ndbcluster_libs $ndbcluster_system_libs"
- mysql_se_libs="$mysql_se_libs $NDB_SCI_LIBS"
-
AC_SUBST(NDB_VERSION_MAJOR)
AC_SUBST(NDB_VERSION_MINOR)
AC_SUBST(NDB_VERSION_BUILD)
@@ -302,6 +298,7 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
AC_SUBST(ndbcluster_libs)
AC_SUBST(ndbcluster_system_libs)
AC_SUBST(ndb_mgmclient_libs)
+ AC_SUBST(NDB_SCI_LIBS)
AC_SUBST(ndb_transporter_opt_objs)
AC_SUBST(ndb_port)
@@ -311,7 +308,7 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
AC_SUBST(NDB_DEFS)
AC_SUBST(ndb_cxxflags_fix)
- AC_CONFIG_FILES(storage/ndb/Makefile storage/ndb/include/Makefile dnl
+ AC_CONFIG_FILES(storage/ndb/include/Makefile dnl
storage/ndb/src/Makefile storage/ndb/src/common/Makefile dnl
storage/ndb/docs/Makefile dnl
storage/ndb/tools/Makefile dnl
diff --git a/config/ac-macros/ha_partition.m4 b/config/ac-macros/ha_partition.m4
deleted file mode 100644
index 1ce7dedc5f3..00000000000
--- a/config/ac-macros/ha_partition.m4
+++ /dev/null
@@ -1,33 +0,0 @@
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_PARTITIONDB
-dnl Sets HAVE_PARTITION_DB if --with-partition is used
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([MYSQL_CHECK_PARTITIONDB], [
- AC_ARG_WITH([partition],
- [
- --with-partition
- Enable the Partition Storage Engine],
- [partitiondb="$withval"],
- [partitiondb=no])
- AC_MSG_CHECKING([for partition])
-
-dnl case "$partitiondb" in
-dnl yes )
-dnl AC_DEFINE([HAVE_PARTITION_DB], [1], [Builds Partition DB])
-dnl AC_MSG_RESULT([yes])
-dnl [partitiondb=yes]
-dnl ;;
-dnl * )
-dnl AC_MSG_RESULT([no])
-dnl [partitiondb=no]
-dnl ;;
-dnl esac
- AC_DEFINE([HAVE_PARTITION_DB], [1], [Builds Partition DB])
- AC_MSG_RESULT([yes])
- [partitiondb=yes]
-
-])
-dnl ---------------------------------------------------------------------------
-dnl END OF MYSQL_CHECK_PARTITION SECTION
-dnl ---------------------------------------------------------------------------
-
diff --git a/config/ac-macros/ha_tina.m4 b/config/ac-macros/ha_tina.m4
deleted file mode 100644
index fe6e382ce20..00000000000
--- a/config/ac-macros/ha_tina.m4
+++ /dev/null
@@ -1,29 +0,0 @@
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_CSVDB
-dnl Sets HAVE_CSV_DB if --with-csv-storage-engine is used
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([MYSQL_CHECK_CSVDB], [
- AC_ARG_WITH([csv-storage-engine],
- [
- --with-csv-storage-engine
- Enable the CSV Storage Engine],
- [csvdb="$withval"],
- [csvdb=no])
- AC_MSG_CHECKING([for csv storage engine])
-
- case "$csvdb" in
- yes )
- AC_DEFINE([HAVE_CSV_DB], [1], [Builds the CSV Storage Engine])
- AC_MSG_RESULT([yes])
- [csvdb=yes]
- ;;
- * )
- AC_MSG_RESULT([no])
- [csvdb=no]
- ;;
- esac
-
-])
-dnl ---------------------------------------------------------------------------
-dnl END OF MYSQL_CHECK_CSV SECTION
-dnl ---------------------------------------------------------------------------
diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4
index d8199f5970e..a2f70071e2d 100644
--- a/config/ac-macros/misc.m4
+++ b/config/ac-macros/misc.m4
@@ -675,8 +675,8 @@ dnl Sets BIG_TABLES if --with-big-tables is used
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_CHECK_BIG_TABLES], [
AC_ARG_WITH([big-tables],
- [
- --with-big-tables Support tables with more than 4 G rows even on 32 bit platforms],
+ AS_HELP_STRING([--with-big-tables],
+ [Support tables with more than 4 G rows even on 32 bit platforms]),
[bigtables="$withval"],
[bigtables=no])
AC_MSG_CHECKING([for big tables support])
@@ -703,8 +703,8 @@ dnl Sets MAX_INDEXES
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_CHECK_MAX_INDEXES], [
AC_ARG_WITH([max-indexes],
- [
- --with-max-indexes=\# Sets the maximum number of indexes per table, default 64],
+ AS_HELP_STRING([--with-max-indexes=N],
+ [Sets the maximum number of indexes per table, default 64]),
[max_indexes="$withval"],
[max_indexes=64])
AC_MSG_CHECKING([max indexes per table])
diff --git a/config/ac-macros/plugins.m4 b/config/ac-macros/plugins.m4
new file mode 100644
index 00000000000..0ca952c4354
--- /dev/null
+++ b/config/ac-macros/plugins.m4
@@ -0,0 +1,715 @@
+dnl ===========================================================================
+dnl Support for mysql server plugins
+dnl ===========================================================================
+dnl
+dnl WorkLog#3201
+dnl
+dnl Framework for pluggable static and dynamic plugins for mysql
+dnl
+dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_PLUGIN
+dnl
+dnl SYNOPSIS
+dnl MYSQL_PLUGIN([name],[Plugin name],
+dnl [Plugin description],
+dnl [group,group...])
+dnl
+dnl DESCRIPTION
+dnl First declaration for a plugin (mandatory).
+dnl Adds plugin as member to configuration groups (if specified)
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_PLUGIN],[
+ _MYSQL_PLUGIN(
+ [$1],
+ [__MYSQL_PLUGIN_]AS_TR_CPP([$1])[__],
+ m4_default([$2], [$1 plugin]),
+ m4_default([$3], [plugin for $1]),
+ m4_default([$4], []),
+ )
+])
+
+AC_DEFUN([_MYSQL_PLUGIN],[
+ m4_ifdef([$2], [
+ AC_FATAL([Duplicate MYSQL_PLUGIN declaration for $3])
+ ],[
+ m4_define([$2], [$1])
+ _MYSQL_PLUGAPPEND([__mysql_plugin_list__],[$1])
+ m4_define([MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]), [$3])
+ m4_define([MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]), [$4])
+ ifelse([$5], [], [], [
+ _MYSQL_PLUGAPPEND_META([$1], $5)
+ ])
+ ])
+])
+
+
+dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_STORAGE_ENGINE
+dnl
+dnl SYNOPSIS
+dnl MYSQL_STORAGE_ENGINE([name],[legacy-option],[Storage engine name],
+dnl [Storage engine description],[group,group...])
+dnl
+dnl DESCRIPTION
+dnl Short cut for storage engine declarations
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_STORAGE_ENGINE],[
+ MYSQL_PLUGIN([$1], [$3], [$4], [[$5]])
+ MYSQL_PLUGIN_DEFINE([$1], [WITH_]AS_TR_CPP([$1])[_STORAGE_ENGINE])
+ ifelse([$2],[no],[],[
+ _MYSQL_LEGACY_STORAGE_ENGINE(
+ m4_bpatsubst(m4_default([$2], [$1-storage-engine]), -, _))
+ ])
+])
+
+AC_DEFUN([_MYSQL_LEGACY_STORAGE_ENGINE],[
+if test "[${with_]$1[+set}]" = set; then
+ [with_plugin_]$1="[$with_]$1"
+fi
+])
+
+
+dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_PLUGIN_DEFINE
+dnl
+dnl SYNOPSIS
+dnl MYSQL_PLUGIN_DEFILE([name],[MYSQL_CPP_DEFINE])
+dnl
+dnl DESCRIPTION
+dnl When a plugin is to be statically linked, define the C macro
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_PLUGIN_DEFINE],[
+ MYSQL_REQUIRE_PLUGIN([$1])
+ m4_define([MYSQL_PLUGIN_DEFINE_]AS_TR_CPP([$1]), [$2])
+])
+
+
+dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_PLUGIN_DIRECTORY
+dnl
+dnl SYNOPSIS
+dnl MYSQL_PLUGIN_DIRECTORY([name],[plugin/dir])
+dnl
+dnl DESCRIPTION
+dnl Adds a directory to the build process
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_PLUGIN_DIRECTORY],[
+ MYSQL_REQUIRE_PLUGIN([$1])
+ m4_define([MYSQL_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]), [$2])
+])
+
+
+dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_PLUGIN_STATIC
+dnl
+dnl SYNOPSIS
+dnl MYSQL_PLUGIN_STATIC([name],[libmyplugin.a])
+dnl
+dnl DESCRIPTION
+dnl Declare the name for the static library
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_PLUGIN_STATIC],[
+ MYSQL_REQUIRE_PLUGIN([$1])
+ m4_define([MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]), [$2])
+])
+
+
+dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_PLUGIN_DYNAMIC
+dnl
+dnl SYNOPSIS
+dnl MYSQL_PLUGIN_DYNAMIC([name],[myplugin.la])
+dnl
+dnl DESCRIPTION
+dnl Declare the name for the shared library
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_PLUGIN_DYNAMIC],[
+ MYSQL_REQUIRE_PLUGIN([$1])
+ m4_define([MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]), [$2])
+])
+
+
+dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_PLUGIN_MANDATORY
+dnl
+dnl SYNOPSIS
+dnl MYSQL_PLUGIN_MANDATORY([name])
+dnl
+dnl DESCRIPTION
+dnl Marks the specified plugin as a mandatory plugin
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_PLUGIN_MANDATORY],[
+ MYSQL_REQUIRE_PLUGIN([$1])
+ _MYSQL_PLUGIN_MANDATORY([$1],
+ [MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1])
+ )
+])
+
+AC_DEFUN([_MYSQL_PLUGIN_MANDATORY],[
+ m4_define([$2], [yes])
+ m4_ifdef([$3], [
+ AC_FATAL([mandatory plugin $1 has been disabled])
+ m4_undefine([$2])
+ ])
+])
+
+
+dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_PLUGIN_DISABLED
+dnl
+dnl SYNOPSIS
+dnl MYSQL_PLUGIN_DISABLED([name])
+dnl
+dnl DESCRIPTION
+dnl Marks the specified plugin as a disabled plugin
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_PLUGIN_DISABLED],[
+ MYSQL_REQUIRE_PLUGIN([$1])
+ _MYSQL_PLUGIN_DISABLED([$1],
+ [MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1])
+ )
+])
+
+AC_DEFUN([_MYSQL_PLUGIN_DISABLED],[
+ m4_define([$2], [yes])
+ m4_ifdef([$3], [
+ AC_FATAL([attempt to disable mandatory plugin $1])
+ m4_undefine([$2])
+ ])
+])
+
+
+dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_PLUGIN_DEPENDS
+dnl
+dnl SYNOPSIS
+dnl MYSQL_PLUGIN_DEPENDS([name],[prereq,prereq...])
+dnl
+dnl DESCRIPTION
+dnl Enables other plugins neccessary for the named plugin
+dnl Dependency checking is not recursive so if any
+dnl required plugin requires further plugins, list them
+dnl here too!
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_PLUGIN_DEPENDS],[
+ MYSQL_REQUIRE_PLUGIN([$1])
+ ifelse($#, 2, [
+ _MYSQL_PLUGIN_DEPEND([$1], $2)
+ ], [
+ AC_FATAL([bad number of arguments])
+ ])
+])
+
+AC_DEFUN([_MYSQL_PLUGIN_DEPEND],[
+ ifelse($#, 1, [], [$#:$2], [2:], [
+ MYSQL_REQUIRE_PLUGIN([$2])
+ _MYSQL_PLUGAPPEND([__mysql_plugdepends_$1__],[$2])
+ _MYSQL_PLUGIN_DEPEND([$1], m4_shift(m4_shift($@)))
+ ])
+])
+
+
+dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_PLUGIN_ACTIONS
+dnl
+dnl SYNOPSIS
+dnl MYSQL_PLUGIN_ACTIONS([name],[PLUGIN_CONFIGURE_STUFF])
+dnl
+dnl DESCRIPTION
+dnl Declares additional autoconf actions required to configure the plugin
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_PLUGIN_ACTIONS],[
+ MYSQL_REQUIRE_PLUGIN([$1])
+ m4_ifdef([$2],[
+ m4_define([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),m4_defn([$2]))
+ ],[
+ m4_define([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]), [$2])
+ ])
+])
+
+
+dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_CONFIGURE_PLUGINS
+dnl
+dnl SYNOPSIS
+dnl MYSQL_PLUGIN_DEPENDS([name,name...])
+dnl
+dnl DESCRIPTION
+dnl Used last, emits all required shell code to configure the plugins
+dnl Argument is a list of default plugins or meta-plugin
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_CONFIGURE_PLUGINS],[
+ m4_ifdef([__mysql_plugin_configured__],[
+ AC_FATAL([cannot use [MYSQL_CONFIGURE_PLUGINS] multiple times])
+ ],[
+ m4_define([__mysql_plugin_configured__],[done])
+ m4_ifdef([__mysql_plugin_list__],[
+ _MYSQL_CHECK_PLUGIN_ARGS([$1])
+ _MYSQL_CONFIGURE_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
+ _MYSQL_EMIT_PLUGIN_ACTIONS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
+ AC_SUBST([mysql_se_dirs])
+ AC_SUBST([mysql_pg_dirs])
+ ])
+ ])
+])
+
+AC_DEFUN([_MYSQL_CONFIGURE_PLUGINS],[
+ ifelse($#, 0, [], $#, 1, [
+ _MYSQL_EMIT_CHECK_PLUGIN([$1])
+ ],[
+ _MYSQL_EMIT_CHECK_PLUGIN([$1])
+ _MYSQL_CONFIGURE_PLUGINS(m4_shift($@))
+ ])
+])
+
+AC_DEFUN([_MYSQL_EMIT_CHECK_PLUGIN],[
+ __MYSQL_EMIT_CHECK_PLUGIN(
+ [$1],
+ m4_bpatsubst([$1], -, _),
+ [MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_DEFINE_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1])
+ )
+])
+
+AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[
+ m4_ifdef([$5],[
+ AH_TEMPLATE($5, [Include ]$4[ into mysqld])
+ ])
+ AC_MSG_CHECKING([whether to use ]$3)
+ mysql_use_plugin_dir=""
+ m4_ifdef([$10],[
+ if test "X[$mysql_plugin_]$2" = Xyes -a \
+ "X[$with_plugin_]$2" != Xno -o \
+ "X[$with_plugin_]$2" = Xyes; then
+ AC_MSG_RESULT([error])
+ AC_MSG_ERROR([disabled])
+ fi
+ AC_MSG_RESULT([no])
+ ],[
+ m4_ifdef([$9],[
+ if test "X[$with_plugin_]$2" = Xno; then
+ AC_MSG_RESULT([error])
+ AC_MSG_ERROR([cannot disable mandatory plugin])
+ fi
+ [mysql_plugin_]$2=yes
+ ])
+ if test "X[$with_plugin_]$2" = Xno; then
+ AC_MSG_RESULT([no])
+ else
+ if test "X[$mysql_plugin_]$2" != Xyes -a \
+ "X[$with_plugin_]$2" != Xyes; then
+ m4_ifdef([$8],[
+ m4_ifdef([$6],[
+ if test -d "$srcdir/$6" ; then
+ mysql_use_plugin_dir="$6"
+ ])
+ AC_SUBST([plugin_]$2[_shared_target], "$8")
+ AC_SUBST([plugin_]$2[_static_target], [""])
+ [with_plugin_]$2=yes
+ AC_MSG_RESULT([plugin])
+ m4_ifdef([$6],[
+ else
+ [mysql_plugin_]$2=no
+ AC_MSG_RESULT([no])
+ fi
+ ])
+ ],[
+ [with_plugin_]$2=no
+ AC_MSG_RESULT([no])
+ ])
+ else
+ m4_ifdef([$7],[
+ ifelse(m4_bregexp($7, [^lib[^.]+\.a$]), -2, [
+ m4_ifdef([$6],[
+ mysql_use_plugin_dir="$6"
+ mysql_plugin_libs="$mysql_plugin_libs -L[\$(top_builddir)]/$6"
+ ])
+ mysql_plugin_libs="$mysql_plugin_libs
+[-l]m4_bregexp($7, [^lib\([^.]+\)], [\1])"
+ ], m4_bregexp($7, [^\\\$]), 0, [
+ m4_ifdef([$6],[
+ mysql_use_plugin_dir="$6"
+ ])
+ mysql_plugin_libs="$mysql_plugin_libs $7"
+ ], [
+ m4_ifdef([$6],[
+ mysql_use_plugin_dir="$6"
+ mysql_plugin_libs="$mysql_plugin_libs \$(top_builddir)/$6/$7"
+ ],[
+ mysql_plugin_libs="$mysql_plugin_libs $7"
+ ])
+ ])
+ m4_ifdef([$5],[
+ AC_DEFINE($5)
+ ])
+ AC_SUBST([plugin_]$2[_static_target], "$7")
+ AC_SUBST([plugin_]$2[_shared_target], [""])
+ ],[
+ m4_ifdef([$6],[
+ AC_MSG_RESULT([error])
+ AC_MSG_ERROR([Plugin $1 does not support static linking])
+ ],[
+ m4_ifdef([$5],[
+ AC_DEFINE($5)
+ AC_SUBST([plugin_]$2[_static_target], ["yes"])
+ AC_SUBST([plugin_]$2[_shared_target], [""])
+ ])
+ ])
+ ])
+ mysql_plugin_defs="$mysql_plugin_defs, [builtin_]$2[_plugin]"
+ [with_plugin_]$2=yes
+ AC_MSG_RESULT([yes])
+ fi
+ m4_ifdef([$6],[
+ if test -n "$mysql_use_plugin_dir" ; then
+ mysql_plugin_dirs="$mysql_plugin_dirs $6"
+ if test -f "$srcdir/$6/configure" ; then
+ other_configures="$other_configures $6/configure"
+ else
+ AC_CONFIG_FILES($6/Makefile)
+ fi
+ ifelse(m4_substr($6, 0, 8), [storage/],
+ [mysql_se_dirs="$mysql_se_dirs ]m4_substr($6, 8)",
+ m4_substr($6, 0, 7), [plugin/],
+ [mysql_pg_dirs="$mysql_pg_dirs ]m4_substr($6, 7)",
+ [AC_FATAL([don't know how to handle plugin dir ]$6)])
+ fi
+ ])
+ fi
+ ])
+])
+
+AC_DEFUN([_MYSQL_EMIT_PLUGIN_ACTIONS],[
+ ifelse($#, 0, [], $#, 1, [
+ _MYSQL_EMIT_PLUGIN_ACTION([$1])
+ ],[
+ _MYSQL_EMIT_PLUGIN_ACTION([$1])
+ _MYSQL_EMIT_PLUGIN_ACTIONS(m4_shift($@))
+ ])
+])
+
+AC_DEFUN([_MYSQL_EMIT_PLUGIN_ACTION],[
+ __MYSQL_EMIT_PLUGIN_ACTION(
+ [$1],
+ m4_bpatsubst([$1], -, _),
+ [MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1])
+ )
+])
+
+
+AC_DEFUN([__MYSQL_EMIT_PLUGIN_ACTION],[
+ m4_ifdef([$3], [], [
+ if test "X[$with_plugin_]$2" = Xyes; then
+ if test "X[$plugin_]$2[_static_target]" = X -a \
+ "X[$plugin_]$2[_shared_target]" = X; then
+ AC_MSG_ERROR([that's strange, $1 failed sanity check])
+ fi
+ $4
+ fi
+ ])
+])
+
+
+
+dnl ===========================================================================
+dnl Private helper macros
+dnl ===========================================================================
+
+
+dnl SYNOPSIS
+dnl MYSQL_REQUIRE_PLUGIN([name])
+dnl
+dnl DESCRIPTION
+dnl Checks that the specified plugin does exist
+
+AC_DEFUN([MYSQL_REQUIRE_PLUGIN],[
+ _MYSQL_REQUIRE_PLUGIN([$1], [__MYSQL_PLUGIN_]AS_TR_CPP([$1])[__])
+])
+
+define([_MYSQL_REQUIRE_PLUGIN],[
+ ifdef([$2],[
+ ifelse($2, [$1], [], [
+ AC_FATAL([Misspelt MYSQL_PLUGIN declaration for $1])
+ ])
+ ],[
+ AC_FATAL([Missing MYSQL_PLUGIN declaration for $1])
+ ])
+])
+
+
+dnl ---------------------------------------------------------------------------
+
+
+dnl SYNOPSIS
+dnl _MYSQL_EMIT_METAPLUGINS([name,name...])
+dnl
+dnl DESCRIPTION
+dnl Emits shell code for metaplugins
+
+AC_DEFUN([_MYSQL_EMIT_METAPLUGINS], [ifelse($#, 0, [], $#, 1,
+[_MYSQL_EMIT_METAPLUGIN([$1], [__mysql_]m4_bpatsubst($1, -, _)[_plugins__])
+],
+[_MYSQL_EMIT_METAPLUGIN([$1], [__mysql_]m4_bpatsubst($1, -, _)[_plugins__])
+_MYSQL_EMIT_METAPLUGINS(m4_shift($@))])
+])
+
+AC_DEFUN([_MYSQL_EMIT_METAPLUGIN], [
+ [$1] )
+m4_ifdef([$2], [
+ mysql_plugins='m4_bpatsubst($2, :, [ ])'
+],[
+ mysql_plugins=''
+])
+ ;;
+])
+
+
+dnl ---------------------------------------------------------------------------
+
+
+dnl SYNOPSIS
+dnl _MYSQL_PLUGAPPEND([name],[to-append])
+dnl
+dnl DESCRIPTION
+dnl Helper macro for appending to colon-delimited lists
+
+AC_DEFUN([_MYSQL_PLUGAPPEND],[
+ m4_ifdef([$1],[
+ m4_define([__plugin_append_tmp__], m4_defn([$1]))
+ m4_undefine([$1])
+ m4_define([$1], __plugin_append_tmp__[:$2])
+ m4_undefine([__plugin_append_tmp__])
+ ],[
+ m4_define([$1], [$2])
+ $3
+ ])
+])
+
+
+dnl SYNOPSIS
+dnl _MYSQL_PLUGAPPEND_META([name],[meta,meta...])
+dnl
+dnl DESCRIPTION
+dnl Helper macro for adding plugins to meta plugins
+
+AC_DEFUN([_MYSQL_PLUGAPPEND_META],[
+ ifelse($#, 1, [], [$#:$2], [2:], [], [$2], [all], [
+ AC_FATAL([protected plugin group: all])
+ ], [$2], [none], [
+ AC_FATAL([protected plugin group: none])
+ ],[
+ _MYSQL_PLUGAPPEND([__mysql_$1_configs__],[$2])
+ _MYSQL_PLUGAPPEND([__mysql_]m4_bpatsubst($2, -, _)[_plugins__],[$1], [
+ _MYSQL_PLUGAPPEND([__mysql_metaplugin_list__],[$2])
+ ])
+ _MYSQL_PLUGAPPEND_META([$1], m4_shift(m4_shift($@)))
+ ])
+])
+
+
+dnl ---------------------------------------------------------------------------
+
+
+dnl SYNOPSIS
+dnl MYSQL_LIST_PLUGINS
+dnl
+dnl DESCRIPTION
+dnl Emits formatted list of declared plugins
+
+AC_DEFUN([MYSQL_LIST_PLUGINS],[dnl
+ m4_ifdef([__mysql_plugin_list__],[dnl
+ _MYSQL_LIST_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))dnl
+ ])dnl
+])
+
+AC_DEFUN([_MYSQL_LIST_PLUGINS],[dnl
+ ifelse($#, 0, [], $#, 1, [dnl
+ MYSQL_SHOW_PLUGIN([$1])dnl
+ ],[dnl
+ MYSQL_SHOW_PLUGIN([$1])dnl
+ _MYSQL_LIST_PLUGINS(m4_shift($@))dnl
+ ])dnl
+])
+
+AC_DEFUN([MYSQL_SHOW_PLUGIN],[
+ _MYSQL_SHOW_PLUGIN(
+ [$1],
+ [$1-plugin],
+ [MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_DEFINE_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),
+ __mysql_[$1]_configs__,
+ )
+])
+
+AC_DEFUN([_MYSQL_SHOW_PLUGIN],[dnl
+ === $3 ===
+ Plugin Name: [$1]
+ Description: $4
+ Supports build: _PLUGIN_BUILD_TYPE([$7],[$8])[]dnl
+m4_ifdef([$12],[
+ Configurations: m4_bpatsubst($12, :, [, ])])[]dnl
+m4_ifdef([$10],[
+ Status: disabled])[]dnl
+m4_ifdef([$9],[
+ Status: mandatory])[]dnl
+])
+
+AC_DEFUN([_PLUGIN_BUILD_TYPE],
+[m4_ifdef([$1],[ifelse($1,[no],[],[static ]m4_ifdef([$2],[and dnl
+]))])[]m4_ifdef([$2],[dynamic],[m4_ifdef([$1],[],[static])])])
+
+
+dnl ---------------------------------------------------------------------------
+
+
+AC_DEFUN([_MYSQL_EMIT_PLUGINS],[
+ ifelse($#, 0, [], [$#:$1], [1:], [], [
+ m4_ifdef([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]), [], [
+ m4_define([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),[ ])
+ ])
+ [$1] )
+ m4_ifdef([MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),[
+ AC_MSG_ERROR([plugin $1 is disabled])
+ ],[
+ [mysql_plugin_]m4_bpatsubst([$1], -, _)=yes
+ ])
+ ;;
+ _MYSQL_EMIT_PLUGINS(m4_shift($@))
+ ])
+])
+
+AC_DEFUN([_MYSQL_EMIT_PLUGIN_DEPENDS], [
+ ifelse($#, 0, [], [$#:$1], [1:], [], [
+ _MYSQL_EMIT_CHECK_DEPENDS(m4_bpatsubst([$1], -, _),
+ [__mysql_plugdepends_$1__])
+ _MYSQL_EMIT_PLUGIN_DEPENDS(m4_shift($@))
+ ])
+])
+
+AC_DEFUN([_MYSQL_EMIT_CHECK_DEPENDS], [
+ m4_ifdef([$2], [
+ if test "X[$mysql_plugin_]$1" = Xyes -a \
+ "X[$with_plugin_]$1" != Xno -o \
+ "X[$with_plugin_]$1" = Xyes; then
+ _MYSQL_EMIT_PLUGIN_DEPENDENCIES(m4_bpatsubst($2, :, [,]))
+ fi
+ ])
+])
+
+AC_DEFUN([_MYSQL_EMIT_PLUGIN_DEPENDENCIES], [
+ ifelse($#, 0, [], [
+ m4_ifdef([MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),[
+ AC_MSG_ERROR([depends upon disabled plugin $1])
+ ],[
+ [mysql_plugin_]m4_bpatsubst([$1], -, _)=yes
+ if test "X[$with_plugin_]m4_bpatsubst([$1], -, _)" = Xno; then
+ AC_MSG_ERROR([depends upon disabled plugin $1])
+ fi
+ ])
+ _MYSQL_EMIT_PLUGIN_DEPENDENCIES(m4_shift($@))
+ ])
+])
+
+dnl SYNOPSIS
+dnl _MYSQL_CHECK_PLUGIN_ARGS([plugin],[plugin]...)
+dnl
+dnl DESCRIPTION
+dnl Emits shell script for checking configure arguments
+dnl Arguments to this macro is default value for selected plugins
+
+AC_DEFUN([_MYSQL_CHECK_PLUGIN_ARGS],[
+ __MYSQL_CHECK_PLUGIN_ARGS(m4_default([$1], [none]))
+])
+
+AC_DEFUN([__MYSQL_CHECK_PLUGIN_ARGS],[
+ AC_ARG_WITH([plugins],
+AS_HELP_STRING([--with-plugins=PLUGIN[[[[[,PLUGIN..]]]]]],
+ [Plugins to include in mysqld. (default is: $1) Must be a
+ configuration name or a comma separated list of plugins.])
+AS_HELP_STRING([],
+ [Available configurations are:] dnl
+m4_bpatsubst([none:]m4_ifdef([__mysql_metaplugin_list__],
+ __mysql_metaplugin_list__:)[all], :, [ ])[.])
+AS_HELP_STRING([],
+ [Available plugins are:] dnl
+m4_bpatsubst(__mysql_plugin_list__, :, [ ])[.])
+AS_HELP_STRING([--without-plugin-PLUGIN],
+ [Disable the named plugin from being built. Otherwise, for
+ plugins which are not selected for inclusion in mysqld will be
+ built dynamically (if supported)])
+AS_HELP_STRING([--with-plugin-PLUGIN],
+ [Forces the named plugin to be linked into mysqld statically.]),
+ [mysql_plugins="`echo $withval | tr ',.:;*[]' ' '`"],
+ [mysql_plugins=['$1']])
+
+m4_divert_once([HELP_VAR_END],[
+Description of plugins:
+MYSQL_LIST_PLUGINS])
+
+ case "$mysql_plugins" in
+ all )
+ mysql_plugins='m4_bpatsubst(__mysql_plugin_list__, :, [ ])'
+ ;;
+ none )
+ mysql_plugins=''
+ ;;
+m4_ifdef([__mysql_metaplugin_list__],[
+_MYSQL_EMIT_METAPLUGINS(m4_bpatsubst(__mysql_metaplugin_list__, :, [,]))
+])
+ esac
+
+ for plugin in $mysql_plugins; do
+ case "$plugin" in
+ all | none )
+ AC_MSG_ERROR([bad plugin name: $plugin])
+ ;;
+_MYSQL_EMIT_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
+ * )
+ AC_MSG_ERROR([unknown plugin: $plugin])
+ ;;
+ esac
+ done
+
+ _MYSQL_EMIT_PLUGIN_DEPENDS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
+])
+
+dnl ===========================================================================
diff --git a/config/ac-macros/storage.m4 b/config/ac-macros/storage.m4
deleted file mode 100644
index 4148aed818d..00000000000
--- a/config/ac-macros/storage.m4
+++ /dev/null
@@ -1,55 +0,0 @@
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_STORAGE_ENGINE
-dnl
-dnl What it does:
-dnl creates --with-xxx configure option
-dnl adds HAVE_XXX to config.h
-dnl appends &xxx_hton, to the list of hanldertons
-dnl appends a dir to the list of source directories
-dnl appends ha_xxx.cc to the list of handler files
-dnl
-dnl all names above are configurable with reasonable defaults.
-dnl
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_STORAGE_ENGINE],
-[_MYSQL_STORAGE_ENGINE(
-[$1], dnl name
-m4_default([$2], [$1 storage engine]), dnl verbose name
-m4_default([$3], [$1-storage-engine]), dnl with-name
-m4_default([$4], no), dnl default
-m4_default([$5], [WITH_]AS_TR_CPP([$1])[_STORAGE_ENGINE]),
-m4_default([$6], $1[_hton]), dnl hton
-m4_default([$7], []), dnl path to the code
-m4_default([$8], [ha_$1.o]), dnl path to the handler in
-m4_default([$9], []), dnl path to extra libraries
-[$10], dnl code-if-set
-)])
-
-AC_DEFUN([_MYSQL_STORAGE_ENGINE],
-[
-AC_ARG_WITH([$3], AS_HELP_STRING([--with-$3], [enable $2 (default is $4)]),
-[], [ [with_]m4_bpatsubst([$3], -, _)=['$4']])
-AC_CACHE_CHECK([whether to use $2], [mysql_cv_use_]m4_bpatsubst([$3], -, _),
-[mysql_cv_use_]m4_bpatsubst([$3], -, _)=[$with_]m4_bpatsubst([$3], -, _))
-AH_TEMPLATE([$5], [Build $2])
-if test "[$mysql_cv_use_]m4_bpatsubst([$3], -, _)" != no; then
-if test "$6" != "no"
-then
- AC_DEFINE([$5])
- mysql_se_decls="${mysql_se_decls},$6"
- mysql_se_htons="${mysql_se_htons},&$6"
- if test "$8" != "no"
- then
- mysql_se_objs="$mysql_se_objs $8"
- fi
- mysql_se_dirs="$mysql_se_dirs $7"
- mysql_se_libs="$mysql_se_libs $9"
-else
- mysql_se_plugins="$mysql_se_plugins $7"
-fi
-$10
-fi
-])
-
-dnl ---------------------------------------------------------------------------