mariadb/config/ac-macros/storage.m4
unknown bd7120f97c Fix the tree: plugin-related changes, necessary for
CSV storage engine to be statically compiled.
Derived from antony's patch.


config/ac-macros/storage.m4:
  don't add objects to the object list if
  we don't have them
configure.in:
  compile CSV statically
sql/ha_myisam.cc:
  fix prototype to get rid of THD
sql/ha_myisam.h:
  fix prototype to get rid of THD
sql/handler.cc:
  new function for plugins
sql/handler.h:
  fix prototype to get rid of THD
  declare functions used by plugins
sql/item.h:
  Don't include all the types and files when not building mysqld
sql/lock.cc:
  don's assume that handler knows about THD
sql/mysql_priv.h:
  Don't include all the types and files when not building mysqld
  declare new plugin functions
sql/sql_class.cc:
  New plugin functions
sql/sql_class.h:
  Don't include all the types and files when not building mysqld
sql/sql_lex.h:
  Don't include all the types and files when not building mysqld
storage/csv/Makefile.am:
  compile CSV into a static lib to be
  linked into mysqld
storage/csv/ha_tina.cc:
  fix ha_tina to be able to build it static
storage/csv/ha_tina.h:
  fix prototype to get rid of THD
2006-01-20 00:40:56 +03:00

55 lines
1.9 KiB
Text

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 ---------------------------------------------------------------------------