mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
6b3a9caef9
Makefile.am: Changes to autoconf subst config/ac-macros/ha_berkeley.m4: simplify config/ac-macros/ha_ndbcluster.m4: simplify config/ac-macros/ha_partition.m4: simplify configure.in: strip configure of storage engine specific cruft and simplify extra/Makefile.am: changes to autoconf/automake subst libmysqld/Makefile.am: only compile storage engines if required. make find object file a little smarter libmysqld/examples/Makefile.am: changes to autoconf subst mysql-test/Makefile.am: remove storage engine specific cruft mysql-test/r/ps_1general.result: cannot gaurantee order of results from 'show storage engines' mysql-test/r/show_check.result: fix test - frm file fails to be deleted if it is invalid mysql-test/r/sql_mode.result: isam does not exist, test may need to be redone/fixed in 5.0 mysql-test/r/warnings.result: isam no longer exists mysql-test/t/ps_1general.test: cannot gaurantee order of results from 'show storage engines' mysql-test/t/show_check.test: fix test - frm file fails to be deleted if it is invalid mysql-test/t/sql_mode.test: isam does not exist, test may need to be redone/fixed in 5.0 mysql-test/t/system_mysql_db_fix.test: change isam to myisam mysql-test/t/view.test: change isam to myisam mysql-test/t/warnings.test: isam no longer exists sql/Makefile.am: Make storage engines "pluggable" stage 1 only compile storage engines if included sql/examples/ha_example.cc: handlerton work sql/examples/ha_example.h: handlerton work sql/examples/ha_tina.cc: handlerton work sql/examples/ha_tina.h: handlerton work sql/ha_archive.cc: handlerton work sql/ha_archive.h: handlerton work sql/ha_berkeley.cc: handlerton work sql/ha_berkeley.h: handlerton work sql/ha_blackhole.cc: handlerton work sql/ha_federated.cc: handlerton work sql/ha_federated.h: handlerton work sql/ha_heap.cc: handlerton work sql/ha_innodb.cc: handlerton work sql/ha_innodb.h: handlerton work sql/ha_myisam.cc: handlerton work sql/ha_myisammrg.cc: handlerton work sql/ha_ndbcluster.cc: handlerton work sql/ha_ndbcluster.h: handlerton work sql/ha_partition.cc: handlerton work sql/handler.cc: start removing storage engine specific cruft sql/handler.h: start removing storage engine specific cruft db_type for binlog handlerton handlerton flag for not-user-selectable storage engines sql/lex.h: start removing storage engine specific cruft sql/log.cc: handlerton work give binlog handlerton a 'real' db_type sql/mysql_priv.h: start removing storage engine specific cruft sql/mysqld.cc: start removing storage engine specific cruft sql/set_var.cc: start removing storage engine specific cruft sql/sp_head.cc: start removing storage engine specific cruft sql/sql_class.cc: start removing storage engine specific cruft sql/sql_class.h: start removing storage engine specific cruft sql/sql_lex.h: start removing storage engine specific cruft sql/sql_manager.cc: start removing storage engine specific cruft sql/sql_manager.h: start removing storage engine specific cruft sql/sql_parse.cc: start removing storage engine specific cruft sql/sql_partition.cc: start removing storage engine specific cruft sql/sql_prepare.cc: start removing storage engine specific cruft sql/sql_show.cc: start removing storage engine specific cruft sql/sql_table.cc: changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE start removing storage engine specific cruft sql/sql_update.cc: changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE sql/sql_yacc.yy: start removing storage engine specific cruft test if we should throw error sql/table.cc: changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE sql/table.h: changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE sql/unireg.cc: changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE storage/ndb/include/kernel/kernel_types.h: added my_config.h storage/ndb/include/ndb_global.h.in: added my_config.h storage/ndb/include/ndb_types.h.in: added my_config.h config/ac-macros/storage.m4: New BitKeeper file ``config/ac-macros/storage.m4'' sql/handlerton.cc.in: New BitKeeper file ``sql/handlerton.cc.in''
338 lines
11 KiB
Text
338 lines
11 KiB
Text
dnl ---------------------------------------------------------------------------
|
|
dnl Macro: MYSQL_CHECK_NDBCLUSTER
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
NDB_VERSION_MAJOR=`echo $VERSION | cut -d. -f1`
|
|
NDB_VERSION_MINOR=`echo $VERSION | cut -d. -f2`
|
|
NDB_VERSION_BUILD=`echo $VERSION | cut -d. -f3 | cut -d- -f1`
|
|
NDB_VERSION_STATUS=`echo $VERSION | cut -d- -f2`
|
|
# if there was now -suffix, $NDB_VERSION_STATUS will be the same as $VERSION
|
|
if test "$NDB_VERSION_STATUS" = "$VERSION"
|
|
then
|
|
NDB_VERSION_STATUS=""
|
|
fi
|
|
TEST_NDBCLUSTER=""
|
|
|
|
dnl for build ndb docs
|
|
|
|
AC_PATH_PROG(DOXYGEN, doxygen, no)
|
|
AC_PATH_PROG(PDFLATEX, pdflatex, no)
|
|
AC_PATH_PROG(MAKEINDEX, makeindex, no)
|
|
|
|
AC_SUBST(DOXYGEN)
|
|
AC_SUBST(PDFLATEX)
|
|
AC_SUBST(MAKEINDEX)
|
|
|
|
|
|
AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
|
|
AC_ARG_WITH([ndb-sci],
|
|
AC_HELP_STRING([--with-ndb-sci=DIR],
|
|
[Provide MySQL with a custom location of
|
|
sci library. Given DIR, sci library is
|
|
assumed to be in $DIR/lib and header files
|
|
in $DIR/include.]),
|
|
[mysql_sci_dir=${withval}],
|
|
[mysql_sci_dir=""])
|
|
|
|
case "$mysql_sci_dir" in
|
|
"no" )
|
|
have_ndb_sci=no
|
|
AC_MSG_RESULT([-- not including sci transporter])
|
|
;;
|
|
* )
|
|
if test -f "$mysql_sci_dir/lib/libsisci.a" -a \
|
|
-f "$mysql_sci_dir/include/sisci_api.h"; then
|
|
NDB_SCI_INCLUDES="-I$mysql_sci_dir/include"
|
|
NDB_SCI_LIBS="-L$mysql_sci_dir/lib -lsisci"
|
|
AC_MSG_RESULT([-- including sci transporter])
|
|
AC_DEFINE([NDB_SCI_TRANSPORTER], [1],
|
|
[Including Ndb Cluster DB sci transporter])
|
|
AC_SUBST(NDB_SCI_INCLUDES)
|
|
AC_SUBST(NDB_SCI_LIBS)
|
|
have_ndb_sci="yes"
|
|
AC_MSG_RESULT([found sci transporter in $mysql_sci_dir/{include, lib}])
|
|
else
|
|
AC_MSG_RESULT([could not find sci transporter in $mysql_sci_dir/{include, lib}])
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
AC_ARG_WITH([ndb-test],
|
|
[
|
|
--with-ndb-test Include the NDB Cluster ndbapi test programs],
|
|
[ndb_test="$withval"],
|
|
[ndb_test=no])
|
|
AC_ARG_WITH([ndb-docs],
|
|
[
|
|
--with-ndb-docs Include the NDB Cluster ndbapi and mgmapi documentation],
|
|
[ndb_docs="$withval"],
|
|
[ndb_docs=no])
|
|
AC_ARG_WITH([ndb-port],
|
|
[
|
|
--with-ndb-port Port for NDB Cluster management server],
|
|
[ndb_port="$withval"],
|
|
[ndb_port="default"])
|
|
AC_ARG_WITH([ndb-port-base],
|
|
[
|
|
--with-ndb-port-base Base port for NDB Cluster transporters],
|
|
[ndb_port_base="$withval"],
|
|
[ndb_port_base="default"])
|
|
AC_ARG_WITH([ndb-debug],
|
|
[
|
|
--without-ndb-debug Disable special ndb debug features],
|
|
[ndb_debug="$withval"],
|
|
[ndb_debug="default"])
|
|
AC_ARG_WITH([ndb-ccflags],
|
|
AC_HELP_STRING([--with-ndb-ccflags=CFLAGS],
|
|
[Extra CFLAGS for ndb compile]),
|
|
[ndb_ccflags=${withval}],
|
|
[ndb_ccflags=""])
|
|
|
|
case "$ndb_ccflags" in
|
|
"yes")
|
|
AC_MSG_RESULT([The --ndb-ccflags option requires a parameter (passed to CC for ndb compilation)])
|
|
;;
|
|
*)
|
|
ndb_cxxflags_fix="$ndb_cxxflags_fix $ndb_ccflags"
|
|
;;
|
|
esac
|
|
|
|
AC_MSG_CHECKING([for NDB Cluster options])
|
|
AC_MSG_RESULT([])
|
|
|
|
have_ndb_test=no
|
|
case "$ndb_test" in
|
|
yes )
|
|
AC_MSG_RESULT([-- including ndbapi test programs])
|
|
have_ndb_test="yes"
|
|
;;
|
|
* )
|
|
AC_MSG_RESULT([-- not including ndbapi test programs])
|
|
;;
|
|
esac
|
|
|
|
have_ndb_docs=no
|
|
case "$ndb_docs" in
|
|
yes )
|
|
AC_MSG_RESULT([-- including ndbapi and mgmapi documentation])
|
|
have_ndb_docs="yes"
|
|
;;
|
|
* )
|
|
AC_MSG_RESULT([-- not including ndbapi and mgmapi documentation])
|
|
;;
|
|
esac
|
|
|
|
case "$ndb_debug" in
|
|
yes )
|
|
AC_MSG_RESULT([-- including ndb extra debug options])
|
|
have_ndb_debug="yes"
|
|
;;
|
|
full )
|
|
AC_MSG_RESULT([-- including ndb extra extra debug options])
|
|
have_ndb_debug="full"
|
|
;;
|
|
no )
|
|
AC_MSG_RESULT([-- not including ndb extra debug options])
|
|
have_ndb_debug="no"
|
|
;;
|
|
* )
|
|
have_ndb_debug="default"
|
|
;;
|
|
esac
|
|
|
|
AC_MSG_RESULT([done.])
|
|
])
|
|
|
|
AC_DEFUN([NDBCLUSTER_WORKAROUNDS], [
|
|
|
|
#workaround for Sun Forte/x86 see BUG#4681
|
|
case $SYSTEM_TYPE-$MACHINE_TYPE-$ac_cv_prog_gcc in
|
|
*solaris*-i?86-no)
|
|
CFLAGS="$CFLAGS -DBIG_TABLES"
|
|
CXXFLAGS="$CXXFLAGS -DBIG_TABLES"
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
|
|
# workaround for Sun Forte compile problem for ndb
|
|
case $SYSTEM_TYPE-$ac_cv_prog_gcc in
|
|
*solaris*-no)
|
|
ndb_cxxflags_fix="$ndb_cxxflags_fix -instances=static"
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
|
|
# ndb fail for whatever strange reason to link Sun Forte/x86
|
|
# unless using incremental linker
|
|
case $SYSTEM_TYPE-$MACHINE_TYPE-$ac_cv_prog_gcc-$have_ndbcluster in
|
|
*solaris*-i?86-no-yes)
|
|
CXXFLAGS="$CXXFLAGS -xildon"
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
])
|
|
|
|
AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
|
|
|
|
with_partition="yes"
|
|
ndb_cxxflags_fix=""
|
|
TEST_NDBCLUSTER="--ndbcluster"
|
|
|
|
ndbcluster_includes="-I\$(top_builddir)/storage/ndb/include -I\$(top_builddir)/storage/ndb/include/ndbapi -I\$(top_builddir)/storage/ndb/include/mgmapi"
|
|
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_CHECK_NDB_OPTIONS
|
|
NDBCLUSTER_WORKAROUNDS
|
|
|
|
MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --with-ndbcluster"
|
|
|
|
# CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS)"
|
|
if test "$have_ndb_debug" = "default"
|
|
then
|
|
have_ndb_debug=$with_debug
|
|
fi
|
|
|
|
if test "$have_ndb_debug" = "yes"
|
|
then
|
|
# Medium debug.
|
|
NDB_DEFS="-DNDB_DEBUG -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
|
|
elif test "$have_ndb_debug" = "full"
|
|
then
|
|
NDB_DEFS="-DNDB_DEBUG_FULL -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
|
|
else
|
|
# no extra ndb debug but still do asserts if debug version
|
|
if test "$with_debug" = "yes" -o "$with_debug" = "full"
|
|
then
|
|
NDB_DEFS=""
|
|
else
|
|
NDB_DEFS="-DNDEBUG"
|
|
fi
|
|
fi
|
|
|
|
if test X"$ndb_port" = Xdefault
|
|
then
|
|
ndb_port="1186"
|
|
fi
|
|
|
|
ndb_transporter_opt_objs=""
|
|
if test "$ac_cv_func_shmget" = "yes" &&
|
|
test "$ac_cv_func_shmat" = "yes" &&
|
|
test "$ac_cv_func_shmdt" = "yes" &&
|
|
test "$ac_cv_func_shmctl" = "yes" &&
|
|
test "$ac_cv_func_sigaction" = "yes" &&
|
|
test "$ac_cv_func_sigemptyset" = "yes" &&
|
|
test "$ac_cv_func_sigaddset" = "yes" &&
|
|
test "$ac_cv_func_pthread_sigmask" = "yes"
|
|
then
|
|
AC_DEFINE([NDB_SHM_TRANSPORTER], [1],
|
|
[Including Ndb Cluster DB shared memory transporter])
|
|
AC_MSG_RESULT([Including ndb shared memory transporter])
|
|
ndb_transporter_opt_objs="$ndb_transporter_opt_objs SHM_Transporter.lo SHM_Transporter.unix.lo"
|
|
else
|
|
AC_MSG_RESULT([Not including ndb shared memory transporter])
|
|
fi
|
|
|
|
if test X"$have_ndb_sci" = Xyes
|
|
then
|
|
ndb_transporter_opt_objs="$ndb_transporter_opt_objs SCI_Transporter.lo"
|
|
fi
|
|
|
|
ndb_opt_subdirs=
|
|
ndb_bin_am_ldflags="-static"
|
|
if test X"$have_ndb_test" = Xyes
|
|
then
|
|
ndb_opt_subdirs="test"
|
|
ndb_bin_am_ldflags=""
|
|
fi
|
|
|
|
if test X"$have_ndb_docs" = Xyes
|
|
then
|
|
ndb_opt_subdirs="$ndb_opt_subdirs docs"
|
|
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)
|
|
AC_SUBST(NDB_VERSION_STATUS)
|
|
AC_DEFINE_UNQUOTED([NDB_VERSION_MAJOR], [$NDB_VERSION_MAJOR],
|
|
[NDB major version])
|
|
AC_DEFINE_UNQUOTED([NDB_VERSION_MINOR], [$NDB_VERSION_MINOR],
|
|
[NDB minor version])
|
|
AC_DEFINE_UNQUOTED([NDB_VERSION_BUILD], [$NDB_VERSION_BUILD],
|
|
[NDB build version])
|
|
AC_DEFINE_UNQUOTED([NDB_VERSION_STATUS], ["$NDB_VERSION_STATUS"],
|
|
[NDB status version])
|
|
|
|
AC_SUBST(ndbcluster_includes)
|
|
AC_SUBST(ndbcluster_libs)
|
|
AC_SUBST(ndbcluster_system_libs)
|
|
AC_SUBST(ndb_mgmclient_libs)
|
|
|
|
AC_SUBST(ndb_transporter_opt_objs)
|
|
AC_SUBST(ndb_port)
|
|
AC_SUBST(ndb_bin_am_ldflags)
|
|
AC_SUBST(ndb_opt_subdirs)
|
|
|
|
AC_SUBST(NDB_DEFS)
|
|
AC_SUBST(ndb_cxxflags_fix)
|
|
|
|
AC_CONFIG_FILES(storage/ndb/Makefile 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
|
|
storage/ndb/src/common/debugger/Makefile dnl
|
|
storage/ndb/src/common/debugger/signaldata/Makefile dnl
|
|
storage/ndb/src/common/portlib/Makefile dnl
|
|
storage/ndb/src/common/util/Makefile dnl
|
|
storage/ndb/src/common/logger/Makefile dnl
|
|
storage/ndb/src/common/transporter/Makefile dnl
|
|
storage/ndb/src/common/mgmcommon/Makefile dnl
|
|
storage/ndb/src/kernel/Makefile dnl
|
|
storage/ndb/src/kernel/error/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/cmvmi/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/dbacc/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/dbdict/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/dbdih/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/dblqh/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/dbtc/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/dbtup/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/ndbfs/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/ndbcntr/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/qmgr/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/trix/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/backup/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/dbutil/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/suma/Makefile dnl
|
|
storage/ndb/src/kernel/blocks/dbtux/Makefile dnl
|
|
storage/ndb/src/kernel/vm/Makefile dnl
|
|
storage/ndb/src/mgmapi/Makefile dnl
|
|
storage/ndb/src/ndbapi/Makefile dnl
|
|
storage/ndb/src/mgmsrv/Makefile dnl
|
|
storage/ndb/src/mgmclient/Makefile dnl
|
|
storage/ndb/src/cw/Makefile dnl
|
|
storage/ndb/src/cw/cpcd/Makefile dnl
|
|
storage/ndb/test/Makefile dnl
|
|
storage/ndb/test/src/Makefile dnl
|
|
storage/ndb/test/ndbapi/Makefile dnl
|
|
storage/ndb/test/ndbapi/bank/Makefile dnl
|
|
storage/ndb/test/tools/Makefile dnl
|
|
storage/ndb/test/run-test/Makefile dnl
|
|
storage/ndb/include/ndb_version.h storage/ndb/include/ndb_global.h dnl
|
|
storage/ndb/include/ndb_types.h dnl
|
|
)
|
|
])
|
|
|
|
AC_SUBST(TEST_NDBCLUSTER)
|
|
dnl ---------------------------------------------------------------------------
|
|
dnl END OF MYSQL_CHECK_NDBCLUSTER SECTION
|
|
dnl ---------------------------------------------------------------------------
|