summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac40
1 files changed, 28 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 7e6764d..86fda3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,26 +11,42 @@ AC_CONFIG_SRCDIR([src/table_sizes.cc])
11AC_CONFIG_HEADER([src/config.h]) 11AC_CONFIG_HEADER([src/config.h])
12 12
13AC_DEFUN([CHECK_DEBUG], [ 13AC_DEFUN([CHECK_DEBUG], [
14 debug_default="no" 14 AC_ARG_ENABLE([debug],
15 AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging 15 AS_HELP_STRING([--enable-debug], [turn on debugging, default: no]))
16 [default=no]],, enable_debug=$debug_default) 16
17 AC_MSG_CHECKING(whether to enable debugging) 17 AC_MSG_CHECKING(whether to enable debugging)
18 AS_IF([test "x$enable_debug" = "xyes"],
19 [
20 CPPFLAGS="$CPPFLAGS -g -D_DEBUG"
21 AC_MSG_RESULT(yes)
22 ],
23 [
24 CPPFLAGS="$CPPFLAGS -g -O2 -DDBUG_OFF"
25 AC_MSG_RESULT(no)
26 ]
27 )
28])
18 29
19 if test "x$enable_debug" = "xyes" 30AC_DEFUN([CHECK_FAST_MUTEXES], [
20 then 31 AC_ARG_ENABLE([fast-mutexes],
21 CPPFLAGS="$CPPFLAGS -g -D_DEBUG" 32 AS_HELP_STRING([--enable-fast-mutexes], [compile with fast mutexes, default: no]))
22 AC_MSG_RESULT(yes) 33
23 else 34 AC_MSG_CHECKING(whether to compile with fast mutexes)
24 CPPFLAGS="$CPPFLAGS -g -O2 -DDBUG_OFF" 35 AS_IF([test "x$enable_fast_mutexes" = "xyes"],
25 AC_MSG_RESULT(no) 36 [
26 fi 37 CPPFLAGS="$CPPFLAGS -DMY_PTHREAD_FASTMUTEX=1"
38 AC_MSG_RESULT(yes)
39 ],
40 [ AC_MSG_RESULT(no) ]
41 )
27]) 42])
28 43
44
29dnl Run tests using C++ compiler 45dnl Run tests using C++ compiler
30dnl AC_LANG(C++) 46dnl AC_LANG(C++)
31 47
32#check debug
33CHECK_DEBUG 48CHECK_DEBUG
49CHECK_FAST_MUTEXES
34 50
35#check for mysql src 51#check for mysql src
36MYSQL_SRC_TEST 52MYSQL_SRC_TEST