blob: 7e6764d282c7038154bd800ea6f9488fc17c9143 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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
|