# 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], [ AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [turn on debugging, default: no])) AC_MSG_CHECKING(whether to enable debugging) AS_IF([test "x$enable_debug" = "xyes"], [ CPPFLAGS="$CPPFLAGS -g -D_DEBUG" AC_MSG_RESULT(yes) ], [ CPPFLAGS="$CPPFLAGS -g -O2 -DDBUG_OFF" AC_MSG_RESULT(no) ] ) ]) dnl Run tests using C++ compiler dnl AC_LANG(C++) 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 CPPFLAGS="$CPPFLAGS -Werror" # 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