mariadb/config/ac-macros/ha_ndbcluster.m4
unknown 5eeee409e7 Fixed the make distcheck problem. We only really need to create libndb.ver if we are building Ndb.
config/ac-macros/ha_ndbcluster.m4:
  We only need to create this file if we are building Ndb in the first place. Moving the code to ha_ndbcluster.m4
configure.in:
  We only need to create this file if we are building Ndb in the first place. Moving the code to ha_ndbcluster.m4
ndb/src/Makefile.am:
  BUILT_SOURCES is uneccesary. Removing it. The real problem was related to building or not building Ndb.
2007-01-19 16:54:01 -08:00

172 lines
5.8 KiB
Text

dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_CHECK_NDBCLUSTER
dnl Sets HAVE_NDBCLUSTER_DB if --with-ndbcluster is used
dnl ---------------------------------------------------------------------------
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([MYSQL_CHECK_NDBCLUSTER], [
AC_ARG_WITH([ndbcluster],
[
--with-ndbcluster Include the NDB Cluster table handler],
[ndbcluster="$withval"],
[ndbcluster=no])
AC_MSG_CHECKING([for NDB Cluster])
have_ndbcluster=no
ndbcluster_includes=
ndbcluster_libs=
ndb_mgmclient_libs=
case "$ndbcluster" in
yes )
AC_MSG_RESULT([Using NDB Cluster])
AC_DEFINE([HAVE_NDBCLUSTER_DB], [1], [Using Ndb Cluster DB])
have_ndbcluster="yes"
ndbcluster_includes="-I\$(top_builddir)/ndb/include -I\$(top_srcdir)/ndb/include -I\$(top_srcdir)/ndb/include/ndbapi -I\$(top_srcdir)/ndb/include/mgmapi"
ndbcluster_libs="\$(top_builddir)/ndb/src/.libs/libndbclient.a"
ndbcluster_system_libs=""
ndb_mgmclient_libs="\$(top_builddir)/ndb/src/mgmclient/libndbmgmclient.la"
MYSQL_CHECK_NDB_OPTIONS
# libndbclient versioning when linked with GNU ld.
if $LD --version 2>/dev/null|grep -q GNU; then
NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/ndb/src/libndb.ver"
AC_CONFIG_FILES(ndb/src/libndb.ver)
fi
AC_SUBST(NDB_LD_VERSION_SCRIPT)
;;
* )
AC_MSG_RESULT([Not using NDB Cluster])
;;
esac
AM_CONDITIONAL([HAVE_NDBCLUSTER_DB], [ test "$have_ndbcluster" = "yes" ])
AC_SUBST(ndbcluster_includes)
AC_SUBST(ndbcluster_libs)
AC_SUBST(ndbcluster_system_libs)
AC_SUBST(ndb_mgmclient_libs)
])
dnl ---------------------------------------------------------------------------
dnl END OF MYSQL_CHECK_NDBCLUSTER SECTION
dnl ---------------------------------------------------------------------------