From bcff4f2e3520eaf170c282ba03d38ba6a4fa95cf Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 11 Feb 2013 14:23:16 +0100 Subject: initial import --- configure.ac | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 configure.ac (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..7e6764d --- /dev/null +++ b/configure.ac @@ -0,0 +1,67 @@ +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.59) +AC_INIT(mysql-table-sizes-plugin, [dev]) +AC_CANONICAL_TARGET +AC_CONFIG_MACRO_DIR([m4]) + +AM_INIT_AUTOMAKE + +AC_CONFIG_SRCDIR([src/table_sizes.cc]) +AC_CONFIG_HEADER([src/config.h]) + +AC_DEFUN([CHECK_DEBUG], [ + debug_default="no" + AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging + [default=no]],, enable_debug=$debug_default) + AC_MSG_CHECKING(whether to enable debugging) + + if test "x$enable_debug" = "xyes" + then + CPPFLAGS="$CPPFLAGS -g -D_DEBUG" + AC_MSG_RESULT(yes) + else + CPPFLAGS="$CPPFLAGS -g -O2 -DDBUG_OFF" + AC_MSG_RESULT(no) + fi +]) + +dnl Run tests using C++ compiler +dnl AC_LANG(C++) + +#check debug +CHECK_DEBUG + +#check for mysql src +MYSQL_SRC_TEST +MYSQL_PLUGIN_DIR_TEST +#MYSQL_LIB_SERVICES_TEST +AC_SUBST(MYSQL_INC) +AC_SUBST(MYSQL_PLUGIN_DIR) +#AC_SUBST(MYSQL_LIBSERVICES) + +#check for programs +AC_PROG_CC +AC_PROG_LIBTOOL +AC_PROG_CXX +AC_PROG_CPP + +#we can add the following flags for better error catching: -Werror -Wimplicit +CPPFLAGS="$CPPFLAGS -Werror -Wimplicit" +# From MySQL: Disable exceptions as they seams to create problems with gcc and threads. +CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-rtti" + +#make sure we have const +AC_C_CONST +AC_TYPE_SIZE_T + +#subst the relevant variables +AC_SUBST(CPPFLAGS) +AC_SUBST(CXXLAGS) +AC_SUBST(CFLAGS) + +AC_CONFIG_FILES([ + Makefile + src/Makefile +]) +AC_OUTPUT -- cgit v1.2.3