diff options
| author | manuel <manuel@mausz.at> | 2013-02-11 14:23:16 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2013-02-11 14:23:16 +0100 |
| commit | bcff4f2e3520eaf170c282ba03d38ba6a4fa95cf (patch) | |
| tree | ae902d4d88bae4611f2391fd800cbdbc5a6a0b50 /configure.ac | |
| download | mysql-table_sizes-bcff4f2e3520eaf170c282ba03d38ba6a4fa95cf.tar.gz mysql-table_sizes-bcff4f2e3520eaf170c282ba03d38ba6a4fa95cf.tar.bz2 mysql-table_sizes-bcff4f2e3520eaf170c282ba03d38ba6a4fa95cf.zip | |
initial import
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..7e6764d --- /dev/null +++ b/configure.ac | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | # Process this file with autoconf to produce a configure script. | ||
| 2 | |||
| 3 | AC_PREREQ(2.59) | ||
| 4 | AC_INIT(mysql-table-sizes-plugin, [dev]) | ||
| 5 | AC_CANONICAL_TARGET | ||
| 6 | AC_CONFIG_MACRO_DIR([m4]) | ||
| 7 | |||
| 8 | AM_INIT_AUTOMAKE | ||
| 9 | |||
| 10 | AC_CONFIG_SRCDIR([src/table_sizes.cc]) | ||
| 11 | AC_CONFIG_HEADER([src/config.h]) | ||
| 12 | |||
| 13 | AC_DEFUN([CHECK_DEBUG], [ | ||
| 14 | debug_default="no" | ||
| 15 | AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging | ||
| 16 | [default=no]],, enable_debug=$debug_default) | ||
| 17 | AC_MSG_CHECKING(whether to enable debugging) | ||
| 18 | |||
| 19 | if test "x$enable_debug" = "xyes" | ||
| 20 | then | ||
| 21 | CPPFLAGS="$CPPFLAGS -g -D_DEBUG" | ||
| 22 | AC_MSG_RESULT(yes) | ||
| 23 | else | ||
| 24 | CPPFLAGS="$CPPFLAGS -g -O2 -DDBUG_OFF" | ||
| 25 | AC_MSG_RESULT(no) | ||
| 26 | fi | ||
| 27 | ]) | ||
| 28 | |||
| 29 | dnl Run tests using C++ compiler | ||
| 30 | dnl AC_LANG(C++) | ||
| 31 | |||
| 32 | #check debug | ||
| 33 | CHECK_DEBUG | ||
| 34 | |||
| 35 | #check for mysql src | ||
| 36 | MYSQL_SRC_TEST | ||
| 37 | MYSQL_PLUGIN_DIR_TEST | ||
| 38 | #MYSQL_LIB_SERVICES_TEST | ||
| 39 | AC_SUBST(MYSQL_INC) | ||
| 40 | AC_SUBST(MYSQL_PLUGIN_DIR) | ||
| 41 | #AC_SUBST(MYSQL_LIBSERVICES) | ||
| 42 | |||
| 43 | #check for programs | ||
| 44 | AC_PROG_CC | ||
| 45 | AC_PROG_LIBTOOL | ||
| 46 | AC_PROG_CXX | ||
| 47 | AC_PROG_CPP | ||
| 48 | |||
| 49 | #we can add the following flags for better error catching: -Werror -Wimplicit | ||
| 50 | CPPFLAGS="$CPPFLAGS -Werror -Wimplicit" | ||
| 51 | # From MySQL: Disable exceptions as they seams to create problems with gcc and threads. | ||
| 52 | CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-rtti" | ||
| 53 | |||
| 54 | #make sure we have const | ||
| 55 | AC_C_CONST | ||
| 56 | AC_TYPE_SIZE_T | ||
| 57 | |||
| 58 | #subst the relevant variables | ||
| 59 | AC_SUBST(CPPFLAGS) | ||
| 60 | AC_SUBST(CXXLAGS) | ||
| 61 | AC_SUBST(CFLAGS) | ||
| 62 | |||
| 63 | AC_CONFIG_FILES([ | ||
| 64 | Makefile | ||
| 65 | src/Makefile | ||
| 66 | ]) | ||
| 67 | AC_OUTPUT | ||
